From dae823600d58346b5e7d38e95d9fa20157be1830 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 22 Apr 2025 22:07:09 +0000
Subject: [PATCH 1/2] SDK regeneration
---
.editorconfig | 35 +
reference.md | 11478 ----------------
.../Core/Json/DateOnlyJsonTests.cs | 76 +
.../Core/Json/DateTimeJsonTests.cs | 110 +
.../Core/{ => Json}/EnumSerializerTests.cs | 3 +-
.../Core/Json/JsonAccessAttributeTests.cs | 160 +
.../Core/{ => Json}/OneOfSerializerTests.cs | 42 +-
.../Core/QueryStringConverterTests.cs | 122 +
src/Merge.Client.Test/Core/RawClientTests.cs | 105 -
.../RawClientTests/AdditionalHeadersTests.cs | 137 +
.../AdditionalParametersTests.cs | 300 +
.../Core/RawClientTests/MultipartFormTests.cs | 1120 ++
.../Core/RawClientTests/RetriesTests.cs | 214 +
.../Merge.Client.Test.csproj | 13 +-
.../Utils/JsonElementComparer.cs | 236 +
.../Utils/NUnitExtensions.cs | 28 +
src/Merge.Client.Test/Utils/OneOfComparer.cs | 43 +
.../Utils/ReadOnlyMemoryComparer.cs | 87 +
src/Merge.Client.sln | 20 +-
.../AccountDetails/AccountDetailsClient.cs | 29 +-
.../AccountToken/AccountTokenClient.cs | 34 +-
.../Accounting/AccountingClient.cs | 6 +
.../AccountingPeriodsClient.cs | 67 +-
.../Requests/AccountingPeriodsListRequest.cs | 7 +
.../AccountingPeriodsRetrieveRequest.cs | 9 +
.../Accounting/Accounts/AccountsClient.cs | 132 +-
.../Requests/AccountEndpointRequest.cs | 5 +
.../Accounts/Requests/AccountsListRequest.cs | 23 +
.../Requests/AccountsRetrieveRequest.cs | 12 +
.../Accounting/Addresses/AddressesClient.cs | 38 +-
.../Requests/AddressesRetrieveRequest.cs | 11 +
.../AsyncPassthroughClient.cs | 63 +-
.../Accounting/AsyncTasks/AsyncTasksClient.cs | 34 +-
.../Attachments/AttachmentsClient.cs | 128 +-
.../AccountingAttachmentEndpointRequest.cs | 5 +
.../Requests/AttachmentsListRequest.cs | 13 +
.../Requests/AttachmentsRetrieveRequest.cs | 9 +
.../Accounting/AuditTrail/AuditTrailClient.cs | 29 +-
.../Requests/AuditTrailListRequest.cs | 10 +-
.../AvailableActionsClient.cs | 29 +-
.../BalanceSheets/BalanceSheetsClient.cs | 67 +-
.../Requests/BalanceSheetsListRequest.cs | 14 +
.../Requests/BalanceSheetsRetrieveRequest.cs | 10 +
.../BankFeedAccountsClient.cs | 128 +-
.../BankFeedAccountEndpointRequest.cs | 5 +
.../Requests/BankFeedAccountsListRequest.cs | 7 +
.../BankFeedAccountsRetrieveRequest.cs | 9 +
.../BankFeedTransactionsClient.cs | 128 +-
.../BankFeedTransactionEndpointRequest.cs | 5 +
.../BankFeedTransactionsListRequest.cs | 14 +
.../BankFeedTransactionsRetrieveRequest.cs | 10 +
.../CashFlowStatementsClient.cs | 67 +-
.../Requests/CashFlowStatementsListRequest.cs | 14 +
.../CashFlowStatementsRetrieveRequest.cs | 10 +
.../CompanyInfo/CompanyInfoClient.cs | 67 +-
.../Requests/CompanyInfoListRequest.cs | 13 +
.../Requests/CompanyInfoRetrieveRequest.cs | 10 +
.../Accounting/Contacts/ContactsClient.cs | 157 +-
.../Requests/ContactEndpointRequest.cs | 5 +
.../Contacts/Requests/ContactsListRequest.cs | 21 +
.../ContactsRemoteFieldClassesListRequest.cs | 8 +
.../Requests/ContactsRetrieveRequest.cs | 13 +
.../CreditNotes/CreditNotesClient.cs | 128 +-
.../Requests/CreditNoteEndpointRequest.cs | 5 +
.../Requests/CreditNotesListRequest.cs | 18 +
.../Requests/CreditNotesRetrieveRequest.cs | 12 +
.../DeleteAccount/DeleteAccountClient.cs | 27 +-
.../Accounting/Employees/EmployeesClient.cs | 67 +-
.../Requests/EmployeesListRequest.cs | 8 +
.../Requests/EmployeesRetrieveRequest.cs | 10 +
.../Accounting/Expenses/ExpensesClient.cs | 186 +-
.../Requests/ExpenseEndpointRequest.cs | 5 +
...ensesLinesRemoteFieldClassesListRequest.cs | 8 +
.../Expenses/Requests/ExpensesListRequest.cs | 17 +
.../ExpensesRemoteFieldClassesListRequest.cs | 8 +
.../Requests/ExpensesRetrieveRequest.cs | 11 +
.../FieldMapping/FieldMappingClient.cs | 195 +-
.../Requests/CreateFieldMappingRequest.cs | 9 +
.../Requests/FieldMappingsRetrieveRequest.cs | 3 +
.../PatchedEditFieldMappingRequest.cs | 1 +
.../Requests/RemoteFieldsRetrieveRequest.cs | 4 +
.../ForceResync/ForceResyncClient.cs | 31 +-
.../GeneralLedgerTransactionsClient.cs | 67 +-
.../GeneralLedgerTransactionsListRequest.cs | 16 +
...eneralLedgerTransactionsRetrieveRequest.cs | 10 +
.../GenerateKey/GenerateKeyClient.cs | 29 +-
.../Requests/GenerateRemoteKeyRequest.cs | 1 +
.../IncomeStatementsClient.cs | 67 +-
.../Requests/IncomeStatementsListRequest.cs | 14 +
.../IncomeStatementsRetrieveRequest.cs | 10 +
.../Accounting/Invoices/InvoicesClient.cs | 259 +-
.../Requests/InvoiceEndpointRequest.cs | 5 +
...sLineItemsRemoteFieldClassesListRequest.cs | 8 +
.../Invoices/Requests/InvoicesListRequest.cs | 41 +-
.../InvoicesRemoteFieldClassesListRequest.cs | 8 +
.../Requests/InvoicesRetrieveRequest.cs | 13 +
.../Requests/PatchedInvoiceEndpointRequest.cs | 5 +
.../Types/InvoicesListRequestExpand.cs | 9530 ++++++++++++-
.../Types/InvoicesRetrieveRequestExpand.cs | 9530 ++++++++++++-
.../Accounting/Issues/IssuesClient.cs | 63 +-
.../Issues/Requests/IssuesListRequest.cs | 20 +-
.../Accounting/Items/ItemsClient.cs | 67 +-
.../Items/Requests/ItemsListRequest.cs | 16 +
.../Items/Requests/ItemsRetrieveRequest.cs | 12 +
.../JournalEntries/JournalEntriesClient.cs | 186 +-
...triesLinesRemoteFieldClassesListRequest.cs | 8 +
.../Requests/JournalEntriesListRequest.cs | 17 +
...nalEntriesRemoteFieldClassesListRequest.cs | 8 +
.../Requests/JournalEntriesRetrieveRequest.cs | 11 +
.../Requests/JournalEntryEndpointRequest.cs | 5 +
.../Accounting/LinkToken/LinkTokenClient.cs | 29 +-
.../Requests/EndUserDetailsRequest.cs | 1 +
.../LinkedAccounts/LinkedAccountsClient.cs | 29 +-
.../Requests/LinkedAccountsListRequest.cs | 29 +-
.../Passthrough/PassthroughClient.cs | 29 +-
.../PaymentMethods/PaymentMethodsClient.cs | 146 +
.../Requests/PaymentMethodsListRequest.cs | 43 +
.../Requests/PaymentMethodsRetrieveRequest.cs | 25 +
.../PaymentTerms/PaymentTermsClient.cs | 154 +
.../Requests/PaymentTermsListRequest.cs | 49 +
.../Requests/PaymentTermsRetrieveRequest.cs | 31 +
.../Accounting/Payments/PaymentsClient.cs | 257 +-
.../Requests/PatchedPaymentEndpointRequest.cs | 5 +
.../Requests/PaymentEndpointRequest.cs | 5 +
...sLineItemsRemoteFieldClassesListRequest.cs | 8 +
.../Payments/Requests/PaymentsListRequest.cs | 19 +
.../PaymentsRemoteFieldClassesListRequest.cs | 8 +
.../Requests/PaymentsRetrieveRequest.cs | 11 +
.../Types/PaymentsListRequestExpand.cs | 212 +
.../Types/PaymentsRetrieveRequestExpand.cs | 212 +
.../PhoneNumbers/PhoneNumbersClient.cs | 38 +-
.../Requests/PhoneNumbersRetrieveRequest.cs | 9 +
.../PurchaseOrders/PurchaseOrdersClient.cs | 186 +-
.../Requests/PurchaseOrderEndpointRequest.cs | 5 +
...sLineItemsRemoteFieldClassesListRequest.cs | 8 +
.../Requests/PurchaseOrdersListRequest.cs | 19 +
...haseOrdersRemoteFieldClassesListRequest.cs | 8 +
.../Requests/PurchaseOrdersRetrieveRequest.cs | 13 +
.../Types/PurchaseOrdersListRequestExpand.cs | 212 +
.../PurchaseOrdersRetrieveRequestExpand.cs | 212 +
.../RegenerateKey/RegenerateKeyClient.cs | 29 +-
.../RemoteKeyForRegenerationRequest.cs | 1 +
...ountCommonModelScopeDeserializerRequest.cs | 1 +
.../Accounting/Scopes/ScopesClient.cs | 87 +-
.../Requests/SyncStatusListRequest.cs | 4 +
.../Accounting/SyncStatus/SyncStatusClient.cs | 31 +-
.../TaxRates/Requests/TaxRatesListRequest.cs | 20 +
.../Requests/TaxRatesRetrieveRequest.cs | 10 +
.../Accounting/TaxRates/TaxRatesClient.cs | 71 +-
.../Requests/TrackingCategoriesListRequest.cs | 22 +
.../TrackingCategoriesRetrieveRequest.cs | 12 +
.../TrackingCategoriesClient.cs | 71 +-
.../Requests/TransactionsListRequest.cs | 16 +
.../Requests/TransactionsRetrieveRequest.cs | 10 +
.../Transactions/TransactionsClient.cs | 67 +-
src/Merge.Client/Accounting/Types/Account.cs | 687 +-
.../Accounting/Types/AccountDetails.cs | 22 +
.../Types/AccountDetailsAndActions.cs | 20 +
.../AccountDetailsAndActionsIntegration.cs | 12 +
.../Accounting/Types/AccountIntegration.cs | 15 +
.../Accounting/Types/AccountRequest.cs | 683 +-
.../Accounting/Types/AccountResponse.cs | 12 +
.../Accounting/Types/AccountToken.cs | 15 +
.../Accounting/Types/AccountingAttachment.cs | 26 +
.../Types/AccountingAttachmentRequest.cs | 22 +
.../Types/AccountingAttachmentResponse.cs | 12 +
.../Accounting/Types/AccountingPeriod.cs | 25 +
.../Accounting/Types/AccountingPhoneNumber.cs | 22 +
.../Types/AccountingPhoneNumberRequest.cs | 22 +
src/Merge.Client/Accounting/Types/Address.cs | 525 +-
.../Accounting/Types/AddressRequest.cs | 524 +-
.../Accounting/Types/AdvancedMetadata.cs | 12 +
.../Types/AsyncPassthroughReciept.cs | 12 +
.../Accounting/Types/AsyncPostTask.cs | 12 +
.../Accounting/Types/AsyncPostTaskResult.cs | 12 +
.../Accounting/Types/AuditLogEvent.cs | 109 +-
.../Accounting/Types/AvailableActions.cs | 20 +
.../Accounting/Types/BalanceSheet.cs | 641 +-
.../Accounting/Types/BankFeedAccount.cs | 644 +-
.../Types/BankFeedAccountRequest.cs | 642 +-
.../Types/BankFeedAccountResponse.cs | 12 +
.../Accounting/Types/BankFeedTransaction.cs | 29 +-
.../BankFeedTransactionRequestRequest.cs | 26 +-
.../Types/BankFeedTransactionResponse.cs | 12 +
.../Accounting/Types/CashFlowStatement.cs | 641 +-
.../Accounting/Types/CommonModelScopeApi.cs | 12 +
.../Types/CommonModelScopesBodyRequest.cs | 12 +
.../Accounting/Types/CompanyInfo.cs | 638 +-
src/Merge.Client/Accounting/Types/Contact.cs | 33 +-
.../Accounting/Types/ContactRequest.cs | 29 +-
.../Accounting/Types/ContactResponse.cs | 12 +
.../Accounting/Types/CreditNote.cs | 644 +-
.../Types/CreditNoteApplyLineForCreditNote.cs | 23 +
...CreditNoteApplyLineForCreditNoteRequest.cs | 22 +
.../Types/CreditNoteApplyLineForInvoice.cs | 23 +
.../Accounting/Types/CreditNoteLineItem.cs | 24 +
.../Types/CreditNoteLineItemRequest.cs | 22 +
.../Accounting/Types/CreditNoteRequest.cs | 640 +-
.../Accounting/Types/CreditNoteResponse.cs | 12 +
.../Types/DataPassthroughRequest.cs | 20 +
.../Accounting/Types/DebugModeLog.cs | 12 +
.../Accounting/Types/DebugModelLogSummary.cs | 12 +
src/Merge.Client/Accounting/Types/Employee.cs | 34 +-
.../Types/ErrorValidationProblem.cs | 12 +
.../Accounting/Types/EventTypeEnum.cs | 3 +
src/Merge.Client/Accounting/Types/Expense.cs | 641 +-
.../Accounting/Types/ExpenseLine.cs | 636 +-
.../Accounting/Types/ExpenseLineRequest.cs | 635 +-
.../Accounting/Types/ExpenseRequest.cs | 637 +-
.../Accounting/Types/ExpenseResponse.cs | 12 +
.../Types/ExternalTargetFieldApi.cs | 15 +
.../Types/ExternalTargetFieldApiResponse.cs | 18 +
.../Types/FieldMappingApiInstance.cs | 16 +
.../FieldMappingApiInstanceRemoteField.cs | 12 +
...piInstanceRemoteFieldRemoteEndpointInfo.cs | 12 +
.../Types/FieldMappingApiInstanceResponse.cs | 18 +
.../FieldMappingApiInstanceTargetField.cs | 12 +
.../Types/FieldMappingInstanceResponse.cs | 12 +
.../Types/FieldPermissionDeserializer.cs | 12 +
.../FieldPermissionDeserializerRequest.cs | 12 +
.../Types/GeneralLedgerTransaction.cs | 45 +-
.../Types/GeneralLedgerTransactionLine.cs | 1250 +-
.../Accounting/Types/IncomeStatement.cs | 642 +-
.../IndividualCommonModelScopeDeserializer.cs | 12 +
...dualCommonModelScopeDeserializerRequest.cs | 12 +
src/Merge.Client/Accounting/Types/Invoice.cs | 667 +-
.../Accounting/Types/InvoiceLineItem.cs | 638 +-
.../Types/InvoiceLineItemRequest.cs | 635 +-
.../Accounting/Types/InvoiceRequest.cs | 660 +-
.../Accounting/Types/InvoiceResponse.cs | 12 +
src/Merge.Client/Accounting/Types/Issue.cs | 20 +-
src/Merge.Client/Accounting/Types/Item.cs | 30 +-
.../Accounting/Types/ItemSchema.cs | 12 +
.../Accounting/Types/JournalEntry.cs | 648 +-
.../Accounting/Types/JournalEntryRequest.cs | 639 +-
.../Accounting/Types/JournalEntryResponse.cs | 12 +
.../Accounting/Types/JournalLine.cs | 637 +-
.../Accounting/Types/JournalLineRequest.cs | 635 +-
...tusStatusEnum.cs => LastSyncResultEnum.cs} | 4 +-
.../Accounting/Types/LinkToken.cs | 12 +
.../Accounting/Types/LinkedAccountStatus.cs | 12 +
.../Accounting/Types/MetaResponse.cs | 12 +
.../Accounting/Types/MethodTypeEnum.cs | 24 +
.../Accounting/Types/ModelOperation.cs | 20 +
.../Types/ModelPermissionDeserializer.cs | 12 +
.../ModelPermissionDeserializerRequest.cs | 12 +
.../Types/MultipartFormFieldRequest.cs | 26 +-
.../PaginatedAccountDetailsAndActionsList.cs | 12 +
.../Accounting/Types/PaginatedAccountList.cs | 12 +
.../PaginatedAccountingAttachmentList.cs | 12 +
.../Types/PaginatedAccountingPeriodList.cs | 12 +
.../Types/PaginatedAuditLogEventList.cs | 12 +
.../Types/PaginatedBalanceSheetList.cs | 12 +
.../Types/PaginatedBankFeedAccountList.cs | 12 +
.../Types/PaginatedBankFeedTransactionList.cs | 12 +
.../Types/PaginatedCashFlowStatementList.cs | 12 +
.../Types/PaginatedCompanyInfoList.cs | 12 +
.../Accounting/Types/PaginatedContactList.cs | 12 +
.../Types/PaginatedCreditNoteList.cs | 12 +
.../Accounting/Types/PaginatedEmployeeList.cs | 12 +
.../Accounting/Types/PaginatedExpenseList.cs | 12 +
.../PaginatedGeneralLedgerTransactionList.cs | 12 +
.../Types/PaginatedIncomeStatementList.cs | 12 +
.../Accounting/Types/PaginatedInvoiceList.cs | 12 +
.../Accounting/Types/PaginatedIssueList.cs | 12 +
.../Accounting/Types/PaginatedItemList.cs | 12 +
.../Types/PaginatedJournalEntryList.cs | 12 +
.../Accounting/Types/PaginatedPaymentList.cs | 12 +
.../Types/PaginatedPaymentMethodList.cs | 33 +
.../Types/PaginatedPaymentTermList.cs | 33 +
.../Types/PaginatedPurchaseOrderList.cs | 12 +
.../Types/PaginatedRemoteFieldClassList.cs | 12 +
.../Types/PaginatedSyncStatusList.cs | 12 +
.../Accounting/Types/PaginatedTaxRateList.cs | 12 +
.../Types/PaginatedTrackingCategoryList.cs | 12 +
.../Types/PaginatedTransactionList.cs | 12 +
.../Types/PaginatedVendorCreditList.cs | 12 +
.../Accounting/Types/PatchedPaymentRequest.cs | 645 +-
src/Merge.Client/Accounting/Types/Payment.cs | 649 +-
.../Accounting/Types/PaymentLineItem.cs | 23 +
.../Types/PaymentLineItemRequest.cs | 23 +
.../Accounting/Types/PaymentMethod.cs | 94 +
.../Accounting/Types/PaymentRequest.cs | 645 +-
.../Accounting/Types/PaymentResponse.cs | 12 +
.../Accounting/Types/PaymentTerm.cs | 102 +
.../Accounting/Types/PurchaseOrder.cs | 658 +-
.../Accounting/Types/PurchaseOrderLineItem.cs | 637 +-
.../Types/PurchaseOrderLineItemRequest.cs | 635 +-
.../Accounting/Types/PurchaseOrderRequest.cs | 651 +-
.../Accounting/Types/PurchaseOrderResponse.cs | 12 +
.../Accounting/Types/RemoteData.cs | 21 +
.../Accounting/Types/RemoteEndpointInfo.cs | 12 +
.../Accounting/Types/RemoteField.cs | 14 +-
.../Accounting/Types/RemoteFieldApi.cs | 13 +
.../Types/RemoteFieldApiResponse.cs | 18 +
.../Accounting/Types/RemoteFieldClass.cs | 12 +
.../Accounting/Types/RemoteFieldRequest.cs | 12 +
.../Accounting/Types/RemoteKey.cs | 20 +
.../Accounting/Types/RemoteResponse.cs | 20 +
.../Accounting/Types/ReportItem.cs | 23 +
.../Accounting/Types/StatusFd5Enum.cs | 27 +
.../Accounting/Types/SyncStatus.cs | 28 +-
.../Accounting/Types/TaxComponent.cs | 28 +-
src/Merge.Client/Accounting/Types/TaxRate.cs | 30 +-
.../Accounting/Types/TrackingCategory.cs | 33 +-
.../Accounting/Types/Transaction.cs | 646 +-
.../Accounting/Types/TransactionLineItem.cs | 636 +-
.../Types/ValidationProblemSource.cs | 12 +
.../Accounting/Types/VendorCredit.cs | 639 +-
.../Types/VendorCreditApplyLineForInvoice.cs | 23 +
.../VendorCreditApplyLineForVendorCredit.cs | 23 +
...orCreditApplyLineForVendorCreditRequest.cs | 22 +
.../Accounting/Types/VendorCreditLine.cs | 24 +
.../Types/VendorCreditLineRequest.cs | 22 +
.../Accounting/Types/VendorCreditRequest.cs | 634 +-
.../Accounting/Types/VendorCreditResponse.cs | 12 +
.../Types/WarningValidationProblem.cs | 12 +
.../Accounting/Types/WebhookReceiver.cs | 12 +
.../Requests/VendorCreditEndpointRequest.cs | 5 +
.../Requests/VendorCreditsListRequest.cs | 16 +
.../Requests/VendorCreditsRetrieveRequest.cs | 10 +
.../VendorCredits/VendorCreditsClient.cs | 128 +-
.../Requests/WebhookReceiverRequest.cs | 1 +
.../WebhookReceiversClient.cs | 58 +-
.../AccountDetails/AccountDetailsClient.cs | 29 +-
.../Ats/AccountToken/AccountTokenClient.cs | 34 +-
.../Ats/Activities/ActivitiesClient.cs | 132 +-
.../Requests/ActivitiesListRequest.cs | 16 +
.../Requests/ActivitiesRetrieveRequest.cs | 12 +
.../Requests/ActivityEndpointRequest.cs | 6 +
.../Ats/Applications/ApplicationsClient.cs | 173 +-
.../Requests/ApplicationEndpointRequest.cs | 6 +
.../Requests/ApplicationsListRequest.cs | 19 +
.../ApplicationsMetaPostRetrieveRequest.cs | 3 +
.../Requests/ApplicationsRetrieveRequest.cs | 10 +
.../Requests/UpdateApplicationStageRequest.cs | 6 +
.../AsyncPassthroughClient.cs | 63 +-
.../Ats/Attachments/AttachmentsClient.cs | 132 +-
.../Requests/AttachmentEndpointRequest.cs | 6 +
.../Requests/AttachmentsListRequest.cs | 16 +
.../Requests/AttachmentsRetrieveRequest.cs | 12 +
.../Ats/AuditTrail/AuditTrailClient.cs | 29 +-
.../Requests/AuditTrailListRequest.cs | 10 +-
.../AvailableActionsClient.cs | 29 +-
.../Ats/Candidates/CandidatesClient.cs | 239 +-
.../Requests/CandidateEndpointRequest.cs | 6 +
.../Requests/CandidatesListRequest.cs | 17 +
.../Requests/CandidatesRetrieveRequest.cs | 10 +
.../Requests/IgnoreCommonModelRequest.cs | 1 +
.../PatchedCandidateEndpointRequest.cs | 6 +
.../Ats/DeleteAccount/DeleteAccountClient.cs | 27 +-
.../Ats/Departments/DepartmentsClient.cs | 67 +-
.../Requests/DepartmentsListRequest.cs | 12 +
.../Requests/DepartmentsRetrieveRequest.cs | 9 +
src/Merge.Client/Ats/Eeocs/EeocsClient.cs | 67 +-
.../Ats/Eeocs/Requests/EeocsListRequest.cs | 16 +
.../Eeocs/Requests/EeocsRetrieveRequest.cs | 12 +
.../Ats/FieldMapping/FieldMappingClient.cs | 195 +-
.../Requests/CreateFieldMappingRequest.cs | 9 +
.../Requests/FieldMappingsRetrieveRequest.cs | 3 +
.../PatchedEditFieldMappingRequest.cs | 1 +
.../Requests/RemoteFieldsRetrieveRequest.cs | 4 +
.../Ats/ForceResync/ForceResyncClient.cs | 31 +-
.../Ats/GenerateKey/GenerateKeyClient.cs | 29 +-
.../Requests/GenerateRemoteKeyRequest.cs | 1 +
.../Ats/Interviews/InterviewsClient.cs | 132 +-
.../Requests/InterviewsListRequest.cs | 19 +
.../Requests/InterviewsRetrieveRequest.cs | 12 +
.../ScheduledInterviewEndpointRequest.cs | 6 +
src/Merge.Client/Ats/Issues/IssuesClient.cs | 63 +-
.../Ats/Issues/Requests/IssuesListRequest.cs | 20 +-
.../JobInterviewStagesClient.cs | 67 +-
.../Requests/JobInterviewStagesListRequest.cs | 14 +
.../JobInterviewStagesRetrieveRequest.cs | 10 +
.../Ats/JobPostings/JobPostingsClient.cs | 67 +-
.../Requests/JobPostingsListRequest.cs | 24 +-
.../Requests/JobPostingsRetrieveRequest.cs | 10 +
src/Merge.Client/Ats/Jobs/JobsClient.cs | 98 +-
.../Ats/Jobs/Requests/JobsListRequest.cs | 28 +-
.../Ats/Jobs/Requests/JobsRetrieveRequest.cs | 12 +
.../JobsScreeningQuestionsListRequest.cs | 8 +
.../Ats/LinkToken/LinkTokenClient.cs | 29 +-
.../Requests/EndUserDetailsRequest.cs | 1 +
.../LinkedAccounts/LinkedAccountsClient.cs | 29 +-
.../Requests/LinkedAccountsListRequest.cs | 29 +-
src/Merge.Client/Ats/Offers/OffersClient.cs | 67 +-
.../Ats/Offers/Requests/OffersListRequest.cs | 17 +
.../Offers/Requests/OffersRetrieveRequest.cs | 12 +
src/Merge.Client/Ats/Offices/OfficesClient.cs | 67 +-
.../Offices/Requests/OfficesListRequest.cs | 12 +
.../Requests/OfficesRetrieveRequest.cs | 9 +
.../Ats/Passthrough/PassthroughClient.cs | 29 +-
.../Ats/RegenerateKey/RegenerateKeyClient.cs | 29 +-
.../RemoteKeyForRegenerationRequest.cs | 1 +
.../Ats/RejectReasons/RejectReasonsClient.cs | 67 +-
.../Requests/RejectReasonsListRequest.cs | 12 +
.../Requests/RejectReasonsRetrieveRequest.cs | 9 +
...ountCommonModelScopeDeserializerRequest.cs | 1 +
src/Merge.Client/Ats/Scopes/ScopesClient.cs | 87 +-
.../Requests/ScorecardsListRequest.cs | 18 +
.../Requests/ScorecardsRetrieveRequest.cs | 12 +
.../Ats/Scorecards/ScorecardsClient.cs | 67 +-
.../Requests/SyncStatusListRequest.cs | 4 +
.../Ats/SyncStatus/SyncStatusClient.cs | 31 +-
.../Ats/Tags/Requests/TagsListRequest.cs | 12 +
src/Merge.Client/Ats/Tags/TagsClient.cs | 29 +-
src/Merge.Client/Ats/Types/AccountDetails.cs | 22 +
.../Ats/Types/AccountDetailsAndActions.cs | 20 +
.../AccountDetailsAndActionsIntegration.cs | 12 +
.../Ats/Types/AccountIntegration.cs | 15 +
src/Merge.Client/Ats/Types/AccountToken.cs | 15 +
src/Merge.Client/Ats/Types/Activity.cs | 37 +-
src/Merge.Client/Ats/Types/ActivityRequest.cs | 33 +-
.../Ats/Types/ActivityResponse.cs | 12 +
.../Ats/Types/AdvancedMetadata.cs | 12 +
src/Merge.Client/Ats/Types/Application.cs | 26 +
.../Ats/Types/ApplicationRequest.cs | 23 +
.../Ats/Types/ApplicationResponse.cs | 12 +
.../Ats/Types/AsyncPassthroughReciept.cs | 12 +
src/Merge.Client/Ats/Types/Attachment.cs | 36 +-
.../Ats/Types/AttachmentRequest.cs | 32 +-
.../Ats/Types/AttachmentResponse.cs | 12 +
src/Merge.Client/Ats/Types/AuditLogEvent.cs | 109 +-
.../Ats/Types/AvailableActions.cs | 20 +
src/Merge.Client/Ats/Types/Candidate.cs | 24 +
.../Ats/Types/CandidateRequest.cs | 22 +
.../Ats/Types/CandidateResponse.cs | 12 +
.../Ats/Types/CommonModelScopeApi.cs | 12 +
.../Ats/Types/CommonModelScopesBodyRequest.cs | 12 +
.../Ats/Types/DataPassthroughRequest.cs | 20 +
src/Merge.Client/Ats/Types/DebugModeLog.cs | 12 +
.../Ats/Types/DebugModelLogSummary.cs | 12 +
src/Merge.Client/Ats/Types/Department.cs | 25 +
src/Merge.Client/Ats/Types/Eeoc.cs | 63 +-
src/Merge.Client/Ats/Types/EmailAddress.cs | 28 +-
.../Ats/Types/EmailAddressRequest.cs | 27 +-
.../Ats/Types/ErrorValidationProblem.cs | 12 +
src/Merge.Client/Ats/Types/EventTypeEnum.cs | 3 +
.../Ats/Types/ExternalTargetFieldApi.cs | 15 +
.../Types/ExternalTargetFieldApiResponse.cs | 12 +
.../Ats/Types/FieldMappingApiInstance.cs | 16 +
.../FieldMappingApiInstanceRemoteField.cs | 12 +
...piInstanceRemoteFieldRemoteEndpointInfo.cs | 12 +
.../Types/FieldMappingApiInstanceResponse.cs | 12 +
.../FieldMappingApiInstanceTargetField.cs | 12 +
.../Ats/Types/FieldMappingInstanceResponse.cs | 12 +
.../Ats/Types/FieldPermissionDeserializer.cs | 12 +
.../FieldPermissionDeserializerRequest.cs | 12 +
.../IndividualCommonModelScopeDeserializer.cs | 12 +
...dualCommonModelScopeDeserializerRequest.cs | 12 +
src/Merge.Client/Ats/Types/Issue.cs | 20 +-
src/Merge.Client/Ats/Types/Job.cs | 41 +-
.../Ats/Types/JobInterviewStage.cs | 25 +
src/Merge.Client/Ats/Types/JobPosting.cs | 35 +-
...tusStatusEnum.cs => LastSyncResultEnum.cs} | 4 +-
src/Merge.Client/Ats/Types/LinkToken.cs | 12 +
.../Ats/Types/LinkedAccountStatus.cs | 12 +
src/Merge.Client/Ats/Types/MetaResponse.cs | 12 +
src/Merge.Client/Ats/Types/ModelOperation.cs | 20 +
.../Ats/Types/ModelPermissionDeserializer.cs | 12 +
.../ModelPermissionDeserializerRequest.cs | 12 +
.../Ats/Types/MultipartFormFieldRequest.cs | 26 +-
src/Merge.Client/Ats/Types/Offer.cs | 43 +-
src/Merge.Client/Ats/Types/Office.cs | 25 +
.../PaginatedAccountDetailsAndActionsList.cs | 12 +
.../Ats/Types/PaginatedActivityList.cs | 12 +
.../Ats/Types/PaginatedApplicationList.cs | 12 +
.../Ats/Types/PaginatedAttachmentList.cs | 12 +
.../Ats/Types/PaginatedAuditLogEventList.cs | 12 +
.../Ats/Types/PaginatedCandidateList.cs | 12 +
.../Ats/Types/PaginatedDepartmentList.cs | 12 +
.../Ats/Types/PaginatedEeocList.cs | 12 +
.../Ats/Types/PaginatedIssueList.cs | 12 +
.../Types/PaginatedJobInterviewStageList.cs | 12 +
.../Ats/Types/PaginatedJobList.cs | 12 +
.../Ats/Types/PaginatedJobPostingList.cs | 12 +
.../Ats/Types/PaginatedOfferList.cs | 12 +
.../Ats/Types/PaginatedOfficeList.cs | 12 +
.../Ats/Types/PaginatedRejectReasonList.cs | 12 +
.../Ats/Types/PaginatedRemoteUserList.cs | 12 +
.../Types/PaginatedScheduledInterviewList.cs | 12 +
.../Ats/Types/PaginatedScorecardList.cs | 12 +
.../Types/PaginatedScreeningQuestionList.cs | 12 +
.../Ats/Types/PaginatedSyncStatusList.cs | 12 +
.../Ats/Types/PaginatedTagList.cs | 12 +
.../Ats/Types/PatchedCandidateRequest.cs | 22 +
src/Merge.Client/Ats/Types/PhoneNumber.cs | 32 +-
.../Ats/Types/PhoneNumberRequest.cs | 31 +-
src/Merge.Client/Ats/Types/RejectReason.cs | 25 +
src/Merge.Client/Ats/Types/RemoteData.cs | 21 +
.../Ats/Types/RemoteEndpointInfo.cs | 12 +
src/Merge.Client/Ats/Types/RemoteFieldApi.cs | 13 +
.../Ats/Types/RemoteFieldApiResponse.cs | 12 +
src/Merge.Client/Ats/Types/RemoteKey.cs | 20 +
src/Merge.Client/Ats/Types/RemoteResponse.cs | 20 +
src/Merge.Client/Ats/Types/RemoteUser.cs | 35 +-
.../Ats/Types/ScheduledInterview.cs | 31 +-
.../Ats/Types/ScheduledInterviewRequest.cs | 27 +-
.../Ats/Types/ScheduledInterviewResponse.cs | 12 +
src/Merge.Client/Ats/Types/Scorecard.cs | 35 +-
.../Ats/Types/ScreeningQuestion.cs | 39 +-
.../Ats/Types/ScreeningQuestionAnswer.cs | 24 +
.../Types/ScreeningQuestionAnswerRequest.cs | 22 +
.../Ats/Types/ScreeningQuestionOption.cs | 23 +
src/Merge.Client/Ats/Types/StatusFd5Enum.cs | 27 +
src/Merge.Client/Ats/Types/SyncStatus.cs | 28 +-
src/Merge.Client/Ats/Types/Tag.cs | 23 +
src/Merge.Client/Ats/Types/Url.cs | 36 +-
src/Merge.Client/Ats/Types/UrlRequest.cs | 35 +-
.../Ats/Types/ValidationProblemSource.cs | 12 +
.../Ats/Types/WarningValidationProblem.cs | 12 +
src/Merge.Client/Ats/Types/WebhookReceiver.cs | 12 +
.../Ats/Users/Requests/UsersListRequest.cs | 15 +
.../Users/Requests/UsersRetrieveRequest.cs | 11 +
src/Merge.Client/Ats/Users/UsersClient.cs | 67 +-
.../Requests/WebhookReceiverRequest.cs | 1 +
.../WebhookReceiversClient.cs | 58 +-
.../{Merge.cs => BaseMergeClient.cs} | 18 +-
src/Merge.Client/Core/ApiResponse.cs | 13 +
src/Merge.Client/Core/BaseRequest.cs | 63 +
.../Core/CollectionItemSerializer.cs | 4 +-
src/Merge.Client/Core/DateOnlyConverter.cs | 748 +
src/Merge.Client/Core/DateTimeSerializer.cs | 2 +-
src/Merge.Client/Core/EmptyRequest.cs | 11 +
src/Merge.Client/Core/EncodingCache.cs | 11 +
src/Merge.Client/Core/EnumSerializer.cs | 6 +-
src/Merge.Client/Core/FormUrlEncoder.cs | 33 +
src/Merge.Client/Core/Headers.cs | 17 +-
src/Merge.Client/Core/IIsRetryableContent.cs | 6 +
src/Merge.Client/Core/IRequestOptions.cs | 68 +-
src/Merge.Client/Core/JsonAccessAttribute.cs | 13 +
src/Merge.Client/Core/JsonConfiguration.cs | 135 +-
src/Merge.Client/Core/JsonRequest.cs | 36 +
src/Merge.Client/Core/MultipartFormRequest.cs | 275 +
src/Merge.Client/Core/OneOfSerializer.cs | 8 +-
...tion.cs => BaseMergeClientApiException.cs} | 4 +-
...nment.cs => BaseMergeClientEnvironment.cs} | 2 +-
...ception.cs => BaseMergeClientException.cs} | 2 +-
src/Merge.Client/Core/Public/ClientOptions.cs | 53 +-
src/Merge.Client/Core/Public/FileParameter.cs | 63 +
.../Core/Public/RequestOptions.cs | 73 +-
src/Merge.Client/Core/Public/Version.cs | 2 +-
src/Merge.Client/Core/QueryStringConverter.cs | 229 +
src/Merge.Client/Core/RawClient.cs | 393 +-
src/Merge.Client/Core/StreamRequest.cs | 29 +
src/Merge.Client/Core/ValueConvert.cs | 109 +
.../AccountDetails/AccountDetailsClient.cs | 29 +-
.../Crm/AccountToken/AccountTokenClient.cs | 34 +-
.../Crm/Accounts/AccountsClient.cs | 228 +-
.../Accounts/Requests/AccountsListRequest.cs | 16 +
.../AccountsRemoteFieldClassesListRequest.cs | 9 +
.../Requests/AccountsRetrieveRequest.cs | 11 +
.../Requests/CrmAccountEndpointRequest.cs | 5 +
.../PatchedCrmAccountEndpointRequest.cs | 5 +
.../AssociationTypesClient.cs | 146 +-
.../CrmAssociationTypeEndpointRequest.cs | 5 +
...bjectClassesAssociationTypesListRequest.cs | 13 +
...tClassesAssociationTypesRetrieveRequest.cs | 10 +
.../Crm/Associations/AssociationsClient.cs | 75 +-
...sesCustomObjectsAssociationsListRequest.cs | 14 +
...sCustomObjectsAssociationsUpdateRequest.cs | 4 +
.../AsyncPassthroughClient.cs | 63 +-
.../Crm/AuditTrail/AuditTrailClient.cs | 29 +-
.../Requests/AuditTrailListRequest.cs | 10 +-
.../AvailableActionsClient.cs | 29 +-
.../Crm/Contacts/ContactsClient.cs | 260 +-
.../Contacts/Requests/ContactsListRequest.cs | 17 +
.../ContactsRemoteFieldClassesListRequest.cs | 9 +
.../Requests/ContactsRetrieveRequest.cs | 11 +
.../Requests/CrmContactEndpointRequest.cs | 5 +
.../PatchedCrmContactEndpointRequest.cs | 5 +
.../CustomObjectClassesClient.cs | 67 +-
.../CustomObjectClassesListRequest.cs | 13 +
.../CustomObjectClassesRetrieveRequest.cs | 10 +
.../Crm/CustomObjects/CustomObjectsClient.cs | 175 +-
.../CrmCustomObjectEndpointRequest.cs | 5 +
...omObjectClassesCustomObjectsListRequest.cs | 13 +
...tomObjectsRemoteFieldClassesListRequest.cs | 9 +
...jectClassesCustomObjectsRetrieveRequest.cs | 10 +
.../Crm/DeleteAccount/DeleteAccountClient.cs | 27 +-
.../EngagementTypes/EngagementTypesClient.cs | 96 +-
.../Requests/EngagementTypesListRequest.cs | 13 +
...ementTypesRemoteFieldClassesListRequest.cs | 9 +
.../EngagementTypesRetrieveRequest.cs | 10 +
.../Crm/Engagements/EngagementsClient.cs | 228 +-
.../Requests/EngagementEndpointRequest.cs | 5 +
.../Requests/EngagementsListRequest.cs | 16 +
...ngagementsRemoteFieldClassesListRequest.cs | 9 +
.../Requests/EngagementsRetrieveRequest.cs | 11 +
.../PatchedEngagementEndpointRequest.cs | 5 +
.../Crm/FieldMapping/FieldMappingClient.cs | 195 +-
.../Requests/CreateFieldMappingRequest.cs | 9 +
.../Requests/FieldMappingsRetrieveRequest.cs | 3 +
.../PatchedEditFieldMappingRequest.cs | 1 +
.../Requests/RemoteFieldsRetrieveRequest.cs | 4 +
.../Crm/ForceResync/ForceResyncClient.cs | 31 +-
.../Crm/GenerateKey/GenerateKeyClient.cs | 29 +-
.../Requests/GenerateRemoteKeyRequest.cs | 1 +
src/Merge.Client/Crm/Issues/IssuesClient.cs | 63 +-
.../Crm/Issues/Requests/IssuesListRequest.cs | 20 +-
src/Merge.Client/Crm/Leads/LeadsClient.cs | 157 +-
.../Crm/Leads/Requests/LeadEndpointRequest.cs | 5 +
.../Crm/Leads/Requests/LeadsListRequest.cs | 19 +
.../LeadsRemoteFieldClassesListRequest.cs | 9 +
.../Leads/Requests/LeadsRetrieveRequest.cs | 11 +
.../Crm/LinkToken/LinkTokenClient.cs | 29 +-
.../Requests/EndUserDetailsRequest.cs | 1 +
.../LinkedAccounts/LinkedAccountsClient.cs | 29 +-
.../Requests/LinkedAccountsListRequest.cs | 29 +-
src/Merge.Client/Crm/Notes/NotesClient.cs | 157 +-
.../Crm/Notes/Requests/NoteEndpointRequest.cs | 5 +
.../Crm/Notes/Requests/NotesListRequest.cs | 18 +
.../NotesRemoteFieldClassesListRequest.cs | 9 +
.../Notes/Requests/NotesRetrieveRequest.cs | 11 +
.../Crm/Opportunities/OpportunitiesClient.cs | 228 +-
.../Requests/OpportunitiesListRequest.cs | 27 +-
...ortunitiesRemoteFieldClassesListRequest.cs | 9 +
.../Requests/OpportunitiesRetrieveRequest.cs | 13 +
.../Requests/OpportunityEndpointRequest.cs | 5 +
.../PatchedOpportunityEndpointRequest.cs | 5 +
.../Crm/Passthrough/PassthroughClient.cs | 29 +-
.../Crm/RegenerateKey/RegenerateKeyClient.cs | 29 +-
.../RemoteKeyForRegenerationRequest.cs | 1 +
...ountCommonModelScopeDeserializerRequest.cs | 1 +
src/Merge.Client/Crm/Scopes/ScopesClient.cs | 87 +-
.../Crm/Stages/Requests/StagesListRequest.cs | 13 +
.../StagesRemoteFieldClassesListRequest.cs | 9 +
.../Stages/Requests/StagesRetrieveRequest.cs | 10 +
src/Merge.Client/Crm/Stages/StagesClient.cs | 96 +-
.../Requests/SyncStatusListRequest.cs | 4 +
.../Crm/SyncStatus/SyncStatusClient.cs | 29 +-
.../Requests/PatchedTaskEndpointRequest.cs | 5 +
.../Crm/Tasks/Requests/TaskEndpointRequest.cs | 5 +
.../Crm/Tasks/Requests/TasksListRequest.cs | 14 +
.../TasksRemoteFieldClassesListRequest.cs | 9 +
.../Tasks/Requests/TasksRetrieveRequest.cs | 11 +
src/Merge.Client/Crm/Tasks/TasksClient.cs | 228 +-
src/Merge.Client/Crm/Types/Account.cs | 27 +
src/Merge.Client/Crm/Types/AccountDetails.cs | 22 +
.../Crm/Types/AccountDetailsAndActions.cs | 20 +
.../AccountDetailsAndActionsIntegration.cs | 12 +
.../Crm/Types/AccountIntegration.cs | 15 +
src/Merge.Client/Crm/Types/AccountRequest.cs | 22 +
src/Merge.Client/Crm/Types/AccountToken.cs | 15 +
src/Merge.Client/Crm/Types/Address.cs | 523 +-
src/Merge.Client/Crm/Types/AddressRequest.cs | 523 +-
.../Crm/Types/AdvancedMetadata.cs | 12 +
src/Merge.Client/Crm/Types/Association.cs | 23 +
.../Crm/Types/AssociationSubType.cs | 16 +
src/Merge.Client/Crm/Types/AssociationType.cs | 24 +
.../Types/AssociationTypeRequestRequest.cs | 12 +
.../Crm/Types/AsyncPassthroughReciept.cs | 12 +
src/Merge.Client/Crm/Types/AuditLogEvent.cs | 109 +-
.../Crm/Types/AvailableActions.cs | 20 +
.../Crm/Types/CommonModelScopeApi.cs | 12 +
.../Crm/Types/CommonModelScopesBodyRequest.cs | 12 +
src/Merge.Client/Crm/Types/Contact.cs | 26 +
src/Merge.Client/Crm/Types/ContactRequest.cs | 22 +
.../Crm/Types/CrmAccountResponse.cs | 12 +
.../Crm/Types/CrmAssociationTypeResponse.cs | 12 +
.../Crm/Types/CrmContactResponse.cs | 12 +
.../Crm/Types/CrmCustomObjectResponse.cs | 12 +
src/Merge.Client/Crm/Types/CustomObject.cs | 24 +
.../Crm/Types/CustomObjectClass.cs | 25 +
.../Crm/Types/CustomObjectRequest.cs | 12 +
.../Crm/Types/DataPassthroughRequest.cs | 20 +
src/Merge.Client/Crm/Types/DebugModeLog.cs | 12 +
.../Crm/Types/DebugModelLogSummary.cs | 12 +
src/Merge.Client/Crm/Types/EmailAddress.cs | 21 +
.../Crm/Types/EmailAddressRequest.cs | 21 +
src/Merge.Client/Crm/Types/Engagement.cs | 30 +-
.../Crm/Types/EngagementRequest.cs | 26 +-
.../Crm/Types/EngagementResponse.cs | 12 +
src/Merge.Client/Crm/Types/EngagementType.cs | 29 +-
.../Crm/Types/ErrorValidationProblem.cs | 12 +
src/Merge.Client/Crm/Types/EventTypeEnum.cs | 3 +
.../Crm/Types/ExternalTargetFieldApi.cs | 15 +
.../Types/ExternalTargetFieldApiResponse.cs | 12 +
.../Crm/Types/FieldMappingApiInstance.cs | 16 +
.../FieldMappingApiInstanceRemoteField.cs | 12 +
...piInstanceRemoteFieldRemoteEndpointInfo.cs | 12 +
.../Types/FieldMappingApiInstanceResponse.cs | 12 +
.../FieldMappingApiInstanceTargetField.cs | 12 +
.../Crm/Types/FieldMappingInstanceResponse.cs | 12 +
.../Crm/Types/FieldPermissionDeserializer.cs | 12 +
.../FieldPermissionDeserializerRequest.cs | 12 +
.../Crm/Types/IgnoreCommonModelRequest.cs | 12 +
.../IndividualCommonModelScopeDeserializer.cs | 12 +
...dualCommonModelScopeDeserializerRequest.cs | 12 +
src/Merge.Client/Crm/Types/Issue.cs | 20 +-
src/Merge.Client/Crm/Types/ItemSchema.cs | 12 +
...tusStatusEnum.cs => LastSyncResultEnum.cs} | 4 +-
src/Merge.Client/Crm/Types/Lead.cs | 29 +
src/Merge.Client/Crm/Types/LeadRequest.cs | 22 +
src/Merge.Client/Crm/Types/LeadResponse.cs | 12 +
src/Merge.Client/Crm/Types/LinkToken.cs | 12 +
.../Crm/Types/LinkedAccountStatus.cs | 12 +
src/Merge.Client/Crm/Types/MetaResponse.cs | 12 +
src/Merge.Client/Crm/Types/ModelOperation.cs | 20 +
.../Crm/Types/ModelPermissionDeserializer.cs | 12 +
.../ModelPermissionDeserializerRequest.cs | 12 +
.../Crm/Types/MultipartFormFieldRequest.cs | 26 +-
src/Merge.Client/Crm/Types/Note.cs | 26 +
src/Merge.Client/Crm/Types/NoteRequest.cs | 22 +
src/Merge.Client/Crm/Types/NoteResponse.cs | 12 +
.../Types/ObjectClassDescriptionRequest.cs | 12 +
src/Merge.Client/Crm/Types/Opportunity.cs | 32 +-
.../Crm/Types/OpportunityRequest.cs | 28 +-
.../Crm/Types/OpportunityResponse.cs | 12 +
.../PaginatedAccountDetailsAndActionsList.cs | 12 +
.../Crm/Types/PaginatedAccountList.cs | 12 +
.../Crm/Types/PaginatedAssociationList.cs | 12 +
.../Crm/Types/PaginatedAssociationTypeList.cs | 12 +
.../Crm/Types/PaginatedAuditLogEventList.cs | 12 +
.../Crm/Types/PaginatedContactList.cs | 12 +
.../Types/PaginatedCustomObjectClassList.cs | 12 +
.../Crm/Types/PaginatedCustomObjectList.cs | 12 +
.../Crm/Types/PaginatedEngagementList.cs | 12 +
.../Crm/Types/PaginatedEngagementTypeList.cs | 12 +
.../Crm/Types/PaginatedIssueList.cs | 12 +
.../Crm/Types/PaginatedLeadList.cs | 12 +
.../Crm/Types/PaginatedNoteList.cs | 12 +
.../Crm/Types/PaginatedOpportunityList.cs | 12 +
.../Types/PaginatedRemoteFieldClassList.cs | 12 +
.../Crm/Types/PaginatedStageList.cs | 12 +
.../Crm/Types/PaginatedSyncStatusList.cs | 12 +
.../Crm/Types/PaginatedTaskList.cs | 12 +
.../Crm/Types/PaginatedUserList.cs | 12 +
.../Crm/Types/PatchedAccountRequest.cs | 22 +
.../Crm/Types/PatchedContactRequest.cs | 22 +
.../Crm/Types/PatchedEngagementRequest.cs | 26 +-
.../Crm/Types/PatchedOpportunityRequest.cs | 28 +-
.../Crm/Types/PatchedTaskRequest.cs | 26 +-
src/Merge.Client/Crm/Types/PhoneNumber.cs | 21 +
.../Crm/Types/PhoneNumberRequest.cs | 21 +
src/Merge.Client/Crm/Types/RemoteData.cs | 21 +
.../Crm/Types/RemoteEndpointInfo.cs | 12 +
src/Merge.Client/Crm/Types/RemoteField.cs | 14 +-
src/Merge.Client/Crm/Types/RemoteFieldApi.cs | 13 +
.../Crm/Types/RemoteFieldApiResponse.cs | 12 +
.../Crm/Types/RemoteFieldClass.cs | 12 +
.../Types/RemoteFieldClassFieldChoicesItem.cs | 12 +
.../RemoteFieldClassForCustomObjectClass.cs | 16 +
...assForCustomObjectClassFieldChoicesItem.cs | 12 +
...ieldClassForCustomObjectClassItemSchema.cs | 12 +
.../Crm/Types/RemoteFieldRequest.cs | 12 +
src/Merge.Client/Crm/Types/RemoteKey.cs | 20 +
src/Merge.Client/Crm/Types/RemoteResponse.cs | 20 +
src/Merge.Client/Crm/Types/Stage.cs | 26 +
src/Merge.Client/Crm/Types/StatusFd5Enum.cs | 27 +
src/Merge.Client/Crm/Types/SyncStatus.cs | 28 +-
src/Merge.Client/Crm/Types/Task.cs | 30 +-
src/Merge.Client/Crm/Types/TaskRequest.cs | 26 +-
src/Merge.Client/Crm/Types/TaskResponse.cs | 12 +
src/Merge.Client/Crm/Types/User.cs | 26 +
.../Crm/Types/ValidationProblemSource.cs | 12 +
.../Crm/Types/WarningValidationProblem.cs | 12 +
src/Merge.Client/Crm/Types/WebhookReceiver.cs | 12 +
.../Crm/Users/Requests/UsersListRequest.cs | 14 +
.../UsersRemoteFieldClassesListRequest.cs | 9 +
.../Users/Requests/UsersRetrieveRequest.cs | 10 +
src/Merge.Client/Crm/Users/UsersClient.cs | 128 +-
.../Requests/WebhookReceiverRequest.cs | 1 +
.../WebhookReceiversClient.cs | 58 +-
.../AccountDetails/AccountDetailsClient.cs | 29 +-
.../AccountToken/AccountTokenClient.cs | 34 +-
.../AsyncPassthroughClient.cs | 63 +-
.../AuditTrail/AuditTrailClient.cs | 29 +-
.../Requests/AuditTrailListRequest.cs | 10 +-
.../AvailableActionsClient.cs | 29 +-
.../DeleteAccount/DeleteAccountClient.cs | 27 +-
.../Filestorage/Drives/DrivesClient.cs | 67 +-
.../Drives/Requests/DrivesListRequest.cs | 13 +
.../Drives/Requests/DrivesRetrieveRequest.cs | 9 +
.../FieldMapping/FieldMappingClient.cs | 195 +-
.../Requests/CreateFieldMappingRequest.cs | 9 +
.../Requests/FieldMappingsRetrieveRequest.cs | 3 +
.../PatchedEditFieldMappingRequest.cs | 1 +
.../Requests/RemoteFieldsRetrieveRequest.cs | 4 +
.../Filestorage/Files/FilesClient.cs | 293 +-
.../FileStorageFileEndpointRequest.cs | 5 +
.../FilesDownloadRequestMetaListRequest.cs | 37 +
...FilesDownloadRequestMetaRetrieveRequest.cs | 19 +
.../Requests/FilesDownloadRetrieveRequest.cs | 9 +
.../Files/Requests/FilesListRequest.cs | 17 +
.../Files/Requests/FilesRetrieveRequest.cs | 10 +
.../Filestorage/Folders/FoldersClient.cs | 128 +-
.../FileStorageFolderEndpointRequest.cs | 5 +
.../Folders/Requests/FoldersListRequest.cs | 16 +
.../Requests/FoldersRetrieveRequest.cs | 10 +
.../ForceResync/ForceResyncClient.cs | 31 +-
.../GenerateKey/GenerateKeyClient.cs | 29 +-
.../Requests/GenerateRemoteKeyRequest.cs | 1 +
.../Filestorage/Groups/GroupsClient.cs | 67 +-
.../Groups/Requests/GroupsListRequest.cs | 13 +
.../Groups/Requests/GroupsRetrieveRequest.cs | 10 +
.../Filestorage/Issues/IssuesClient.cs | 63 +-
.../Issues/Requests/IssuesListRequest.cs | 20 +-
.../Filestorage/LinkToken/LinkTokenClient.cs | 29 +-
.../Requests/EndUserDetailsRequest.cs | 1 +
.../LinkedAccounts/LinkedAccountsClient.cs | 29 +-
.../Requests/LinkedAccountsListRequest.cs | 29 +-
.../Passthrough/PassthroughClient.cs | 29 +-
.../RegenerateKey/RegenerateKeyClient.cs | 29 +-
.../RemoteKeyForRegenerationRequest.cs | 1 +
...ountCommonModelScopeDeserializerRequest.cs | 1 +
.../Filestorage/Scopes/ScopesClient.cs | 87 +-
.../Requests/SyncStatusListRequest.cs | 4 +
.../SyncStatus/SyncStatusClient.cs | 29 +-
.../Filestorage/Types/AccountDetails.cs | 22 +
.../Types/AccountDetailsAndActions.cs | 20 +
.../AccountDetailsAndActionsIntegration.cs | 12 +
.../Filestorage/Types/AccountIntegration.cs | 15 +
.../Filestorage/Types/AccountToken.cs | 15 +
.../Filestorage/Types/AdvancedMetadata.cs | 12 +
.../Types/AsyncPassthroughReciept.cs | 12 +
.../Filestorage/Types/AuditLogEvent.cs | 109 +-
.../Filestorage/Types/AvailableActions.cs | 20 +
.../Filestorage/Types/CommonModelScopeApi.cs | 12 +
.../Types/CommonModelScopesBodyRequest.cs | 12 +
.../Types/DataPassthroughRequest.cs | 20 +
.../Filestorage/Types/DebugModeLog.cs | 12 +
.../Filestorage/Types/DebugModelLogSummary.cs | 12 +
.../Filestorage/Types/DownloadRequestMeta.cs | 39 +
src/Merge.Client/Filestorage/Types/Drive.cs | 24 +
.../Types/ErrorValidationProblem.cs | 12 +
.../Filestorage/Types/EventTypeEnum.cs | 3 +
.../Types/ExternalTargetFieldApi.cs | 15 +
.../Types/ExternalTargetFieldApiResponse.cs | 12 +
.../Types/FieldMappingApiInstance.cs | 16 +
.../FieldMappingApiInstanceRemoteField.cs | 12 +
...piInstanceRemoteFieldRemoteEndpointInfo.cs | 12 +
.../Types/FieldMappingApiInstanceResponse.cs | 12 +
.../FieldMappingApiInstanceTargetField.cs | 12 +
.../Types/FieldMappingInstanceResponse.cs | 12 +
.../Types/FieldPermissionDeserializer.cs | 12 +
.../FieldPermissionDeserializerRequest.cs | 12 +
src/Merge.Client/Filestorage/Types/File.cs | 28 +-
.../Filestorage/Types/FileRequest.cs | 21 +
.../Types/FileStorageFileResponse.cs | 12 +
.../Types/FileStorageFolderResponse.cs | 12 +
src/Merge.Client/Filestorage/Types/Folder.cs | 28 +-
.../Filestorage/Types/FolderRequest.cs | 21 +
src/Merge.Client/Filestorage/Types/Group.cs | 25 +
.../IndividualCommonModelScopeDeserializer.cs | 12 +
...dualCommonModelScopeDeserializerRequest.cs | 12 +
src/Merge.Client/Filestorage/Types/Issue.cs | 20 +-
...tusStatusEnum.cs => LastSyncResultEnum.cs} | 4 +-
.../Filestorage/Types/LinkToken.cs | 12 +
.../Filestorage/Types/LinkedAccountStatus.cs | 12 +
.../Filestorage/Types/MetaResponse.cs | 12 +
.../Filestorage/Types/ModelOperation.cs | 20 +
.../Types/ModelPermissionDeserializer.cs | 12 +
.../ModelPermissionDeserializerRequest.cs | 12 +
.../Types/MultipartFormFieldRequest.cs | 26 +-
.../PaginatedAccountDetailsAndActionsList.cs | 12 +
.../Types/PaginatedAuditLogEventList.cs | 12 +
.../Types/PaginatedDownloadRequestMetaList.cs | 33 +
.../Filestorage/Types/PaginatedDriveList.cs | 12 +
.../Filestorage/Types/PaginatedFileList.cs | 12 +
.../Filestorage/Types/PaginatedFolderList.cs | 12 +
.../Filestorage/Types/PaginatedGroupList.cs | 12 +
.../Filestorage/Types/PaginatedIssueList.cs | 12 +
.../Types/PaginatedSyncStatusList.cs | 12 +
.../Filestorage/Types/PaginatedUserList.cs | 12 +
.../Filestorage/Types/Permission.cs | 31 +-
.../Filestorage/Types/PermissionRequest.cs | 30 +-
.../Filestorage/Types/RemoteData.cs | 21 +
.../Filestorage/Types/RemoteEndpointInfo.cs | 12 +
.../Filestorage/Types/RemoteFieldApi.cs | 13 +
.../Types/RemoteFieldApiResponse.cs | 12 +
.../Filestorage/Types/RemoteKey.cs | 20 +
.../Filestorage/Types/RemoteResponse.cs | 20 +
.../Filestorage/Types/StatusFd5Enum.cs | 27 +
.../Filestorage/Types/SyncStatus.cs | 28 +-
src/Merge.Client/Filestorage/Types/User.cs | 24 +
.../Types/ValidationProblemSource.cs | 12 +
.../Types/WarningValidationProblem.cs | 12 +
.../Filestorage/Types/WebhookReceiver.cs | 12 +
.../Users/Requests/UsersListRequest.cs | 13 +
.../Users/Requests/UsersRetrieveRequest.cs | 9 +
.../Filestorage/Users/UsersClient.cs | 67 +-
.../Requests/WebhookReceiverRequest.cs | 1 +
.../WebhookReceiversClient.cs | 58 +-
.../AccountDetails/AccountDetailsClient.cs | 29 +-
.../Hris/AccountToken/AccountTokenClient.cs | 34 +-
.../AsyncPassthroughClient.cs | 63 +-
.../Hris/AuditTrail/AuditTrailClient.cs | 29 +-
.../Requests/AuditTrailListRequest.cs | 10 +-
.../AvailableActionsClient.cs | 29 +-
.../Hris/BankInfo/BankInfoClient.cs | 67 +-
.../BankInfo/Requests/BankInfoListRequest.cs | 23 +-
.../Requests/BankInfoRetrieveRequest.cs | 12 +
.../Hris/Benefits/BenefitsClient.cs | 67 +-
.../Benefits/Requests/BenefitsListRequest.cs | 14 +
.../Requests/BenefitsRetrieveRequest.cs | 10 +
.../Hris/Companies/CompaniesClient.cs | 67 +-
.../Requests/CompaniesListRequest.cs | 12 +
.../Requests/CompaniesRetrieveRequest.cs | 9 +
.../Hris/DeleteAccount/DeleteAccountClient.cs | 27 +-
.../Hris/Dependents/DependentsClient.cs | 67 +-
.../Requests/DependentsListRequest.cs | 13 +
.../Requests/DependentsRetrieveRequest.cs | 10 +
.../EmployeePayrollRunsClient.cs | 67 +-
.../EmployeePayrollRunsListRequest.cs | 19 +
.../EmployeePayrollRunsRetrieveRequest.cs | 10 +
.../Hris/Employees/EmployeesClient.cs | 160 +-
.../Requests/EmployeeEndpointRequest.cs | 5 +
.../Requests/EmployeesListRequest.cs | 41 +-
.../Requests/EmployeesRetrieveRequest.cs | 13 +
.../Requests/IgnoreCommonModelRequest.cs | 1 +
.../EmployerBenefitsClient.cs | 67 +-
.../Requests/EmployerBenefitsListRequest.cs | 12 +
.../EmployerBenefitsRetrieveRequest.cs | 9 +
.../Hris/Employments/EmploymentsClient.cs | 67 +-
.../Requests/EmploymentsListRequest.cs | 17 +
.../Requests/EmploymentsRetrieveRequest.cs | 12 +
.../Hris/FieldMapping/FieldMappingClient.cs | 195 +-
.../Requests/CreateFieldMappingRequest.cs | 9 +
.../Requests/FieldMappingsRetrieveRequest.cs | 3 +
.../PatchedEditFieldMappingRequest.cs | 1 +
.../Requests/RemoteFieldsRetrieveRequest.cs | 4 +
.../Hris/ForceResync/ForceResyncClient.cs | 31 +-
.../Hris/GenerateKey/GenerateKeyClient.cs | 29 +-
.../Requests/GenerateRemoteKeyRequest.cs | 1 +
src/Merge.Client/Hris/Groups/GroupsClient.cs | 67 +-
.../Hris/Groups/Requests/GroupsListRequest.cs | 17 +
.../Groups/Requests/GroupsRetrieveRequest.cs | 11 +
src/Merge.Client/Hris/Issues/IssuesClient.cs | 63 +-
.../Hris/Issues/Requests/IssuesListRequest.cs | 20 +-
.../Hris/LinkToken/LinkTokenClient.cs | 29 +-
.../Requests/EndUserDetailsRequest.cs | 1 +
.../LinkedAccounts/LinkedAccountsClient.cs | 29 +-
.../Requests/LinkedAccountsListRequest.cs | 29 +-
.../Hris/Locations/LocationsClient.cs | 67 +-
.../Requests/LocationsListRequest.cs | 19 +-
.../Requests/LocationsRetrieveRequest.cs | 11 +
.../Hris/Passthrough/PassthroughClient.cs | 29 +-
.../Hris/PayGroups/PayGroupsClient.cs | 67 +-
.../Requests/PayGroupsListRequest.cs | 12 +
.../Requests/PayGroupsRetrieveRequest.cs | 9 +
.../Hris/PayrollRuns/PayrollRunsClient.cs | 67 +-
.../Requests/PayrollRunsListRequest.cs | 29 +-
.../Requests/PayrollRunsRetrieveRequest.cs | 11 +
.../Hris/RegenerateKey/RegenerateKeyClient.cs | 29 +-
.../RemoteKeyForRegenerationRequest.cs | 1 +
...ountCommonModelScopeDeserializerRequest.cs | 1 +
src/Merge.Client/Hris/Scopes/ScopesClient.cs | 87 +-
.../Requests/SyncStatusListRequest.cs | 4 +
.../Hris/SyncStatus/SyncStatusClient.cs | 31 +-
.../Hris/Teams/Requests/TeamsListRequest.cs | 14 +
.../Teams/Requests/TeamsRetrieveRequest.cs | 10 +
src/Merge.Client/Hris/Teams/TeamsClient.cs | 67 +-
.../Requests/TimeOffEndpointRequest.cs | 5 +
.../TimeOff/Requests/TimeOffListRequest.cs | 47 +-
.../Requests/TimeOffRetrieveRequest.cs | 12 +
.../Hris/TimeOff/TimeOffClient.cs | 128 +-
.../Requests/TimeOffBalancesListRequest.cs | 29 +-
.../TimeOffBalancesRetrieveRequest.cs | 12 +
.../TimeOffBalances/TimeOffBalancesClient.cs | 67 +-
.../Requests/TimesheetEntriesListRequest.cs | 19 +
.../TimesheetEntriesRetrieveRequest.cs | 10 +
.../Requests/TimesheetEntryEndpointRequest.cs | 5 +
.../TimesheetEntriesClient.cs | 128 +-
src/Merge.Client/Hris/Types/AccountDetails.cs | 22 +
.../Hris/Types/AccountDetailsAndActions.cs | 20 +
.../AccountDetailsAndActionsIntegration.cs | 12 +
.../Hris/Types/AccountIntegration.cs | 15 +
src/Merge.Client/Hris/Types/AccountToken.cs | 15 +
.../Hris/Types/AdvancedMetadata.cs | 12 +
.../Hris/Types/AsyncPassthroughReciept.cs | 12 +
src/Merge.Client/Hris/Types/AuditLogEvent.cs | 109 +-
.../Hris/Types/AvailableActions.cs | 20 +
src/Merge.Client/Hris/Types/BankInfo.cs | 30 +-
src/Merge.Client/Hris/Types/Benefit.cs | 26 +
.../Hris/Types/CommonModelScopeApi.cs | 12 +
.../Types/CommonModelScopesBodyRequest.cs | 12 +
src/Merge.Client/Hris/Types/Company.cs | 26 +
.../Hris/Types/DataPassthroughRequest.cs | 20 +
src/Merge.Client/Hris/Types/DebugModeLog.cs | 12 +
.../Hris/Types/DebugModelLogSummary.cs | 12 +
src/Merge.Client/Hris/Types/Deduction.cs | 25 +
src/Merge.Client/Hris/Types/Dependent.cs | 42 +-
src/Merge.Client/Hris/Types/Earning.cs | 33 +-
src/Merge.Client/Hris/Types/Employee.cs | 68 +-
.../Hris/Types/EmployeePayrollRun.cs | 29 +
.../Hris/Types/EmployeeRequest.cs | 64 +-
.../Hris/Types/EmployeeResponse.cs | 12 +
.../Hris/Types/EmployerBenefit.cs | 36 +-
src/Merge.Client/Hris/Types/Employment.cs | 694 +-
.../Hris/Types/ErrorValidationProblem.cs | 12 +
src/Merge.Client/Hris/Types/EventTypeEnum.cs | 3 +
.../Hris/Types/ExternalTargetFieldApi.cs | 15 +
.../Types/ExternalTargetFieldApiResponse.cs | 12 +
.../Hris/Types/FieldMappingApiInstance.cs | 16 +
.../FieldMappingApiInstanceRemoteField.cs | 12 +
...piInstanceRemoteFieldRemoteEndpointInfo.cs | 12 +
.../Types/FieldMappingApiInstanceResponse.cs | 12 +
.../FieldMappingApiInstanceTargetField.cs | 12 +
.../Types/FieldMappingInstanceResponse.cs | 12 +
.../Hris/Types/FieldPermissionDeserializer.cs | 12 +
.../FieldPermissionDeserializerRequest.cs | 12 +
src/Merge.Client/Hris/Types/Group.cs | 48 +-
.../IndividualCommonModelScopeDeserializer.cs | 12 +
...dualCommonModelScopeDeserializerRequest.cs | 12 +
src/Merge.Client/Hris/Types/Issue.cs | 20 +-
...tusStatusEnum.cs => LastSyncResultEnum.cs} | 4 +-
src/Merge.Client/Hris/Types/LinkToken.cs | 12 +
.../Hris/Types/LinkedAccountStatus.cs | 12 +
src/Merge.Client/Hris/Types/Location.cs | 528 +-
src/Merge.Client/Hris/Types/MetaResponse.cs | 12 +
src/Merge.Client/Hris/Types/ModelOperation.cs | 20 +
.../Hris/Types/ModelPermissionDeserializer.cs | 12 +
.../ModelPermissionDeserializerRequest.cs | 12 +
.../Hris/Types/MultipartFormFieldRequest.cs | 26 +-
.../PaginatedAccountDetailsAndActionsList.cs | 12 +
.../Hris/Types/PaginatedAuditLogEventList.cs | 12 +
.../Hris/Types/PaginatedBankInfoList.cs | 12 +
.../Hris/Types/PaginatedBenefitList.cs | 12 +
.../Hris/Types/PaginatedCompanyList.cs | 12 +
.../Hris/Types/PaginatedDependentList.cs | 12 +
.../Hris/Types/PaginatedEmployeeList.cs | 12 +
.../Types/PaginatedEmployeePayrollRunList.cs | 12 +
.../Types/PaginatedEmployerBenefitList.cs | 12 +
.../Hris/Types/PaginatedEmploymentList.cs | 12 +
.../Hris/Types/PaginatedGroupList.cs | 12 +
.../Hris/Types/PaginatedIssueList.cs | 12 +
.../Hris/Types/PaginatedLocationList.cs | 12 +
.../Hris/Types/PaginatedPayGroupList.cs | 12 +
.../Hris/Types/PaginatedPayrollRunList.cs | 12 +
.../Hris/Types/PaginatedSyncStatusList.cs | 12 +
.../Hris/Types/PaginatedTeamList.cs | 12 +
.../Hris/Types/PaginatedTimeOffBalanceList.cs | 12 +
.../Hris/Types/PaginatedTimeOffList.cs | 12 +
.../Hris/Types/PaginatedTimesheetEntryList.cs | 12 +
src/Merge.Client/Hris/Types/PayGroup.cs | 26 +
src/Merge.Client/Hris/Types/PayrollRun.cs | 46 +-
src/Merge.Client/Hris/Types/RemoteData.cs | 21 +
.../Hris/Types/RemoteEndpointInfo.cs | 12 +
src/Merge.Client/Hris/Types/RemoteFieldApi.cs | 13 +
.../Hris/Types/RemoteFieldApiResponse.cs | 12 +
src/Merge.Client/Hris/Types/RemoteKey.cs | 20 +
src/Merge.Client/Hris/Types/RemoteResponse.cs | 20 +
src/Merge.Client/Hris/Types/StatusFd5Enum.cs | 27 +
src/Merge.Client/Hris/Types/SyncStatus.cs | 28 +-
src/Merge.Client/Hris/Types/Tax.cs | 25 +
src/Merge.Client/Hris/Types/Team.cs | 26 +
src/Merge.Client/Hris/Types/TimeOff.cs | 52 +-
src/Merge.Client/Hris/Types/TimeOffBalance.cs | 38 +-
src/Merge.Client/Hris/Types/TimeOffRequest.cs | 48 +-
.../Hris/Types/TimeOffResponse.cs | 12 +
src/Merge.Client/Hris/Types/TimesheetEntry.cs | 27 +
.../Hris/Types/TimesheetEntryRequest.cs | 23 +
.../Hris/Types/TimesheetEntryResponse.cs | 12 +
.../Hris/Types/ValidationProblemSource.cs | 12 +
.../Hris/Types/WarningValidationProblem.cs | 12 +
.../Hris/Types/WebhookReceiver.cs | 12 +
.../Requests/WebhookReceiverRequest.cs | 1 +
.../WebhookReceiversClient.cs | 58 +-
src/Merge.Client/Merge.Client.csproj | 15 +-
.../AccountDetails/AccountDetailsClient.cs | 29 +-
.../AccountToken/AccountTokenClient.cs | 34 +-
.../Ticketing/Accounts/AccountsClient.cs | 67 +-
.../Accounts/Requests/AccountsListRequest.cs | 12 +
.../Requests/AccountsRetrieveRequest.cs | 9 +
.../AsyncPassthroughClient.cs | 63 +-
.../Attachments/AttachmentsClient.cs | 166 +-
.../AttachmentsDownloadRetrieveRequest.cs | 9 +
.../Requests/AttachmentsListRequest.cs | 15 +
.../Requests/AttachmentsRetrieveRequest.cs | 10 +
.../TicketingAttachmentEndpointRequest.cs | 5 +
.../Ticketing/AuditTrail/AuditTrailClient.cs | 29 +-
.../Requests/AuditTrailListRequest.cs | 10 +-
.../AvailableActionsClient.cs | 29 +-
.../Collections/CollectionsClient.cs | 151 +-
.../Requests/CollectionsListRequest.cs | 19 +-
.../Requests/CollectionsRetrieveRequest.cs | 14 +-
.../Requests/CollectionsViewersListRequest.cs | 49 +
.../Types/CollectionsListRequestExpand.cs | 18 -
.../Types/CollectionsRetrieveRequestExpand.cs | 18 -
.../CollectionsViewersListRequestExpand.cs | 18 +
.../Ticketing/Comments/CommentsClient.cs | 128 +-
.../Requests/CommentEndpointRequest.cs | 5 +
.../Comments/Requests/CommentsListRequest.cs | 15 +
.../Requests/CommentsRetrieveRequest.cs | 10 +
.../Ticketing/Contacts/ContactsClient.cs | 128 +-
.../Contacts/Requests/ContactsListRequest.cs | 13 +
.../Requests/ContactsRetrieveRequest.cs | 10 +
.../TicketingContactEndpointRequest.cs | 5 +
.../DeleteAccount/DeleteAccountClient.cs | 27 +-
.../FieldMapping/FieldMappingClient.cs | 195 +-
.../Requests/CreateFieldMappingRequest.cs | 9 +
.../Requests/FieldMappingsRetrieveRequest.cs | 3 +
.../PatchedEditFieldMappingRequest.cs | 1 +
.../Requests/RemoteFieldsRetrieveRequest.cs | 4 +
.../ForceResync/ForceResyncClient.cs | 31 +-
.../GenerateKey/GenerateKeyClient.cs | 29 +-
.../Requests/GenerateRemoteKeyRequest.cs | 1 +
.../Ticketing/Issues/IssuesClient.cs | 63 +-
.../Issues/Requests/IssuesListRequest.cs | 20 +-
.../Ticketing/LinkToken/LinkTokenClient.cs | 29 +-
.../Requests/EndUserDetailsRequest.cs | 1 +
.../LinkedAccounts/LinkedAccountsClient.cs | 29 +-
.../Requests/LinkedAccountsListRequest.cs | 29 +-
.../Passthrough/PassthroughClient.cs | 29 +-
.../Ticketing/Projects/ProjectsClient.cs | 101 +-
.../Projects/Requests/ProjectsListRequest.cs | 12 +
.../Requests/ProjectsRetrieveRequest.cs | 9 +
.../Requests/ProjectsUsersListRequest.cs | 8 +
.../RegenerateKey/RegenerateKeyClient.cs | 29 +-
.../RemoteKeyForRegenerationRequest.cs | 1 +
.../Roles/Requests/RolesListRequest.cs | 12 +
.../Roles/Requests/RolesRetrieveRequest.cs | 9 +
.../Ticketing/Roles/RolesClient.cs | 67 +-
...ountCommonModelScopeDeserializerRequest.cs | 1 +
.../Ticketing/Scopes/ScopesClient.cs | 87 +-
.../Requests/SyncStatusListRequest.cs | 4 +
.../Ticketing/SyncStatus/SyncStatusClient.cs | 31 +-
.../Tags/Requests/TagsListRequest.cs | 12 +
.../Tags/Requests/TagsRetrieveRequest.cs | 9 +
src/Merge.Client/Ticketing/Tags/TagsClient.cs | 67 +-
.../Teams/Requests/TeamsListRequest.cs | 12 +
.../Teams/Requests/TeamsRetrieveRequest.cs | 9 +
.../Ticketing/Teams/TeamsClient.cs | 67 +-
.../Requests/PatchedTicketEndpointRequest.cs | 5 +
.../Tickets/Requests/TicketEndpointRequest.cs | 5 +
.../Tickets/Requests/TicketsListRequest.cs | 42 +-
.../TicketsRemoteFieldClassesListRequest.cs | 14 +
.../Requests/TicketsRetrieveRequest.cs | 13 +
.../Requests/TicketsViewersListRequest.cs | 8 +
.../Ticketing/Tickets/TicketsClient.cs | 268 +-
src/Merge.Client/Ticketing/Types/Account.cs | 27 +
.../Ticketing/Types/AccountDetails.cs | 22 +
.../Types/AccountDetailsAndActions.cs | 20 +
.../AccountDetailsAndActionsIntegration.cs | 12 +
.../Ticketing/Types/AccountIntegration.cs | 15 +
.../Ticketing/Types/AccountToken.cs | 15 +
.../Ticketing/Types/AdvancedMetadata.cs | 12 +
.../Types/AsyncPassthroughReciept.cs | 12 +
.../Ticketing/Types/Attachment.cs | 26 +
.../Ticketing/Types/AttachmentRequest.cs | 22 +
.../Ticketing/Types/AuditLogEvent.cs | 109 +-
.../Ticketing/Types/AvailableActions.cs | 20 +
.../Ticketing/Types/Collection.cs | 38 +-
src/Merge.Client/Ticketing/Types/Comment.cs | 26 +
.../Ticketing/Types/CommentRequest.cs | 22 +
.../Ticketing/Types/CommentResponse.cs | 12 +
.../Ticketing/Types/CommonModelScopeApi.cs | 12 +
.../Types/CommonModelScopesBodyRequest.cs | 12 +
src/Merge.Client/Ticketing/Types/Contact.cs | 26 +
.../Ticketing/Types/ContactRequest.cs | 22 +
.../Ticketing/Types/DataPassthroughRequest.cs | 20 +
.../Ticketing/Types/DebugModeLog.cs | 12 +
.../Ticketing/Types/DebugModelLogSummary.cs | 12 +
.../Ticketing/Types/ErrorValidationProblem.cs | 12 +
.../Ticketing/Types/EventTypeEnum.cs | 3 +
.../Ticketing/Types/ExternalTargetFieldApi.cs | 15 +
.../Types/ExternalTargetFieldApiResponse.cs | 12 +
.../Types/FieldMappingApiInstance.cs | 16 +
.../FieldMappingApiInstanceRemoteField.cs | 12 +
...piInstanceRemoteFieldRemoteEndpointInfo.cs | 12 +
.../Types/FieldMappingApiInstanceResponse.cs | 12 +
.../FieldMappingApiInstanceTargetField.cs | 12 +
.../Types/FieldMappingInstanceResponse.cs | 12 +
.../Types/FieldPermissionDeserializer.cs | 12 +
.../FieldPermissionDeserializerRequest.cs | 12 +
.../IndividualCommonModelScopeDeserializer.cs | 12 +
...dualCommonModelScopeDeserializerRequest.cs | 12 +
src/Merge.Client/Ticketing/Types/Issue.cs | 20 +-
.../Ticketing/Types/ItemSchema.cs | 12 +
...tusStatusEnum.cs => LastSyncResultEnum.cs} | 4 +-
src/Merge.Client/Ticketing/Types/LinkToken.cs | 12 +
.../Ticketing/Types/LinkedAccountStatus.cs | 12 +
.../Ticketing/Types/MetaResponse.cs | 12 +
.../Ticketing/Types/ModelOperation.cs | 20 +
.../Types/ModelPermissionDeserializer.cs | 12 +
.../ModelPermissionDeserializerRequest.cs | 12 +
.../Types/MultipartFormFieldRequest.cs | 26 +-
.../PaginatedAccountDetailsAndActionsList.cs | 12 +
.../Ticketing/Types/PaginatedAccountList.cs | 12 +
.../Types/PaginatedAttachmentList.cs | 12 +
.../Types/PaginatedAuditLogEventList.cs | 12 +
.../Types/PaginatedCollectionList.cs | 12 +
.../Ticketing/Types/PaginatedCommentList.cs | 12 +
.../Ticketing/Types/PaginatedContactList.cs | 12 +
.../Ticketing/Types/PaginatedIssueList.cs | 12 +
.../Ticketing/Types/PaginatedProjectList.cs | 12 +
.../Types/PaginatedRemoteFieldClassList.cs | 12 +
.../Ticketing/Types/PaginatedRoleList.cs | 12 +
.../Types/PaginatedSyncStatusList.cs | 12 +
.../Ticketing/Types/PaginatedTagList.cs | 12 +
.../Ticketing/Types/PaginatedTeamList.cs | 12 +
.../Ticketing/Types/PaginatedTicketList.cs | 12 +
.../Ticketing/Types/PaginatedUserList.cs | 12 +
.../Ticketing/Types/PaginatedViewerList.cs | 12 +
.../Ticketing/Types/PatchedTicketRequest.cs | 42 +-
src/Merge.Client/Ticketing/Types/Project.cs | 25 +
.../Ticketing/Types/RemoteData.cs | 21 +
.../Ticketing/Types/RemoteEndpointInfo.cs | 12 +
.../Ticketing/Types/RemoteField.cs | 14 +-
.../Ticketing/Types/RemoteFieldApi.cs | 13 +
.../Ticketing/Types/RemoteFieldApiResponse.cs | 12 +
.../Ticketing/Types/RemoteFieldClass.cs | 13 +
.../Types/RemoteFieldClassFieldChoicesItem.cs | 12 +
.../Ticketing/Types/RemoteFieldRequest.cs | 12 +
src/Merge.Client/Ticketing/Types/RemoteKey.cs | 20 +
.../Ticketing/Types/RemoteResponse.cs | 20 +
src/Merge.Client/Ticketing/Types/Role.cs | 31 +-
.../Ticketing/Types/StatusFd5Enum.cs | 27 +
.../Ticketing/Types/SyncStatus.cs | 28 +-
src/Merge.Client/Ticketing/Types/Tag.cs | 25 +
src/Merge.Client/Ticketing/Types/Team.cs | 25 +
src/Merge.Client/Ticketing/Types/Ticket.cs | 46 +-
.../Ticketing/Types/TicketRequest.cs | 42 +-
.../Ticketing/Types/TicketResponse.cs | 12 +
.../Types/TicketingAttachmentResponse.cs | 12 +
.../Types/TicketingContactResponse.cs | 12 +
src/Merge.Client/Ticketing/Types/User.cs | 27 +
.../Types/ValidationProblemSource.cs | 12 +
src/Merge.Client/Ticketing/Types/Viewer.cs | 23 +
.../Types/WarningValidationProblem.cs | 12 +
.../Ticketing/Types/WebhookReceiver.cs | 12 +
.../Users/Requests/UsersListRequest.cs | 20 +
.../Users/Requests/UsersRetrieveRequest.cs | 10 +
.../Ticketing/Users/UsersClient.cs | 71 +-
.../Requests/WebhookReceiverRequest.cs | 1 +
.../WebhookReceiversClient.cs | 58 +-
1227 files changed, 60490 insertions(+), 31929 deletions(-)
create mode 100644 .editorconfig
delete mode 100644 reference.md
create mode 100644 src/Merge.Client.Test/Core/Json/DateOnlyJsonTests.cs
create mode 100644 src/Merge.Client.Test/Core/Json/DateTimeJsonTests.cs
rename src/Merge.Client.Test/Core/{ => Json}/EnumSerializerTests.cs (95%)
create mode 100644 src/Merge.Client.Test/Core/Json/JsonAccessAttributeTests.cs
rename src/Merge.Client.Test/Core/{ => Json}/OneOfSerializerTests.cs (87%)
create mode 100644 src/Merge.Client.Test/Core/QueryStringConverterTests.cs
delete mode 100644 src/Merge.Client.Test/Core/RawClientTests.cs
create mode 100644 src/Merge.Client.Test/Core/RawClientTests/AdditionalHeadersTests.cs
create mode 100644 src/Merge.Client.Test/Core/RawClientTests/AdditionalParametersTests.cs
create mode 100644 src/Merge.Client.Test/Core/RawClientTests/MultipartFormTests.cs
create mode 100644 src/Merge.Client.Test/Core/RawClientTests/RetriesTests.cs
create mode 100644 src/Merge.Client.Test/Utils/JsonElementComparer.cs
create mode 100644 src/Merge.Client.Test/Utils/NUnitExtensions.cs
create mode 100644 src/Merge.Client.Test/Utils/OneOfComparer.cs
create mode 100644 src/Merge.Client.Test/Utils/ReadOnlyMemoryComparer.cs
create mode 100644 src/Merge.Client/Accounting/PaymentMethods/PaymentMethodsClient.cs
create mode 100644 src/Merge.Client/Accounting/PaymentMethods/Requests/PaymentMethodsListRequest.cs
create mode 100644 src/Merge.Client/Accounting/PaymentMethods/Requests/PaymentMethodsRetrieveRequest.cs
create mode 100644 src/Merge.Client/Accounting/PaymentTerms/PaymentTermsClient.cs
create mode 100644 src/Merge.Client/Accounting/PaymentTerms/Requests/PaymentTermsListRequest.cs
create mode 100644 src/Merge.Client/Accounting/PaymentTerms/Requests/PaymentTermsRetrieveRequest.cs
rename src/Merge.Client/Accounting/Types/{SyncStatusStatusEnum.cs => LastSyncResultEnum.cs} (82%)
create mode 100644 src/Merge.Client/Accounting/Types/MethodTypeEnum.cs
create mode 100644 src/Merge.Client/Accounting/Types/PaginatedPaymentMethodList.cs
create mode 100644 src/Merge.Client/Accounting/Types/PaginatedPaymentTermList.cs
create mode 100644 src/Merge.Client/Accounting/Types/PaymentMethod.cs
create mode 100644 src/Merge.Client/Accounting/Types/PaymentTerm.cs
create mode 100644 src/Merge.Client/Accounting/Types/StatusFd5Enum.cs
rename src/Merge.Client/Ats/Types/{SyncStatusStatusEnum.cs => LastSyncResultEnum.cs} (82%)
create mode 100644 src/Merge.Client/Ats/Types/StatusFd5Enum.cs
rename src/Merge.Client/{Merge.cs => BaseMergeClient.cs} (78%)
create mode 100644 src/Merge.Client/Core/ApiResponse.cs
create mode 100644 src/Merge.Client/Core/BaseRequest.cs
create mode 100644 src/Merge.Client/Core/DateOnlyConverter.cs
create mode 100644 src/Merge.Client/Core/EmptyRequest.cs
create mode 100644 src/Merge.Client/Core/EncodingCache.cs
create mode 100644 src/Merge.Client/Core/FormUrlEncoder.cs
create mode 100644 src/Merge.Client/Core/IIsRetryableContent.cs
create mode 100644 src/Merge.Client/Core/JsonAccessAttribute.cs
create mode 100644 src/Merge.Client/Core/JsonRequest.cs
create mode 100644 src/Merge.Client/Core/MultipartFormRequest.cs
rename src/Merge.Client/Core/Public/{MergeApiException.cs => BaseMergeClientApiException.cs} (76%)
rename src/Merge.Client/Core/Public/{MergeEnvironment.cs => BaseMergeClientEnvironment.cs} (85%)
rename src/Merge.Client/Core/Public/{MergeException.cs => BaseMergeClientException.cs} (67%)
create mode 100644 src/Merge.Client/Core/Public/FileParameter.cs
create mode 100644 src/Merge.Client/Core/QueryStringConverter.cs
create mode 100644 src/Merge.Client/Core/StreamRequest.cs
create mode 100644 src/Merge.Client/Core/ValueConvert.cs
rename src/Merge.Client/Crm/Types/{SyncStatusStatusEnum.cs => LastSyncResultEnum.cs} (82%)
create mode 100644 src/Merge.Client/Crm/Types/StatusFd5Enum.cs
create mode 100644 src/Merge.Client/Filestorage/Files/Requests/FilesDownloadRequestMetaListRequest.cs
create mode 100644 src/Merge.Client/Filestorage/Files/Requests/FilesDownloadRequestMetaRetrieveRequest.cs
create mode 100644 src/Merge.Client/Filestorage/Types/DownloadRequestMeta.cs
rename src/Merge.Client/Filestorage/Types/{SyncStatusStatusEnum.cs => LastSyncResultEnum.cs} (82%)
create mode 100644 src/Merge.Client/Filestorage/Types/PaginatedDownloadRequestMetaList.cs
create mode 100644 src/Merge.Client/Filestorage/Types/StatusFd5Enum.cs
rename src/Merge.Client/Hris/Types/{SyncStatusStatusEnum.cs => LastSyncResultEnum.cs} (82%)
create mode 100644 src/Merge.Client/Hris/Types/StatusFd5Enum.cs
create mode 100644 src/Merge.Client/Ticketing/Collections/Requests/CollectionsViewersListRequest.cs
delete mode 100644 src/Merge.Client/Ticketing/Collections/Types/CollectionsListRequestExpand.cs
delete mode 100644 src/Merge.Client/Ticketing/Collections/Types/CollectionsRetrieveRequestExpand.cs
create mode 100644 src/Merge.Client/Ticketing/Collections/Types/CollectionsViewersListRequestExpand.cs
rename src/Merge.Client/Ticketing/Types/{SyncStatusStatusEnum.cs => LastSyncResultEnum.cs} (82%)
create mode 100644 src/Merge.Client/Ticketing/Types/StatusFd5Enum.cs
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..1e7a0adb
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,35 @@
+root = true
+
+[*.cs]
+resharper_arrange_object_creation_when_type_evident_highlighting = hint
+resharper_auto_property_can_be_made_get_only_global_highlighting = hint
+resharper_check_namespace_highlighting = hint
+resharper_class_never_instantiated_global_highlighting = hint
+resharper_class_never_instantiated_local_highlighting = hint
+resharper_collection_never_updated_global_highlighting = hint
+resharper_convert_type_check_pattern_to_null_check_highlighting = hint
+resharper_inconsistent_naming_highlighting = hint
+resharper_member_can_be_private_global_highlighting = hint
+resharper_member_hides_static_from_outer_class_highlighting = hint
+resharper_not_accessed_field_local_highlighting = hint
+resharper_nullable_warning_suppression_is_used_highlighting = suggestion
+resharper_partial_type_with_single_part_highlighting = hint
+resharper_prefer_concrete_value_over_default_highlighting = none
+resharper_private_field_can_be_converted_to_local_variable_highlighting = hint
+resharper_property_can_be_made_init_only_global_highlighting = hint
+resharper_property_can_be_made_init_only_local_highlighting = hint
+resharper_redundant_name_qualifier_highlighting = none
+resharper_redundant_using_directive_highlighting = hint
+resharper_replace_slice_with_range_indexer_highlighting = none
+resharper_unused_auto_property_accessor_global_highlighting = hint
+resharper_unused_auto_property_accessor_local_highlighting = hint
+resharper_unused_member_global_highlighting = hint
+resharper_unused_type_global_highlighting = hint
+resharper_use_string_interpolation_highlighting = hint
+dotnet_diagnostic.CS1591.severity = suggestion
+
+[src/**/Types/*.cs]
+resharper_check_namespace_highlighting = none
+
+[src/**/Core/Public/*.cs]
+resharper_check_namespace_highlighting = none
\ No newline at end of file
diff --git a/reference.md b/reference.md
deleted file mode 100644
index 44266a18..00000000
--- a/reference.md
+++ /dev/null
@@ -1,11478 +0,0 @@
-# Reference
-## Ats AccountDetails
-client.Ats.AccountDetails.RetrieveAsync () -> Ats.AccountDetails
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Get details for a linked account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.AccountDetails.RetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats AccountToken
-client.Ats.AccountToken.RetrieveAsync (publicToken) -> Ats.AccountToken
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns the account token for the end user with the provided public token.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.AccountToken.RetrieveAsync("public_token");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**publicToken:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Activities
-client.Ats.Activities.ListAsync (ActivitiesListRequest { ... }) -> PaginatedActivityList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Activity` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Activities.ListAsync(new ActivitiesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ActivitiesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Activities.CreateAsync (ActivityEndpointRequest { ... }) -> ActivityResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an `Activity` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Activities.CreateAsync(
- new ActivityEndpointRequest { Model = new ActivityRequest(), RemoteUserId = "remote_user_id" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ActivityEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Activities.RetrieveAsync (id, ActivitiesRetrieveRequest { ... }) -> Activity
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Activity` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Activities.RetrieveAsync("id", new ActivitiesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `ActivitiesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Activities.MetaPostRetrieveAsync () -> Ats.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Activity` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Activities.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats Applications
-client.Ats.Applications.ListAsync (ApplicationsListRequest { ... }) -> PaginatedApplicationList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Application` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Applications.ListAsync(new ApplicationsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ApplicationsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Applications.CreateAsync (ApplicationEndpointRequest { ... }) -> ApplicationResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Applications.CreateAsync(
- new ApplicationEndpointRequest
- {
- Model = new ApplicationRequest(),
- RemoteUserId = "remote_user_id",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ApplicationEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Applications.RetrieveAsync (id, ApplicationsRetrieveRequest { ... }) -> Application
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Application` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Applications.RetrieveAsync("id", new ApplicationsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `ApplicationsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Applications.ChangeStageCreateAsync (id, UpdateApplicationStageRequest { ... }) -> ApplicationResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates the `current_stage` field of an `Application` object
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Applications.ChangeStageCreateAsync("id", new UpdateApplicationStageRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `UpdateApplicationStageRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Applications.MetaPostRetrieveAsync (ApplicationsMetaPostRetrieveRequest { ... }) -> Ats.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Application` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Applications.MetaPostRetrieveAsync(new ApplicationsMetaPostRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ApplicationsMetaPostRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats AsyncPassthrough
-client.Ats.AsyncPassthrough.CreateAsync (Ats.DataPassthroughRequest { ... }) -> Ats.AsyncPassthroughReciept
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Asynchronously pull data from an endpoint not currently supported by Merge.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.AsyncPassthrough.CreateAsync(
- new Merge.Client.Ats.DataPassthroughRequest
- {
- Method = Merge.Client.Ats.MethodEnum.Get,
- Path = "/scooters",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `Ats.DataPassthroughRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.AsyncPassthrough.RetrieveAsync (asyncPassthroughReceiptId) -> OneOf
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Retrieves data from earlier async-passthrough POST request
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**asyncPassthroughReceiptId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Attachments
-client.Ats.Attachments.ListAsync (AttachmentsListRequest { ... }) -> Ats.PaginatedAttachmentList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Attachment` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Attachments.ListAsync(new AttachmentsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AttachmentsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Attachments.CreateAsync (AttachmentEndpointRequest { ... }) -> AttachmentResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an `Attachment` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Attachments.CreateAsync(
- new AttachmentEndpointRequest
- {
- Model = new Merge.Client.Ats.AttachmentRequest(),
- RemoteUserId = "remote_user_id",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AttachmentEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Attachments.RetrieveAsync (id, AttachmentsRetrieveRequest { ... }) -> Ats.Attachment
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Attachment` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Attachments.RetrieveAsync("id", new AttachmentsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `AttachmentsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Attachments.MetaPostRetrieveAsync () -> Ats.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Attachment` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Attachments.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats AuditTrail
-client.Ats.AuditTrail.ListAsync (AuditTrailListRequest { ... }) -> Ats.PaginatedAuditLogEventList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Gets a list of audit trail events.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.AuditTrail.ListAsync(new AuditTrailListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AuditTrailListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats AvailableActions
-client.Ats.AvailableActions.RetrieveAsync () -> Ats.AvailableActions
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of models and actions available for an account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.AvailableActions.RetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats Candidates
-client.Ats.Candidates.ListAsync (CandidatesListRequest { ... }) -> PaginatedCandidateList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Candidate` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.ListAsync(new CandidatesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CandidatesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Candidates.CreateAsync (CandidateEndpointRequest { ... }) -> CandidateResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `Candidate` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.CreateAsync(
- new CandidateEndpointRequest { Model = new CandidateRequest(), RemoteUserId = "remote_user_id" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CandidateEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Candidates.RetrieveAsync (id, CandidatesRetrieveRequest { ... }) -> Candidate
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Candidate` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.RetrieveAsync("id", new CandidatesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `CandidatesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Candidates.PartialUpdateAsync (id, PatchedCandidateEndpointRequest { ... }) -> CandidateResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates a `Candidate` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.PartialUpdateAsync(
- "id",
- new PatchedCandidateEndpointRequest
- {
- Model = new PatchedCandidateRequest(),
- RemoteUserId = "remote_user_id",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedCandidateEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Candidates.IgnoreCreateAsync (modelId, Ats.IgnoreCommonModelRequest { ... })
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.IgnoreCreateAsync(
- "model_id",
- new Merge.Client.Ats.IgnoreCommonModelRequest
- {
- Reason = Merge.Client.Ats.ReasonEnum.GeneralCustomerRequest,
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**modelId:** `string`
-
-
-
-
-
-
-
-**request:** `Ats.IgnoreCommonModelRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Candidates.MetaPatchRetrieveAsync (id) -> Ats.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Candidate` PATCHs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.MetaPatchRetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Candidates.MetaPostRetrieveAsync () -> Ats.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Candidate` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Candidates.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats Scopes
-client.Ats.Scopes.DefaultScopesRetrieveAsync () -> Ats.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Scopes.DefaultScopesRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Ats.Scopes.LinkedAccountScopesRetrieveAsync () -> Ats.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Scopes.LinkedAccountScopesRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Ats.Scopes.LinkedAccountScopesCreateAsync (LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Ats.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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)
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Scopes.LinkedAccountScopesCreateAsync(
- new LinkedAccountCommonModelScopeDeserializerRequest
- {
- CommonModels = new List()
- {
- new Merge.Client.Ats.IndividualCommonModelScopeDeserializerRequest
- {
- ModelName = "Employee",
- ModelPermissions = new Dictionary<
- string,
- Merge.Client.Ats.ModelPermissionDeserializerRequest
- >()
- {
- {
- "READ",
- new Merge.Client.Ats.ModelPermissionDeserializerRequest { IsEnabled = true }
- },
- {
- "WRITE",
- new Merge.Client.Ats.ModelPermissionDeserializerRequest
- {
- IsEnabled = false,
- }
- },
- },
- FieldPermissions = new Merge.Client.Ats.FieldPermissionDeserializerRequest
- {
- EnabledFields = new List() { "avatar", "home_location" },
- DisabledFields = new List() { "work_location" },
- },
- },
- new Merge.Client.Ats.IndividualCommonModelScopeDeserializerRequest
- {
- ModelName = "Benefit",
- ModelPermissions = new Dictionary<
- string,
- Merge.Client.Ats.ModelPermissionDeserializerRequest
- >()
- {
- {
- "WRITE",
- new Merge.Client.Ats.ModelPermissionDeserializerRequest
- {
- IsEnabled = false,
- }
- },
- },
- },
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LinkedAccountCommonModelScopeDeserializerRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats DeleteAccount
-client.Ats.DeleteAccount.DeleteAsync ()
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Delete a linked account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.DeleteAccount.DeleteAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats Departments
-client.Ats.Departments.ListAsync (DepartmentsListRequest { ... }) -> PaginatedDepartmentList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Department` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Departments.ListAsync(new DepartmentsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `DepartmentsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Departments.RetrieveAsync (id, DepartmentsRetrieveRequest { ... }) -> Department
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Department` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Departments.RetrieveAsync("id", new DepartmentsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `DepartmentsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Eeocs
-client.Ats.Eeocs.ListAsync (EeocsListRequest { ... }) -> PaginatedEeocList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `EEOC` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Eeocs.ListAsync(new EeocsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EeocsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Eeocs.RetrieveAsync (id, EeocsRetrieveRequest { ... }) -> Eeoc
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `EEOC` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Eeocs.RetrieveAsync("id", new EeocsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `EeocsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats FieldMapping
-client.Ats.FieldMapping.FieldMappingsRetrieveAsync (FieldMappingsRetrieveRequest { ... }) -> Ats.FieldMappingApiInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.FieldMapping.FieldMappingsRetrieveAsync(new FieldMappingsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FieldMappingsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.FieldMapping.FieldMappingsCreateAsync (CreateFieldMappingRequest { ... }) -> Ats.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.FieldMapping.FieldMappingsCreateAsync(
- new CreateFieldMappingRequest
- {
- TargetFieldName = "example_target_field_name",
- TargetFieldDescription = "this is a example description of the target field",
- RemoteFieldTraversalPath = new List() { "example_remote_field" },
- RemoteMethod = "GET",
- RemoteUrlPath = "/example-url-path",
- CommonModelName = "ExampleCommonModel",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CreateFieldMappingRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.FieldMapping.FieldMappingsDestroyAsync (fieldMappingId) -> Ats.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**fieldMappingId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.FieldMapping.FieldMappingsPartialUpdateAsync (fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Ats.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.FieldMapping.FieldMappingsPartialUpdateAsync(
- "field_mapping_id",
- new PatchedEditFieldMappingRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**fieldMappingId:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedEditFieldMappingRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.FieldMapping.RemoteFieldsRetrieveAsync (RemoteFieldsRetrieveRequest { ... }) -> Ats.RemoteFieldApiResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `RemoteFieldsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.FieldMapping.TargetFieldsRetrieveAsync () -> Ats.ExternalTargetFieldApiResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.FieldMapping.TargetFieldsRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats GenerateKey
-client.Ats.GenerateKey.CreateAsync (GenerateRemoteKeyRequest { ... }) -> Ats.RemoteKey
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Create a remote key.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.GenerateKey.CreateAsync(
- new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `GenerateRemoteKeyRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Interviews
-client.Ats.Interviews.ListAsync (InterviewsListRequest { ... }) -> PaginatedScheduledInterviewList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `ScheduledInterview` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Interviews.ListAsync(new InterviewsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `InterviewsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Interviews.CreateAsync (ScheduledInterviewEndpointRequest { ... }) -> ScheduledInterviewResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `ScheduledInterview` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Interviews.CreateAsync(
- new ScheduledInterviewEndpointRequest
- {
- Model = new ScheduledInterviewRequest(),
- RemoteUserId = "remote_user_id",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ScheduledInterviewEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Interviews.RetrieveAsync (id, InterviewsRetrieveRequest { ... }) -> ScheduledInterview
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `ScheduledInterview` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Interviews.RetrieveAsync("id", new InterviewsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `InterviewsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Interviews.MetaPostRetrieveAsync () -> Ats.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `ScheduledInterview` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Interviews.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats Issues
-client.Ats.Issues.ListAsync (IssuesListRequest { ... }) -> Ats.PaginatedIssueList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Gets all issues for Organization.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Issues.ListAsync(new IssuesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `IssuesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Issues.RetrieveAsync (id) -> Ats.Issue
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Get a specific issue.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Issues.RetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Ats JobInterviewStages
-client.Ats.JobInterviewStages.ListAsync (JobInterviewStagesListRequest { ... }) -> PaginatedJobInterviewStageList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `JobInterviewStage` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.JobInterviewStages.ListAsync(new JobInterviewStagesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `JobInterviewStagesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.JobInterviewStages.RetrieveAsync (id, JobInterviewStagesRetrieveRequest { ... }) -> JobInterviewStage
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `JobInterviewStage` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.JobInterviewStages.RetrieveAsync("id", new JobInterviewStagesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `JobInterviewStagesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats JobPostings
-client.Ats.JobPostings.ListAsync (JobPostingsListRequest { ... }) -> PaginatedJobPostingList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `JobPosting` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.JobPostings.ListAsync(new JobPostingsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `JobPostingsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.JobPostings.RetrieveAsync (id, JobPostingsRetrieveRequest { ... }) -> JobPosting
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `JobPosting` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.JobPostings.RetrieveAsync("id", new JobPostingsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `JobPostingsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Jobs
-client.Ats.Jobs.ListAsync (JobsListRequest { ... }) -> PaginatedJobList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Job` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Jobs.ListAsync(new JobsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `JobsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Jobs.RetrieveAsync (id, JobsRetrieveRequest { ... }) -> Job
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Job` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Jobs.RetrieveAsync("id", new JobsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `JobsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Jobs.ScreeningQuestionsListAsync (jobId, JobsScreeningQuestionsListRequest { ... }) -> PaginatedScreeningQuestionList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `ScreeningQuestion` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Jobs.ScreeningQuestionsListAsync(
- "job_id",
- new JobsScreeningQuestionsListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**jobId:** `string`
-
-
-
-
-
-
-
-**request:** `JobsScreeningQuestionsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats LinkToken
-client.Ats.LinkToken.CreateAsync (EndUserDetailsRequest { ... }) -> Ats.LinkToken
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a link token to be used when linking a new end user.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.LinkToken.CreateAsync(
- new EndUserDetailsRequest
- {
- EndUserEmailAddress = "example@gmail.com",
- EndUserOrganizationName = "Test Organization",
- EndUserOriginId = "12345",
- Categories = new List()
- {
- Merge.Client.Ats.CategoriesEnum.Hris,
- Merge.Client.Ats.CategoriesEnum.Ats,
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EndUserDetailsRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats LinkedAccounts
-client.Ats.LinkedAccounts.ListAsync (LinkedAccountsListRequest { ... }) -> Ats.PaginatedAccountDetailsAndActionsList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-List linked accounts for your organization.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.LinkedAccounts.ListAsync(new LinkedAccountsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LinkedAccountsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Offers
-client.Ats.Offers.ListAsync (OffersListRequest { ... }) -> PaginatedOfferList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Offer` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Offers.ListAsync(new OffersListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `OffersListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Offers.RetrieveAsync (id, OffersRetrieveRequest { ... }) -> Offer
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Offer` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Offers.RetrieveAsync("id", new OffersRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `OffersRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Offices
-client.Ats.Offices.ListAsync (OfficesListRequest { ... }) -> PaginatedOfficeList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Office` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Offices.ListAsync(new OfficesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `OfficesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Offices.RetrieveAsync (id, OfficesRetrieveRequest { ... }) -> Office
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Office` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Offices.RetrieveAsync("id", new OfficesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `OfficesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Passthrough
-client.Ats.Passthrough.CreateAsync (Ats.DataPassthroughRequest { ... }) -> Ats.RemoteResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Pull data from an endpoint not currently supported by Merge.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Passthrough.CreateAsync(
- new Merge.Client.Ats.DataPassthroughRequest
- {
- Method = Merge.Client.Ats.MethodEnum.Get,
- Path = "/scooters",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `Ats.DataPassthroughRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats RegenerateKey
-client.Ats.RegenerateKey.CreateAsync (RemoteKeyForRegenerationRequest { ... }) -> Ats.RemoteKey
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Exchange remote keys.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.RegenerateKey.CreateAsync(
- new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `RemoteKeyForRegenerationRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats RejectReasons
-client.Ats.RejectReasons.ListAsync (RejectReasonsListRequest { ... }) -> PaginatedRejectReasonList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RejectReason` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.RejectReasons.ListAsync(new RejectReasonsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `RejectReasonsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.RejectReasons.RetrieveAsync (id, RejectReasonsRetrieveRequest { ... }) -> RejectReason
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `RejectReason` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.RejectReasons.RetrieveAsync("id", new RejectReasonsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `RejectReasonsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Scorecards
-client.Ats.Scorecards.ListAsync (ScorecardsListRequest { ... }) -> PaginatedScorecardList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Scorecard` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Scorecards.ListAsync(new ScorecardsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ScorecardsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Scorecards.RetrieveAsync (id, ScorecardsRetrieveRequest { ... }) -> Scorecard
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Scorecard` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Scorecards.RetrieveAsync("id", new ScorecardsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `ScorecardsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats SyncStatus
-client.Ats.SyncStatus.ListAsync (SyncStatusListRequest { ... }) -> Ats.PaginatedSyncStatusList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.SyncStatus.ListAsync(new SyncStatusListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `SyncStatusListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats ForceResync
-client.Ats.ForceResync.SyncStatusResyncCreateAsync () -> IEnumerable
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.ForceResync.SyncStatusResyncCreateAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Ats Tags
-client.Ats.Tags.ListAsync (TagsListRequest { ... }) -> Ats.PaginatedTagList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Tag` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Tags.ListAsync(new TagsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `TagsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats Users
-client.Ats.Users.ListAsync (UsersListRequest { ... }) -> PaginatedRemoteUserList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteUser` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Users.ListAsync(new UsersListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `UsersListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Ats.Users.RetrieveAsync (id, UsersRetrieveRequest { ... }) -> RemoteUser
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `RemoteUser` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.Users.RetrieveAsync("id", new UsersRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `UsersRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Ats WebhookReceivers
-client.Ats.WebhookReceivers.ListAsync () -> IEnumerable
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `WebhookReceiver` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.WebhookReceivers.ListAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Ats.WebhookReceivers.CreateAsync (WebhookReceiverRequest { ... }) -> Ats.WebhookReceiver
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `WebhookReceiver` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Ats.WebhookReceivers.CreateAsync(
- new WebhookReceiverRequest { Event = "event", IsActive = true }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `WebhookReceiverRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm AccountDetails
-client.Crm.AccountDetails.RetrieveAsync () -> Crm.AccountDetails
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Get details for a linked account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AccountDetails.RetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Crm AccountToken
-client.Crm.AccountToken.RetrieveAsync (publicToken) -> Crm.AccountToken
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns the account token for the end user with the provided public token.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AccountToken.RetrieveAsync("public_token");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**publicToken:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Accounts
-client.Crm.Accounts.ListAsync (AccountsListRequest { ... }) -> Crm.PaginatedAccountList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Account` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.ListAsync(new AccountsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AccountsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Accounts.CreateAsync (CrmAccountEndpointRequest { ... }) -> CrmAccountResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an `Account` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.CreateAsync(
- new CrmAccountEndpointRequest { Model = new Merge.Client.Crm.AccountRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CrmAccountEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Accounts.RetrieveAsync (id, AccountsRetrieveRequest { ... }) -> Crm.Account
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Account` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.RetrieveAsync("id", new AccountsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `AccountsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Accounts.PartialUpdateAsync (id, PatchedCrmAccountEndpointRequest { ... }) -> CrmAccountResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates an `Account` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.PartialUpdateAsync(
- "id",
- new PatchedCrmAccountEndpointRequest { Model = new PatchedAccountRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedCrmAccountEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Accounts.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `CRMAccount` PATCHs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.MetaPatchRetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Accounts.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `CRMAccount` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Accounts.RemoteFieldClassesListAsync (AccountsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Accounts.RemoteFieldClassesListAsync(new AccountsRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AccountsRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm AsyncPassthrough
-client.Crm.AsyncPassthrough.CreateAsync (Crm.DataPassthroughRequest { ... }) -> Crm.AsyncPassthroughReciept
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Asynchronously pull data from an endpoint not currently supported by Merge.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AsyncPassthrough.CreateAsync(
- new Merge.Client.Crm.DataPassthroughRequest
- {
- Method = Merge.Client.Crm.MethodEnum.Get,
- Path = "/scooters",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `Crm.DataPassthroughRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.AsyncPassthrough.RetrieveAsync (asyncPassthroughReceiptId) -> OneOf
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Retrieves data from earlier async-passthrough POST request
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**asyncPassthroughReceiptId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Crm AuditTrail
-client.Crm.AuditTrail.ListAsync (AuditTrailListRequest { ... }) -> Crm.PaginatedAuditLogEventList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Gets a list of audit trail events.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AuditTrail.ListAsync(new AuditTrailListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AuditTrailListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm AvailableActions
-client.Crm.AvailableActions.RetrieveAsync () -> Crm.AvailableActions
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of models and actions available for an account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AvailableActions.RetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Crm Contacts
-client.Crm.Contacts.ListAsync (ContactsListRequest { ... }) -> Crm.PaginatedContactList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Contact` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.ListAsync(new ContactsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ContactsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.CreateAsync (CrmContactEndpointRequest { ... }) -> CrmContactResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `Contact` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.CreateAsync(
- new CrmContactEndpointRequest { Model = new Merge.Client.Crm.ContactRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CrmContactEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.RetrieveAsync (id, ContactsRetrieveRequest { ... }) -> Crm.Contact
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Contact` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.RetrieveAsync("id", new ContactsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `ContactsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.PartialUpdateAsync (id, PatchedCrmContactEndpointRequest { ... }) -> CrmContactResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates a `Contact` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.PartialUpdateAsync(
- "id",
- new PatchedCrmContactEndpointRequest { Model = new PatchedContactRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedCrmContactEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.IgnoreCreateAsync (modelId, IgnoreCommonModelRequest { ... })
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.IgnoreCreateAsync(
- "model_id",
- new IgnoreCommonModelRequest { Reason = Merge.Client.Crm.ReasonEnum.GeneralCustomerRequest }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**modelId:** `string`
-
-
-
-
-
-
-
-**request:** `IgnoreCommonModelRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `CRMContact` PATCHs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.MetaPatchRetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `CRMContact` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Contacts.RemoteFieldClassesListAsync (ContactsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Contacts.RemoteFieldClassesListAsync(new ContactsRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `ContactsRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm CustomObjectClasses
-client.Crm.CustomObjectClasses.ListAsync (CustomObjectClassesListRequest { ... }) -> PaginatedCustomObjectClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `CustomObjectClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjectClasses.ListAsync(new CustomObjectClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.CustomObjectClasses.RetrieveAsync (id, CustomObjectClassesRetrieveRequest { ... }) -> CustomObjectClass
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `CustomObjectClass` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjectClasses.RetrieveAsync("id", new CustomObjectClassesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm AssociationTypes
-client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesListAsync (customObjectClassId, CustomObjectClassesAssociationTypesListRequest { ... }) -> PaginatedAssociationTypeList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `AssociationType` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesListAsync(
- "custom_object_class_id",
- new CustomObjectClassesAssociationTypesListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesAssociationTypesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesCreateAsync (customObjectClassId, CrmAssociationTypeEndpointRequest { ... }) -> CrmAssociationTypeResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an `AssociationType` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesCreateAsync(
- "custom_object_class_id",
- new CrmAssociationTypeEndpointRequest
- {
- Model = new AssociationTypeRequestRequest
- {
- SourceObjectClass = new ObjectClassDescriptionRequest
- {
- Id = "id",
- OriginType = OriginTypeEnum.CustomObject,
- },
- TargetObjectClasses = new List()
- {
- new ObjectClassDescriptionRequest
- {
- Id = "id",
- OriginType = OriginTypeEnum.CustomObject,
- },
- },
- RemoteKeyName = "remote_key_name",
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**request:** `CrmAssociationTypeEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesRetrieveAsync (customObjectClassId, id, CustomObjectClassesAssociationTypesRetrieveRequest { ... }) -> AssociationType
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `AssociationType` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesRetrieveAsync(
- "custom_object_class_id",
- "id",
- new CustomObjectClassesAssociationTypesRetrieveRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesAssociationTypesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesMetaPostRetrieveAsync (customObjectClassId) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `CRMAssociationType` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesMetaPostRetrieveAsync(
- "custom_object_class_id"
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Crm CustomObjects
-client.Crm.CustomObjects.CustomObjectClassesCustomObjectsListAsync (customObjectClassId, CustomObjectClassesCustomObjectsListRequest { ... }) -> PaginatedCustomObjectList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `CustomObject` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsListAsync(
- "custom_object_class_id",
- new CustomObjectClassesCustomObjectsListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesCustomObjectsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.CustomObjects.CustomObjectClassesCustomObjectsCreateAsync (customObjectClassId, CrmCustomObjectEndpointRequest { ... }) -> CrmCustomObjectResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `CustomObject` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsCreateAsync(
- "custom_object_class_id",
- new CrmCustomObjectEndpointRequest
- {
- Model = new CustomObjectRequest
- {
- Fields = new Dictionary() { { "test_field", "hello" } },
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**request:** `CrmCustomObjectEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRetrieveAsync (customObjectClassId, id, CustomObjectClassesCustomObjectsRetrieveRequest { ... }) -> CustomObject
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `CustomObject` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRetrieveAsync(
- "custom_object_class_id",
- "id",
- new CustomObjectClassesCustomObjectsRetrieveRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesCustomObjectsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.CustomObjects.CustomObjectClassesCustomObjectsMetaPostRetrieveAsync (customObjectClassId) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `CRMCustomObject` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsMetaPostRetrieveAsync(
- "custom_object_class_id"
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRemoteFieldClassesListAsync (CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRemoteFieldClassesListAsync(
- new CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Associations
-client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsListAsync (customObjectClassId, objectId, CustomObjectClassesCustomObjectsAssociationsListRequest { ... }) -> PaginatedAssociationList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Association` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsListAsync(
- "custom_object_class_id",
- "object_id",
- new CustomObjectClassesCustomObjectsAssociationsListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**customObjectClassId:** `string`
-
-
-
-
-
-
-
-**objectId:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesCustomObjectsAssociationsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsUpdateAsync (associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, CustomObjectClassesCustomObjectsAssociationsUpdateRequest { ... }) -> Association
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsUpdateAsync(
- "association_type_id",
- "source_class_id",
- "source_object_id",
- "target_class_id",
- "target_object_id",
- new CustomObjectClassesCustomObjectsAssociationsUpdateRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**associationTypeId:** `string`
-
-
-
-
-
-
-
-**sourceClassId:** `string`
-
-
-
-
-
-
-
-**sourceObjectId:** `string`
-
-
-
-
-
-
-
-**targetClassId:** `string`
-
-
-
-
-
-
-
-**targetObjectId:** `string`
-
-
-
-
-
-
-
-**request:** `CustomObjectClassesCustomObjectsAssociationsUpdateRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Scopes
-client.Crm.Scopes.DefaultScopesRetrieveAsync () -> Crm.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Scopes.DefaultScopesRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Scopes.LinkedAccountScopesRetrieveAsync () -> Crm.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Scopes.LinkedAccountScopesRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Scopes.LinkedAccountScopesCreateAsync (LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Crm.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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)
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Scopes.LinkedAccountScopesCreateAsync(
- new LinkedAccountCommonModelScopeDeserializerRequest
- {
- CommonModels = new List()
- {
- new Merge.Client.Crm.IndividualCommonModelScopeDeserializerRequest
- {
- ModelName = "Employee",
- ModelPermissions = new Dictionary<
- string,
- Merge.Client.Crm.ModelPermissionDeserializerRequest
- >()
- {
- {
- "READ",
- new Merge.Client.Crm.ModelPermissionDeserializerRequest { IsEnabled = true }
- },
- {
- "WRITE",
- new Merge.Client.Crm.ModelPermissionDeserializerRequest
- {
- IsEnabled = false,
- }
- },
- },
- FieldPermissions = new Merge.Client.Crm.FieldPermissionDeserializerRequest
- {
- EnabledFields = new List() { "avatar", "home_location" },
- DisabledFields = new List() { "work_location" },
- },
- },
- new Merge.Client.Crm.IndividualCommonModelScopeDeserializerRequest
- {
- ModelName = "Benefit",
- ModelPermissions = new Dictionary<
- string,
- Merge.Client.Crm.ModelPermissionDeserializerRequest
- >()
- {
- {
- "WRITE",
- new Merge.Client.Crm.ModelPermissionDeserializerRequest
- {
- IsEnabled = false,
- }
- },
- },
- },
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LinkedAccountCommonModelScopeDeserializerRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm DeleteAccount
-client.Crm.DeleteAccount.DeleteAsync ()
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Delete a linked account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.DeleteAccount.DeleteAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Crm EngagementTypes
-client.Crm.EngagementTypes.ListAsync (EngagementTypesListRequest { ... }) -> PaginatedEngagementTypeList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `EngagementType` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.EngagementTypes.ListAsync(new EngagementTypesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EngagementTypesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.EngagementTypes.RetrieveAsync (id, EngagementTypesRetrieveRequest { ... }) -> EngagementType
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `EngagementType` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.EngagementTypes.RetrieveAsync("id", new EngagementTypesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `EngagementTypesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.EngagementTypes.RemoteFieldClassesListAsync (EngagementTypesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.EngagementTypes.RemoteFieldClassesListAsync(
- new EngagementTypesRemoteFieldClassesListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EngagementTypesRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Engagements
-client.Crm.Engagements.ListAsync (EngagementsListRequest { ... }) -> PaginatedEngagementList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Engagement` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.ListAsync(new EngagementsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EngagementsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Engagements.CreateAsync (EngagementEndpointRequest { ... }) -> EngagementResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an `Engagement` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.CreateAsync(
- new EngagementEndpointRequest { Model = new EngagementRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EngagementEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Engagements.RetrieveAsync (id, EngagementsRetrieveRequest { ... }) -> Engagement
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Engagement` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.RetrieveAsync("id", new EngagementsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `EngagementsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Engagements.PartialUpdateAsync (id, PatchedEngagementEndpointRequest { ... }) -> EngagementResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates an `Engagement` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.PartialUpdateAsync(
- "id",
- new PatchedEngagementEndpointRequest { Model = new PatchedEngagementRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedEngagementEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Engagements.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Engagement` PATCHs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.MetaPatchRetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Engagements.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Engagement` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Engagements.RemoteFieldClassesListAsync (EngagementsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Engagements.RemoteFieldClassesListAsync(
- new EngagementsRemoteFieldClassesListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EngagementsRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm FieldMapping
-client.Crm.FieldMapping.FieldMappingsRetrieveAsync (FieldMappingsRetrieveRequest { ... }) -> Crm.FieldMappingApiInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.FieldMapping.FieldMappingsRetrieveAsync(new FieldMappingsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FieldMappingsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.FieldMapping.FieldMappingsCreateAsync (CreateFieldMappingRequest { ... }) -> Crm.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.FieldMapping.FieldMappingsCreateAsync(
- new CreateFieldMappingRequest
- {
- TargetFieldName = "example_target_field_name",
- TargetFieldDescription = "this is a example description of the target field",
- RemoteFieldTraversalPath = new List() { "example_remote_field" },
- RemoteMethod = "GET",
- RemoteUrlPath = "/example-url-path",
- CommonModelName = "ExampleCommonModel",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CreateFieldMappingRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.FieldMapping.FieldMappingsDestroyAsync (fieldMappingId) -> Crm.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**fieldMappingId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.FieldMapping.FieldMappingsPartialUpdateAsync (fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Crm.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.FieldMapping.FieldMappingsPartialUpdateAsync(
- "field_mapping_id",
- new PatchedEditFieldMappingRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**fieldMappingId:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedEditFieldMappingRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.FieldMapping.RemoteFieldsRetrieveAsync (RemoteFieldsRetrieveRequest { ... }) -> Crm.RemoteFieldApiResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `RemoteFieldsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.FieldMapping.TargetFieldsRetrieveAsync () -> Crm.ExternalTargetFieldApiResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.FieldMapping.TargetFieldsRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Crm GenerateKey
-client.Crm.GenerateKey.CreateAsync (GenerateRemoteKeyRequest { ... }) -> Crm.RemoteKey
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Create a remote key.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.GenerateKey.CreateAsync(
- new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `GenerateRemoteKeyRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Issues
-client.Crm.Issues.ListAsync (IssuesListRequest { ... }) -> Crm.PaginatedIssueList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Gets all issues for Organization.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Issues.ListAsync(new IssuesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `IssuesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Issues.RetrieveAsync (id) -> Crm.Issue
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Get a specific issue.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Issues.RetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Leads
-client.Crm.Leads.ListAsync (LeadsListRequest { ... }) -> PaginatedLeadList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Lead` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Leads.ListAsync(new LeadsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LeadsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Leads.CreateAsync (LeadEndpointRequest { ... }) -> LeadResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `Lead` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Leads.CreateAsync(new LeadEndpointRequest { Model = new LeadRequest() });
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LeadEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Leads.RetrieveAsync (id, LeadsRetrieveRequest { ... }) -> Lead
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Lead` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Leads.RetrieveAsync("id", new LeadsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `LeadsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Leads.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Lead` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Leads.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Leads.RemoteFieldClassesListAsync (LeadsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Leads.RemoteFieldClassesListAsync(new LeadsRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LeadsRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm LinkToken
-client.Crm.LinkToken.CreateAsync (EndUserDetailsRequest { ... }) -> Crm.LinkToken
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a link token to be used when linking a new end user.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.LinkToken.CreateAsync(
- new EndUserDetailsRequest
- {
- EndUserEmailAddress = "example@gmail.com",
- EndUserOrganizationName = "Test Organization",
- EndUserOriginId = "12345",
- Categories = new List()
- {
- Merge.Client.Crm.CategoriesEnum.Hris,
- Merge.Client.Crm.CategoriesEnum.Ats,
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EndUserDetailsRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm LinkedAccounts
-client.Crm.LinkedAccounts.ListAsync (LinkedAccountsListRequest { ... }) -> Crm.PaginatedAccountDetailsAndActionsList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-List linked accounts for your organization.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.LinkedAccounts.ListAsync(new LinkedAccountsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LinkedAccountsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Notes
-client.Crm.Notes.ListAsync (NotesListRequest { ... }) -> PaginatedNoteList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Note` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Notes.ListAsync(new NotesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `NotesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Notes.CreateAsync (NoteEndpointRequest { ... }) -> NoteResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `Note` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Notes.CreateAsync(new NoteEndpointRequest { Model = new NoteRequest() });
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `NoteEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Notes.RetrieveAsync (id, NotesRetrieveRequest { ... }) -> Note
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Note` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Notes.RetrieveAsync("id", new NotesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `NotesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Notes.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Note` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Notes.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Notes.RemoteFieldClassesListAsync (NotesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Notes.RemoteFieldClassesListAsync(new NotesRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `NotesRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Opportunities
-client.Crm.Opportunities.ListAsync (OpportunitiesListRequest { ... }) -> PaginatedOpportunityList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Opportunity` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.ListAsync(new OpportunitiesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `OpportunitiesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Opportunities.CreateAsync (OpportunityEndpointRequest { ... }) -> OpportunityResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates an `Opportunity` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.CreateAsync(
- new OpportunityEndpointRequest { Model = new OpportunityRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `OpportunityEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Opportunities.RetrieveAsync (id, OpportunitiesRetrieveRequest { ... }) -> Opportunity
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns an `Opportunity` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.RetrieveAsync("id", new OpportunitiesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `OpportunitiesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Opportunities.PartialUpdateAsync (id, PatchedOpportunityEndpointRequest { ... }) -> OpportunityResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates an `Opportunity` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.PartialUpdateAsync(
- "id",
- new PatchedOpportunityEndpointRequest { Model = new PatchedOpportunityRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedOpportunityEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Opportunities.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Opportunity` PATCHs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.MetaPatchRetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Opportunities.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Opportunity` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Opportunities.RemoteFieldClassesListAsync (OpportunitiesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Opportunities.RemoteFieldClassesListAsync(
- new OpportunitiesRemoteFieldClassesListRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `OpportunitiesRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Passthrough
-client.Crm.Passthrough.CreateAsync (Crm.DataPassthroughRequest { ... }) -> Crm.RemoteResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Pull data from an endpoint not currently supported by Merge.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Passthrough.CreateAsync(
- new Merge.Client.Crm.DataPassthroughRequest
- {
- Method = Merge.Client.Crm.MethodEnum.Get,
- Path = "/scooters",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `Crm.DataPassthroughRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm RegenerateKey
-client.Crm.RegenerateKey.CreateAsync (RemoteKeyForRegenerationRequest { ... }) -> Crm.RemoteKey
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Exchange remote keys.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.RegenerateKey.CreateAsync(
- new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `RemoteKeyForRegenerationRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Stages
-client.Crm.Stages.ListAsync (StagesListRequest { ... }) -> PaginatedStageList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Stage` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Stages.ListAsync(new StagesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `StagesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Stages.RetrieveAsync (id, StagesRetrieveRequest { ... }) -> Stage
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Stage` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Stages.RetrieveAsync("id", new StagesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `StagesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Stages.RemoteFieldClassesListAsync (StagesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Stages.RemoteFieldClassesListAsync(new StagesRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `StagesRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm SyncStatus
-client.Crm.SyncStatus.ListAsync (SyncStatusListRequest { ... }) -> Crm.PaginatedSyncStatusList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.SyncStatus.ListAsync(new SyncStatusListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `SyncStatusListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm ForceResync
-client.Crm.ForceResync.SyncStatusResyncCreateAsync () -> IEnumerable
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.ForceResync.SyncStatusResyncCreateAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Crm Tasks
-client.Crm.Tasks.ListAsync (TasksListRequest { ... }) -> PaginatedTaskList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Task` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.ListAsync(new TasksListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `TasksListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Tasks.CreateAsync (TaskEndpointRequest { ... }) -> TaskResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `Task` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.CreateAsync(new TaskEndpointRequest { Model = new TaskRequest() });
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `TaskEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Tasks.RetrieveAsync (id, TasksRetrieveRequest { ... }) -> Task
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Task` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.RetrieveAsync("id", new TasksRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `TasksRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Tasks.PartialUpdateAsync (id, PatchedTaskEndpointRequest { ... }) -> TaskResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Updates a `Task` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.PartialUpdateAsync(
- "id",
- new PatchedTaskEndpointRequest { Model = new PatchedTaskRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedTaskEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Tasks.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Task` PATCHs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.MetaPatchRetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Tasks.MetaPostRetrieveAsync () -> Crm.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `Task` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.Tasks.RemoteFieldClassesListAsync (TasksRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Tasks.RemoteFieldClassesListAsync(new TasksRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `TasksRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm Users
-client.Crm.Users.ListAsync (UsersListRequest { ... }) -> Crm.PaginatedUserList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `User` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Users.ListAsync(new UsersListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `UsersListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Users.RetrieveAsync (id, UsersRetrieveRequest { ... }) -> Crm.User
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `User` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Users.RetrieveAsync("id", new UsersRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `UsersRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Users.IgnoreCreateAsync (modelId, IgnoreCommonModelRequest { ... })
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Users.IgnoreCreateAsync(
- "model_id",
- new IgnoreCommonModelRequest { Reason = Merge.Client.Crm.ReasonEnum.GeneralCustomerRequest }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**modelId:** `string`
-
-
-
-
-
-
-
-**request:** `IgnoreCommonModelRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Crm.Users.RemoteFieldClassesListAsync (UsersRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `RemoteFieldClass` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.Users.RemoteFieldClassesListAsync(new UsersRemoteFieldClassesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `UsersRemoteFieldClassesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Crm WebhookReceivers
-client.Crm.WebhookReceivers.ListAsync () -> IEnumerable
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `WebhookReceiver` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.WebhookReceivers.ListAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Crm.WebhookReceivers.CreateAsync (WebhookReceiverRequest { ... }) -> Crm.WebhookReceiver
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `WebhookReceiver` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Crm.WebhookReceivers.CreateAsync(
- new WebhookReceiverRequest { Event = "event", IsActive = true }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `WebhookReceiverRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage AccountDetails
-client.Filestorage.AccountDetails.RetrieveAsync () -> Filestorage.AccountDetails
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Get details for a linked account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.AccountDetails.RetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Filestorage AccountToken
-client.Filestorage.AccountToken.RetrieveAsync (publicToken) -> Filestorage.AccountToken
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns the account token for the end user with the provided public token.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.AccountToken.RetrieveAsync("public_token");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**publicToken:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage AsyncPassthrough
-client.Filestorage.AsyncPassthrough.CreateAsync (Filestorage.DataPassthroughRequest { ... }) -> Filestorage.AsyncPassthroughReciept
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Asynchronously pull data from an endpoint not currently supported by Merge.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.AsyncPassthrough.CreateAsync(
- new Merge.Client.Filestorage.DataPassthroughRequest
- {
- Method = Merge.Client.Filestorage.MethodEnum.Get,
- Path = "/scooters",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `Filestorage.DataPassthroughRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.AsyncPassthrough.RetrieveAsync (asyncPassthroughReceiptId) -> OneOf
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Retrieves data from earlier async-passthrough POST request
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**asyncPassthroughReceiptId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage AuditTrail
-client.Filestorage.AuditTrail.ListAsync (AuditTrailListRequest { ... }) -> Filestorage.PaginatedAuditLogEventList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Gets a list of audit trail events.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.AuditTrail.ListAsync(new AuditTrailListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `AuditTrailListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage AvailableActions
-client.Filestorage.AvailableActions.RetrieveAsync () -> Filestorage.AvailableActions
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of models and actions available for an account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.AvailableActions.RetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Filestorage Scopes
-client.Filestorage.Scopes.DefaultScopesRetrieveAsync () -> Filestorage.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Scopes.DefaultScopesRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Scopes.LinkedAccountScopesRetrieveAsync () -> Filestorage.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Scopes.LinkedAccountScopesRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Scopes.LinkedAccountScopesCreateAsync (LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Filestorage.CommonModelScopeApi
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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)
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Scopes.LinkedAccountScopesCreateAsync(
- new LinkedAccountCommonModelScopeDeserializerRequest
- {
- CommonModels =
- new List()
- {
- new Merge.Client.Filestorage.IndividualCommonModelScopeDeserializerRequest
- {
- ModelName = "Employee",
- ModelPermissions = new Dictionary<
- string,
- Merge.Client.Filestorage.ModelPermissionDeserializerRequest
- >()
- {
- {
- "READ",
- new Merge.Client.Filestorage.ModelPermissionDeserializerRequest
- {
- IsEnabled = true,
- }
- },
- {
- "WRITE",
- new Merge.Client.Filestorage.ModelPermissionDeserializerRequest
- {
- IsEnabled = false,
- }
- },
- },
- FieldPermissions =
- new Merge.Client.Filestorage.FieldPermissionDeserializerRequest
- {
- EnabledFields = new List() { "avatar", "home_location" },
- DisabledFields = new List() { "work_location" },
- },
- },
- new Merge.Client.Filestorage.IndividualCommonModelScopeDeserializerRequest
- {
- ModelName = "Benefit",
- ModelPermissions = new Dictionary<
- string,
- Merge.Client.Filestorage.ModelPermissionDeserializerRequest
- >()
- {
- {
- "WRITE",
- new Merge.Client.Filestorage.ModelPermissionDeserializerRequest
- {
- IsEnabled = false,
- }
- },
- },
- },
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LinkedAccountCommonModelScopeDeserializerRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage DeleteAccount
-client.Filestorage.DeleteAccount.DeleteAsync ()
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Delete a linked account.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.DeleteAccount.DeleteAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Filestorage Drives
-client.Filestorage.Drives.ListAsync (DrivesListRequest { ... }) -> PaginatedDriveList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Drive` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Drives.ListAsync(new DrivesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `DrivesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Drives.RetrieveAsync (id, DrivesRetrieveRequest { ... }) -> Drive
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Drive` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Drives.RetrieveAsync("id", new DrivesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `DrivesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage FieldMapping
-client.Filestorage.FieldMapping.FieldMappingsRetrieveAsync (FieldMappingsRetrieveRequest { ... }) -> Filestorage.FieldMappingApiInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.FieldMapping.FieldMappingsRetrieveAsync(
- new FieldMappingsRetrieveRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FieldMappingsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.FieldMapping.FieldMappingsCreateAsync (CreateFieldMappingRequest { ... }) -> Filestorage.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.FieldMapping.FieldMappingsCreateAsync(
- new CreateFieldMappingRequest
- {
- TargetFieldName = "example_target_field_name",
- TargetFieldDescription = "this is a example description of the target field",
- RemoteFieldTraversalPath = new List() { "example_remote_field" },
- RemoteMethod = "GET",
- RemoteUrlPath = "/example-url-path",
- CommonModelName = "ExampleCommonModel",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `CreateFieldMappingRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.FieldMapping.FieldMappingsDestroyAsync (fieldMappingId) -> Filestorage.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**fieldMappingId:** `string`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.FieldMapping.FieldMappingsPartialUpdateAsync (fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Filestorage.FieldMappingInstanceResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.FieldMapping.FieldMappingsPartialUpdateAsync(
- "field_mapping_id",
- new PatchedEditFieldMappingRequest()
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**fieldMappingId:** `string`
-
-
-
-
-
-
-
-**request:** `PatchedEditFieldMappingRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.FieldMapping.RemoteFieldsRetrieveAsync (RemoteFieldsRetrieveRequest { ... }) -> Filestorage.RemoteFieldApiResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `RemoteFieldsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.FieldMapping.TargetFieldsRetrieveAsync () -> Filestorage.ExternalTargetFieldApiResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-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/).
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.FieldMapping.TargetFieldsRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Filestorage Files
-client.Filestorage.Files.ListAsync (FilesListRequest { ... }) -> PaginatedFileList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `File` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Files.ListAsync(new FilesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FilesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Files.CreateAsync (FileStorageFileEndpointRequest { ... }) -> FileStorageFileResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `File` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Files.CreateAsync(
- new FileStorageFileEndpointRequest { Model = new FileRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FileStorageFileEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Files.RetrieveAsync (id, FilesRetrieveRequest { ... }) -> File
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `File` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Files.RetrieveAsync("id", new FilesRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `FilesRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Files.DownloadRetrieveAsync (id, FilesDownloadRetrieveRequest { ... })
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns the `File` content with the given `id` as a stream of bytes.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Files.DownloadRetrieveAsync(
- "string",
- new FilesDownloadRetrieveRequest { MimeType = "string" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `FilesDownloadRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Files.MetaPostRetrieveAsync () -> Filestorage.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `FileStorageFile` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Files.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Filestorage Folders
-client.Filestorage.Folders.ListAsync (FoldersListRequest { ... }) -> PaginatedFolderList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Folder` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Folders.ListAsync(new FoldersListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FoldersListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Folders.CreateAsync (FileStorageFolderEndpointRequest { ... }) -> FileStorageFolderResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a `Folder` object with the given values.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Folders.CreateAsync(
- new FileStorageFolderEndpointRequest { Model = new FolderRequest() }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `FileStorageFolderEndpointRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Folders.RetrieveAsync (id, FoldersRetrieveRequest { ... }) -> Folder
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Folder` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Folders.RetrieveAsync("id", new FoldersRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `FoldersRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Folders.MetaPostRetrieveAsync () -> Filestorage.MetaResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns metadata for `FileStorageFolder` POSTs.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Folders.MetaPostRetrieveAsync();
-```
-
-
-
-
-
-
-
-
-
-
-## Filestorage GenerateKey
-client.Filestorage.GenerateKey.CreateAsync (GenerateRemoteKeyRequest { ... }) -> Filestorage.RemoteKey
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Create a remote key.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.GenerateKey.CreateAsync(
- new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `GenerateRemoteKeyRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage Groups
-client.Filestorage.Groups.ListAsync (GroupsListRequest { ... }) -> Filestorage.PaginatedGroupList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a list of `Group` objects.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Groups.ListAsync(new GroupsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `GroupsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Groups.RetrieveAsync (id, GroupsRetrieveRequest { ... }) -> Filestorage.Group
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Returns a `Group` object with the given `id`.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Groups.RetrieveAsync("id", new GroupsRetrieveRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-**request:** `GroupsRetrieveRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage Issues
-client.Filestorage.Issues.ListAsync (IssuesListRequest { ... }) -> Filestorage.PaginatedIssueList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Gets all issues for Organization.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Issues.ListAsync(new IssuesListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `IssuesListRequest`
-
-
-
-
-
-
-
-
-
-
-
-client.Filestorage.Issues.RetrieveAsync (id) -> Filestorage.Issue
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Get a specific issue.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Issues.RetrieveAsync("id");
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**id:** `string`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage LinkToken
-client.Filestorage.LinkToken.CreateAsync (EndUserDetailsRequest { ... }) -> Filestorage.LinkToken
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Creates a link token to be used when linking a new end user.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.LinkToken.CreateAsync(
- new EndUserDetailsRequest
- {
- EndUserEmailAddress = "example@gmail.com",
- EndUserOrganizationName = "Test Organization",
- EndUserOriginId = "12345",
- Categories = new List()
- {
- Merge.Client.Filestorage.CategoriesEnum.Hris,
- Merge.Client.Filestorage.CategoriesEnum.Ats,
- },
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `EndUserDetailsRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage LinkedAccounts
-client.Filestorage.LinkedAccounts.ListAsync (LinkedAccountsListRequest { ... }) -> Filestorage.PaginatedAccountDetailsAndActionsList
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-List linked accounts for your organization.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.LinkedAccounts.ListAsync(new LinkedAccountsListRequest());
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `LinkedAccountsListRequest`
-
-
-
-
-
-
-
-
-
-
-
-## Filestorage Passthrough
-client.Filestorage.Passthrough.CreateAsync (Filestorage.DataPassthroughRequest { ... }) -> Filestorage.RemoteResponse
-
-
-
-#### 📝 Description
-
-
-
-
-
-
-
-Pull data from an endpoint not currently supported by Merge.
-
-
-
-
-
-#### 🔌 Usage
-
-
-
-
-
-
-
-```csharp
-await client.Filestorage.Passthrough.CreateAsync(
- new Merge.Client.Filestorage.DataPassthroughRequest
- {
- Method = Merge.Client.Filestorage.MethodEnum.Get,
- Path = "/scooters",
- }
-);
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
-
-
-
-
-
-**request:** `Filestorage.DataPassthroughRequest`
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Merge.Client.Test/Core/Json/DateOnlyJsonTests.cs b/src/Merge.Client.Test/Core/Json/DateOnlyJsonTests.cs
new file mode 100644
index 00000000..421d05a1
--- /dev/null
+++ b/src/Merge.Client.Test/Core/Json/DateOnlyJsonTests.cs
@@ -0,0 +1,76 @@
+using Merge.Client.Core;
+using NUnit.Framework;
+
+namespace Merge.Client.Test.Core.Json;
+
+[TestFixture]
+public class DateOnlyJsonTests
+{
+ [Test]
+ public void SerializeDateOnly_ShouldMatchExpectedFormat()
+ {
+ (DateOnly dateOnly, string expected)[] testCases =
+ [
+ (new DateOnly(2023, 10, 5), "\"2023-10-05\""),
+ (new DateOnly(2023, 1, 1), "\"2023-01-01\""),
+ (new DateOnly(2023, 12, 31), "\"2023-12-31\""),
+ (new DateOnly(2023, 6, 15), "\"2023-06-15\""),
+ (new DateOnly(2023, 3, 10), "\"2023-03-10\""),
+ ];
+ foreach (var (dateOnly, expected) in testCases)
+ {
+ var json = JsonUtils.Serialize(dateOnly);
+ Assert.That(json, Is.EqualTo(expected));
+ }
+ }
+
+ [Test]
+ public void DeserializeDateOnly_ShouldMatchExpectedDateOnly()
+ {
+ (DateOnly expected, string json)[] testCases =
+ [
+ (new DateOnly(2023, 10, 5), "\"2023-10-05\""),
+ (new DateOnly(2023, 1, 1), "\"2023-01-01\""),
+ (new DateOnly(2023, 12, 31), "\"2023-12-31\""),
+ (new DateOnly(2023, 6, 15), "\"2023-06-15\""),
+ (new DateOnly(2023, 3, 10), "\"2023-03-10\""),
+ ];
+
+ foreach (var (expected, json) in testCases)
+ {
+ var dateOnly = JsonUtils.Deserialize(json);
+ Assert.That(dateOnly, Is.EqualTo(expected));
+ }
+ }
+
+ [Test]
+ public void SerializeNullableDateOnly_ShouldMatchExpectedFormat()
+ {
+ (DateOnly? dateOnly, string expected)[] testCases =
+ [
+ (new DateOnly(2023, 10, 5), "\"2023-10-05\""),
+ (null, "null"),
+ ];
+ foreach (var (dateOnly, expected) in testCases)
+ {
+ var json = JsonUtils.Serialize(dateOnly);
+ Assert.That(json, Is.EqualTo(expected));
+ }
+ }
+
+ [Test]
+ public void DeserializeNullableDateOnly_ShouldMatchExpectedDateOnly()
+ {
+ (DateOnly? expected, string json)[] testCases =
+ [
+ (new DateOnly(2023, 10, 5), "\"2023-10-05\""),
+ (null, "null"),
+ ];
+
+ foreach (var (expected, json) in testCases)
+ {
+ var dateOnly = JsonUtils.Deserialize(json);
+ Assert.That(dateOnly, Is.EqualTo(expected));
+ }
+ }
+}
diff --git a/src/Merge.Client.Test/Core/Json/DateTimeJsonTests.cs b/src/Merge.Client.Test/Core/Json/DateTimeJsonTests.cs
new file mode 100644
index 00000000..8299fe3f
--- /dev/null
+++ b/src/Merge.Client.Test/Core/Json/DateTimeJsonTests.cs
@@ -0,0 +1,110 @@
+using Merge.Client.Core;
+using NUnit.Framework;
+
+namespace Merge.Client.Test.Core.Json;
+
+[TestFixture]
+public class DateTimeJsonTests
+{
+ [Test]
+ public void SerializeDateTime_ShouldMatchExpectedFormat()
+ {
+ (DateTime dateTime, string expected)[] testCases =
+ [
+ (
+ new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc),
+ "\"2023-10-05T14:30:00.000Z\""
+ ),
+ (new DateTime(2023, 1, 1, 0, 0, 0, DateTimeKind.Utc), "\"2023-01-01T00:00:00.000Z\""),
+ (
+ new DateTime(2023, 12, 31, 23, 59, 59, DateTimeKind.Utc),
+ "\"2023-12-31T23:59:59.000Z\""
+ ),
+ (new DateTime(2023, 6, 15, 12, 0, 0, DateTimeKind.Utc), "\"2023-06-15T12:00:00.000Z\""),
+ (
+ new DateTime(2023, 3, 10, 8, 45, 30, DateTimeKind.Utc),
+ "\"2023-03-10T08:45:30.000Z\""
+ ),
+ (
+ new DateTime(2023, 3, 10, 8, 45, 30, 123, DateTimeKind.Utc),
+ "\"2023-03-10T08:45:30.123Z\""
+ ),
+ ];
+ foreach (var (dateTime, expected) in testCases)
+ {
+ var json = JsonUtils.Serialize(dateTime);
+ Assert.That(json, Is.EqualTo(expected));
+ }
+ }
+
+ [Test]
+ public void DeserializeDateTime_ShouldMatchExpectedDateTime()
+ {
+ (DateTime expected, string json)[] testCases =
+ [
+ (
+ new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc),
+ "\"2023-10-05T14:30:00.000Z\""
+ ),
+ (new DateTime(2023, 1, 1, 0, 0, 0, DateTimeKind.Utc), "\"2023-01-01T00:00:00.000Z\""),
+ (
+ new DateTime(2023, 12, 31, 23, 59, 59, DateTimeKind.Utc),
+ "\"2023-12-31T23:59:59.000Z\""
+ ),
+ (new DateTime(2023, 6, 15, 12, 0, 0, DateTimeKind.Utc), "\"2023-06-15T12:00:00.000Z\""),
+ (
+ new DateTime(2023, 3, 10, 8, 45, 30, DateTimeKind.Utc),
+ "\"2023-03-10T08:45:30.000Z\""
+ ),
+ (new DateTime(2023, 3, 10, 8, 45, 30, DateTimeKind.Utc), "\"2023-03-10T08:45:30Z\""),
+ (
+ new DateTime(2023, 3, 10, 8, 45, 30, 123, DateTimeKind.Utc),
+ "\"2023-03-10T08:45:30.123Z\""
+ ),
+ ];
+
+ foreach (var (expected, json) in testCases)
+ {
+ var dateTime = JsonUtils.Deserialize(json);
+ Assert.That(dateTime, Is.EqualTo(expected));
+ }
+ }
+
+ [Test]
+ public void SerializeNullableDateTime_ShouldMatchExpectedFormat()
+ {
+ (DateTime? expected, string json)[] testCases =
+ [
+ (
+ new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc),
+ "\"2023-10-05T14:30:00.000Z\""
+ ),
+ (null, "null"),
+ ];
+
+ foreach (var (expected, json) in testCases)
+ {
+ var dateTime = JsonUtils.Deserialize(json);
+ Assert.That(dateTime, Is.EqualTo(expected));
+ }
+ }
+
+ [Test]
+ public void DeserializeNullableDateTime_ShouldMatchExpectedDateTime()
+ {
+ (DateTime? expected, string json)[] testCases =
+ [
+ (
+ new DateTime(2023, 10, 5, 14, 30, 0, DateTimeKind.Utc),
+ "\"2023-10-05T14:30:00.000Z\""
+ ),
+ (null, "null"),
+ ];
+
+ foreach (var (expected, json) in testCases)
+ {
+ var dateTime = JsonUtils.Deserialize(json);
+ Assert.That(dateTime, Is.EqualTo(expected));
+ }
+ }
+}
diff --git a/src/Merge.Client.Test/Core/EnumSerializerTests.cs b/src/Merge.Client.Test/Core/Json/EnumSerializerTests.cs
similarity index 95%
rename from src/Merge.Client.Test/Core/EnumSerializerTests.cs
rename to src/Merge.Client.Test/Core/Json/EnumSerializerTests.cs
index 71066fe3..6ac017b7 100644
--- a/src/Merge.Client.Test/Core/EnumSerializerTests.cs
+++ b/src/Merge.Client.Test/Core/Json/EnumSerializerTests.cs
@@ -4,9 +4,10 @@
using Merge.Client.Core;
using NUnit.Framework;
-namespace Merge.Client.Test.Core;
+namespace Merge.Client.Test.Core.Json;
[TestFixture]
+[Parallelizable(ParallelScope.All)]
public class StringEnumSerializerTests
{
private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true };
diff --git a/src/Merge.Client.Test/Core/Json/JsonAccessAttributeTests.cs b/src/Merge.Client.Test/Core/Json/JsonAccessAttributeTests.cs
new file mode 100644
index 00000000..7d6db25c
--- /dev/null
+++ b/src/Merge.Client.Test/Core/Json/JsonAccessAttributeTests.cs
@@ -0,0 +1,160 @@
+using global::System.Text.Json.Serialization;
+using Merge.Client.Core;
+using NUnit.Framework;
+
+namespace Merge.Client.Test.Core.Json;
+
+[TestFixture]
+public class JsonAccessAttributeTests
+{
+ private class MyClass
+ {
+ [JsonPropertyName("read_only_prop")]
+ [JsonAccess(JsonAccessType.ReadOnly)]
+ public string? ReadOnlyProp { get; set; }
+
+ [JsonPropertyName("write_only_prop")]
+ [JsonAccess(JsonAccessType.WriteOnly)]
+ public string? WriteOnlyProp { get; set; }
+
+ [JsonPropertyName("normal_prop")]
+ public string? NormalProp { get; set; }
+
+ [JsonPropertyName("read_only_nullable_list")]
+ [JsonAccess(JsonAccessType.ReadOnly)]
+ public IEnumerable? ReadOnlyNullableList { get; set; }
+
+ [JsonPropertyName("read_only_list")]
+ [JsonAccess(JsonAccessType.ReadOnly)]
+ public IEnumerable ReadOnlyList { get; set; } = [];
+
+ [JsonPropertyName("write_only_nullable_list")]
+ [JsonAccess(JsonAccessType.WriteOnly)]
+ public IEnumerable? WriteOnlyNullableList { get; set; }
+
+ [JsonPropertyName("write_only_list")]
+ [JsonAccess(JsonAccessType.WriteOnly)]
+ public IEnumerable WriteOnlyList { get; set; } = [];
+
+ [JsonPropertyName("normal_list")]
+ public IEnumerable NormalList { get; set; } = [];
+
+ [JsonPropertyName("normal_nullable_list")]
+ public IEnumerable? NullableNormalList { get; set; }
+ }
+
+ [Test]
+ public void JsonAccessAttribute_ShouldWorkAsExpected()
+ {
+ const string json = """
+ {
+ "read_only_prop": "read",
+ "write_only_prop": "write",
+ "normal_prop": "normal_prop",
+ "read_only_nullable_list": ["item1", "item2"],
+ "read_only_list": ["item3", "item4"],
+ "write_only_nullable_list": ["item5", "item6"],
+ "write_only_list": ["item7", "item8"],
+ "normal_list": ["normal1", "normal2"],
+ "normal_nullable_list": ["normal1", "normal2"]
+ }
+ """;
+ var obj = JsonUtils.Deserialize(json);
+
+ Assert.Multiple(() =>
+ {
+ // String properties
+ Assert.That(obj.ReadOnlyProp, Is.EqualTo("read"));
+ Assert.That(obj.WriteOnlyProp, Is.Null);
+ Assert.That(obj.NormalProp, Is.EqualTo("normal_prop"));
+
+ // List properties - read only
+ var nullableReadOnlyList = obj.ReadOnlyNullableList?.ToArray();
+ Assert.That(nullableReadOnlyList, Is.Not.Null);
+ Assert.That(nullableReadOnlyList, Has.Length.EqualTo(2));
+ Assert.That(nullableReadOnlyList[0], Is.EqualTo("item1"));
+ Assert.That(nullableReadOnlyList[1], Is.EqualTo("item2"));
+
+ var readOnlyList = obj.ReadOnlyList.ToArray();
+ Assert.That(readOnlyList, Is.Not.Null);
+ Assert.That(readOnlyList, Has.Length.EqualTo(2));
+ Assert.That(readOnlyList[0], Is.EqualTo("item3"));
+ Assert.That(readOnlyList[1], Is.EqualTo("item4"));
+
+ // List properties - write only
+ Assert.That(obj.WriteOnlyNullableList, Is.Null);
+ Assert.That(obj.WriteOnlyList, Is.Not.Null);
+ Assert.That(obj.WriteOnlyList, Is.Empty);
+
+ // Normal list property
+ var normalList = obj.NormalList.ToArray();
+ Assert.That(normalList, Is.Not.Null);
+ Assert.That(normalList, Has.Length.EqualTo(2));
+ Assert.That(normalList[0], Is.EqualTo("normal1"));
+ Assert.That(normalList[1], Is.EqualTo("normal2"));
+ });
+
+ // Set up values for serialization
+ obj.WriteOnlyProp = "write";
+ obj.NormalProp = "new_value";
+ obj.WriteOnlyNullableList = new List { "write1", "write2" };
+ obj.WriteOnlyList = new List { "write3", "write4" };
+ obj.NormalList = new List { "new_normal" };
+ obj.NullableNormalList = new List { "new_normal" };
+
+ var serializedJson = JsonUtils.Serialize(obj);
+ const string expectedJson = """
+ {
+ "write_only_prop": "write",
+ "normal_prop": "new_value",
+ "write_only_nullable_list": [
+ "write1",
+ "write2"
+ ],
+ "write_only_list": [
+ "write3",
+ "write4"
+ ],
+ "normal_list": [
+ "new_normal"
+ ],
+ "normal_nullable_list": [
+ "new_normal"
+ ]
+ }
+ """;
+ Assert.That(serializedJson, Is.EqualTo(expectedJson).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public void JsonAccessAttribute_WithNullListsInJson_ShouldWorkAsExpected()
+ {
+ const string json = """
+ {
+ "read_only_prop": "read",
+ "normal_prop": "normal_prop",
+ "read_only_nullable_list": null,
+ "read_only_list": []
+ }
+ """;
+ var obj = JsonUtils.Deserialize(json);
+
+ Assert.Multiple(() =>
+ {
+ // Read-only nullable list should be null when JSON contains null
+ var nullableReadOnlyList = obj.ReadOnlyNullableList?.ToArray();
+ Assert.That(nullableReadOnlyList, Is.Null);
+
+ // Read-only non-nullable list should never be null, but empty when JSON contains null
+ var readOnlyList = obj.ReadOnlyList.ToArray(); // This should be initialized to an empty list by default
+ Assert.That(readOnlyList, Is.Not.Null);
+ Assert.That(readOnlyList, Is.Empty);
+ });
+
+ // Serialize and verify read-only lists are not included
+ var serializedJson = JsonUtils.Serialize(obj);
+ Assert.That(serializedJson, Does.Not.Contain("read_only_prop"));
+ Assert.That(serializedJson, Does.Not.Contain("read_only_nullable_list"));
+ Assert.That(serializedJson, Does.Not.Contain("read_only_list"));
+ }
+}
diff --git a/src/Merge.Client.Test/Core/OneOfSerializerTests.cs b/src/Merge.Client.Test/Core/Json/OneOfSerializerTests.cs
similarity index 87%
rename from src/Merge.Client.Test/Core/OneOfSerializerTests.cs
rename to src/Merge.Client.Test/Core/Json/OneOfSerializerTests.cs
index 7bff6992..45fe4fa3 100644
--- a/src/Merge.Client.Test/Core/OneOfSerializerTests.cs
+++ b/src/Merge.Client.Test/Core/Json/OneOfSerializerTests.cs
@@ -4,9 +4,10 @@
using NUnit.Framework;
using OneOf;
-namespace Merge.Client.Test.Core;
+namespace Merge.Client.Test.Core.Json;
[TestFixture]
+[Parallelizable(ParallelScope.All)]
public class OneOfSerializerTests
{
private class Foo
@@ -55,7 +56,7 @@ private class Bar
Foo,
Bar
>.FromT3(new Foo { StringProp = "test" });
- private const string OneOf4String = "{\n \"string_prop\": \"test\"\n}";
+ private const string OneOf4String = "{\"string_prop\": \"test\"}";
private static readonly OneOf OneOf5 = OneOf<
string,
@@ -64,7 +65,7 @@ private class Bar
Foo,
Bar
>.FromT4(new Bar { IntProp = 5 });
- private const string OneOf5String = "{\n \"int_prop\": 5\n}";
+ private const string OneOf5String = "{\"int_prop\": 5}";
[Test]
public void Serialize_OneOfs_Should_Return_Expected_String()
@@ -82,7 +83,7 @@ public void Serialize_OneOfs_Should_Return_Expected_String()
foreach (var (oneOf, expected) in testData)
{
var result = JsonUtils.Serialize(oneOf);
- Assert.That(result, Is.EqualTo(expected));
+ Assert.That(result, Is.EqualTo(expected).IgnoreWhiteSpace);
}
});
}
@@ -104,7 +105,7 @@ public void OneOfs_Should_Deserialize_From_String()
{
var result = JsonUtils.Deserialize>(json);
Assert.That(result.Index, Is.EqualTo(oneOf.Index));
- Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result.Value)));
+ Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result.Value)).IgnoreWhiteSpace);
}
});
}
@@ -119,7 +120,7 @@ public void OneOfs_Should_Deserialize_From_String()
Foo,
Bar
>.FromT4(new Bar { IntProp = 5 });
- private const string NullableOneOf2String = "{\n \"int_prop\": 5\n}";
+ private const string NullableOneOf2String = "{\"int_prop\": 5}";
[Test]
public void Serialize_NullableOneOfs_Should_Return_Expected_String()
@@ -134,7 +135,7 @@ public void Serialize_NullableOneOfs_Should_Return_Expected_String()
foreach (var (oneOf, expected) in testData)
{
var result = JsonUtils.Serialize(oneOf);
- Assert.That(result, Is.EqualTo(expected));
+ Assert.That(result, Is.EqualTo(expected).IgnoreWhiteSpace);
}
});
}
@@ -153,7 +154,7 @@ public void NullableOneOfs_Should_Deserialize_From_String()
{
var result = JsonUtils.Deserialize?>(json);
Assert.That(result?.Index, Is.EqualTo(oneOf?.Index));
- Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result?.Value)));
+ Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result?.Value)).IgnoreWhiteSpace);
}
});
}
@@ -170,7 +171,7 @@ public void NullableOneOfs_Should_Deserialize_From_String()
int,
Foo?
>.FromT2(new Foo { StringProp = "test" });
- private const string OneOfWithNullable2String = "{\n \"string_prop\": \"test\"\n}";
+ private const string OneOfWithNullable2String = "{\"string_prop\": \"test\"}";
private static readonly OneOf OneOfWithNullable3 = OneOf<
string,
@@ -193,7 +194,7 @@ public void Serialize_OneOfWithNullables_Should_Return_Expected_String()
foreach (var (oneOf, expected) in testData)
{
var result = JsonUtils.Serialize(oneOf);
- Assert.That(result, Is.EqualTo(expected));
+ Assert.That(result, Is.EqualTo(expected).IgnoreWhiteSpace);
}
});
}
@@ -213,7 +214,7 @@ public void OneOfWithNullables_Should_Deserialize_From_String()
{
var result = JsonUtils.Deserialize>(json);
Assert.That(result.Index, Is.EqualTo(oneOf.Index));
- Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result.Value)));
+ Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result.Value)).IgnoreWhiteSpace);
}
});
}
@@ -224,16 +225,16 @@ public void Serialize_OneOfWithObjectLast_Should_Return_Expected_String()
var oneOfWithObjectLast = OneOf.FromT4(
new { random = "data" }
);
- const string oneOfWithObjectLastString = "{\n \"random\": \"data\"\n}";
+ const string oneOfWithObjectLastString = "{\"random\": \"data\"}";
var result = JsonUtils.Serialize(oneOfWithObjectLast);
- Assert.That(result, Is.EqualTo(oneOfWithObjectLastString));
+ Assert.That(result, Is.EqualTo(oneOfWithObjectLastString).IgnoreWhiteSpace);
}
[Test]
public void OneOfWithObjectLast_Should_Deserialize_From_String()
{
- const string oneOfWithObjectLastString = "{\n \"random\": \"data\"\n}";
+ const string oneOfWithObjectLastString = "{\"random\": \"data\"}";
var result = JsonUtils.Deserialize>(
oneOfWithObjectLastString
);
@@ -241,7 +242,10 @@ public void OneOfWithObjectLast_Should_Deserialize_From_String()
{
Assert.That(result.Index, Is.EqualTo(4));
Assert.That(result.Value, Is.InstanceOf());
- Assert.That(JsonUtils.Serialize(result.Value), Is.EqualTo(oneOfWithObjectLastString));
+ Assert.That(
+ JsonUtils.Serialize(result.Value),
+ Is.EqualTo(oneOfWithObjectLastString).IgnoreWhiteSpace
+ );
});
}
@@ -251,16 +255,16 @@ public void Serialize_OneOfWithObjectNotLast_Should_Return_Expected_String()
var oneOfWithObjectNotLast = OneOf.FromT1(
new { random = "data" }
);
- const string oneOfWithObjectNotLastString = "{\n \"random\": \"data\"\n}";
+ const string oneOfWithObjectNotLastString = "{\"random\": \"data\"}";
var result = JsonUtils.Serialize(oneOfWithObjectNotLast);
- Assert.That(result, Is.EqualTo(oneOfWithObjectNotLastString));
+ Assert.That(result, Is.EqualTo(oneOfWithObjectNotLastString).IgnoreWhiteSpace);
}
[Test]
public void OneOfWithObjectNotLast_Should_Deserialize_From_String()
{
- const string oneOfWithObjectNotLastString = "{\n \"random\": \"data\"\n}";
+ const string oneOfWithObjectNotLastString = "{\"random\": \"data\"}";
var result = JsonUtils.Deserialize>(
oneOfWithObjectNotLastString
);
@@ -270,7 +274,7 @@ public void OneOfWithObjectNotLast_Should_Deserialize_From_String()
Assert.That(result.Value, Is.InstanceOf());
Assert.That(
JsonUtils.Serialize(result.Value),
- Is.EqualTo(oneOfWithObjectNotLastString)
+ Is.EqualTo(oneOfWithObjectNotLastString).IgnoreWhiteSpace
);
});
}
diff --git a/src/Merge.Client.Test/Core/QueryStringConverterTests.cs b/src/Merge.Client.Test/Core/QueryStringConverterTests.cs
new file mode 100644
index 00000000..447dce71
--- /dev/null
+++ b/src/Merge.Client.Test/Core/QueryStringConverterTests.cs
@@ -0,0 +1,122 @@
+using Merge.Client.Core;
+using NUnit.Framework;
+
+namespace Merge.Client.Test.Core;
+
+[TestFixture]
+public class QueryStringConverterTests
+{
+ [Test]
+ public void ToQueryStringCollection_Form()
+ {
+ var obj = new
+ {
+ Name = "John",
+ Age = 30,
+ Address = new
+ {
+ Street = "123 Main St",
+ City = "Anytown",
+ Coordinates = new[] { 39.781721f, -89.650148f },
+ },
+ Tags = new[] { "Developer", "Blogger" },
+ };
+ var result = QueryStringConverter.ToForm(obj);
+ var expected = new List>
+ {
+ new("Name", "John"),
+ new("Age", "30"),
+ new("Address[Street]", "123 Main St"),
+ new("Address[City]", "Anytown"),
+ new("Address[Coordinates]", "39.78172,-89.65015"),
+ new("Tags", "Developer,Blogger"),
+ };
+ Assert.That(result, Is.EqualTo(expected));
+ }
+
+ [Test]
+ public void ToQueryStringCollection_ExplodedForm()
+ {
+ var obj = new
+ {
+ Name = "John",
+ Age = 30,
+ Address = new
+ {
+ Street = "123 Main St",
+ City = "Anytown",
+ Coordinates = new[] { 39.781721f, -89.650148f },
+ },
+ Tags = new[] { "Developer", "Blogger" },
+ };
+ var result = QueryStringConverter.ToExplodedForm(obj);
+ var expected = new List>
+ {
+ new("Name", "John"),
+ new("Age", "30"),
+ new("Address[Street]", "123 Main St"),
+ new("Address[City]", "Anytown"),
+ new("Address[Coordinates]", "39.78172"),
+ new("Address[Coordinates]", "-89.65015"),
+ new("Tags", "Developer"),
+ new("Tags", "Blogger"),
+ };
+ Assert.That(result, Is.EqualTo(expected));
+ }
+
+ [Test]
+ public void ToQueryStringCollection_DeepObject()
+ {
+ var obj = new
+ {
+ Name = "John",
+ Age = 30,
+ Address = new
+ {
+ Street = "123 Main St",
+ City = "Anytown",
+ Coordinates = new[] { 39.781721f, -89.650148f },
+ },
+ Tags = new[] { "Developer", "Blogger" },
+ };
+ var result = QueryStringConverter.ToDeepObject(obj);
+ var expected = new List>
+ {
+ new("Name", "John"),
+ new("Age", "30"),
+ new("Address[Street]", "123 Main St"),
+ new("Address[City]", "Anytown"),
+ new("Address[Coordinates][0]", "39.78172"),
+ new("Address[Coordinates][1]", "-89.65015"),
+ new("Tags[0]", "Developer"),
+ new("Tags[1]", "Blogger"),
+ };
+ Assert.That(result, Is.EqualTo(expected));
+ }
+
+ [Test]
+ public void ToQueryStringCollection_OnString_ThrowsException()
+ {
+ var exception = Assert.Throws(() => QueryStringConverter.ToForm("invalid"));
+ Assert.That(
+ exception.Message,
+ Is.EqualTo(
+ "Only objects can be converted to query string collections. Given type is String."
+ )
+ );
+ }
+
+ [Test]
+ public void ToQueryStringCollection_OnArray_ThrowsException()
+ {
+ var exception = Assert.Throws(
+ () => QueryStringConverter.ToForm(Array.Empty())
+ );
+ Assert.That(
+ exception.Message,
+ Is.EqualTo(
+ "Only objects can be converted to query string collections. Given type is Array."
+ )
+ );
+ }
+}
diff --git a/src/Merge.Client.Test/Core/RawClientTests.cs b/src/Merge.Client.Test/Core/RawClientTests.cs
deleted file mode 100644
index f65ae64f..00000000
--- a/src/Merge.Client.Test/Core/RawClientTests.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using Merge.Client.Core;
-using NUnit.Framework;
-using WireMock.Server;
-using SystemTask = System.Threading.Tasks.Task;
-using WireMockRequest = WireMock.RequestBuilders.Request;
-using WireMockResponse = WireMock.ResponseBuilders.Response;
-
-namespace Merge.Client.Test.Core;
-
-[TestFixture]
-public class RawClientTests
-{
- private const int MaxRetries = 3;
- private WireMockServer _server;
- private HttpClient _httpClient;
- private RawClient _rawClient;
- private string _baseUrl;
-
- [SetUp]
- public void SetUp()
- {
- _server = WireMockServer.Start();
- _baseUrl = _server.Url ?? "";
- _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) };
- _rawClient = new RawClient(
- new ClientOptions { HttpClient = _httpClient, MaxRetries = MaxRetries }
- );
- }
-
- [Test]
- [TestCase(408)]
- [TestCase(429)]
- [TestCase(500)]
- [TestCase(504)]
- public async SystemTask MakeRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode)
- {
- _server
- .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
- .InScenario("Retry")
- .WillSetStateTo("Server Error")
- .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode));
-
- _server
- .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
- .InScenario("Retry")
- .WhenStateIs("Server Error")
- .WillSetStateTo("Success")
- .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode));
-
- _server
- .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
- .InScenario("Retry")
- .WhenStateIs("Success")
- .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
-
- var request = new RawClient.BaseApiRequest
- {
- BaseUrl = _baseUrl,
- Method = HttpMethod.Get,
- Path = "/test",
- };
-
- var response = await _rawClient.MakeRequestAsync(request);
- Assert.That(response.StatusCode, Is.EqualTo(200));
-
- var content = await response.Raw.Content.ReadAsStringAsync();
- Assert.That(content, Is.EqualTo("Success"));
-
- Assert.That(_server.LogEntries.Count, Is.EqualTo(MaxRetries));
- }
-
- [Test]
- [TestCase(400)]
- [TestCase(409)]
- public async SystemTask MakeRequestAsync_ShouldRetry_OnNonRetryableStatusCodes(int statusCode)
- {
- _server
- .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
- .InScenario("Retry")
- .WillSetStateTo("Server Error")
- .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure"));
-
- var request = new RawClient.BaseApiRequest
- {
- BaseUrl = _baseUrl,
- Method = HttpMethod.Get,
- Path = "/test",
- };
-
- var response = await _rawClient.MakeRequestAsync(request);
- Assert.That(response.StatusCode, Is.EqualTo(statusCode));
-
- var content = await response.Raw.Content.ReadAsStringAsync();
- Assert.That(content, Is.EqualTo("Failure"));
-
- Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
- }
-
- [TearDown]
- public void TearDown()
- {
- _server.Dispose();
- _httpClient.Dispose();
- }
-}
diff --git a/src/Merge.Client.Test/Core/RawClientTests/AdditionalHeadersTests.cs b/src/Merge.Client.Test/Core/RawClientTests/AdditionalHeadersTests.cs
new file mode 100644
index 00000000..b21c5abb
--- /dev/null
+++ b/src/Merge.Client.Test/Core/RawClientTests/AdditionalHeadersTests.cs
@@ -0,0 +1,137 @@
+using Merge.Client.Core;
+using NUnit.Framework;
+using WireMock.Server;
+using SystemTask = global::System.Threading.Tasks.Task;
+using WireMockRequest = WireMock.RequestBuilders.Request;
+using WireMockResponse = WireMock.ResponseBuilders.Response;
+
+// ReSharper disable NullableWarningSuppressionIsUsed
+
+namespace Merge.Client.Test.Core.RawClientTests;
+
+[TestFixture]
+[Parallelizable(ParallelScope.Self)]
+public class AdditionalHeadersTests
+{
+ private WireMockServer _server;
+ private HttpClient _httpClient;
+ private RawClient _rawClient;
+ private string _baseUrl;
+
+ [SetUp]
+ public void SetUp()
+ {
+ _server = WireMockServer.Start();
+ _baseUrl = _server.Url ?? "";
+ _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) };
+ _rawClient = new RawClient(
+ new ClientOptions
+ {
+ HttpClient = _httpClient,
+ Headers = new Headers(
+ new Dictionary
+ {
+ ["a"] = "client_headers",
+ ["b"] = "client_headers",
+ ["c"] = "client_headers",
+ ["d"] = "client_headers",
+ ["e"] = "client_headers",
+ ["f"] = "client_headers",
+ ["client_multiple"] = "client_headers",
+ }
+ ),
+ AdditionalHeaders = new List>
+ {
+ new("b", "client_additional_headers"),
+ new("c", "client_additional_headers"),
+ new("d", "client_additional_headers"),
+ new("e", null),
+ new("client_multiple", "client_additional_headers1"),
+ new("client_multiple", "client_additional_headers2"),
+ },
+ }
+ );
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalHeaderParameters()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ Headers = new Headers(
+ new Dictionary
+ {
+ ["c"] = "request_headers",
+ ["d"] = "request_headers",
+ ["request_multiple"] = "request_headers",
+ }
+ ),
+ Options = new RequestOptions
+ {
+ AdditionalHeaders = new List>
+ {
+ new("d", "request_additional_headers"),
+ new("f", null),
+ new("request_multiple", "request_additional_headers1"),
+ new("request_multiple", "request_additional_headers2"),
+ },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.Multiple(() =>
+ {
+ Assert.That(content, Is.EqualTo("Success"));
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ var headers =
+ _server.LogEntries[0].RequestMessage.Headers
+ ?? throw new Exception("Headers are null");
+
+ Assert.That(headers, Contains.Key("client_multiple"));
+ Assert.That(headers!["client_multiple"][0], Does.Contain("client_additional_headers1"));
+ Assert.That(headers["client_multiple"][0], Does.Contain("client_additional_headers2"));
+
+ Assert.That(headers, Contains.Key("request_multiple"));
+ Assert.That(
+ headers["request_multiple"][0],
+ Does.Contain("request_additional_headers1")
+ );
+ Assert.That(
+ headers["request_multiple"][0],
+ Does.Contain("request_additional_headers2")
+ );
+
+ Assert.That(headers, Contains.Key("a"));
+ Assert.That(headers["a"][0], Does.Contain("client_headers"));
+
+ Assert.That(headers, Contains.Key("b"));
+ Assert.That(headers["b"][0], Does.Contain("client_additional_headers"));
+
+ Assert.That(headers, Contains.Key("c"));
+ Assert.That(headers["c"][0], Does.Contain("request_headers"));
+
+ Assert.That(headers, Contains.Key("d"));
+ Assert.That(headers["d"][0], Does.Contain("request_additional_headers"));
+
+ Assert.That(headers, Does.Not.ContainKey("e"));
+ Assert.That(headers, Does.Not.ContainKey("f"));
+ });
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ _server.Dispose();
+ _httpClient.Dispose();
+ }
+}
diff --git a/src/Merge.Client.Test/Core/RawClientTests/AdditionalParametersTests.cs b/src/Merge.Client.Test/Core/RawClientTests/AdditionalParametersTests.cs
new file mode 100644
index 00000000..34d50cc1
--- /dev/null
+++ b/src/Merge.Client.Test/Core/RawClientTests/AdditionalParametersTests.cs
@@ -0,0 +1,300 @@
+using Merge.Client.Core;
+using NUnit.Framework;
+using WireMock.Matchers;
+using WireMock.Server;
+using SystemTask = global::System.Threading.Tasks.Task;
+using WireMockRequest = WireMock.RequestBuilders.Request;
+using WireMockResponse = WireMock.ResponseBuilders.Response;
+
+namespace Merge.Client.Test.Core.RawClientTests;
+
+[TestFixture]
+[Parallelizable(ParallelScope.Self)]
+public class AdditionalParametersTests
+{
+ private WireMockServer _server;
+ private HttpClient _httpClient;
+ private RawClient _rawClient;
+ private string _baseUrl;
+
+ [SetUp]
+ public void SetUp()
+ {
+ _server = WireMockServer.Start();
+ _baseUrl = _server.Url ?? "";
+ _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) };
+ _rawClient = new RawClient(new ClientOptions { HttpClient = _httpClient });
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalQueryParameters()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").WithParam("foo", "bar").UsingGet())
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest()
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ Options = new RequestOptions
+ {
+ AdditionalQueryParameters = new List>
+ {
+ new("foo", "bar"),
+ },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalQueryParameters_Override()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").WithParam("foo", "null").UsingGet())
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest()
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ Query = new Dictionary { { "foo", "bar" } },
+ Options = new RequestOptions
+ {
+ AdditionalQueryParameters = new List>
+ {
+ new("foo", "null"),
+ },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalQueryParameters_Merge()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest()
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ Query = new Dictionary { { "foo", "baz" } },
+ Options = new RequestOptions
+ {
+ AdditionalQueryParameters = new List>
+ {
+ new("foo", "one"),
+ new("foo", "two"),
+ },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+
+ var requestUrl = _server.LogEntries.First().RequestMessage.Url;
+ Assert.That(requestUrl, Does.Contain("foo=one"));
+ Assert.That(requestUrl, Does.Contain("foo=two"));
+ Assert.That(requestUrl, Does.Not.Contain("foo=baz"));
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalBodyProperties()
+ {
+ string expectedBody = "{\n \"foo\": \"bar\",\n \"baz\": \"qux\"\n}";
+ _server
+ .Given(
+ WireMockRequest
+ .Create()
+ .WithPath("/test")
+ .UsingPost()
+ .WithBody(new JsonMatcher(expectedBody))
+ )
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Post,
+ Path = "/test",
+ Body = new Dictionary { { "foo", "bar" } },
+ Options = new RequestOptions
+ {
+ AdditionalBodyProperties = new Dictionary { { "baz", "qux" } },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalBodyProperties_Override()
+ {
+ string expectedBody = "{\n \"foo\": null\n}";
+ _server
+ .Given(
+ WireMockRequest
+ .Create()
+ .WithPath("/test")
+ .UsingPost()
+ .WithBody(new JsonMatcher(expectedBody))
+ )
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Post,
+ Path = "/test",
+ Body = new Dictionary { { "foo", "bar" } },
+ Options = new RequestOptions
+ {
+ AdditionalBodyProperties = new Dictionary { { "foo", null } },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_AdditionalBodyProperties_DeepMerge()
+ {
+ const string expectedBody = """
+ {
+ "foo": {
+ "inner1": "original",
+ "inner2": "overridden",
+ "inner3": {
+ "deepProp1": "deep-override",
+ "deepProp2": "original",
+ "deepProp3": null,
+ "deepProp4": "new-value"
+ }
+ },
+ "bar": "new-value",
+ "baz": ["new","value"]
+ }
+ """;
+
+ _server
+ .Given(
+ WireMockRequest
+ .Create()
+ .WithPath("/test-deep-merge")
+ .UsingPost()
+ .WithBody(new JsonMatcher(expectedBody))
+ )
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new JsonRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Post,
+ Path = "/test-deep-merge",
+ Body = new Dictionary
+ {
+ {
+ "foo",
+ new Dictionary
+ {
+ { "inner1", "original" },
+ { "inner2", "original" },
+ {
+ "inner3",
+ new Dictionary
+ {
+ { "deepProp1", "deep-original" },
+ { "deepProp2", "original" },
+ { "deepProp3", "" },
+ }
+ },
+ }
+ },
+ {
+ "baz",
+ new List { "original" }
+ },
+ },
+ Options = new RequestOptions
+ {
+ AdditionalBodyProperties = new Dictionary
+ {
+ {
+ "foo",
+ new Dictionary
+ {
+ { "inner2", "overridden" },
+ {
+ "inner3",
+ new Dictionary
+ {
+ { "deepProp1", "deep-override" },
+ { "deepProp3", null },
+ { "deepProp4", "new-value" },
+ }
+ },
+ }
+ },
+ { "bar", "new-value" },
+ {
+ "baz",
+ new List { "new", "value" }
+ },
+ },
+ },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ _server.Dispose();
+ _httpClient.Dispose();
+ }
+}
diff --git a/src/Merge.Client.Test/Core/RawClientTests/MultipartFormTests.cs b/src/Merge.Client.Test/Core/RawClientTests/MultipartFormTests.cs
new file mode 100644
index 00000000..faff9672
--- /dev/null
+++ b/src/Merge.Client.Test/Core/RawClientTests/MultipartFormTests.cs
@@ -0,0 +1,1120 @@
+using global::System.Net.Http;
+using global::System.Text;
+using global::System.Text.Json.Serialization;
+using Merge.Client.Core;
+using NUnit.Framework;
+using SystemTask = global::System.Threading.Tasks.Task;
+
+namespace Merge.Client.Test.Core.RawClientTests;
+
+[TestFixture]
+[Parallelizable(ParallelScope.Self)]
+public class MultipartFormTests
+{
+ private static SimpleObject _simpleObject = new();
+
+ private static string _simpleFormEncoded =
+ "meta=data&Date=2023-10-01&Time=12:00:00&Duration=01:00:00&Id=1a1bb98f-47c6-407b-9481-78476affe52a&IsActive=true&Count=42&Initial=A&Values=data,2023-10-01,12:00:00,01:00:00,1a1bb98f-47c6-407b-9481-78476affe52a,true,42,A";
+
+ private static string _simpleExplodedFormEncoded =
+ "meta=data&Date=2023-10-01&Time=12:00:00&Duration=01:00:00&Id=1a1bb98f-47c6-407b-9481-78476affe52a&IsActive=true&Count=42&Initial=A&Values=data&Values=2023-10-01&Values=12:00:00&Values=01:00:00&Values=1a1bb98f-47c6-407b-9481-78476affe52a&Values=true&Values=42&Values=A";
+
+ private static ComplexObject _complexObject = new();
+
+ private static string _complexJson = """
+ {
+ "meta": "data",
+ "Nested": {
+ "foo": "value"
+ },
+ "NestedDictionary": {
+ "key": {
+ "foo": "value"
+ }
+ },
+ "ListOfObjects": [
+ {
+ "foo": "value"
+ },
+ {
+ "foo": "value2"
+ }
+ ],
+ "Date": "2023-10-01",
+ "Time": "12:00:00",
+ "Duration": "01:00:00",
+ "Id": "1a1bb98f-47c6-407b-9481-78476affe52a",
+ "IsActive": true,
+ "Count": 42,
+ "Initial": "A"
+ }
+ """;
+
+ [Test]
+ public async SystemTask ShouldAddStringPart()
+ {
+ const string partInput = "string content";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringPart("string", partInput);
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=string
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddStringParts()
+ {
+ const string partInput = "string content";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringParts("strings", [partInput, partInput]);
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask GivenNull_ShouldNotAddStringPart()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringPart("string", null);
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddStringParts_WithNullsInList()
+ {
+ const string partInput = "string content";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringParts("strings", [partInput, null, partInput]);
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddStringPart_WithContentType()
+ {
+ const string partInput = "string content ";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringPart("string", partInput, "text/xml");
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/xml
+ Content-Disposition: form-data; name=string
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddStringPart_WithContentTypeAndCharset()
+ {
+ const string partInput = "string content ";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringPart("string", partInput, "text/xml; charset=utf-8");
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/xml; charset=utf-8
+ Content-Disposition: form-data; name=string
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddStringParts_WithContentType()
+ {
+ const string partInput = "string content ";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringParts("strings", [partInput, partInput], "text/xml");
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/xml
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}
+ Content-Type: text/xml
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddStringParts_WithContentTypeAndCharset()
+ {
+ const string partInput = "string content ";
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddStringParts(
+ "strings",
+ [partInput, partInput],
+ "text/xml; charset=utf-8"
+ );
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/xml; charset=utf-8
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}
+ Content-Type: text/xml; charset=utf-8
+ Content-Disposition: form-data; name=strings
+
+ {partInput}
+ --{boundary}--
+ """;
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameter_WithFileName()
+ {
+ var (partInput, partExpectedString) = GetFileParameterTestData();
+ var file = new FileParameter { Stream = partInput, FileName = "test.txt" };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", file);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/octet-stream
+ Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt
+
+ {partExpectedString}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameter_WithoutFileName()
+ {
+ var (partInput, partExpectedString) = GetFileParameterTestData();
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", partInput);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/octet-stream
+ Content-Disposition: form-data; name=file
+
+ {partExpectedString}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameter_WithContentType()
+ {
+ var (partInput, partExpectedString) = GetFileParameterTestData();
+ var file = new FileParameter
+ {
+ Stream = partInput,
+ FileName = "test.txt",
+ ContentType = "text/plain",
+ };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", file, "ignored-fallback-content-type");
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt
+
+ {partExpectedString}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameter_WithContentTypeAndCharset()
+ {
+ var (partInput, partExpectedString) = GetFileParameterTestData();
+ var file = new FileParameter
+ {
+ Stream = partInput,
+ FileName = "test.txt",
+ ContentType = "text/plain; charset=utf-8",
+ };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", file, "ignored-fallback-content-type");
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain; charset=utf-8
+ Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt
+
+ {partExpectedString}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameter_WithFallbackContentType()
+ {
+ var (partInput, partExpectedString) = GetFileParameterTestData();
+ var file = new FileParameter { Stream = partInput, FileName = "test.txt" };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", file, "text/plain");
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain
+ Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt
+
+ {partExpectedString}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameter_WithFallbackContentTypeAndCharset()
+ {
+ var (partInput, partExpectedString) = GetFileParameterTestData();
+ var file = new FileParameter { Stream = partInput, FileName = "test.txt" };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", file, "text/plain; charset=utf-8");
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: text/plain; charset=utf-8
+ Content-Disposition: form-data; name=file; filename=test.txt; filename*=utf-8''test.txt
+
+ {partExpectedString}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameters()
+ {
+ var (partInput1, partExpectedString1) = GetFileParameterTestData();
+ var (partInput2, partExpectedString2) = GetFileParameterTestData();
+ var file1 = new FileParameter { Stream = partInput1, FileName = "test1.txt" };
+ var file2 = new FileParameter { Stream = partInput2, FileName = "test2.txt" };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterParts("file", [file1, file2]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/octet-stream
+ Content-Disposition: form-data; name=file; filename=test1.txt; filename*=utf-8''test1.txt
+
+ {partExpectedString1}
+ --{boundary}
+ Content-Type: application/octet-stream
+ Content-Disposition: form-data; name=file; filename=test2.txt; filename*=utf-8''test2.txt
+
+ {partExpectedString2}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFileParameters_WithNullsInList()
+ {
+ var (partInput1, partExpectedString1) = GetFileParameterTestData();
+ var (partInput2, partExpectedString2) = GetFileParameterTestData();
+ var file1 = new FileParameter { Stream = partInput1, FileName = "test1.txt" };
+ var file2 = new FileParameter { Stream = partInput2, FileName = "test2.txt" };
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterParts("file", [file1, null, file2]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/octet-stream
+ Content-Disposition: form-data; name=file; filename=test1.txt; filename*=utf-8''test1.txt
+
+ {partExpectedString1}
+ --{boundary}
+ Content-Type: application/octet-stream
+ Content-Disposition: form-data; name=file; filename=test2.txt; filename*=utf-8''test2.txt
+
+ {partExpectedString2}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask GivenNull_ShouldNotAddFileParameter()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFileParameterPart("file", null);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddJsonPart_WithComplexObject()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddJsonPart("object", _complexObject);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/json
+ Content-Disposition: form-data; name=object
+
+ {_complexJson}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddJsonPart_WithComplexObjectList()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddJsonParts("objects", [_complexObject, _complexObject]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/json
+ Content-Disposition: form-data; name=objects
+
+ {_complexJson}
+ --{boundary}
+ Content-Type: application/json
+ Content-Disposition: form-data; name=objects
+
+ {_complexJson}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask GivenNull_ShouldNotAddJsonPart()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddJsonPart("object", null);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddJsonParts_WithNullsInList()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddJsonParts("objects", [_complexObject, null]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/json
+ Content-Disposition: form-data; name=objects
+
+ {_complexJson}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddJsonParts_WithContentType()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddJsonParts("objects", [new { }], "application/json-patch+json");
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $$"""
+ --{{boundary}}
+ Content-Type: application/json-patch+json
+ Content-Disposition: form-data; name=objects
+
+ {}
+ --{{boundary}}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFormEncodedParts_WithSimpleObject()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedPart("object", _simpleObject);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=object
+
+ {EscapeFormEncodedString(_simpleFormEncoded)}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFormEncodedParts_WithSimpleObjectList()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedParts("objects", [_simpleObject, _simpleObject]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ {EscapeFormEncodedString(_simpleFormEncoded)}
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ {EscapeFormEncodedString(_simpleFormEncoded)}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldNotAddFormEncodedParts_WithNull()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedParts("object", null);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldNotAddFormEncodedParts_WithNullsInList()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedParts("objects", [_simpleObject, null]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ {EscapeFormEncodedString(_simpleFormEncoded)}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFormEncodedPart_WithContentType()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedPart(
+ "objects",
+ new { foo = "bar" },
+ "application/x-www-form-urlencoded"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFormEncodedPart_WithContentTypeAndCharset()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedPart(
+ "objects",
+ new { foo = "bar" },
+ "application/x-www-form-urlencoded; charset=utf-8"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFormEncodedParts_WithContentType()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedParts(
+ "objects",
+ [new { foo = "bar" }],
+ "application/x-www-form-urlencoded"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddFormEncodedParts_WithContentTypeAndCharset()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddFormEncodedParts(
+ "objects",
+ [new { foo = "bar" }],
+ "application/x-www-form-urlencoded; charset=utf-8"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddExplodedFormEncodedParts_WithSimpleObject()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedPart("object", _simpleObject);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=object
+
+ {EscapeFormEncodedString(_simpleExplodedFormEncoded)}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddExplodedFormEncodedParts_WithSimpleObjectList()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedParts("objects", [_simpleObject, _simpleObject]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ {EscapeFormEncodedString(_simpleExplodedFormEncoded)}
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ {EscapeFormEncodedString(_simpleExplodedFormEncoded)}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldNotAddExplodedFormEncodedParts_WithNull()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedPart("object", null);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldNotAddExplodedFormEncodedParts_WithNullsInList()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedParts("objects", [_simpleObject, null]);
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ {EscapeFormEncodedString(_simpleExplodedFormEncoded)}
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddExplodedFormEncodedPart_WithContentType()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedPart(
+ "objects",
+ new { foo = "bar" },
+ "application/x-www-form-urlencoded"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddExplodedFormEncodedPart_WithContentTypeAndCharset()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedPart(
+ "objects",
+ new { foo = "bar" },
+ "application/x-www-form-urlencoded; charset=utf-8"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddExplodedFormEncodedParts_WithContentType()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedParts(
+ "objects",
+ [new { foo = "bar" }],
+ "application/x-www-form-urlencoded"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ [Test]
+ public async SystemTask ShouldAddExplodedFormEncodedParts_WithContentTypeAndCharset()
+ {
+ var multipartFormRequest = CreateMultipartFormRequest();
+ multipartFormRequest.AddExplodedFormEncodedParts(
+ "objects",
+ [new { foo = "bar" }],
+ "application/x-www-form-urlencoded; charset=utf-8"
+ );
+
+ var httpContent = multipartFormRequest.CreateContent();
+ Assert.That(httpContent, Is.InstanceOf());
+ var multipartContent = (MultipartFormDataContent)httpContent;
+
+ var boundary = GetBoundary(multipartContent);
+ var expected = $"""
+ --{boundary}
+ Content-Type: application/x-www-form-urlencoded; charset=utf-8
+ Content-Disposition: form-data; name=objects
+
+ foo=bar
+ --{boundary}--
+ """;
+
+ var actual = await multipartContent.ReadAsStringAsync();
+ Assert.That(actual, Is.EqualTo(expected).IgnoreWhiteSpace);
+ }
+
+ private static string EscapeFormEncodedString(string input)
+ {
+ return string.Join(
+ "&",
+ input
+ .Split('&')
+ .Select(x => x.Split('='))
+ .Select(x => $"{Uri.EscapeDataString(x[0])}={Uri.EscapeDataString(x[1])}")
+ );
+ }
+
+ private static string GetBoundary(MultipartFormDataContent content)
+ {
+ return content
+ .Headers.ContentType?.Parameters.Single(p =>
+ p.Name.Equals("boundary", StringComparison.OrdinalIgnoreCase)
+ )
+ .Value?.Trim('"') ?? throw new Exception("Boundary not found");
+ }
+
+ private static MultipartFormRequest CreateMultipartFormRequest()
+ {
+ return new MultipartFormRequest
+ {
+ BaseUrl = "https://localhost",
+ Method = HttpMethod.Post,
+ Path = "",
+ };
+ }
+
+ private static (Stream partInput, string partExpectedString) GetFileParameterTestData()
+ {
+ const string partExpectedString = "file content";
+ var partInput = new MemoryStream(Encoding.Default.GetBytes(partExpectedString));
+ return (partInput, partExpectedString);
+ }
+
+ private class SimpleObject
+ {
+ [JsonPropertyName("meta")]
+ public string Meta { get; set; } = "data";
+ public DateOnly Date { get; set; } = DateOnly.Parse("2023-10-01");
+ public TimeOnly Time { get; set; } = TimeOnly.Parse("12:00:00");
+ public TimeSpan Duration { get; set; } = TimeSpan.FromHours(1);
+ public Guid Id { get; set; } = Guid.Parse("1a1bb98f-47c6-407b-9481-78476affe52a");
+ public bool IsActive { get; set; } = true;
+ public int Count { get; set; } = 42;
+ public char Initial { get; set; } = 'A';
+ public IEnumerable Values { get; set; } =
+ [
+ "data",
+ DateOnly.Parse("2023-10-01"),
+ TimeOnly.Parse("12:00:00"),
+ TimeSpan.FromHours(1),
+ Guid.Parse("1a1bb98f-47c6-407b-9481-78476affe52a"),
+ true,
+ 42,
+ 'A',
+ ];
+ }
+
+ private class ComplexObject
+ {
+ [JsonPropertyName("meta")]
+ public string Meta { get; set; } = "data";
+
+ public object Nested { get; set; } = new { foo = "value" };
+
+ public Dictionary NestedDictionary { get; set; } =
+ new() { { "key", new { foo = "value" } } };
+
+ public IEnumerable ListOfObjects { get; set; } =
+ new List { new { foo = "value" }, new { foo = "value2" } };
+
+ public DateOnly Date { get; set; } = DateOnly.Parse("2023-10-01");
+ public TimeOnly Time { get; set; } = TimeOnly.Parse("12:00:00");
+ public TimeSpan Duration { get; set; } = TimeSpan.FromHours(1);
+ public Guid Id { get; set; } = Guid.Parse("1a1bb98f-47c6-407b-9481-78476affe52a");
+ public bool IsActive { get; set; } = true;
+ public int Count { get; set; } = 42;
+ public char Initial { get; set; } = 'A';
+ }
+}
diff --git a/src/Merge.Client.Test/Core/RawClientTests/RetriesTests.cs b/src/Merge.Client.Test/Core/RawClientTests/RetriesTests.cs
new file mode 100644
index 00000000..bfbb096f
--- /dev/null
+++ b/src/Merge.Client.Test/Core/RawClientTests/RetriesTests.cs
@@ -0,0 +1,214 @@
+using global::System.Net.Http;
+using Merge.Client.Core;
+using NUnit.Framework;
+using WireMock.Server;
+using SystemTask = global::System.Threading.Tasks.Task;
+using WireMockRequest = WireMock.RequestBuilders.Request;
+using WireMockResponse = WireMock.ResponseBuilders.Response;
+
+namespace Merge.Client.Test.Core.RawClientTests;
+
+[TestFixture]
+[Parallelizable(ParallelScope.Self)]
+public class RetriesTests
+{
+ private const int MaxRetries = 3;
+ private WireMockServer _server;
+ private HttpClient _httpClient;
+ private RawClient _rawClient;
+ private string _baseUrl;
+
+ [SetUp]
+ public void SetUp()
+ {
+ _server = WireMockServer.Start();
+ _baseUrl = _server.Url ?? "";
+ _httpClient = new HttpClient { BaseAddress = new Uri(_baseUrl) };
+ _rawClient = new RawClient(
+ new ClientOptions { HttpClient = _httpClient, MaxRetries = MaxRetries }
+ )
+ {
+ BaseRetryDelay = 0,
+ };
+ }
+
+ [Test]
+ [TestCase(408)]
+ [TestCase(429)]
+ [TestCase(500)]
+ [TestCase(504)]
+ public async SystemTask SendRequestAsync_ShouldRetry_OnRetryableStatusCodes(int statusCode)
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
+ .InScenario("Retry")
+ .WillSetStateTo("Server Error")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode));
+
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
+ .InScenario("Retry")
+ .WhenStateIs("Server Error")
+ .WillSetStateTo("Success")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode));
+
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
+ .InScenario("Retry")
+ .WhenStateIs("Success")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new EmptyRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ using (Assert.EnterMultipleScope())
+ {
+ Assert.That(content, Is.EqualTo("Success"));
+
+ Assert.That(_server.LogEntries, Has.Count.EqualTo(MaxRetries));
+ }
+ }
+
+ [Test]
+ [TestCase(400)]
+ [TestCase(409)]
+ public async SystemTask SendRequestAsync_ShouldRetry_OnNonRetryableStatusCodes(int statusCode)
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingGet())
+ .InScenario("Retry")
+ .WillSetStateTo("Server Error")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(statusCode).WithBody("Failure"));
+
+ var request = new JsonRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ Body = new { },
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(statusCode));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.Multiple(() =>
+ {
+ Assert.That(content, Is.EqualTo("Failure"));
+
+ Assert.That(_server.LogEntries, Has.Count.EqualTo(1));
+ });
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_ShouldNotRetry_WithStreamRequest()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingPost())
+ .InScenario("Retry")
+ .WillSetStateTo("Server Error")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure"));
+
+ var request = new StreamRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Post,
+ Path = "/test",
+ Body = new MemoryStream(),
+ };
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(429));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.Multiple(() =>
+ {
+ Assert.That(content, Is.EqualTo("Failure"));
+ Assert.That(_server.LogEntries, Has.Count.EqualTo(1));
+ });
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_ShouldNotRetry_WithMultiPartFormRequest_WithStream()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingPost())
+ .InScenario("Retry")
+ .WillSetStateTo("Server Error")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(429).WithBody("Failure"));
+
+ var request = new MultipartFormRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Post,
+ Path = "/test",
+ };
+ request.AddFileParameterPart("file", new MemoryStream());
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(429));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.Multiple(() =>
+ {
+ Assert.That(content, Is.EqualTo("Failure"));
+ Assert.That(_server.LogEntries, Has.Count.EqualTo(1));
+ });
+ }
+
+ [Test]
+ public async SystemTask SendRequestAsync_ShouldRetry_WithMultiPartFormRequest_WithoutStream()
+ {
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingPost())
+ .InScenario("Retry")
+ .WillSetStateTo("Server Error")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(429));
+
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingPost())
+ .InScenario("Retry")
+ .WhenStateIs("Server Error")
+ .WillSetStateTo("Success")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(429));
+
+ _server
+ .Given(WireMockRequest.Create().WithPath("/test").UsingPost())
+ .InScenario("Retry")
+ .WhenStateIs("Success")
+ .RespondWith(WireMockResponse.Create().WithStatusCode(200).WithBody("Success"));
+
+ var request = new MultipartFormRequest
+ {
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Post,
+ Path = "/test",
+ };
+ request.AddJsonPart("object", new { });
+
+ var response = await _rawClient.SendRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(200));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.Multiple(() =>
+ {
+ Assert.That(content, Is.EqualTo("Success"));
+ Assert.That(_server.LogEntries, Has.Count.EqualTo(MaxRetries));
+ });
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ _server.Dispose();
+ _httpClient.Dispose();
+ }
+}
diff --git a/src/Merge.Client.Test/Merge.Client.Test.csproj b/src/Merge.Client.Test/Merge.Client.Test.csproj
index a0308daa..1947c5e7 100644
--- a/src/Merge.Client.Test/Merge.Client.Test.csproj
+++ b/src/Merge.Client.Test/Merge.Client.Test.csproj
@@ -15,19 +15,18 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
-
-
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
diff --git a/src/Merge.Client.Test/Utils/JsonElementComparer.cs b/src/Merge.Client.Test/Utils/JsonElementComparer.cs
new file mode 100644
index 00000000..1704c99a
--- /dev/null
+++ b/src/Merge.Client.Test/Utils/JsonElementComparer.cs
@@ -0,0 +1,236 @@
+using System.Text.Json;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework;
+
+///
+/// Extensions for EqualConstraint to handle JsonElement objects.
+///
+public static class JsonElementComparerExtensions
+{
+ ///
+ /// Extension method for comparing JsonElement objects in NUnit tests.
+ /// Property order doesn't matter, but array order does matter.
+ /// Includes special handling for DateTime string formats.
+ ///
+ /// The Is.EqualTo() constraint instance.
+ /// A constraint that can compare JsonElements with detailed diffs.
+ public static EqualConstraint UsingJsonElementComparer(this EqualConstraint constraint)
+ {
+ return constraint.Using(new JsonElementComparer());
+ }
+}
+
+///
+/// Equality comparer for JsonElement with detailed reporting.
+/// Property order doesn't matter, but array order does matter.
+/// Now includes special handling for DateTime string formats with improved null handling.
+///
+public class JsonElementComparer : IEqualityComparer
+{
+ private string _failurePath = string.Empty;
+
+ ///
+ public bool Equals(JsonElement x, JsonElement y)
+ {
+ _failurePath = string.Empty;
+ return CompareJsonElements(x, y, string.Empty);
+ }
+
+ ///
+ public int GetHashCode(JsonElement obj)
+ {
+ return JsonSerializer.Serialize(obj).GetHashCode();
+ }
+
+ private bool CompareJsonElements(JsonElement x, JsonElement y, string path)
+ {
+ // If value kinds don't match, they're not equivalent
+ if (x.ValueKind != y.ValueKind)
+ {
+ _failurePath = $"{path}: Expected {x.ValueKind} but got {y.ValueKind}";
+ return false;
+ }
+
+ switch (x.ValueKind)
+ {
+ case JsonValueKind.Object:
+ return CompareJsonObjects(x, y, path);
+
+ case JsonValueKind.Array:
+ return CompareJsonArraysInOrder(x, y, path);
+
+ case JsonValueKind.String:
+ string? xStr = x.GetString();
+ string? yStr = y.GetString();
+
+ // Handle null strings
+ if (xStr is null && yStr is null)
+ return true;
+
+ if (xStr is null || yStr is null)
+ {
+ _failurePath =
+ $"{path}: Expected {(xStr is null ? "null" : $"\"{xStr}\"")} but got {(yStr is null ? "null" : $"\"{yStr}\"")}";
+ return false;
+ }
+
+ // Check if they are identical strings
+ if (xStr == yStr)
+ return true;
+
+ // Try to handle DateTime strings
+ if (IsLikelyDateTimeString(xStr) && IsLikelyDateTimeString(yStr))
+ {
+ if (AreEquivalentDateTimeStrings(xStr, yStr))
+ return true;
+ }
+
+ _failurePath = $"{path}: Expected \"{xStr}\" but got \"{yStr}\"";
+ return false;
+
+ case JsonValueKind.Number:
+ if (x.GetDecimal() != y.GetDecimal())
+ {
+ _failurePath = $"{path}: Expected {x.GetDecimal()} but got {y.GetDecimal()}";
+ return false;
+ }
+
+ return true;
+
+ case JsonValueKind.True:
+ case JsonValueKind.False:
+ if (x.GetBoolean() != y.GetBoolean())
+ {
+ _failurePath = $"{path}: Expected {x.GetBoolean()} but got {y.GetBoolean()}";
+ return false;
+ }
+
+ return true;
+
+ case JsonValueKind.Null:
+ return true;
+
+ default:
+ _failurePath = $"{path}: Unsupported JsonValueKind {x.ValueKind}";
+ return false;
+ }
+ }
+
+ private bool IsLikelyDateTimeString(string? str)
+ {
+ // Simple heuristic to identify likely ISO date time strings
+ return str != null
+ && (str.Contains("T") && (str.EndsWith("Z") || str.Contains("+") || str.Contains("-")));
+ }
+
+ private bool AreEquivalentDateTimeStrings(string str1, string str2)
+ {
+ // Try to parse both as DateTime
+ if (DateTime.TryParse(str1, out DateTime dt1) && DateTime.TryParse(str2, out DateTime dt2))
+ {
+ return dt1 == dt2;
+ }
+
+ return false;
+ }
+
+ private bool CompareJsonObjects(JsonElement x, JsonElement y, string path)
+ {
+ // Create dictionaries for both JSON objects
+ var xProps = new Dictionary();
+ var yProps = new Dictionary();
+
+ foreach (var prop in x.EnumerateObject())
+ xProps[prop.Name] = prop.Value;
+
+ foreach (var prop in y.EnumerateObject())
+ yProps[prop.Name] = prop.Value;
+
+ // Check if all properties in x exist in y
+ foreach (var key in xProps.Keys)
+ {
+ if (!yProps.ContainsKey(key))
+ {
+ _failurePath = $"{path}: Missing property '{key}'";
+ return false;
+ }
+ }
+
+ // Check if y has extra properties
+ foreach (var key in yProps.Keys)
+ {
+ if (!xProps.ContainsKey(key))
+ {
+ _failurePath = $"{path}: Unexpected property '{key}'";
+ return false;
+ }
+ }
+
+ // Compare each property value
+ foreach (var key in xProps.Keys)
+ {
+ var propPath = string.IsNullOrEmpty(path) ? key : $"{path}.{key}";
+ if (!CompareJsonElements(xProps[key], yProps[key], propPath))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private bool CompareJsonArraysInOrder(JsonElement x, JsonElement y, string path)
+ {
+ var xArray = x.EnumerateArray();
+ var yArray = y.EnumerateArray();
+
+ // Count x elements
+ var xCount = 0;
+ var xElements = new List();
+ foreach (var item in xArray)
+ {
+ xElements.Add(item);
+ xCount++;
+ }
+
+ // Count y elements
+ var yCount = 0;
+ var yElements = new List();
+ foreach (var item in yArray)
+ {
+ yElements.Add(item);
+ yCount++;
+ }
+
+ // Check if counts match
+ if (xCount != yCount)
+ {
+ _failurePath = $"{path}: Expected {xCount} items but found {yCount}";
+ return false;
+ }
+
+ // Compare elements in order
+ for (var i = 0; i < xCount; i++)
+ {
+ var itemPath = $"{path}[{i}]";
+ if (!CompareJsonElements(xElements[i], yElements[i], itemPath))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ ///
+ public override string ToString()
+ {
+ if (!string.IsNullOrEmpty(_failurePath))
+ {
+ return $"JSON comparison failed at {_failurePath}";
+ }
+
+ return "JsonElementEqualityComparer";
+ }
+}
diff --git a/src/Merge.Client.Test/Utils/NUnitExtensions.cs b/src/Merge.Client.Test/Utils/NUnitExtensions.cs
new file mode 100644
index 00000000..426df124
--- /dev/null
+++ b/src/Merge.Client.Test/Utils/NUnitExtensions.cs
@@ -0,0 +1,28 @@
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework;
+
+///
+/// Extensions for NUnit constraints.
+///
+public static class NUnitExtensions
+{
+ ///
+ /// Modifies the EqualConstraint to use our own set of default comparers.
+ ///
+ ///
+ ///
+ public static EqualConstraint UsingDefaults(this EqualConstraint constraint) =>
+ constraint
+ .UsingPropertiesComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingReadOnlyMemoryComparer()
+ .UsingOneOfComparer()
+ .UsingJsonElementComparer();
+}
diff --git a/src/Merge.Client.Test/Utils/OneOfComparer.cs b/src/Merge.Client.Test/Utils/OneOfComparer.cs
new file mode 100644
index 00000000..0c975b47
--- /dev/null
+++ b/src/Merge.Client.Test/Utils/OneOfComparer.cs
@@ -0,0 +1,43 @@
+using NUnit.Framework.Constraints;
+using OneOf;
+
+namespace NUnit.Framework;
+
+///
+/// Extensions for EqualConstraint to handle OneOf values.
+///
+public static class EqualConstraintExtensions
+{
+ ///
+ /// Modifies the EqualConstraint to handle OneOf instances by comparing their inner values.
+ /// This works alongside other comparison modifiers like UsingPropertiesComparer.
+ ///
+ /// The EqualConstraint to modify.
+ /// The same constraint instance for method chaining.
+ public static EqualConstraint UsingOneOfComparer(this EqualConstraint constraint)
+ {
+ // Register a comparer factory for IOneOf types
+ constraint.Using(
+ (x, y) =>
+ {
+ // ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
+ if (x.Value is null && y.Value is null)
+ {
+ return true;
+ }
+
+ if (x.Value is null)
+ {
+ return false;
+ }
+
+ var propertiesComparer = new NUnitEqualityComparer();
+ var tolerance = Tolerance.Default;
+ propertiesComparer.CompareProperties = true;
+ return propertiesComparer.AreEqual(x.Value, y.Value, ref tolerance);
+ }
+ );
+
+ return constraint;
+ }
+}
diff --git a/src/Merge.Client.Test/Utils/ReadOnlyMemoryComparer.cs b/src/Merge.Client.Test/Utils/ReadOnlyMemoryComparer.cs
new file mode 100644
index 00000000..fc0b595a
--- /dev/null
+++ b/src/Merge.Client.Test/Utils/ReadOnlyMemoryComparer.cs
@@ -0,0 +1,87 @@
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework;
+
+///
+/// Extensions for NUnit constraints.
+///
+public static class ReadOnlyMemoryComparerExtensions
+{
+ ///
+ /// Extension method for comparing ReadOnlyMemory<T> in NUnit tests.
+ ///
+ /// The type of elements in the ReadOnlyMemory.
+ /// The Is.EqualTo() constraint instance.
+ /// A constraint that can compare ReadOnlyMemory<T>.
+ public static EqualConstraint UsingReadOnlyMemoryComparer(this EqualConstraint constraint)
+ where T : IComparable
+ {
+ return constraint.Using(new ReadOnlyMemoryComparer());
+ }
+}
+
+///
+/// Comparer for ReadOnlyMemory<T>. Compares sequences by value.
+///
+///
+/// The type of elements in the ReadOnlyMemory.
+///
+public class ReadOnlyMemoryComparer : IComparer>
+ where T : IComparable
+{
+ ///
+ public int Compare(ReadOnlyMemory x, ReadOnlyMemory y)
+ {
+ // Check if sequences are equal
+ var xSpan = x.Span;
+ var ySpan = y.Span;
+
+ // Optimized case for IEquatable implementations
+ if (typeof(IEquatable).IsAssignableFrom(typeof(T)))
+ {
+ var areEqual = xSpan.SequenceEqual(ySpan);
+ if (areEqual)
+ {
+ return 0; // Sequences are equal
+ }
+ }
+ else
+ {
+ // Manual equality check for non-IEquatable types
+ if (xSpan.Length == ySpan.Length)
+ {
+ var areEqual = true;
+ for (var i = 0; i < xSpan.Length; i++)
+ {
+ if (!EqualityComparer.Default.Equals(xSpan[i], ySpan[i]))
+ {
+ areEqual = false;
+ break;
+ }
+ }
+
+ if (areEqual)
+ {
+ return 0; // Sequences are equal
+ }
+ }
+ }
+
+ // For non-equal sequences, we need to return a consistent ordering
+ // First compare lengths
+ if (x.Length != y.Length)
+ return x.Length.CompareTo(y.Length);
+
+ // Same length but different content - compare first differing element
+ for (var i = 0; i < x.Length; i++)
+ {
+ if (!EqualityComparer.Default.Equals(xSpan[i], ySpan[i]))
+ {
+ return xSpan[i].CompareTo(ySpan[i]);
+ }
+ }
+
+ // Should never reach here if not equal
+ return 0;
+ }
+}
diff --git a/src/Merge.Client.sln b/src/Merge.Client.sln
index 0056acbb..7e2cc3ab 100644
--- a/src/Merge.Client.sln
+++ b/src/Merge.Client.sln
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{99CD0E0D-82DE-4D05-9ABF-5B67B4058FC8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{79D3B862-5A69-4F6E-BFE9-A96DC42D0BFD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{EF07BAED-762B-45DE-A732-0FA850FDEB9C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{EB9E51F4-0BD7-4B2E-9997-490B672F23DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {99CD0E0D-82DE-4D05-9ABF-5B67B4058FC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {99CD0E0D-82DE-4D05-9ABF-5B67B4058FC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {99CD0E0D-82DE-4D05-9ABF-5B67B4058FC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {99CD0E0D-82DE-4D05-9ABF-5B67B4058FC8}.Release|Any CPU.Build.0 = Release|Any CPU
- {EF07BAED-762B-45DE-A732-0FA850FDEB9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EF07BAED-762B-45DE-A732-0FA850FDEB9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EF07BAED-762B-45DE-A732-0FA850FDEB9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EF07BAED-762B-45DE-A732-0FA850FDEB9C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {79D3B862-5A69-4F6E-BFE9-A96DC42D0BFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {79D3B862-5A69-4F6E-BFE9-A96DC42D0BFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {79D3B862-5A69-4F6E-BFE9-A96DC42D0BFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {79D3B862-5A69-4F6E-BFE9-A96DC42D0BFD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EB9E51F4-0BD7-4B2E-9997-490B672F23DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EB9E51F4-0BD7-4B2E-9997-490B672F23DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EB9E51F4-0BD7-4B2E-9997-490B672F23DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EB9E51F4-0BD7-4B2E-9997-490B672F23DB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs b/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs
index c6cd5c39..c45681bd 100644
--- a/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs
+++ b/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs
@@ -17,19 +17,17 @@ internal AccountDetailsClient(RawClient client)
///
/// Get details for a linked account.
///
- ///
- ///
+ ///
/// await client.Accounting.AccountDetails.RetrieveAsync();
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -39,23 +37,26 @@ public async System.Threading.Tasks.Task RetrieveAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs b/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs
index e1cd1f61..44522d01 100644
--- a/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs
+++ b/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs
@@ -17,46 +17,50 @@ internal AccountTokenClient(RawClient client)
///
/// Returns the account token for the end user with the provided public token.
///
- ///
- ///
+ ///
/// await client.Accounting.AccountToken.RetrieveAsync("public_token");
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string publicToken,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/account-token/{publicToken}",
+ Path = string.Format(
+ "accounting/v1/account-token/{0}",
+ ValueConvert.ToPathParameterString(publicToken)
+ ),
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/AccountingClient.cs b/src/Merge.Client/Accounting/AccountingClient.cs
index d8ad1aa2..9974dca3 100644
--- a/src/Merge.Client/Accounting/AccountingClient.cs
+++ b/src/Merge.Client/Accounting/AccountingClient.cs
@@ -41,6 +41,8 @@ internal AccountingClient(RawClient client)
LinkToken = new LinkTokenClient(_client);
LinkedAccounts = new LinkedAccountsClient(_client);
Passthrough = new PassthroughClient(_client);
+ PaymentMethods = new PaymentMethodsClient(_client);
+ PaymentTerms = new PaymentTermsClient(_client);
Payments = new PaymentsClient(_client);
PhoneNumbers = new PhoneNumbersClient(_client);
PurchaseOrders = new PurchaseOrdersClient(_client);
@@ -118,6 +120,10 @@ internal AccountingClient(RawClient client)
public PassthroughClient Passthrough { get; }
+ public PaymentMethodsClient PaymentMethods { get; }
+
+ public PaymentTermsClient PaymentTerms { get; }
+
public PaymentsClient Payments { get; }
public PhoneNumbersClient PhoneNumbers { get; }
diff --git a/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs b/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs
index 3beb3516..c88eca2a 100644
--- a/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs
+++ b/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs
@@ -17,12 +17,10 @@ internal AccountingPeriodsClient(RawClient client)
///
/// Returns a list of `AccountingPeriod` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.AccountingPeriods.ListAsync(new AccountingPeriodsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
AccountingPeriodsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -50,8 +48,8 @@ public async System.Threading.Tasks.Task ListAsyn
_query["page_size"] = request.PageSize.Value.ToString();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -62,38 +60,39 @@ public async System.Threading.Tasks.Task ListAsyn
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns an `AccountingPeriod` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.AccountingPeriods.RetrieveAsync(
/// "id",
/// new AccountingPeriodsRetrieveRequest()
/// );
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
AccountingPeriodsRetrieveRequest request,
RequestOptions? options = null,
@@ -105,36 +104,46 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/accounting-periods/{id}",
+ Path = string.Format(
+ "accounting/v1/accounting-periods/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs
index d982218f..363054f1 100644
--- a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs
+++ b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,28 +8,34 @@ public record AccountingPeriodsListRequest
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs
index c597e5a0..af16145a 100644
--- a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,8 +8,16 @@ public record AccountingPeriodsRetrieveRequest
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Accounts/AccountsClient.cs b/src/Merge.Client/Accounting/Accounts/AccountsClient.cs
index 58db9b77..0446584c 100644
--- a/src/Merge.Client/Accounting/Accounts/AccountsClient.cs
+++ b/src/Merge.Client/Accounting/Accounts/AccountsClient.cs
@@ -17,12 +17,10 @@ internal AccountsClient(RawClient client)
///
/// Returns a list of `Account` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.Accounts.ListAsync(new AccountsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
AccountsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -79,6 +77,10 @@ public async System.Threading.Tasks.Task ListAsync(
Constants.DateTimeFormat
);
}
+ if (request.Name != null)
+ {
+ _query["name"] = request.Name;
+ }
if (request.PageSize != null)
{
_query["page_size"] = request.PageSize.Value.ToString();
@@ -96,8 +98,8 @@ public async System.Threading.Tasks.Task ListAsync(
_query["show_enum_origins"] = request.ShowEnumOrigins.Value.Stringify();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -108,37 +110,38 @@ public async System.Threading.Tasks.Task ListAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Creates an `Account` object with the given values.
///
- ///
- ///
+ ///
/// await client.Accounting.Accounts.CreateAsync(
/// new AccountEndpointRequest { Model = new Merge.Client.Accounting.AccountRequest() }
/// );
- ///
- ///
- public async System.Threading.Tasks.Task CreateAsync(
+ ///
+ public async Task CreateAsync(
AccountEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -153,15 +156,14 @@ public async System.Threading.Tasks.Task CreateAsync(
{
_query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
- var requestBody = new Dictionary() { { "model", request.Model } };
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Post,
Path = "accounting/v1/accounts",
- Body = requestBody,
+ Body = request,
Query = _query,
ContentType = "application/json",
Options = options,
@@ -169,35 +171,36 @@ public async System.Threading.Tasks.Task CreateAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns an `Account` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.Accounts.RetrieveAsync("id", new AccountsRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
AccountsRetrieveRequest request,
RequestOptions? options = null,
@@ -213,6 +216,10 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
if (request.RemoteFields != null)
{
_query["remote_fields"] = request.RemoteFields.Value.Stringify();
@@ -222,54 +229,58 @@ public async System.Threading.Tasks.Task RetrieveAsync(
_query["show_enum_origins"] = request.ShowEnumOrigins.Value.Stringify();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/accounts/{id}",
+ Path = string.Format(
+ "accounting/v1/accounts/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns metadata for `Account` POSTs.
///
- ///
- ///
+ ///
/// await client.Accounting.Accounts.MetaPostRetrieveAsync();
- ///
- ///
- public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
+ ///
+ public async Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -279,23 +290,26 @@ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs b/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs
index 27290725..0892a546 100644
--- a/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,15 +8,19 @@ public record AccountEndpointRequest
///
/// Whether to include debug fields (such as log file links) in the response.
///
+ [JsonIgnore]
public bool? IsDebugMode { get; set; }
///
/// Whether or not third-party updates should be run asynchronously.
///
+ [JsonIgnore]
public bool? RunAsync { get; set; }
+ [JsonPropertyName("model")]
public required AccountRequest Model { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs b/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs
index 55f250af..42f3214b 100644
--- a/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs
+++ b/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,78 +8,100 @@ public record AccountsListRequest
///
/// If provided, will only provide accounts with the passed in enum.
///
+ [JsonIgnore]
public string? AccountType { get; set; }
///
/// If provided, will only return accounts for this company.
///
+ [JsonIgnore]
public string? CompanyId { get; set; }
///
/// If provided, will only return objects created after this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedAfter { get; set; }
///
/// If provided, will only return objects created before this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedBefore { get; set; }
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// If provided, only objects synced by Merge after this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedAfter { get; set; }
///
/// If provided, only objects synced by Merge before this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedBefore { get; set; }
+ ///
+ /// If provided, will only return Accounts with this name.
+ ///
+ [JsonIgnore]
+ public string? Name { get; set; }
+
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// Deprecated. Use show_enum_origins.
///
+ [JsonIgnore]
public AccountsListRequestRemoteFields? RemoteFields { get; set; }
///
/// The API provider's ID for the given object.
///
+ [JsonIgnore]
public string? RemoteId { get; set; }
///
/// 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)
///
+ [JsonIgnore]
public AccountsListRequestShowEnumOrigins? ShowEnumOrigins { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs b/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs
index f044a15f..6d1e7a27 100644
--- a/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,23 +8,34 @@ public record AccountsRetrieveRequest
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
///
/// Deprecated. Use show_enum_origins.
///
+ [JsonIgnore]
public AccountsRetrieveRequestRemoteFields? RemoteFields { get; set; }
///
/// 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)
///
+ [JsonIgnore]
public AccountsRetrieveRequestShowEnumOrigins? ShowEnumOrigins { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Addresses/AddressesClient.cs b/src/Merge.Client/Accounting/Addresses/AddressesClient.cs
index c9cfb8ac..2506314b 100644
--- a/src/Merge.Client/Accounting/Addresses/AddressesClient.cs
+++ b/src/Merge.Client/Accounting/Addresses/AddressesClient.cs
@@ -17,12 +17,10 @@ internal AddressesClient(RawClient client)
///
/// Returns an `Address` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.Addresses.RetrieveAsync("id", new AddressesRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
AddressesRetrieveRequest request,
RequestOptions? options = null,
@@ -34,6 +32,10 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
if (request.RemoteFields != null)
{
_query["remote_fields"] = request.RemoteFields.ToString();
@@ -43,35 +45,41 @@ public async System.Threading.Tasks.Task RetrieveAsync(
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/addresses/{id}",
+ Path = string.Format(
+ "accounting/v1/addresses/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs b/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs
index 38a47b27..ac1bb97b 100644
--- a/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,18 +8,28 @@ public record AddressesRetrieveRequest
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
///
/// Deprecated. Use show_enum_origins.
///
+ [JsonIgnore]
public string? RemoteFields { get; set; }
///
/// 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)
///
+ [JsonIgnore]
public string? ShowEnumOrigins { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs
index a2cde885..9f9c83cc 100644
--- a/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs
+++ b/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs
@@ -18,8 +18,7 @@ internal AsyncPassthroughClient(RawClient client)
///
/// Asynchronously pull data from an endpoint not currently supported by Merge.
///
- ///
- ///
+ ///
/// await client.Accounting.AsyncPassthrough.CreateAsync(
/// new Merge.Client.Accounting.DataPassthroughRequest
/// {
@@ -27,17 +26,16 @@ internal AsyncPassthroughClient(RawClient client)
/// Path = "/scooters",
/// }
/// );
- ///
- ///
- public async System.Threading.Tasks.Task CreateAsync(
+ ///
+ public async Task CreateAsync(
DataPassthroughRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Post,
@@ -49,69 +47,76 @@ public async System.Threading.Tasks.Task CreateAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Retrieves data from earlier async-passthrough POST request
///
- ///
- ///
+ ///
/// await client.Accounting.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
- ///
- ///
- public async System.Threading.Tasks.Task> RetrieveAsync(
+ ///
+ public async Task> RetrieveAsync(
string asyncPassthroughReceiptId,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/async-passthrough/{asyncPassthroughReceiptId}",
+ Path = string.Format(
+ "accounting/v1/async-passthrough/{0}",
+ ValueConvert.ToPathParameterString(asyncPassthroughReceiptId)
+ ),
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize>(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs b/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs
index 367f6774..3ccdad17 100644
--- a/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs
+++ b/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs
@@ -17,46 +17,50 @@ internal AsyncTasksClient(RawClient client)
///
/// Returns an `AsyncPostTask` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.AsyncTasks.RetrieveAsync("id");
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/async-tasks/{id}",
+ Path = string.Format(
+ "accounting/v1/async-tasks/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs b/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
index 5701feb2..92221c24 100644
--- a/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
+++ b/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
@@ -17,12 +17,10 @@ internal AttachmentsClient(RawClient client)
///
/// Returns a list of `AccountingAttachment` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.Attachments.ListAsync(new AttachmentsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
AttachmentsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -80,8 +78,8 @@ public async System.Threading.Tasks.Task List
_query["remote_id"] = request.RemoteId;
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -92,37 +90,38 @@ public async System.Threading.Tasks.Task List
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Creates an `AccountingAttachment` object with the given values.
///
- ///
- ///
+ ///
/// await client.Accounting.Attachments.CreateAsync(
/// new AccountingAttachmentEndpointRequest { Model = new AccountingAttachmentRequest() }
/// );
- ///
- ///
- public async System.Threading.Tasks.Task CreateAsync(
+ ///
+ public async Task CreateAsync(
AccountingAttachmentEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -137,15 +136,14 @@ public async System.Threading.Tasks.Task CreateAsy
{
_query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
- var requestBody = new Dictionary() { { "model", request.Model } };
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Post,
Path = "accounting/v1/attachments",
- Body = requestBody,
+ Body = request,
Query = _query,
ContentType = "application/json",
Options = options,
@@ -153,35 +151,36 @@ public async System.Threading.Tasks.Task CreateAsy
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns an `AccountingAttachment` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.Attachments.RetrieveAsync("id", new AttachmentsRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
AttachmentsRetrieveRequest request,
RequestOptions? options = null,
@@ -193,55 +192,63 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/attachments/{id}",
+ Path = string.Format(
+ "accounting/v1/attachments/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns metadata for `AccountingAttachment` POSTs.
///
- ///
- ///
+ ///
/// await client.Accounting.Attachments.MetaPostRetrieveAsync();
- ///
- ///
- public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
+ ///
+ public async Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -251,23 +258,26 @@ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs b/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs
index 2535c457..edd54665 100644
--- a/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,15 +8,19 @@ public record AccountingAttachmentEndpointRequest
///
/// Whether to include debug fields (such as log file links) in the response.
///
+ [JsonIgnore]
public bool? IsDebugMode { get; set; }
///
/// Whether or not third-party updates should be run asynchronously.
///
+ [JsonIgnore]
public bool? RunAsync { get; set; }
+ [JsonPropertyName("model")]
public required AccountingAttachmentRequest Model { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs
index 5f88a575..6427e44b 100644
--- a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs
+++ b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,58 +8,70 @@ public record AttachmentsListRequest
///
/// If provided, will only return accounting attachments for this company.
///
+ [JsonIgnore]
public string? CompanyId { get; set; }
///
/// If provided, will only return objects created after this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedAfter { get; set; }
///
/// If provided, will only return objects created before this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedBefore { get; set; }
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// If provided, only objects synced by Merge after this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedAfter { get; set; }
///
/// If provided, only objects synced by Merge before this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedBefore { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// The API provider's ID for the given object.
///
+ [JsonIgnore]
public string? RemoteId { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs
index 11c9307e..f0346dc8 100644
--- a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,8 +8,16 @@ public record AttachmentsRetrieveRequest
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs b/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
index 0f947620..ffaa1dfd 100644
--- a/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
+++ b/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
@@ -17,12 +17,10 @@ internal AuditTrailClient(RawClient client)
///
/// Gets a list of audit trail events.
///
- ///
- ///
+ ///
/// await client.Accounting.AuditTrail.ListAsync(new AuditTrailListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
AuditTrailListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -54,8 +52,8 @@ public async System.Threading.Tasks.Task ListAsync(
_query["user_email"] = request.UserEmail;
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -66,23 +64,26 @@ public async System.Threading.Tasks.Task ListAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs b/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs
index 39cae663..3a49a5a6 100644
--- a/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs
+++ b/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,33 +8,40 @@ public record AuditTrailListRequest
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// If included, will only include audit trail events that occurred before this time
///
+ [JsonIgnore]
public string? EndDate { get; set; }
///
- /// 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`
+ /// 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`
///
+ [JsonIgnore]
public string? EventType { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// If included, will only include audit trail events that occurred after this time
///
+ [JsonIgnore]
public string? StartDate { get; set; }
///
/// 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.
///
+ [JsonIgnore]
public string? UserEmail { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs b/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs
index 95322274..3e5f6aeb 100644
--- a/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs
+++ b/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs
@@ -17,19 +17,17 @@ internal AvailableActionsClient(RawClient client)
///
/// Returns a list of models and actions available for an account.
///
- ///
- ///
+ ///
/// await client.Accounting.AvailableActions.RetrieveAsync();
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -39,23 +37,26 @@ public async System.Threading.Tasks.Task RetrieveAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs b/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs
index 25316188..80d96e5b 100644
--- a/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs
+++ b/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs
@@ -17,12 +17,10 @@ internal BalanceSheetsClient(RawClient client)
///
/// Returns a list of `BalanceSheet` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.BalanceSheets.ListAsync(new BalanceSheetsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
BalanceSheetsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -84,8 +82,8 @@ public async System.Threading.Tasks.Task ListAsync(
_query["remote_id"] = request.RemoteId;
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -96,35 +94,36 @@ public async System.Threading.Tasks.Task ListAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns a `BalanceSheet` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.BalanceSheets.RetrieveAsync("id", new BalanceSheetsRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
BalanceSheetsRetrieveRequest request,
RequestOptions? options = null,
@@ -140,36 +139,46 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/balance-sheets/{id}",
+ Path = string.Format(
+ "accounting/v1/balance-sheets/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs
index c52a8ed5..2e816419 100644
--- a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs
+++ b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,63 +8,76 @@ public record BalanceSheetsListRequest
///
/// If provided, will only return balance sheets for this company.
///
+ [JsonIgnore]
public string? CompanyId { get; set; }
///
/// If provided, will only return objects created after this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedAfter { get; set; }
///
/// If provided, will only return objects created before this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedBefore { get; set; }
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// If provided, only objects synced by Merge after this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedAfter { get; set; }
///
/// If provided, only objects synced by Merge before this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedBefore { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// The API provider's ID for the given object.
///
+ [JsonIgnore]
public string? RemoteId { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs
index e014f9a2..7a3e3807 100644
--- a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,13 +8,22 @@ public record BalanceSheetsRetrieveRequest
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs b/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs
index cf2876c0..5df3c8b1 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs
@@ -17,12 +17,10 @@ internal BankFeedAccountsClient(RawClient client)
///
/// Returns a list of `BankFeedAccount` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedAccounts.ListAsync(new BankFeedAccountsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
BankFeedAccountsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -50,8 +48,8 @@ public async System.Threading.Tasks.Task ListAsync
_query["page_size"] = request.PageSize.Value.ToString();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -62,37 +60,38 @@ public async System.Threading.Tasks.Task ListAsync
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Creates a `BankFeedAccount` object with the given values.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedAccounts.CreateAsync(
/// new BankFeedAccountEndpointRequest { Model = new BankFeedAccountRequest() }
/// );
- ///
- ///
- public async System.Threading.Tasks.Task CreateAsync(
+ ///
+ public async Task CreateAsync(
BankFeedAccountEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -107,15 +106,14 @@ public async System.Threading.Tasks.Task CreateAsync(
{
_query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
- var requestBody = new Dictionary() { { "model", request.Model } };
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Post,
Path = "accounting/v1/bank-feed-accounts",
- Body = requestBody,
+ Body = request,
Query = _query,
ContentType = "application/json",
Options = options,
@@ -123,35 +121,36 @@ public async System.Threading.Tasks.Task CreateAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns a `BankFeedAccount` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedAccounts.RetrieveAsync("id", new BankFeedAccountsRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
BankFeedAccountsRetrieveRequest request,
RequestOptions? options = null,
@@ -163,55 +162,63 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/bank-feed-accounts/{id}",
+ Path = string.Format(
+ "accounting/v1/bank-feed-accounts/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns metadata for `BankFeedAccount` POSTs.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedAccounts.MetaPostRetrieveAsync();
- ///
- ///
- public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
+ ///
+ public async Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -221,23 +228,26 @@ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs
index 00be1aa7..2a9e6d05 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,15 +8,19 @@ public record BankFeedAccountEndpointRequest
///
/// Whether to include debug fields (such as log file links) in the response.
///
+ [JsonIgnore]
public bool? IsDebugMode { get; set; }
///
/// Whether or not third-party updates should be run asynchronously.
///
+ [JsonIgnore]
public bool? RunAsync { get; set; }
+ [JsonPropertyName("model")]
public required BankFeedAccountRequest Model { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs
index a1e4323f..507f0970 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,28 +8,34 @@ public record BankFeedAccountsListRequest
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs
index 95cabd74..673f6521 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,8 +8,16 @@ public record BankFeedAccountsRetrieveRequest
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs b/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs
index a9a54d3d..7f5b72a3 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs
@@ -17,12 +17,10 @@ internal BankFeedTransactionsClient(RawClient client)
///
/// Returns a list of `BankFeedTransaction` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedTransactions.ListAsync(new BankFeedTransactionsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
BankFeedTransactionsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -84,8 +82,8 @@ public async System.Threading.Tasks.Task ListA
_query["remote_id"] = request.RemoteId;
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -96,37 +94,38 @@ public async System.Threading.Tasks.Task ListA
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Creates a `BankFeedTransaction` object with the given values.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedTransactions.CreateAsync(
/// new BankFeedTransactionEndpointRequest { Model = new BankFeedTransactionRequestRequest() }
/// );
- ///
- ///
- public async System.Threading.Tasks.Task CreateAsync(
+ ///
+ public async Task CreateAsync(
BankFeedTransactionEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -141,15 +140,14 @@ public async System.Threading.Tasks.Task CreateAsyn
{
_query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
- var requestBody = new Dictionary() { { "model", request.Model } };
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Post,
Path = "accounting/v1/bank-feed-transactions",
- Body = requestBody,
+ Body = request,
Query = _query,
ContentType = "application/json",
Options = options,
@@ -157,38 +155,39 @@ public async System.Threading.Tasks.Task CreateAsyn
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns a `BankFeedTransaction` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedTransactions.RetrieveAsync(
/// "id",
/// new BankFeedTransactionsRetrieveRequest()
/// );
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
BankFeedTransactionsRetrieveRequest request,
RequestOptions? options = null,
@@ -204,55 +203,63 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/bank-feed-transactions/{id}",
+ Path = string.Format(
+ "accounting/v1/bank-feed-transactions/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns metadata for `BankFeedTransaction` POSTs.
///
- ///
- ///
+ ///
/// await client.Accounting.BankFeedTransactions.MetaPostRetrieveAsync();
- ///
- ///
- public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
+ ///
+ public async Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -262,23 +269,26 @@ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs
index 732d5f54..118dedf3 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,15 +8,19 @@ public record BankFeedTransactionEndpointRequest
///
/// Whether to include debug fields (such as log file links) in the response.
///
+ [JsonIgnore]
public bool? IsDebugMode { get; set; }
///
/// Whether or not third-party updates should be run asynchronously.
///
+ [JsonIgnore]
public bool? RunAsync { get; set; }
+ [JsonPropertyName("model")]
public required BankFeedTransactionRequestRequest Model { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs
index 64015df1..eca997cc 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,63 +8,76 @@ public record BankFeedTransactionsListRequest
///
/// If provided, will only return objects created after this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedAfter { get; set; }
///
/// If provided, will only return objects created before this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedBefore { get; set; }
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// If provided, will only return bank feed transactions with this is_processed value
///
+ [JsonIgnore]
public bool? IsProcessed { get; set; }
///
/// If provided, only objects synced by Merge after this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedAfter { get; set; }
///
/// If provided, only objects synced by Merge before this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedBefore { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// The API provider's ID for the given object.
///
+ [JsonIgnore]
public string? RemoteId { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs
index ab912749..d03f2676 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,13 +8,22 @@ public record BankFeedTransactionsRetrieveRequest
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs b/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs
index 90c74589..8cce0bec 100644
--- a/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs
+++ b/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs
@@ -17,12 +17,10 @@ internal CashFlowStatementsClient(RawClient client)
///
/// Returns a list of `CashFlowStatement` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.CashFlowStatements.ListAsync(new CashFlowStatementsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
CashFlowStatementsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -84,8 +82,8 @@ public async System.Threading.Tasks.Task ListAsy
_query["remote_id"] = request.RemoteId;
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -96,38 +94,39 @@ public async System.Threading.Tasks.Task ListAsy
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns a `CashFlowStatement` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.CashFlowStatements.RetrieveAsync(
/// "id",
/// new CashFlowStatementsRetrieveRequest()
/// );
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
CashFlowStatementsRetrieveRequest request,
RequestOptions? options = null,
@@ -143,36 +142,46 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/cash-flow-statements/{id}",
+ Path = string.Format(
+ "accounting/v1/cash-flow-statements/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs
index 1e352e45..c1aebda9 100644
--- a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs
+++ b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,63 +8,76 @@ public record CashFlowStatementsListRequest
///
/// If provided, will only return cash flow statements for this company.
///
+ [JsonIgnore]
public string? CompanyId { get; set; }
///
/// If provided, will only return objects created after this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedAfter { get; set; }
///
/// If provided, will only return objects created before this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedBefore { get; set; }
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// If provided, only objects synced by Merge after this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedAfter { get; set; }
///
/// If provided, only objects synced by Merge before this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedBefore { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// The API provider's ID for the given object.
///
+ [JsonIgnore]
public string? RemoteId { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs
index 520101d1..a00985f3 100644
--- a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,13 +8,22 @@ public record CashFlowStatementsRetrieveRequest
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public string? Expand { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs b/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
index fc271dbf..d5100dae 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
@@ -17,12 +17,10 @@ internal CompanyInfoClient(RawClient client)
///
/// Returns a list of `CompanyInfo` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.CompanyInfo.ListAsync(new CompanyInfoListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
CompanyInfoListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -80,8 +78,8 @@ public async System.Threading.Tasks.Task ListAsync(
_query["remote_id"] = request.RemoteId;
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -92,35 +90,36 @@ public async System.Threading.Tasks.Task ListAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns a `CompanyInfo` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.CompanyInfo.RetrieveAsync("id", new CompanyInfoRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
CompanyInfoRetrieveRequest request,
RequestOptions? options = null,
@@ -136,36 +135,46 @@ public async System.Threading.Tasks.Task RetrieveAsync(
{
_query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/company-info/{id}",
+ Path = string.Format(
+ "accounting/v1/company-info/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
}
diff --git a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
index 0e2117f6..d2a11577 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,58 +8,70 @@ public record CompanyInfoListRequest
///
/// If provided, will only return objects created after this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedAfter { get; set; }
///
/// If provided, will only return objects created before this datetime.
///
+ [JsonIgnore]
public DateTime? CreatedBefore { get; set; }
///
/// The pagination cursor value.
///
+ [JsonIgnore]
public string? Cursor { get; set; }
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public CompanyInfoListRequestExpand? Expand { get; set; }
///
/// Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
///
+ [JsonIgnore]
public bool? IncludeDeletedData { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
///
/// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
///
+ [JsonIgnore]
public bool? IncludeShellData { get; set; }
///
/// If provided, only objects synced by Merge after this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedAfter { get; set; }
///
/// If provided, only objects synced by Merge before this date time will be returned.
///
+ [JsonIgnore]
public DateTime? ModifiedBefore { get; set; }
///
/// Number of results to return per page.
///
+ [JsonIgnore]
public int? PageSize { get; set; }
///
/// The API provider's ID for the given object.
///
+ [JsonIgnore]
public string? RemoteId { get; set; }
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs
index 5737aa39..6fab50fa 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs
@@ -1,3 +1,4 @@
+using System.Text.Json.Serialization;
using Merge.Client.Core;
namespace Merge.Client.Accounting;
@@ -7,13 +8,22 @@ public record CompanyInfoRetrieveRequest
///
/// Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
///
+ [JsonIgnore]
public CompanyInfoRetrieveRequestExpand? Expand { get; set; }
///
/// Whether to include the original data Merge fetched from the third-party to produce these models.
///
+ [JsonIgnore]
public bool? IncludeRemoteData { get; set; }
+ ///
+ /// Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).
+ ///
+ [JsonIgnore]
+ public bool? IncludeShellData { get; set; }
+
+ ///
public override string ToString()
{
return JsonUtils.Serialize(this);
diff --git a/src/Merge.Client/Accounting/Contacts/ContactsClient.cs b/src/Merge.Client/Accounting/Contacts/ContactsClient.cs
index d2668875..18f12833 100644
--- a/src/Merge.Client/Accounting/Contacts/ContactsClient.cs
+++ b/src/Merge.Client/Accounting/Contacts/ContactsClient.cs
@@ -17,12 +17,10 @@ internal ContactsClient(RawClient client)
///
/// Returns a list of `Contact` objects.
///
- ///
- ///
+ ///
/// await client.Accounting.Contacts.ListAsync(new ContactsListRequest());
- ///
- ///
- public async System.Threading.Tasks.Task ListAsync(
+ ///
+ public async Task ListAsync(
ContactsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -114,8 +112,8 @@ public async System.Threading.Tasks.Task ListAsync(
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
@@ -126,37 +124,38 @@ public async System.Threading.Tasks.Task ListAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Creates a `Contact` object with the given values.
///
- ///
- ///
+ ///
/// await client.Accounting.Contacts.CreateAsync(
/// new ContactEndpointRequest { Model = new Merge.Client.Accounting.ContactRequest() }
/// );
- ///
- ///
- public async System.Threading.Tasks.Task CreateAsync(
+ ///
+ public async Task CreateAsync(
ContactEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -171,15 +170,14 @@ public async System.Threading.Tasks.Task CreateAsync(
{
_query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
- var requestBody = new Dictionary() { { "model", request.Model } };
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Post,
Path = "accounting/v1/contacts",
- Body = requestBody,
+ Body = request,
Query = _query,
ContentType = "application/json",
Options = options,
@@ -187,35 +185,36 @@ public async System.Threading.Tasks.Task CreateAsync(
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns a `Contact` object with the given `id`.
///
- ///
- ///
+ ///
/// await client.Accounting.Contacts.RetrieveAsync("id", new ContactsRetrieveRequest());
- ///
- ///
- public async System.Threading.Tasks.Task RetrieveAsync(
+ ///
+ public async Task RetrieveAsync(
string id,
ContactsRetrieveRequest request,
RequestOptions? options = null,
@@ -237,6 +236,10 @@ public async System.Threading.Tasks.Task RetrieveAsync(
request.IncludeRemoteFields.Value
);
}
+ if (request.IncludeShellData != null)
+ {
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
+ }
if (request.RemoteFields != null)
{
_query["remote_fields"] = request.RemoteFields.ToString();
@@ -246,54 +249,58 @@ public async System.Threading.Tasks.Task RetrieveAsync(
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
var response = await _client
- .MakeRequestAsync(
- new RawClient.JsonApiRequest
+ .SendRequestAsync(
+ new JsonRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
- Path = $"accounting/v1/contacts/{id}",
+ Path = string.Format(
+ "accounting/v1/contacts/{0}",
+ ValueConvert.ToPathParameterString(id)
+ ),
Query = _query,
Options = options,
},
cancellationToken
)
.ConfigureAwait(false);
- var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
try
{
return JsonUtils.Deserialize(responseBody)!;
}
catch (JsonException e)
{
- throw new MergeException("Failed to deserialize response", e);
+ throw new BaseMergeClientException("Failed to deserialize response", e);
}
}
- throw new MergeApiException(
- $"Error with status code {response.StatusCode}",
- response.StatusCode,
- responseBody
- );
+ {
+ var responseBody = await response.Raw.Content.ReadAsStringAsync();
+ throw new BaseMergeClientApiException(
+ $"Error with status code {response.StatusCode}",
+ response.StatusCode,
+ responseBody
+ );
+ }
}
///
/// Returns metadata for `Contact` POSTs.
///
- ///
- ///
+ ///