From b933827b24da404e339f04de79944a6d94586ac5 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:31:34 +0000 Subject: [PATCH] SDK regeneration --- README.md | 104 +- reference.md | 23775 ++++++++++++++++ src/Merge.Client.Test/Core/RawClientTests.cs | 113 + src/Merge.Client.sln | 20 +- .../Accounting/Accounts/AccountsClient.cs | 2 +- .../AsyncPassthroughClient.cs | 6 +- .../Accounting/Contacts/ContactsClient.cs | 2 +- .../Accounting/LinkToken/LinkTokenClient.cs | 6 +- .../Passthrough/PassthroughClient.cs | 6 +- .../Accounting/Scopes/ScopesClient.cs | 54 +- .../Accounting/Types/BalanceSheet.cs | 1 - .../Accounting/Types/CashFlowStatement.cs | 1 - src/Merge.Client/Accounting/Types/Contact.cs | 6 - .../Accounting/Types/ContactRequest.cs | 6 - .../Accounting/Types/CreditNote.cs | 21 - .../Accounting/Types/CreditNoteLineItem.cs | 2 - src/Merge.Client/Accounting/Types/Expense.cs | 10 - .../Accounting/Types/ExpenseLine.cs | 10 - .../Accounting/Types/ExpenseLineRequest.cs | 10 - .../Accounting/Types/ExpenseRequest.cs | 10 - .../Accounting/Types/IncomeStatement.cs | 1 - src/Merge.Client/Accounting/Types/Invoice.cs | 27 - .../Accounting/Types/InvoiceLineItem.cs | 9 - .../Types/InvoiceLineItemRequest.cs | 9 - .../Accounting/Types/InvoiceRequest.cs | 20 - src/Merge.Client/Accounting/Types/Item.cs | 3 - .../Accounting/Types/JournalEntry.cs | 20 - .../Accounting/Types/JournalEntryRequest.cs | 13 - .../Accounting/Types/JournalLine.cs | 8 - .../Accounting/Types/JournalLineRequest.cs | 8 - .../Accounting/Types/PatchedPaymentRequest.cs | 16 - src/Merge.Client/Accounting/Types/Payment.cs | 16 - .../Accounting/Types/PaymentRequest.cs | 16 - .../Accounting/Types/PurchaseOrder.cs | 10 - .../Accounting/Types/PurchaseOrderLineItem.cs | 1 - .../Types/PurchaseOrderLineItemRequest.cs | 1 - .../Accounting/Types/PurchaseOrderRequest.cs | 9 - .../Accounting/Types/RemoteFieldApi.cs | 1 - src/Merge.Client/Accounting/Types/TaxRate.cs | 1 - .../Accounting/Types/TrackingCategory.cs | 1 - .../Accounting/Types/Transaction.cs | 9 - .../Accounting/Types/TransactionLineItem.cs | 1 - .../Accounting/Types/VendorCredit.cs | 9 - .../Accounting/Types/VendorCreditLine.cs | 1 - .../AsyncPassthroughClient.cs | 6 +- .../Ats/Attachments/AttachmentsClient.cs | 2 +- .../Ats/Candidates/CandidatesClient.cs | 5 +- .../Ats/LinkToken/LinkTokenClient.cs | 6 +- .../Ats/Passthrough/PassthroughClient.cs | 6 +- src/Merge.Client/Ats/Scopes/ScopesClient.cs | 28 +- src/Merge.Client/Ats/Types/Activity.cs | 1 - src/Merge.Client/Ats/Types/ActivityRequest.cs | 1 - src/Merge.Client/Ats/Types/Application.cs | 17 - .../Ats/Types/ApplicationRequest.cs | 17 - src/Merge.Client/Ats/Types/Candidate.cs | 12 - .../Ats/Types/CandidateRequest.cs | 12 - src/Merge.Client/Ats/Types/Eeoc.cs | 1 - src/Merge.Client/Ats/Types/Job.cs | 24 - .../Ats/Types/JobInterviewStage.cs | 1 - src/Merge.Client/Ats/Types/JobPosting.cs | 4 - src/Merge.Client/Ats/Types/Offer.cs | 2 - src/Merge.Client/Ats/Types/RemoteFieldApi.cs | 1 - .../Ats/Types/ScheduledInterview.cs | 9 - .../Ats/Types/ScheduledInterviewRequest.cs | 9 - src/Merge.Client/Ats/Types/Scorecard.cs | 3 - .../Ats/Types/ScreeningQuestion.cs | 1 - .../Ats/Types/ScreeningQuestionAnswer.cs | 1 - .../Types/ScreeningQuestionAnswerRequest.cs | 1 - src/Merge.Client/Core/JsonConfiguration.cs | 2 +- src/Merge.Client/Core/OneOfSerializer.cs | 26 +- src/Merge.Client/Core/Public/Version.cs | 6 + src/Merge.Client/Core/RawClient.cs | 114 +- .../Crm/Accounts/AccountsClient.cs | 2 +- .../AsyncPassthroughClient.cs | 6 +- .../Crm/Contacts/ContactsClient.cs | 4 +- .../Crm/LinkToken/LinkTokenClient.cs | 6 +- .../Crm/Passthrough/PassthroughClient.cs | 6 +- src/Merge.Client/Crm/Scopes/ScopesClient.cs | 28 +- src/Merge.Client/Crm/Types/Account.cs | 1 - src/Merge.Client/Crm/Types/AccountRequest.cs | 1 - src/Merge.Client/Crm/Types/Association.cs | 1 - src/Merge.Client/Crm/Types/Contact.cs | 2 - src/Merge.Client/Crm/Types/ContactRequest.cs | 2 - src/Merge.Client/Crm/Types/Engagement.cs | 9 - .../Crm/Types/EngagementRequest.cs | 9 - src/Merge.Client/Crm/Types/Lead.cs | 3 - src/Merge.Client/Crm/Types/LeadRequest.cs | 3 - src/Merge.Client/Crm/Types/Note.cs | 4 - src/Merge.Client/Crm/Types/NoteRequest.cs | 4 - src/Merge.Client/Crm/Types/Opportunity.cs | 3 - .../Crm/Types/OpportunityRequest.cs | 3 - .../Crm/Types/PatchedContactRequest.cs | 1 - src/Merge.Client/Crm/Types/RemoteField.cs | 1 - src/Merge.Client/Crm/Types/RemoteFieldApi.cs | 1 - .../Crm/Types/RemoteFieldRequest.cs | 1 - src/Merge.Client/Crm/Types/Task.cs | 3 - src/Merge.Client/Crm/Types/TaskRequest.cs | 3 - src/Merge.Client/Crm/Users/UsersClient.cs | 2 +- .../AsyncPassthroughClient.cs | 6 +- .../Filestorage/LinkToken/LinkTokenClient.cs | 6 +- .../Passthrough/PassthroughClient.cs | 6 +- .../Filestorage/Scopes/ScopesClient.cs | 54 +- src/Merge.Client/Filestorage/Types/File.cs | 7 - .../Filestorage/Types/FileRequest.cs | 7 - src/Merge.Client/Filestorage/Types/Folder.cs | 7 - .../Filestorage/Types/FolderRequest.cs | 7 - .../Filestorage/Types/Permission.cs | 2 - .../Filestorage/Types/PermissionRequest.cs | 2 - .../Filestorage/Types/RemoteFieldApi.cs | 1 - .../AsyncPassthroughClient.cs | 6 +- .../Hris/Employees/EmployeesClient.cs | 5 +- .../Hris/LinkToken/LinkTokenClient.cs | 6 +- .../Hris/Passthrough/PassthroughClient.cs | 6 +- src/Merge.Client/Hris/Scopes/ScopesClient.cs | 31 +- src/Merge.Client/Hris/Types/BankInfo.cs | 1 - src/Merge.Client/Hris/Types/Benefit.cs | 1 - src/Merge.Client/Hris/Types/Employee.cs | 18 - .../Hris/Types/EmployeePayrollRun.cs | 2 - .../Hris/Types/EmployeeRequest.cs | 18 - src/Merge.Client/Hris/Types/Employment.cs | 2 - src/Merge.Client/Hris/Types/RemoteFieldApi.cs | 1 - src/Merge.Client/Hris/Types/Team.cs | 1 - src/Merge.Client/Hris/Types/TimeOff.cs | 2 - src/Merge.Client/Hris/Types/TimeOffBalance.cs | 1 - src/Merge.Client/Hris/Types/TimeOffRequest.cs | 2 - src/Merge.Client/Merge.Client.csproj | 2 +- src/Merge.Client/Merge.cs | 10 +- .../AsyncPassthroughClient.cs | 6 +- .../Attachments/AttachmentsClient.cs | 5 +- .../Ticketing/Contacts/ContactsClient.cs | 2 +- .../Ticketing/LinkToken/LinkTokenClient.cs | 6 +- .../Passthrough/PassthroughClient.cs | 6 +- .../Ticketing/Scopes/ScopesClient.cs | 54 +- .../Ticketing/Types/Attachment.cs | 1 - .../Ticketing/Types/AttachmentRequest.cs | 1 - .../Ticketing/Types/Collection.cs | 1 - src/Merge.Client/Ticketing/Types/Comment.cs | 3 - .../Ticketing/Types/CommentRequest.cs | 3 - src/Merge.Client/Ticketing/Types/Contact.cs | 1 - .../Ticketing/Types/ContactRequest.cs | 1 - .../Ticketing/Types/RemoteField.cs | 1 - .../Ticketing/Types/RemoteFieldApi.cs | 1 - .../Ticketing/Types/RemoteFieldRequest.cs | 1 - src/Merge.Client/Ticketing/Types/Ticket.cs | 19 - .../Ticketing/Types/TicketRequest.cs | 19 - src/Merge.Client/Ticketing/Types/User.cs | 6 - 146 files changed, 24338 insertions(+), 821 deletions(-) create mode 100644 reference.md create mode 100644 src/Merge.Client.Test/Core/RawClientTests.cs create mode 100644 src/Merge.Client/Core/Public/Version.cs diff --git a/README.md b/README.md index 81788db2..6de54452 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ -# Merge .NET Library +# Merge C# Library -The official Merge C# library, supporting .NET Standard, .NET Core, and .NET Framework. +[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) +[![nuget shield](https://img.shields.io/nuget/v/Merge.Client)](https://nuget.org/packages/Merge.Client) + +The Merge C# library provides convenient access to the Merge API from C#. ## Documentation @@ -8,16 +11,22 @@ API reference documentation is available [here](https://docs.merge.dev/basics/au ## Installation -Using the .NET Core command-line interface (CLI) tools: - ```sh -dotnet add package Merge.Client +nuget install Merge.Client ``` -Using the NuGet Command Line Interface (CLI): +## Usage -```sh -nuget install Merge.Client +Instantiate and use the client with the following: + +```csharp +using Merge.Client.Ats; +using Merge.Client; + +var client = new Merge("API_KEY"); +await client.Ats.Activities.CreateAsync( + new ActivityEndpointRequest { Model = new ActivityRequest(), RemoteUserId = "remote_user_id" } +); ``` ## Instantiation @@ -61,55 +70,68 @@ var merge = new MergeClient("YOUR_API_KEY", "YOUR_ACCOUNT_ID", new ClientOptions ``` ## Exception Handling -When the API returns a non-zero status code, (4xx or 5xx response), -a subclass of MergeException will be thrown: + +When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error +will be thrown. ```csharp using Merge.Client; try { - merge.Ats.Candidates.Retrieve(...); -} catch (MergeException e) { - System.Console.WriteLine(e.Message) - System.Console.WriteLine(e.StatusCode) + var response = await client.Ats.Activities.CreateAsync(...); +} catch (MergeApiException e) { + System.Console.WriteLine(e.Body); + System.Console.WriteLine(e.StatusCode); } ``` -## Usage +## Advanced -Below are code snippets of how you can use the C# SDK. +### Retries -### Create Link Token +The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long +as the request is deemed retriable and the number of retry attempts has not grown larger than the configured +retry limit (default: 2). -```c# -using Merge.Client; -using Merge.Client.Ats; +A request is deemed retriable when any of the following HTTP status codes is returned: -var merge = new MergeClient("YOUR_API_KEY", "YOUR_ACCOUNT_TOKEN") +- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout) +- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests) +- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors) -merge.Ats.LinkToken.Create(new EndUserDetailsRequest{ - EndUserEmailAddress = "john.smith@gmail.com", - EndUserOrganizationName = "acme", - EndUserOriginId = "1234", -}) +Use the `MaxRetries` request option to configure this behavior. + +```csharp +var response = await client.Ats.Activities.CreateAsync( + ..., + new RequestOptions { + MaxRetries: 0 // Override MaxRetries at the request level + } +); ``` -### Get Employee +### Timeouts -```c# -using Merge.Client; -using Merge.Client.Hris; +The SDK defaults to a 30 second timeout. Use the `Timeout` option to configure this behavior. -var merge = new MergeClient( - "YOUR_API_KEY", "YOUR_ACCOUNT_ID" -) -Employee employee = merge.Hris.Employees.RetrieveAsync("0958cbc6-6040-430a-848e-aafacbadf4ae", - new EmployeesRetrieveRequest{ - IncludeRemoteData = true +```csharp +var response = await client.Ats.Activities.CreateAsync( + ..., + new RequestOptions { + Timeout: TimeSpan.FromSeconds(3) // Override timeout to 3s } ); ``` +## Contributing + +While we value open-source contributions to this SDK, this library is generated programmatically. +Additions made directly to this library would have to be moved over to our generation code, +otherwise they would be overwritten upon the next generated release. Feel free to open a PR as +a proof of concept, but know that we will not be able to merge it as-is. We suggest opening +an issue first to discuss with us! + +On the other hand, contributions to the README are always very welcome! ## Retries 429 Rate Limit, and >=500 Internal errors will all be retried twice with exponential backoff. You can override this behavior @@ -130,13 +152,3 @@ var merge = new MergeClient("...", new ClientOptions{ TimeoutInSeconds = 20 // Lower timeout }); ``` - -## Contributing -While we value open-source contributions to this SDK, this library -is generated programmatically. Additions made directly to this library -would have to be moved over to our generation code, otherwise they would -be overwritten upon the next generated release. Feel free to open a PR as a -proof of concept, but know that we will not be able to merge it as-is. -We suggest opening an issue first to discuss with us! - -On the other hand, contributions to the README are always very welcome! diff --git a/reference.md b/reference.md new file mode 100644 index 00000000..3ab9e25f --- /dev/null +++ b/reference.md @@ -0,0 +1,23775 @@ +# 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. +
+
+
+
+ +#### 🔌 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) -> Ats.RemoteResponse +
+
+ +#### 📝 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/8828211-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/8828211-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/8828211-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, + } + }, + }, + }, + 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() -> 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(); +``` +
+
+
+
+ + +
+
+
+ +
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 Launch, 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) -> Crm.RemoteResponse +
+
+ +#### 📝 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/8828211-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/8828211-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/8828211-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, + } + }, + }, + }, + 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() -> 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(); +``` +
+
+
+
+ + +
+
+
+ +
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 Launch, 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) -> Filestorage.RemoteResponse +
+
+ +#### 📝 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/8828211-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/8828211-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/8828211-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, + } + }, + }, + }, + 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() -> 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(); +``` +
+
+
+
+ + +
+
+
+ +
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` + +
+
+
+
+ + +
+
+
+ +## Filestorage RegenerateKey +
client.Filestorage.RegenerateKey.CreateAsync(RemoteKeyForRegenerationRequest { ... }) -> Filestorage.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Filestorage.RegenerateKey.CreateAsync( + new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteKeyForRegenerationRequest` + +
+
+
+
+ + +
+
+
+ +## Filestorage SyncStatus +
client.Filestorage.SyncStatus.ListAsync(SyncStatusListRequest { ... }) -> Filestorage.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.Filestorage.SyncStatus.ListAsync(new SyncStatusListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SyncStatusListRequest` + +
+
+
+
+ + +
+
+
+ +## Filestorage ForceResync +
client.Filestorage.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 Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Filestorage.ForceResync.SyncStatusResyncCreateAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Filestorage Users +
client.Filestorage.Users.ListAsync(UsersListRequest { ... }) -> Filestorage.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Filestorage.Users.ListAsync(new UsersListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `UsersListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Filestorage.Users.RetrieveAsync(id, UsersRetrieveRequest { ... }) -> Filestorage.User +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Filestorage.Users.RetrieveAsync("id", new UsersRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `UsersRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Filestorage WebhookReceivers +
client.Filestorage.WebhookReceivers.ListAsync() -> IEnumerable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Filestorage.WebhookReceivers.ListAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Filestorage.WebhookReceivers.CreateAsync(WebhookReceiverRequest { ... }) -> Filestorage.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Filestorage.WebhookReceivers.CreateAsync( + new WebhookReceiverRequest { Event = "event", IsActive = true } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `WebhookReceiverRequest` + +
+
+
+
+ + +
+
+
+ +## Hris AccountDetails +
client.Hris.AccountDetails.RetrieveAsync() -> Hris.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.AccountDetails.RetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris AccountToken +
client.Hris.AccountToken.RetrieveAsync(publicToken) -> Hris.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.AccountToken.RetrieveAsync("public_token"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+
+
+ + +
+
+
+ +## Hris AsyncPassthrough +
client.Hris.AsyncPassthrough.CreateAsync(Hris.DataPassthroughRequest { ... }) -> Hris.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.AsyncPassthrough.CreateAsync( + new Merge.Client.Hris.DataPassthroughRequest + { + Method = Merge.Client.Hris.MethodEnum.Get, + Path = "/scooters", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Hris.DataPassthroughRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.AsyncPassthrough.RetrieveAsync(asyncPassthroughReceiptId) -> Hris.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+
+
+ + +
+
+
+ +## Hris AuditTrail +
client.Hris.AuditTrail.ListAsync(AuditTrailListRequest { ... }) -> Hris.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.AuditTrail.ListAsync(new AuditTrailListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AuditTrailListRequest` + +
+
+
+
+ + +
+
+
+ +## Hris AvailableActions +
client.Hris.AvailableActions.RetrieveAsync() -> Hris.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.AvailableActions.RetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris BankInfo +
client.Hris.BankInfo.ListAsync(BankInfoListRequest { ... }) -> PaginatedBankInfoList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `BankInfo` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.BankInfo.ListAsync(new BankInfoListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `BankInfoListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.BankInfo.RetrieveAsync(id, BankInfoRetrieveRequest { ... }) -> BankInfo +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `BankInfo` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.BankInfo.RetrieveAsync("id", new BankInfoRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `BankInfoRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Benefits +
client.Hris.Benefits.ListAsync(BenefitsListRequest { ... }) -> PaginatedBenefitList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Benefit` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Benefits.ListAsync(new BenefitsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `BenefitsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Benefits.RetrieveAsync(id, BenefitsRetrieveRequest { ... }) -> Benefit +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Benefit` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Benefits.RetrieveAsync("id", new BenefitsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `BenefitsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Companies +
client.Hris.Companies.ListAsync(CompaniesListRequest { ... }) -> PaginatedCompanyList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Company` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Companies.ListAsync(new CompaniesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CompaniesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Companies.RetrieveAsync(id, CompaniesRetrieveRequest { ... }) -> Company +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Company` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Companies.RetrieveAsync("id", new CompaniesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `CompaniesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Scopes +
client.Hris.Scopes.DefaultScopesRetrieveAsync() -> Hris.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/8828211-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Scopes.DefaultScopesRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Hris.Scopes.LinkedAccountScopesRetrieveAsync() -> Hris.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/8828211-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Scopes.LinkedAccountScopesRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Hris.Scopes.LinkedAccountScopesCreateAsync(LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Hris.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/8828211-common-model-and-field-scopes) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Scopes.LinkedAccountScopesCreateAsync( + new LinkedAccountCommonModelScopeDeserializerRequest + { + CommonModels = new List() + { + new Merge.Client.Hris.IndividualCommonModelScopeDeserializerRequest + { + ModelName = "Employee", + ModelPermissions = new Dictionary< + string, + Merge.Client.Hris.ModelPermissionDeserializerRequest + >() + { + { + "READ", + new Merge.Client.Hris.ModelPermissionDeserializerRequest + { + IsEnabled = true, + } + }, + { + "WRITE", + new Merge.Client.Hris.ModelPermissionDeserializerRequest + { + IsEnabled = false, + } + }, + }, + }, + new Merge.Client.Hris.IndividualCommonModelScopeDeserializerRequest + { + ModelName = "Benefit", + ModelPermissions = new Dictionary< + string, + Merge.Client.Hris.ModelPermissionDeserializerRequest + >() + { + { + "WRITE", + new Merge.Client.Hris.ModelPermissionDeserializerRequest + { + IsEnabled = false, + } + }, + }, + }, + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+
+
+ + +
+
+
+ +## Hris DeleteAccount +
client.Hris.DeleteAccount.DeleteAsync() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.DeleteAccount.DeleteAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris Dependents +
client.Hris.Dependents.ListAsync(DependentsListRequest { ... }) -> PaginatedDependentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Dependent` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Dependents.ListAsync(new DependentsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `DependentsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Dependents.RetrieveAsync(id, DependentsRetrieveRequest { ... }) -> Dependent +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Dependent` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Dependents.RetrieveAsync("id", new DependentsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `DependentsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris EmployeePayrollRuns +
client.Hris.EmployeePayrollRuns.ListAsync(EmployeePayrollRunsListRequest { ... }) -> PaginatedEmployeePayrollRunList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EmployeePayrollRun` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.EmployeePayrollRuns.ListAsync(new EmployeePayrollRunsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EmployeePayrollRunsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.EmployeePayrollRuns.RetrieveAsync(id, EmployeePayrollRunsRetrieveRequest { ... }) -> EmployeePayrollRun +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EmployeePayrollRun` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.EmployeePayrollRuns.RetrieveAsync("id", new EmployeePayrollRunsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `EmployeePayrollRunsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Employees +
client.Hris.Employees.ListAsync(EmployeesListRequest { ... }) -> PaginatedEmployeeList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Employee` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Employees.ListAsync(new EmployeesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EmployeesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Employees.CreateAsync(EmployeeEndpointRequest { ... }) -> EmployeeResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Employee` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Employees.CreateAsync( + new EmployeeEndpointRequest { Model = new EmployeeRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EmployeeEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Employees.RetrieveAsync(id, EmployeesRetrieveRequest { ... }) -> Employee +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Employee` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Employees.RetrieveAsync("id", new EmployeesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `EmployeesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Employees.IgnoreCreateAsync(modelId, Hris.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.Hris.Employees.IgnoreCreateAsync( + "model_id", + new Merge.Client.Hris.IgnoreCommonModelRequest + { + Reason = Merge.Client.Hris.ReasonEnum.GeneralCustomerRequest, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**modelId:** `string` + +
+
+ +
+
+ +**request:** `Hris.IgnoreCommonModelRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Employees.MetaPostRetrieveAsync() -> Hris.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Employee` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Employees.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris EmployerBenefits +
client.Hris.EmployerBenefits.ListAsync(EmployerBenefitsListRequest { ... }) -> PaginatedEmployerBenefitList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `EmployerBenefit` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.EmployerBenefits.ListAsync(new EmployerBenefitsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EmployerBenefitsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.EmployerBenefits.RetrieveAsync(id, EmployerBenefitsRetrieveRequest { ... }) -> EmployerBenefit +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `EmployerBenefit` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.EmployerBenefits.RetrieveAsync("id", new EmployerBenefitsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `EmployerBenefitsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Employments +
client.Hris.Employments.ListAsync(EmploymentsListRequest { ... }) -> PaginatedEmploymentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Employment` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Employments.ListAsync(new EmploymentsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EmploymentsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Employments.RetrieveAsync(id, EmploymentsRetrieveRequest { ... }) -> Employment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Employment` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Employments.RetrieveAsync("id", new EmploymentsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `EmploymentsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris FieldMapping +
client.Hris.FieldMapping.FieldMappingsRetrieveAsync() -> Hris.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.Hris.FieldMapping.FieldMappingsRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Hris.FieldMapping.FieldMappingsCreateAsync(CreateFieldMappingRequest { ... }) -> Hris.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.Hris.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.Hris.FieldMapping.FieldMappingsDestroyAsync(fieldMappingId) -> Hris.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.Hris.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+
+
+ + +
+
+
+ +
client.Hris.FieldMapping.FieldMappingsPartialUpdateAsync(fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Hris.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.Hris.FieldMapping.FieldMappingsPartialUpdateAsync( + "field_mapping_id", + new PatchedEditFieldMappingRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `PatchedEditFieldMappingRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.FieldMapping.RemoteFieldsRetrieveAsync(RemoteFieldsRetrieveRequest { ... }) -> Hris.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.Hris.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteFieldsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.FieldMapping.TargetFieldsRetrieveAsync() -> Hris.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.Hris.FieldMapping.TargetFieldsRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris GenerateKey +
client.Hris.GenerateKey.CreateAsync(GenerateRemoteKeyRequest { ... }) -> Hris.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.GenerateKey.CreateAsync( + new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `GenerateRemoteKeyRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Groups +
client.Hris.Groups.ListAsync(GroupsListRequest { ... }) -> Hris.PaginatedGroupList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Group` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Groups.ListAsync(new GroupsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `GroupsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Groups.RetrieveAsync(id, GroupsRetrieveRequest { ... }) -> Hris.Group +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Group` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Groups.RetrieveAsync("id", new GroupsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `GroupsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Issues +
client.Hris.Issues.ListAsync(IssuesListRequest { ... }) -> Hris.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Issues.ListAsync(new IssuesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `IssuesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Issues.RetrieveAsync(id) -> Hris.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Issues.RetrieveAsync("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+
+
+ + +
+
+
+ +## Hris LinkToken +
client.Hris.LinkToken.CreateAsync(EndUserDetailsRequest { ... }) -> Hris.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.LinkToken.CreateAsync( + new EndUserDetailsRequest + { + EndUserEmailAddress = "example@gmail.com", + EndUserOrganizationName = "Test Organization", + EndUserOriginId = "12345", + Categories = new List() + { + Merge.Client.Hris.CategoriesEnum.Hris, + Merge.Client.Hris.CategoriesEnum.Ats, + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EndUserDetailsRequest` + +
+
+
+
+ + +
+
+
+ +## Hris LinkedAccounts +
client.Hris.LinkedAccounts.ListAsync(LinkedAccountsListRequest { ... }) -> Hris.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.LinkedAccounts.ListAsync(new LinkedAccountsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LinkedAccountsListRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Locations +
client.Hris.Locations.ListAsync(LocationsListRequest { ... }) -> PaginatedLocationList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Location` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Locations.ListAsync(new LocationsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LocationsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Locations.RetrieveAsync(id, LocationsRetrieveRequest { ... }) -> Location +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Location` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Locations.RetrieveAsync("id", new LocationsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `LocationsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris Passthrough +
client.Hris.Passthrough.CreateAsync(Hris.DataPassthroughRequest { ... }) -> Hris.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Passthrough.CreateAsync( + new Merge.Client.Hris.DataPassthroughRequest + { + Method = Merge.Client.Hris.MethodEnum.Get, + Path = "/scooters", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Hris.DataPassthroughRequest` + +
+
+
+
+ + +
+
+
+ +## Hris PayGroups +
client.Hris.PayGroups.ListAsync(PayGroupsListRequest { ... }) -> PaginatedPayGroupList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PayGroup` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.PayGroups.ListAsync(new PayGroupsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PayGroupsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.PayGroups.RetrieveAsync(id, PayGroupsRetrieveRequest { ... }) -> PayGroup +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `PayGroup` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.PayGroups.RetrieveAsync("id", new PayGroupsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PayGroupsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris PayrollRuns +
client.Hris.PayrollRuns.ListAsync(PayrollRunsListRequest { ... }) -> PaginatedPayrollRunList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PayrollRun` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.PayrollRuns.ListAsync(new PayrollRunsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PayrollRunsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.PayrollRuns.RetrieveAsync(id, PayrollRunsRetrieveRequest { ... }) -> PayrollRun +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `PayrollRun` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.PayrollRuns.RetrieveAsync("id", new PayrollRunsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PayrollRunsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris RegenerateKey +
client.Hris.RegenerateKey.CreateAsync(RemoteKeyForRegenerationRequest { ... }) -> Hris.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.RegenerateKey.CreateAsync( + new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteKeyForRegenerationRequest` + +
+
+
+
+ + +
+
+
+ +## Hris SyncStatus +
client.Hris.SyncStatus.ListAsync(SyncStatusListRequest { ... }) -> Hris.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.Hris.SyncStatus.ListAsync(new SyncStatusListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SyncStatusListRequest` + +
+
+
+
+ + +
+
+
+ +## Hris ForceResync +
client.Hris.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 Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.ForceResync.SyncStatusResyncCreateAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris Teams +
client.Hris.Teams.ListAsync(TeamsListRequest { ... }) -> Hris.PaginatedTeamList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Team` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Teams.ListAsync(new TeamsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TeamsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.Teams.RetrieveAsync(id, TeamsRetrieveRequest { ... }) -> Hris.Team +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Team` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.Teams.RetrieveAsync("id", new TeamsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TeamsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris TimeOff +
client.Hris.TimeOff.ListAsync(TimeOffListRequest { ... }) -> PaginatedTimeOffList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TimeOff` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimeOff.ListAsync(new TimeOffListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TimeOffListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimeOff.CreateAsync(TimeOffEndpointRequest { ... }) -> TimeOffResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `TimeOff` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimeOff.CreateAsync(new TimeOffEndpointRequest { Model = new TimeOffRequest() }); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TimeOffEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimeOff.RetrieveAsync(id, TimeOffRetrieveRequest { ... }) -> TimeOff +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TimeOff` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimeOff.RetrieveAsync("id", new TimeOffRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TimeOffRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimeOff.MetaPostRetrieveAsync() -> Hris.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TimeOff` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimeOff.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris TimeOffBalances +
client.Hris.TimeOffBalances.ListAsync(TimeOffBalancesListRequest { ... }) -> PaginatedTimeOffBalanceList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TimeOffBalance` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimeOffBalances.ListAsync(new TimeOffBalancesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TimeOffBalancesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimeOffBalances.RetrieveAsync(id, TimeOffBalancesRetrieveRequest { ... }) -> TimeOffBalance +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TimeOffBalance` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimeOffBalances.RetrieveAsync("id", new TimeOffBalancesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TimeOffBalancesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Hris TimesheetEntries +
client.Hris.TimesheetEntries.ListAsync(TimesheetEntriesListRequest { ... }) -> PaginatedTimesheetEntryList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TimesheetEntry` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimesheetEntries.ListAsync(new TimesheetEntriesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TimesheetEntriesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimesheetEntries.CreateAsync(TimesheetEntryEndpointRequest { ... }) -> TimesheetEntryResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `TimesheetEntry` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimesheetEntries.CreateAsync( + new TimesheetEntryEndpointRequest { Model = new TimesheetEntryRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TimesheetEntryEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimesheetEntries.RetrieveAsync(id, TimesheetEntriesRetrieveRequest { ... }) -> TimesheetEntry +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TimesheetEntry` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimesheetEntries.RetrieveAsync("id", new TimesheetEntriesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TimesheetEntriesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Hris.TimesheetEntries.MetaPostRetrieveAsync() -> Hris.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TimesheetEntry` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.TimesheetEntries.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Hris WebhookReceivers +
client.Hris.WebhookReceivers.ListAsync() -> IEnumerable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.WebhookReceivers.ListAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Hris.WebhookReceivers.CreateAsync(WebhookReceiverRequest { ... }) -> Hris.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Hris.WebhookReceivers.CreateAsync( + new WebhookReceiverRequest { Event = "event", IsActive = true } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `WebhookReceiverRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing AccountDetails +
client.Ticketing.AccountDetails.RetrieveAsync() -> Ticketing.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.AccountDetails.RetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing AccountToken +
client.Ticketing.AccountToken.RetrieveAsync(publicToken) -> Ticketing.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.AccountToken.RetrieveAsync("public_token"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+
+
+ + +
+
+
+ +## Ticketing Accounts +
client.Ticketing.Accounts.ListAsync(AccountsListRequest { ... }) -> Ticketing.PaginatedAccountList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Account` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Accounts.ListAsync(new AccountsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AccountsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Accounts.RetrieveAsync(id, AccountsRetrieveRequest { ... }) -> Ticketing.Account +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Account` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Accounts.RetrieveAsync("id", new AccountsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AccountsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing AsyncPassthrough +
client.Ticketing.AsyncPassthrough.CreateAsync(Ticketing.DataPassthroughRequest { ... }) -> Ticketing.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.AsyncPassthrough.CreateAsync( + new Merge.Client.Ticketing.DataPassthroughRequest + { + Method = Merge.Client.Ticketing.MethodEnum.Get, + Path = "/scooters", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Ticketing.DataPassthroughRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.AsyncPassthrough.RetrieveAsync(asyncPassthroughReceiptId) -> Ticketing.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+
+
+ + +
+
+
+ +## Ticketing Attachments +
client.Ticketing.Attachments.ListAsync(AttachmentsListRequest { ... }) -> Ticketing.PaginatedAttachmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Attachment` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Attachments.ListAsync(new AttachmentsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AttachmentsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Attachments.CreateAsync(TicketingAttachmentEndpointRequest { ... }) -> TicketingAttachmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Attachment` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Attachments.CreateAsync( + new TicketingAttachmentEndpointRequest + { + Model = new Merge.Client.Ticketing.AttachmentRequest(), + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TicketingAttachmentEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Attachments.RetrieveAsync(id, AttachmentsRetrieveRequest { ... }) -> Ticketing.Attachment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Attachment` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Attachments.RetrieveAsync("id", new AttachmentsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AttachmentsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Attachments.DownloadRetrieveAsync(id, AttachmentsDownloadRetrieveRequest { ... }) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the `File` content with the given `id` as a stream of bytes. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Attachments.DownloadRetrieveAsync( + "string", + new AttachmentsDownloadRetrieveRequest { MimeType = "string" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AttachmentsDownloadRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Attachments.MetaPostRetrieveAsync() -> Ticketing.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TicketingAttachment` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Attachments.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing AuditTrail +
client.Ticketing.AuditTrail.ListAsync(AuditTrailListRequest { ... }) -> Ticketing.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.AuditTrail.ListAsync(new AuditTrailListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AuditTrailListRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing AvailableActions +
client.Ticketing.AvailableActions.RetrieveAsync() -> Ticketing.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.AvailableActions.RetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing Collections +
client.Ticketing.Collections.ListAsync(CollectionsListRequest { ... }) -> PaginatedCollectionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Collection` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Collections.ListAsync(new CollectionsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CollectionsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Collections.RetrieveAsync(id, CollectionsRetrieveRequest { ... }) -> Collection +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Collection` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Collections.RetrieveAsync("id", new CollectionsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `CollectionsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Collections.UsersListAsync(parentId, CollectionsUsersListRequest { ... }) -> Ticketing.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Collections.UsersListAsync("parent_id", new CollectionsUsersListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**parentId:** `string` + +
+
+ +
+
+ +**request:** `CollectionsUsersListRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Comments +
client.Ticketing.Comments.ListAsync(CommentsListRequest { ... }) -> PaginatedCommentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Comment` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Comments.ListAsync(new CommentsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CommentsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Comments.CreateAsync(CommentEndpointRequest { ... }) -> CommentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Comment` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Comments.CreateAsync( + new CommentEndpointRequest { Model = new CommentRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CommentEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Comments.RetrieveAsync(id, CommentsRetrieveRequest { ... }) -> Comment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Comment` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Comments.RetrieveAsync("id", new CommentsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `CommentsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Comments.MetaPostRetrieveAsync() -> Ticketing.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Comment` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Comments.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing Contacts +
client.Ticketing.Contacts.ListAsync(ContactsListRequest { ... }) -> Ticketing.PaginatedContactList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Contact` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Contacts.ListAsync(new ContactsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ContactsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Contacts.CreateAsync(TicketingContactEndpointRequest { ... }) -> TicketingContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Contact` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Contacts.CreateAsync( + new TicketingContactEndpointRequest { Model = new Merge.Client.Ticketing.ContactRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TicketingContactEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Contacts.RetrieveAsync(id, ContactsRetrieveRequest { ... }) -> Ticketing.Contact +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Contact` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Contacts.RetrieveAsync("id", new ContactsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `ContactsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Contacts.MetaPostRetrieveAsync() -> Ticketing.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `TicketingContact` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Contacts.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing Scopes +
client.Ticketing.Scopes.DefaultScopesRetrieveAsync() -> Ticketing.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/8828211-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Scopes.DefaultScopesRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Scopes.LinkedAccountScopesRetrieveAsync() -> Ticketing.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/8828211-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Scopes.LinkedAccountScopesRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Scopes.LinkedAccountScopesCreateAsync(LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Ticketing.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/8828211-common-model-and-field-scopes) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Scopes.LinkedAccountScopesCreateAsync( + new LinkedAccountCommonModelScopeDeserializerRequest + { + CommonModels = + new List() + { + new Merge.Client.Ticketing.IndividualCommonModelScopeDeserializerRequest + { + ModelName = "Employee", + ModelPermissions = new Dictionary< + string, + Merge.Client.Ticketing.ModelPermissionDeserializerRequest + >() + { + { + "READ", + new Merge.Client.Ticketing.ModelPermissionDeserializerRequest + { + IsEnabled = true, + } + }, + { + "WRITE", + new Merge.Client.Ticketing.ModelPermissionDeserializerRequest + { + IsEnabled = false, + } + }, + }, + }, + new Merge.Client.Ticketing.IndividualCommonModelScopeDeserializerRequest + { + ModelName = "Benefit", + ModelPermissions = new Dictionary< + string, + Merge.Client.Ticketing.ModelPermissionDeserializerRequest + >() + { + { + "WRITE", + new Merge.Client.Ticketing.ModelPermissionDeserializerRequest + { + IsEnabled = false, + } + }, + }, + }, + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing DeleteAccount +
client.Ticketing.DeleteAccount.DeleteAsync() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.DeleteAccount.DeleteAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing FieldMapping +
client.Ticketing.FieldMapping.FieldMappingsRetrieveAsync() -> Ticketing.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.Ticketing.FieldMapping.FieldMappingsRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Ticketing.FieldMapping.FieldMappingsCreateAsync(CreateFieldMappingRequest { ... }) -> Ticketing.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.Ticketing.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.Ticketing.FieldMapping.FieldMappingsDestroyAsync(fieldMappingId) -> Ticketing.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.Ticketing.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.FieldMapping.FieldMappingsPartialUpdateAsync(fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Ticketing.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.Ticketing.FieldMapping.FieldMappingsPartialUpdateAsync( + "field_mapping_id", + new PatchedEditFieldMappingRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `PatchedEditFieldMappingRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.FieldMapping.RemoteFieldsRetrieveAsync(RemoteFieldsRetrieveRequest { ... }) -> Ticketing.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.Ticketing.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteFieldsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.FieldMapping.TargetFieldsRetrieveAsync() -> Ticketing.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.Ticketing.FieldMapping.TargetFieldsRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing GenerateKey +
client.Ticketing.GenerateKey.CreateAsync(GenerateRemoteKeyRequest { ... }) -> Ticketing.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.GenerateKey.CreateAsync( + new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `GenerateRemoteKeyRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Issues +
client.Ticketing.Issues.ListAsync(IssuesListRequest { ... }) -> Ticketing.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets all issues for Organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Issues.ListAsync(new IssuesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `IssuesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Issues.RetrieveAsync(id) -> Ticketing.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Issues.RetrieveAsync("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+
+
+ + +
+
+
+ +## Ticketing LinkToken +
client.Ticketing.LinkToken.CreateAsync(EndUserDetailsRequest { ... }) -> Ticketing.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.LinkToken.CreateAsync( + new EndUserDetailsRequest + { + EndUserEmailAddress = "example@gmail.com", + EndUserOrganizationName = "Test Organization", + EndUserOriginId = "12345", + Categories = new List() + { + Merge.Client.Ticketing.CategoriesEnum.Hris, + Merge.Client.Ticketing.CategoriesEnum.Ats, + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EndUserDetailsRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing LinkedAccounts +
client.Ticketing.LinkedAccounts.ListAsync(LinkedAccountsListRequest { ... }) -> Ticketing.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.LinkedAccounts.ListAsync(new LinkedAccountsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LinkedAccountsListRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Passthrough +
client.Ticketing.Passthrough.CreateAsync(Ticketing.DataPassthroughRequest { ... }) -> Ticketing.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Passthrough.CreateAsync( + new Merge.Client.Ticketing.DataPassthroughRequest + { + Method = Merge.Client.Ticketing.MethodEnum.Get, + Path = "/scooters", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Ticketing.DataPassthroughRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Projects +
client.Ticketing.Projects.ListAsync(ProjectsListRequest { ... }) -> PaginatedProjectList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Project` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Projects.ListAsync(new ProjectsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ProjectsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Projects.RetrieveAsync(id, ProjectsRetrieveRequest { ... }) -> Project +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Project` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Projects.RetrieveAsync("id", new ProjectsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `ProjectsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Projects.UsersListAsync(parentId, ProjectsUsersListRequest { ... }) -> Ticketing.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Projects.UsersListAsync("parent_id", new ProjectsUsersListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**parentId:** `string` + +
+
+ +
+
+ +**request:** `ProjectsUsersListRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing RegenerateKey +
client.Ticketing.RegenerateKey.CreateAsync(RemoteKeyForRegenerationRequest { ... }) -> Ticketing.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.RegenerateKey.CreateAsync( + new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteKeyForRegenerationRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Roles +
client.Ticketing.Roles.ListAsync(RolesListRequest { ... }) -> PaginatedRoleList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Role` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Roles.ListAsync(new RolesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RolesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Roles.RetrieveAsync(id, RolesRetrieveRequest { ... }) -> Role +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Role` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Roles.RetrieveAsync("id", new RolesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `RolesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing SyncStatus +
client.Ticketing.SyncStatus.ListAsync(SyncStatusListRequest { ... }) -> Ticketing.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.Ticketing.SyncStatus.ListAsync(new SyncStatusListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SyncStatusListRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing ForceResync +
client.Ticketing.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 Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.ForceResync.SyncStatusResyncCreateAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Ticketing Tags +
client.Ticketing.Tags.ListAsync(TagsListRequest { ... }) -> Ticketing.PaginatedTagList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Tag` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tags.ListAsync(new TagsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TagsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tags.RetrieveAsync(id, TagsRetrieveRequest { ... }) -> Ticketing.Tag +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Tag` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tags.RetrieveAsync("id", new TagsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TagsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Teams +
client.Ticketing.Teams.ListAsync(TeamsListRequest { ... }) -> Ticketing.PaginatedTeamList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Team` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Teams.ListAsync(new TeamsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TeamsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Teams.RetrieveAsync(id, TeamsRetrieveRequest { ... }) -> Ticketing.Team +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Team` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Teams.RetrieveAsync("id", new TeamsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TeamsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Tickets +
client.Ticketing.Tickets.ListAsync(TicketsListRequest { ... }) -> PaginatedTicketList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Ticket` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.ListAsync(new TicketsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TicketsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.CreateAsync(TicketEndpointRequest { ... }) -> TicketResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Ticket` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.CreateAsync( + new TicketEndpointRequest { Model = new TicketRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TicketEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.RetrieveAsync(id, TicketsRetrieveRequest { ... }) -> Ticket +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Ticket` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.RetrieveAsync("id", new TicketsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TicketsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.PartialUpdateAsync(id, PatchedTicketEndpointRequest { ... }) -> TicketResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Ticket` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.PartialUpdateAsync( + "id", + new PatchedTicketEndpointRequest { Model = new PatchedTicketRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PatchedTicketEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.CollaboratorsListAsync(parentId, TicketsCollaboratorsListRequest { ... }) -> Ticketing.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.CollaboratorsListAsync( + "parent_id", + new TicketsCollaboratorsListRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**parentId:** `string` + +
+
+ +
+
+ +**request:** `TicketsCollaboratorsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.MetaPatchRetrieveAsync(id) -> Ticketing.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Ticket` PATCHs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.MetaPatchRetrieveAsync("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.MetaPostRetrieveAsync() -> Ticketing.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Ticket` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Tickets.RemoteFieldClassesListAsync(TicketsRemoteFieldClassesListRequest { ... }) -> Ticketing.PaginatedRemoteFieldClassList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `RemoteFieldClass` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Tickets.RemoteFieldClassesListAsync( + new TicketsRemoteFieldClassesListRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TicketsRemoteFieldClassesListRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing Users +
client.Ticketing.Users.ListAsync(UsersListRequest { ... }) -> Ticketing.PaginatedUserList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `User` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Users.ListAsync(new UsersListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `UsersListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Ticketing.Users.RetrieveAsync(id, UsersRetrieveRequest { ... }) -> Ticketing.User +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `User` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.Users.RetrieveAsync("id", new UsersRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `UsersRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Ticketing WebhookReceivers +
client.Ticketing.WebhookReceivers.ListAsync() -> IEnumerable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.WebhookReceivers.ListAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Ticketing.WebhookReceivers.CreateAsync(WebhookReceiverRequest { ... }) -> Ticketing.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Ticketing.WebhookReceivers.CreateAsync( + new WebhookReceiverRequest { Event = "event", IsActive = true } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `WebhookReceiverRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting AccountDetails +
client.Accounting.AccountDetails.RetrieveAsync() -> Accounting.AccountDetails +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get details for a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AccountDetails.RetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting AccountToken +
client.Accounting.AccountToken.RetrieveAsync(publicToken) -> Accounting.AccountToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the account token for the end user with the provided public token. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AccountToken.RetrieveAsync("public_token"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**publicToken:** `string` + +
+
+
+
+ + +
+
+
+ +## Accounting AccountingPeriods +
client.Accounting.AccountingPeriods.ListAsync(AccountingPeriodsListRequest { ... }) -> PaginatedAccountingPeriodList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `AccountingPeriod` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AccountingPeriods.ListAsync(new AccountingPeriodsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AccountingPeriodsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.AccountingPeriods.RetrieveAsync(id, AccountingPeriodsRetrieveRequest { ... }) -> AccountingPeriod +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AccountingPeriod` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AccountingPeriods.RetrieveAsync( + "id", + new AccountingPeriodsRetrieveRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AccountingPeriodsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Accounts +
client.Accounting.Accounts.ListAsync(AccountsListRequest { ... }) -> Accounting.PaginatedAccountList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Account` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Accounts.ListAsync(new AccountsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AccountsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Accounts.CreateAsync(AccountEndpointRequest { ... }) -> AccountResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Account` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Accounts.CreateAsync( + new AccountEndpointRequest { Model = new Merge.Client.Accounting.AccountRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AccountEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Accounts.RetrieveAsync(id, AccountsRetrieveRequest { ... }) -> Accounting.Account +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Account` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Accounts.RetrieveAsync("id", new AccountsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AccountsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Accounts.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Account` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Accounts.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting Addresses +
client.Accounting.Addresses.RetrieveAsync(id, AddressesRetrieveRequest { ... }) -> Accounting.Address +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Address` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Addresses.RetrieveAsync("id", new AddressesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AddressesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting AsyncPassthrough +
client.Accounting.AsyncPassthrough.CreateAsync(Accounting.DataPassthroughRequest { ... }) -> Accounting.AsyncPassthroughReciept +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Asynchronously pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AsyncPassthrough.CreateAsync( + new Merge.Client.Accounting.DataPassthroughRequest + { + Method = Merge.Client.Accounting.MethodEnum.Get, + Path = "/scooters", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Accounting.DataPassthroughRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.AsyncPassthrough.RetrieveAsync(asyncPassthroughReceiptId) -> Accounting.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves data from earlier async-passthrough POST request +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**asyncPassthroughReceiptId:** `string` + +
+
+
+
+ + +
+
+
+ +## Accounting Attachments +
client.Accounting.Attachments.ListAsync(AttachmentsListRequest { ... }) -> PaginatedAccountingAttachmentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `AccountingAttachment` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Attachments.ListAsync(new AttachmentsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AttachmentsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Attachments.CreateAsync(AccountingAttachmentEndpointRequest { ... }) -> AccountingAttachmentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `AccountingAttachment` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Attachments.CreateAsync( + new AccountingAttachmentEndpointRequest { Model = new AccountingAttachmentRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AccountingAttachmentEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Attachments.RetrieveAsync(id, AttachmentsRetrieveRequest { ... }) -> AccountingAttachment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AccountingAttachment` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Attachments.RetrieveAsync("id", new AttachmentsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `AttachmentsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Attachments.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `AccountingAttachment` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Attachments.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting AuditTrail +
client.Accounting.AuditTrail.ListAsync(AuditTrailListRequest { ... }) -> Accounting.PaginatedAuditLogEventList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets a list of audit trail events. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AuditTrail.ListAsync(new AuditTrailListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `AuditTrailListRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting AvailableActions +
client.Accounting.AvailableActions.RetrieveAsync() -> Accounting.AvailableActions +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of models and actions available for an account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.AvailableActions.RetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting BalanceSheets +
client.Accounting.BalanceSheets.ListAsync(BalanceSheetsListRequest { ... }) -> PaginatedBalanceSheetList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `BalanceSheet` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.BalanceSheets.ListAsync(new BalanceSheetsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `BalanceSheetsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.BalanceSheets.RetrieveAsync(id, BalanceSheetsRetrieveRequest { ... }) -> BalanceSheet +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `BalanceSheet` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.BalanceSheets.RetrieveAsync("id", new BalanceSheetsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `BalanceSheetsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting CashFlowStatements +
client.Accounting.CashFlowStatements.ListAsync(CashFlowStatementsListRequest { ... }) -> PaginatedCashFlowStatementList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CashFlowStatement` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.CashFlowStatements.ListAsync(new CashFlowStatementsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CashFlowStatementsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.CashFlowStatements.RetrieveAsync(id, CashFlowStatementsRetrieveRequest { ... }) -> CashFlowStatement +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CashFlowStatement` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.CashFlowStatements.RetrieveAsync( + "id", + new CashFlowStatementsRetrieveRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `CashFlowStatementsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting CompanyInfo +
client.Accounting.CompanyInfo.ListAsync(CompanyInfoListRequest { ... }) -> PaginatedCompanyInfoList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CompanyInfo` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.CompanyInfo.ListAsync(new CompanyInfoListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CompanyInfoListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.CompanyInfo.RetrieveAsync(id, CompanyInfoRetrieveRequest { ... }) -> CompanyInfo +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CompanyInfo` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.CompanyInfo.RetrieveAsync("id", new CompanyInfoRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `CompanyInfoRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Contacts +
client.Accounting.Contacts.ListAsync(ContactsListRequest { ... }) -> Accounting.PaginatedContactList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Contact` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Contacts.ListAsync(new ContactsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ContactsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Contacts.CreateAsync(ContactEndpointRequest { ... }) -> ContactResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Contact` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Contacts.CreateAsync( + new ContactEndpointRequest { Model = new Merge.Client.Accounting.ContactRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ContactEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Contacts.RetrieveAsync(id, ContactsRetrieveRequest { ... }) -> Accounting.Contact +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Contact` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Contacts.RetrieveAsync("id", new ContactsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `ContactsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Contacts.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Contact` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Contacts.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting CreditNotes +
client.Accounting.CreditNotes.ListAsync(CreditNotesListRequest { ... }) -> PaginatedCreditNoteList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `CreditNote` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.CreditNotes.ListAsync(new CreditNotesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreditNotesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.CreditNotes.RetrieveAsync(id, CreditNotesRetrieveRequest { ... }) -> CreditNote +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `CreditNote` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.CreditNotes.RetrieveAsync("id", new CreditNotesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `CreditNotesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Scopes +
client.Accounting.Scopes.DefaultScopesRetrieveAsync() -> Accounting.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/8828211-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Scopes.DefaultScopesRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Accounting.Scopes.LinkedAccountScopesRetrieveAsync() -> Accounting.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/8828211-common-model-and-field-scopes). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Scopes.LinkedAccountScopesRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Accounting.Scopes.LinkedAccountScopesCreateAsync(LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Accounting.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/8828211-common-model-and-field-scopes) +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Scopes.LinkedAccountScopesCreateAsync( + new LinkedAccountCommonModelScopeDeserializerRequest + { + CommonModels = + new List() + { + new Merge.Client.Accounting.IndividualCommonModelScopeDeserializerRequest + { + ModelName = "Employee", + ModelPermissions = new Dictionary< + string, + Merge.Client.Accounting.ModelPermissionDeserializerRequest + >() + { + { + "READ", + new Merge.Client.Accounting.ModelPermissionDeserializerRequest + { + IsEnabled = true, + } + }, + { + "WRITE", + new Merge.Client.Accounting.ModelPermissionDeserializerRequest + { + IsEnabled = false, + } + }, + }, + }, + new Merge.Client.Accounting.IndividualCommonModelScopeDeserializerRequest + { + ModelName = "Benefit", + ModelPermissions = new Dictionary< + string, + Merge.Client.Accounting.ModelPermissionDeserializerRequest + >() + { + { + "WRITE", + new Merge.Client.Accounting.ModelPermissionDeserializerRequest + { + IsEnabled = false, + } + }, + }, + }, + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LinkedAccountCommonModelScopeDeserializerRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting DeleteAccount +
client.Accounting.DeleteAccount.DeleteAsync() +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.DeleteAccount.DeleteAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting Expenses +
client.Accounting.Expenses.ListAsync(ExpensesListRequest { ... }) -> PaginatedExpenseList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Expense` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Expenses.ListAsync(new ExpensesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ExpensesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Expenses.CreateAsync(ExpenseEndpointRequest { ... }) -> ExpenseResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Expense` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Expenses.CreateAsync( + new ExpenseEndpointRequest { Model = new ExpenseRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ExpenseEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Expenses.RetrieveAsync(id, ExpensesRetrieveRequest { ... }) -> Expense +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Expense` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Expenses.RetrieveAsync("id", new ExpensesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `ExpensesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Expenses.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Expense` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Expenses.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting FieldMapping +
client.Accounting.FieldMapping.FieldMappingsRetrieveAsync() -> Accounting.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.Accounting.FieldMapping.FieldMappingsRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Accounting.FieldMapping.FieldMappingsCreateAsync(CreateFieldMappingRequest { ... }) -> Accounting.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.Accounting.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.Accounting.FieldMapping.FieldMappingsDestroyAsync(fieldMappingId) -> Accounting.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.Accounting.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.FieldMapping.FieldMappingsPartialUpdateAsync(fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Accounting.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.Accounting.FieldMapping.FieldMappingsPartialUpdateAsync( + "field_mapping_id", + new PatchedEditFieldMappingRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**fieldMappingId:** `string` + +
+
+ +
+
+ +**request:** `PatchedEditFieldMappingRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.FieldMapping.RemoteFieldsRetrieveAsync(RemoteFieldsRetrieveRequest { ... }) -> Accounting.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.Accounting.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteFieldsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.FieldMapping.TargetFieldsRetrieveAsync() -> Accounting.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.Accounting.FieldMapping.TargetFieldsRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting GenerateKey +
client.Accounting.GenerateKey.CreateAsync(GenerateRemoteKeyRequest { ... }) -> Accounting.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a remote key. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.GenerateKey.CreateAsync( + new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `GenerateRemoteKeyRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting IncomeStatements +
client.Accounting.IncomeStatements.ListAsync(IncomeStatementsListRequest { ... }) -> PaginatedIncomeStatementList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `IncomeStatement` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.IncomeStatements.ListAsync(new IncomeStatementsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `IncomeStatementsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.IncomeStatements.RetrieveAsync(id, IncomeStatementsRetrieveRequest { ... }) -> IncomeStatement +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `IncomeStatement` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.IncomeStatements.RetrieveAsync("id", new IncomeStatementsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `IncomeStatementsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Invoices +
client.Accounting.Invoices.ListAsync(InvoicesListRequest { ... }) -> PaginatedInvoiceList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Invoice` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Invoices.ListAsync(new InvoicesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `InvoicesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Invoices.CreateAsync(InvoiceEndpointRequest { ... }) -> InvoiceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates an `Invoice` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Invoices.CreateAsync( + new InvoiceEndpointRequest { Model = new InvoiceRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `InvoiceEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Invoices.RetrieveAsync(id, InvoicesRetrieveRequest { ... }) -> Invoice +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Invoice` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Invoices.RetrieveAsync("id", new InvoicesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `InvoicesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Invoices.PartialUpdateAsync(id, PatchedInvoiceEndpointRequest { ... }) -> InvoiceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates an `Invoice` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Invoices.PartialUpdateAsync( + "id", + new PatchedInvoiceEndpointRequest { Model = new InvoiceRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PatchedInvoiceEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Invoices.MetaPatchRetrieveAsync(id) -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Invoice` PATCHs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Invoices.MetaPatchRetrieveAsync("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Invoices.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Invoice` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Invoices.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting Issues +
client.Accounting.Issues.ListAsync(IssuesListRequest { ... }) -> Accounting.PaginatedIssueList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Gets issues. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Issues.ListAsync(new IssuesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `IssuesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Issues.RetrieveAsync(id) -> Accounting.Issue +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a specific issue. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Issues.RetrieveAsync("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+
+
+ + +
+
+
+ +## Accounting Items +
client.Accounting.Items.ListAsync(ItemsListRequest { ... }) -> PaginatedItemList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Item` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Items.ListAsync(new ItemsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `ItemsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Items.RetrieveAsync(id, ItemsRetrieveRequest { ... }) -> Item +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `Item` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Items.RetrieveAsync("id", new ItemsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `ItemsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting JournalEntries +
client.Accounting.JournalEntries.ListAsync(JournalEntriesListRequest { ... }) -> PaginatedJournalEntryList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `JournalEntry` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.JournalEntries.ListAsync(new JournalEntriesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `JournalEntriesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.JournalEntries.CreateAsync(JournalEntryEndpointRequest { ... }) -> JournalEntryResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `JournalEntry` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.JournalEntries.CreateAsync( + new JournalEntryEndpointRequest { Model = new JournalEntryRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `JournalEntryEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.JournalEntries.RetrieveAsync(id, JournalEntriesRetrieveRequest { ... }) -> JournalEntry +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `JournalEntry` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.JournalEntries.RetrieveAsync("id", new JournalEntriesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `JournalEntriesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.JournalEntries.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `JournalEntry` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.JournalEntries.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting LinkToken +
client.Accounting.LinkToken.CreateAsync(EndUserDetailsRequest { ... }) -> Accounting.LinkToken +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a link token to be used when linking a new end user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.LinkToken.CreateAsync( + new EndUserDetailsRequest + { + EndUserEmailAddress = "example@gmail.com", + EndUserOrganizationName = "Test Organization", + EndUserOriginId = "12345", + Categories = new List() + { + Merge.Client.Accounting.CategoriesEnum.Hris, + Merge.Client.Accounting.CategoriesEnum.Ats, + }, + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `EndUserDetailsRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting LinkedAccounts +
client.Accounting.LinkedAccounts.ListAsync(LinkedAccountsListRequest { ... }) -> Accounting.PaginatedAccountDetailsAndActionsList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List linked accounts for your organization. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.LinkedAccounts.ListAsync(new LinkedAccountsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `LinkedAccountsListRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Passthrough +
client.Accounting.Passthrough.CreateAsync(Accounting.DataPassthroughRequest { ... }) -> Accounting.RemoteResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pull data from an endpoint not currently supported by Merge. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Passthrough.CreateAsync( + new Merge.Client.Accounting.DataPassthroughRequest + { + Method = Merge.Client.Accounting.MethodEnum.Get, + Path = "/scooters", + } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Accounting.DataPassthroughRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Payments +
client.Accounting.Payments.ListAsync(PaymentsListRequest { ... }) -> PaginatedPaymentList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Payment` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Payments.ListAsync(new PaymentsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PaymentsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Payments.CreateAsync(PaymentEndpointRequest { ... }) -> PaymentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `Payment` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Payments.CreateAsync( + new PaymentEndpointRequest { Model = new PaymentRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PaymentEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Payments.RetrieveAsync(id, PaymentsRetrieveRequest { ... }) -> Payment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Payment` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Payments.RetrieveAsync("id", new PaymentsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PaymentsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Payments.PartialUpdateAsync(id, PatchedPaymentEndpointRequest { ... }) -> PaymentResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Updates a `Payment` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Payments.PartialUpdateAsync( + "id", + new PatchedPaymentEndpointRequest { Model = new PatchedPaymentRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PatchedPaymentEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Payments.MetaPatchRetrieveAsync(id) -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Payment` PATCHs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Payments.MetaPatchRetrieveAsync("id"); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Payments.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `Payment` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Payments.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting PhoneNumbers +
client.Accounting.PhoneNumbers.RetrieveAsync(id, PhoneNumbersRetrieveRequest { ... }) -> AccountingPhoneNumber +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an `AccountingPhoneNumber` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.PhoneNumbers.RetrieveAsync("id", new PhoneNumbersRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PhoneNumbersRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting PurchaseOrders +
client.Accounting.PurchaseOrders.ListAsync(PurchaseOrdersListRequest { ... }) -> PaginatedPurchaseOrderList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `PurchaseOrder` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.PurchaseOrders.ListAsync(new PurchaseOrdersListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PurchaseOrdersListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.PurchaseOrders.CreateAsync(PurchaseOrderEndpointRequest { ... }) -> PurchaseOrderResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `PurchaseOrder` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.PurchaseOrders.CreateAsync( + new PurchaseOrderEndpointRequest { Model = new PurchaseOrderRequest() } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `PurchaseOrderEndpointRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.PurchaseOrders.RetrieveAsync(id, PurchaseOrdersRetrieveRequest { ... }) -> PurchaseOrder +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `PurchaseOrder` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.PurchaseOrders.RetrieveAsync("id", new PurchaseOrdersRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `PurchaseOrdersRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.PurchaseOrders.MetaPostRetrieveAsync() -> Accounting.MetaResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns metadata for `PurchaseOrder` POSTs. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.PurchaseOrders.MetaPostRetrieveAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting RegenerateKey +
client.Accounting.RegenerateKey.CreateAsync(RemoteKeyForRegenerationRequest { ... }) -> Accounting.RemoteKey +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exchange remote keys. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.RegenerateKey.CreateAsync( + new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `RemoteKeyForRegenerationRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting SyncStatus +
client.Accounting.SyncStatus.ListAsync(SyncStatusListRequest { ... }) -> Accounting.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.Accounting.SyncStatus.ListAsync(new SyncStatusListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `SyncStatusListRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting ForceResync +
client.Accounting.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 Launch, Professional, or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.ForceResync.SyncStatusResyncCreateAsync(); +``` +
+
+
+
+ + +
+
+
+ +## Accounting TaxRates +
client.Accounting.TaxRates.ListAsync(TaxRatesListRequest { ... }) -> PaginatedTaxRateList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TaxRate` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.TaxRates.ListAsync(new TaxRatesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TaxRatesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.TaxRates.RetrieveAsync(id, TaxRatesRetrieveRequest { ... }) -> TaxRate +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TaxRate` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.TaxRates.RetrieveAsync("id", new TaxRatesRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TaxRatesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting TrackingCategories +
client.Accounting.TrackingCategories.ListAsync(TrackingCategoriesListRequest { ... }) -> PaginatedTrackingCategoryList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `TrackingCategory` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.TrackingCategories.ListAsync(new TrackingCategoriesListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TrackingCategoriesListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.TrackingCategories.RetrieveAsync(id, TrackingCategoriesRetrieveRequest { ... }) -> TrackingCategory +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `TrackingCategory` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.TrackingCategories.RetrieveAsync( + "id", + new TrackingCategoriesRetrieveRequest() +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TrackingCategoriesRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting Transactions +
client.Accounting.Transactions.ListAsync(TransactionsListRequest { ... }) -> PaginatedTransactionList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `Transaction` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Transactions.ListAsync(new TransactionsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `TransactionsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.Transactions.RetrieveAsync(id, TransactionsRetrieveRequest { ... }) -> Transaction +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `Transaction` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.Transactions.RetrieveAsync("id", new TransactionsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `TransactionsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting VendorCredits +
client.Accounting.VendorCredits.ListAsync(VendorCreditsListRequest { ... }) -> PaginatedVendorCreditList +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `VendorCredit` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.VendorCredits.ListAsync(new VendorCreditsListRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `VendorCreditsListRequest` + +
+
+
+
+ + +
+
+
+ +
client.Accounting.VendorCredits.RetrieveAsync(id, VendorCreditsRetrieveRequest { ... }) -> VendorCredit +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a `VendorCredit` object with the given `id`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.VendorCredits.RetrieveAsync("id", new VendorCreditsRetrieveRequest()); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `VendorCreditsRetrieveRequest` + +
+
+
+
+ + +
+
+
+ +## Accounting WebhookReceivers +
client.Accounting.WebhookReceivers.ListAsync() -> IEnumerable +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a list of `WebhookReceiver` objects. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.WebhookReceivers.ListAsync(); +``` +
+
+
+
+ + +
+
+
+ +
client.Accounting.WebhookReceivers.CreateAsync(WebhookReceiverRequest { ... }) -> Accounting.WebhookReceiver +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a `WebhookReceiver` object with the given values. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```csharp +await client.Accounting.WebhookReceivers.CreateAsync( + new WebhookReceiverRequest { Event = "event", IsActive = true } +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `WebhookReceiverRequest` + +
+
+
+
+ + +
+
+
diff --git a/src/Merge.Client.Test/Core/RawClientTests.cs b/src/Merge.Client.Test/Core/RawClientTests.cs new file mode 100644 index 00000000..cf369f18 --- /dev/null +++ b/src/Merge.Client.Test/Core/RawClientTests.cs @@ -0,0 +1,113 @@ +using System; +using System.Net.Http; +using FluentAssertions; +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 WireMockServer _server; + private HttpClient _httpClient; + private RawClient _rawClient; + private string _baseUrl; + private const int _maxRetries = 3; + + [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.sln b/src/Merge.Client.sln index 1e0643fa..4ff93b2c 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", "{FC3BB5C9-688E-4EF8-82DF-ACA00A7A6052}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{F72C1D5D-4B83-4580-8ED3-21132CD0B162}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{F421D601-C723-4774-A58A-7E4A3E74E3FB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{559A221E-2914-4480-946A-42AD265F79EF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -16,13 +16,13 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FC3BB5C9-688E-4EF8-82DF-ACA00A7A6052}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FC3BB5C9-688E-4EF8-82DF-ACA00A7A6052}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FC3BB5C9-688E-4EF8-82DF-ACA00A7A6052}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FC3BB5C9-688E-4EF8-82DF-ACA00A7A6052}.Release|Any CPU.Build.0 = Release|Any CPU - {F421D601-C723-4774-A58A-7E4A3E74E3FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F421D601-C723-4774-A58A-7E4A3E74E3FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F421D601-C723-4774-A58A-7E4A3E74E3FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F421D601-C723-4774-A58A-7E4A3E74E3FB}.Release|Any CPU.Build.0 = Release|Any CPU + {F72C1D5D-4B83-4580-8ED3-21132CD0B162}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F72C1D5D-4B83-4580-8ED3-21132CD0B162}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F72C1D5D-4B83-4580-8ED3-21132CD0B162}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F72C1D5D-4B83-4580-8ED3-21132CD0B162}.Release|Any CPU.Build.0 = Release|Any CPU + {559A221E-2914-4480-946A-42AD265F79EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {559A221E-2914-4480-946A-42AD265F79EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {559A221E-2914-4480-946A-42AD265F79EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {559A221E-2914-4480-946A-42AD265F79EF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Merge.Client/Accounting/Accounts/AccountsClient.cs b/src/Merge.Client/Accounting/Accounts/AccountsClient.cs index ec7f2f6c..805d5e6b 100644 --- a/src/Merge.Client/Accounting/Accounts/AccountsClient.cs +++ b/src/Merge.Client/Accounting/Accounts/AccountsClient.cs @@ -126,7 +126,7 @@ public async Task ListAsync( /// /// /// await client.Accounting.Accounts.CreateAsync( - /// new AccountEndpointRequest { Model = new AccountRequest() } + /// new AccountEndpointRequest { Model = new Merge.Client.Accounting.AccountRequest() } /// ); /// /// diff --git a/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs index 8be9fcf5..1d73a09f 100644 --- a/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs +++ b/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs @@ -22,7 +22,11 @@ internal AsyncPassthroughClient(RawClient client) /// /// /// await client.Accounting.AsyncPassthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Accounting.DataPassthroughRequest + /// { + /// Method = Merge.Client.Accounting.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Accounting/Contacts/ContactsClient.cs b/src/Merge.Client/Accounting/Contacts/ContactsClient.cs index 9b2db33c..4ad89c56 100644 --- a/src/Merge.Client/Accounting/Contacts/ContactsClient.cs +++ b/src/Merge.Client/Accounting/Contacts/ContactsClient.cs @@ -134,7 +134,7 @@ public async Task ListAsync( /// /// /// await client.Accounting.Contacts.CreateAsync( - /// new ContactEndpointRequest { Model = new ContactRequest() } + /// new ContactEndpointRequest { Model = new Merge.Client.Accounting.ContactRequest() } /// ); /// /// diff --git a/src/Merge.Client/Accounting/LinkToken/LinkTokenClient.cs b/src/Merge.Client/Accounting/LinkToken/LinkTokenClient.cs index b3cdbde2..14c07418 100644 --- a/src/Merge.Client/Accounting/LinkToken/LinkTokenClient.cs +++ b/src/Merge.Client/Accounting/LinkToken/LinkTokenClient.cs @@ -27,7 +27,11 @@ internal LinkTokenClient(RawClient client) /// EndUserEmailAddress = "example@gmail.com", /// EndUserOrganizationName = "Test Organization", /// EndUserOriginId = "12345", - /// Categories = new List() { CategoriesEnum.Hris, CategoriesEnum.Ats }, + /// Categories = new List() + /// { + /// Merge.Client.Accounting.CategoriesEnum.Hris, + /// Merge.Client.Accounting.CategoriesEnum.Ats, + /// }, /// } /// ); /// diff --git a/src/Merge.Client/Accounting/Passthrough/PassthroughClient.cs b/src/Merge.Client/Accounting/Passthrough/PassthroughClient.cs index f55f0d55..5657ad37 100644 --- a/src/Merge.Client/Accounting/Passthrough/PassthroughClient.cs +++ b/src/Merge.Client/Accounting/Passthrough/PassthroughClient.cs @@ -22,7 +22,11 @@ internal PassthroughClient(RawClient client) /// /// /// await client.Accounting.Passthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Accounting.DataPassthroughRequest + /// { + /// Method = Merge.Client.Accounting.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Accounting/Scopes/ScopesClient.cs b/src/Merge.Client/Accounting/Scopes/ScopesClient.cs index fbd99076..591b0e9f 100644 --- a/src/Merge.Client/Accounting/Scopes/ScopesClient.cs +++ b/src/Merge.Client/Accounting/Scopes/ScopesClient.cs @@ -110,35 +110,51 @@ public async Task LinkedAccountScopesRetrieveAsync( /// await client.Accounting.Scopes.LinkedAccountScopesCreateAsync( /// new LinkedAccountCommonModelScopeDeserializerRequest /// { - /// CommonModels = new List() - /// { - /// new IndividualCommonModelScopeDeserializerRequest + /// CommonModels = + /// new List() /// { - /// ModelName = "Employee", - /// ModelPermissions = new Dictionary() + /// new Merge.Client.Accounting.IndividualCommonModelScopeDeserializerRequest /// { + /// ModelName = "Employee", + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Accounting.ModelPermissionDeserializerRequest + /// >() /// { - /// "READ", - /// new ModelPermissionDeserializerRequest { IsEnabled = true } - /// }, - /// { - /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// { + /// "READ", + /// new Merge.Client.Accounting.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = true, + /// } + /// }, + /// { + /// "WRITE", + /// new Merge.Client.Accounting.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } + /// }, /// }, /// }, - /// }, - /// new IndividualCommonModelScopeDeserializerRequest - /// { - /// ModelName = "Benefit", - /// ModelPermissions = new Dictionary() + /// new Merge.Client.Accounting.IndividualCommonModelScopeDeserializerRequest /// { + /// ModelName = "Benefit", + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Accounting.ModelPermissionDeserializerRequest + /// >() /// { - /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// { + /// "WRITE", + /// new Merge.Client.Accounting.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } + /// }, /// }, /// }, /// }, - /// }, /// } /// ); /// diff --git a/src/Merge.Client/Accounting/Types/BalanceSheet.cs b/src/Merge.Client/Accounting/Types/BalanceSheet.cs index 4b6aae4e..ec9dc189 100644 --- a/src/Merge.Client/Accounting/Types/BalanceSheet.cs +++ b/src/Merge.Client/Accounting/Types/BalanceSheet.cs @@ -352,7 +352,6 @@ public record BalanceSheet /// `Company` object for the given `BalanceSheet` object. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/CashFlowStatement.cs b/src/Merge.Client/Accounting/Types/CashFlowStatement.cs index 866755c4..410e26be 100644 --- a/src/Merge.Client/Accounting/Types/CashFlowStatement.cs +++ b/src/Merge.Client/Accounting/Types/CashFlowStatement.cs @@ -352,7 +352,6 @@ public record CashFlowStatement /// The company the cash flow statement belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/Contact.cs b/src/Merge.Client/Accounting/Types/Contact.cs index 43fff2f5..ecad88b2 100644 --- a/src/Merge.Client/Accounting/Types/Contact.cs +++ b/src/Merge.Client/Accounting/Types/Contact.cs @@ -90,12 +90,6 @@ public record Contact /// `Address` object IDs for the given `Contacts` object. /// [JsonPropertyName("addresses")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Addresses { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/ContactRequest.cs b/src/Merge.Client/Accounting/Types/ContactRequest.cs index 6fd49ce2..89aa70bc 100644 --- a/src/Merge.Client/Accounting/Types/ContactRequest.cs +++ b/src/Merge.Client/Accounting/Types/ContactRequest.cs @@ -63,12 +63,6 @@ public record ContactRequest /// `Address` object IDs for the given `Contacts` object. /// [JsonPropertyName("addresses")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Addresses { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/CreditNote.cs b/src/Merge.Client/Accounting/Types/CreditNote.cs index 45302c10..b0d694cd 100644 --- a/src/Merge.Client/Accounting/Types/CreditNote.cs +++ b/src/Merge.Client/Accounting/Types/CreditNote.cs @@ -55,14 +55,12 @@ public record CreditNote /// The credit note's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The company the credit note belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -87,12 +85,6 @@ public record CreditNote public IEnumerable? LineItems { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -424,24 +416,12 @@ public record CreditNote /// Array of `Payment` object IDs /// [JsonPropertyName("payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Payments { get; set; } /// /// A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. /// [JsonPropertyName("applied_payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? AppliedPayments { get; set; } /// @@ -454,7 +434,6 @@ public record CreditNote /// The accounting period that the CreditNote was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/CreditNoteLineItem.cs b/src/Merge.Client/Accounting/Types/CreditNoteLineItem.cs index 1fd397cc..d2ccb434 100644 --- a/src/Merge.Client/Accounting/Types/CreditNoteLineItem.cs +++ b/src/Merge.Client/Accounting/Types/CreditNoteLineItem.cs @@ -30,7 +30,6 @@ public record CreditNoteLineItem public DateTime? ModifiedAt { get; set; } [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } /// @@ -91,7 +90,6 @@ public record CreditNoteLineItem /// The company the credit note belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/Expense.cs b/src/Merge.Client/Accounting/Types/Expense.cs index 76a66b8e..7dcc3208 100644 --- a/src/Merge.Client/Accounting/Types/Expense.cs +++ b/src/Merge.Client/Accounting/Types/Expense.cs @@ -45,14 +45,12 @@ public record Expense /// The expense's payment account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The expense's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -396,7 +394,6 @@ public record Expense /// The company the expense belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -409,12 +406,6 @@ public record Expense public IEnumerable? Lines { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -427,7 +418,6 @@ public record Expense /// The accounting period that the Expense was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/ExpenseLine.cs b/src/Merge.Client/Accounting/Types/ExpenseLine.cs index 87fac3ed..06384add 100644 --- a/src/Merge.Client/Accounting/Types/ExpenseLine.cs +++ b/src/Merge.Client/Accounting/Types/ExpenseLine.cs @@ -33,7 +33,6 @@ public record ExpenseLine /// The line's item. /// [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } /// @@ -43,16 +42,9 @@ public record ExpenseLine public double? NetAmount { get; set; } [JsonPropertyName("tracking_category")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? TrackingCategory { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -378,14 +370,12 @@ public record ExpenseLine /// The expense's payment account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The expense's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/ExpenseLineRequest.cs b/src/Merge.Client/Accounting/Types/ExpenseLineRequest.cs index 444b63fe..ec0178c9 100644 --- a/src/Merge.Client/Accounting/Types/ExpenseLineRequest.cs +++ b/src/Merge.Client/Accounting/Types/ExpenseLineRequest.cs @@ -18,7 +18,6 @@ public record ExpenseLineRequest /// The line's item. /// [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } /// @@ -28,16 +27,9 @@ public record ExpenseLineRequest public double? NetAmount { get; set; } [JsonPropertyName("tracking_category")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? TrackingCategory { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -363,14 +355,12 @@ public record ExpenseLineRequest /// The expense's payment account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The expense's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/ExpenseRequest.cs b/src/Merge.Client/Accounting/Types/ExpenseRequest.cs index d365b91f..fd964b95 100644 --- a/src/Merge.Client/Accounting/Types/ExpenseRequest.cs +++ b/src/Merge.Client/Accounting/Types/ExpenseRequest.cs @@ -18,14 +18,12 @@ public record ExpenseRequest /// The expense's payment account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The expense's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -369,7 +367,6 @@ public record ExpenseRequest /// The company the expense belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -382,19 +379,12 @@ public record ExpenseRequest public IEnumerable? Lines { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// /// The accounting period that the Expense was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Accounting/Types/IncomeStatement.cs b/src/Merge.Client/Accounting/Types/IncomeStatement.cs index ca9b0672..9be9fc7f 100644 --- a/src/Merge.Client/Accounting/Types/IncomeStatement.cs +++ b/src/Merge.Client/Accounting/Types/IncomeStatement.cs @@ -352,7 +352,6 @@ public record IncomeStatement /// The company the income statement belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/Invoice.cs b/src/Merge.Client/Accounting/Types/Invoice.cs index 3ab472e8..43acab2b 100644 --- a/src/Merge.Client/Accounting/Types/Invoice.cs +++ b/src/Merge.Client/Accounting/Types/Invoice.cs @@ -42,7 +42,6 @@ public record Invoice /// The invoice's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -79,7 +78,6 @@ public record Invoice /// The company the invoice belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -451,36 +449,18 @@ public record Invoice public DateTime? RemoteUpdatedAt { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// /// Array of `Payment` object IDs. /// [JsonPropertyName("payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Payments { get; set; } /// /// A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. /// [JsonPropertyName("applied_payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? AppliedPayments { get; set; } [JsonPropertyName("line_items")] @@ -493,16 +473,9 @@ public record Invoice /// The accounting period that the Invoice was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("purchase_orders")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? PurchaseOrders { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/InvoiceLineItem.cs b/src/Merge.Client/Accounting/Types/InvoiceLineItem.cs index 8f9f86e7..b14bb172 100644 --- a/src/Merge.Client/Accounting/Types/InvoiceLineItem.cs +++ b/src/Merge.Client/Accounting/Types/InvoiceLineItem.cs @@ -373,24 +373,15 @@ public record InvoiceLineItem public string? ExchangeRate { get; set; } [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } [JsonPropertyName("tracking_category")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? TrackingCategory { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/InvoiceLineItemRequest.cs b/src/Merge.Client/Accounting/Types/InvoiceLineItemRequest.cs index 0ee385b4..a70f0837 100644 --- a/src/Merge.Client/Accounting/Types/InvoiceLineItemRequest.cs +++ b/src/Merge.Client/Accounting/Types/InvoiceLineItemRequest.cs @@ -358,24 +358,15 @@ public record InvoiceLineItemRequest public string? ExchangeRate { get; set; } [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } [JsonPropertyName("tracking_category")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? TrackingCategory { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/InvoiceRequest.cs b/src/Merge.Client/Accounting/Types/InvoiceRequest.cs index f76a7d4b..dcc57964 100644 --- a/src/Merge.Client/Accounting/Types/InvoiceRequest.cs +++ b/src/Merge.Client/Accounting/Types/InvoiceRequest.cs @@ -21,7 +21,6 @@ public record InvoiceRequest /// The invoice's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -71,7 +70,6 @@ public record InvoiceRequest /// The company the invoice belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -427,33 +425,15 @@ public record InvoiceRequest /// Array of `Payment` object IDs. /// [JsonPropertyName("payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Payments { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } [JsonPropertyName("line_items")] public IEnumerable? LineItems { get; set; } [JsonPropertyName("purchase_orders")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? PurchaseOrders { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Accounting/Types/Item.cs b/src/Merge.Client/Accounting/Types/Item.cs index 38d1785e..c42d27aa 100644 --- a/src/Merge.Client/Accounting/Types/Item.cs +++ b/src/Merge.Client/Accounting/Types/Item.cs @@ -60,21 +60,18 @@ public record Item /// References the default account used to record a purchase of the item. /// [JsonPropertyName("purchase_account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? PurchaseAccount { get; set; } /// /// References the default account used to record a sale. /// [JsonPropertyName("sales_account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? SalesAccount { get; set; } /// /// The company the item belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/JournalEntry.cs b/src/Merge.Client/Accounting/Types/JournalEntry.cs index b1b1a2b8..7d370e33 100644 --- a/src/Merge.Client/Accounting/Types/JournalEntry.cs +++ b/src/Merge.Client/Accounting/Types/JournalEntry.cs @@ -51,24 +51,12 @@ public record JournalEntry /// Array of `Payment` object IDs. /// [JsonPropertyName("payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Payments { get; set; } /// /// A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. /// [JsonPropertyName("applied_payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? AppliedPayments { get; set; } /// @@ -400,7 +388,6 @@ public record JournalEntry /// The company the journal entry belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } [JsonPropertyName("lines")] @@ -413,12 +400,6 @@ public record JournalEntry public string? JournalNumber { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } [JsonPropertyName("remote_was_deleted")] @@ -437,7 +418,6 @@ public record JournalEntry /// The accounting period that the JournalEntry was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/JournalEntryRequest.cs b/src/Merge.Client/Accounting/Types/JournalEntryRequest.cs index d906b8de..d132c46b 100644 --- a/src/Merge.Client/Accounting/Types/JournalEntryRequest.cs +++ b/src/Merge.Client/Accounting/Types/JournalEntryRequest.cs @@ -18,12 +18,6 @@ public record JournalEntryRequest /// Array of `Payment` object IDs. /// [JsonPropertyName("payments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Payments { get; set; } /// @@ -355,16 +349,9 @@ public record JournalEntryRequest /// The company the journal entry belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } [JsonPropertyName("lines")] diff --git a/src/Merge.Client/Accounting/Types/JournalLine.cs b/src/Merge.Client/Accounting/Types/JournalLine.cs index f73d4ef8..65bef68e 100644 --- a/src/Merge.Client/Accounting/Types/JournalLine.cs +++ b/src/Merge.Client/Accounting/Types/JournalLine.cs @@ -30,7 +30,6 @@ public record JournalLine public DateTime? ModifiedAt { get; set; } [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// @@ -40,16 +39,9 @@ public record JournalLine public double? NetAmount { get; set; } [JsonPropertyName("tracking_category")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? TrackingCategory { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/JournalLineRequest.cs b/src/Merge.Client/Accounting/Types/JournalLineRequest.cs index d4d71cd1..4bb2ba1b 100644 --- a/src/Merge.Client/Accounting/Types/JournalLineRequest.cs +++ b/src/Merge.Client/Accounting/Types/JournalLineRequest.cs @@ -15,7 +15,6 @@ public record JournalLineRequest public string? RemoteId { get; set; } [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// @@ -25,16 +24,9 @@ public record JournalLineRequest public double? NetAmount { get; set; } [JsonPropertyName("tracking_category")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? TrackingCategory { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/PatchedPaymentRequest.cs b/src/Merge.Client/Accounting/Types/PatchedPaymentRequest.cs index 984ccacf..87f99a61 100644 --- a/src/Merge.Client/Accounting/Types/PatchedPaymentRequest.cs +++ b/src/Merge.Client/Accounting/Types/PatchedPaymentRequest.cs @@ -18,14 +18,12 @@ public record PatchedPaymentRequest /// The supplier, or customer involved in the payment. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The supplier’s or customer’s account in which the payment is made. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// @@ -351,7 +349,6 @@ public record PatchedPaymentRequest /// The company the payment belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -370,31 +367,18 @@ public record PatchedPaymentRequest public PaymentTypeEnum? Type { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// /// The accounting period that the Payment was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } /// /// A list of “Payment Applied to Lines” objects. /// [JsonPropertyName("applied_to_lines")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? AppliedToLines { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Accounting/Types/Payment.cs b/src/Merge.Client/Accounting/Types/Payment.cs index a1bbc8c9..f3a91d4d 100644 --- a/src/Merge.Client/Accounting/Types/Payment.cs +++ b/src/Merge.Client/Accounting/Types/Payment.cs @@ -39,14 +39,12 @@ public record Payment /// The supplier, or customer involved in the payment. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The supplier’s or customer’s account in which the payment is made. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// @@ -372,7 +370,6 @@ public record Payment /// The company the payment belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -391,12 +388,6 @@ public record Payment public PaymentTypeEnum? Type { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -415,19 +406,12 @@ public record Payment /// The accounting period that the Payment was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } /// /// A list of “Payment Applied to Lines” objects. /// [JsonPropertyName("applied_to_lines")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? AppliedToLines { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/PaymentRequest.cs b/src/Merge.Client/Accounting/Types/PaymentRequest.cs index d63bf022..3e9d9456 100644 --- a/src/Merge.Client/Accounting/Types/PaymentRequest.cs +++ b/src/Merge.Client/Accounting/Types/PaymentRequest.cs @@ -18,14 +18,12 @@ public record PaymentRequest /// The supplier, or customer involved in the payment. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The supplier’s or customer’s account in which the payment is made. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// @@ -351,7 +349,6 @@ public record PaymentRequest /// The company the payment belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -370,31 +367,18 @@ public record PaymentRequest public PaymentTypeEnum? Type { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// /// The accounting period that the Payment was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } /// /// A list of “Payment Applied to Lines” objects. /// [JsonPropertyName("applied_to_lines")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? AppliedToLines { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Accounting/Types/PurchaseOrder.cs b/src/Merge.Client/Accounting/Types/PurchaseOrder.cs index ef9a6381..b30f89ff 100644 --- a/src/Merge.Client/Accounting/Types/PurchaseOrder.cs +++ b/src/Merge.Client/Accounting/Types/PurchaseOrder.cs @@ -63,7 +63,6 @@ public record PurchaseOrder /// The purchase order's delivery address. /// [JsonPropertyName("delivery_address")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? DeliveryAddress { get; set; } /// @@ -76,7 +75,6 @@ public record PurchaseOrder /// The party fulfilling the purchase order. /// [JsonPropertyName("vendor")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Vendor { get; set; } /// @@ -89,7 +87,6 @@ public record PurchaseOrder /// The company the purchase order belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -421,12 +418,6 @@ public record PurchaseOrder public IEnumerable? LineItems { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -451,7 +442,6 @@ public record PurchaseOrder /// The accounting period that the PurchaseOrder was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/PurchaseOrderLineItem.cs b/src/Merge.Client/Accounting/Types/PurchaseOrderLineItem.cs index 491692e3..936706e6 100644 --- a/src/Merge.Client/Accounting/Types/PurchaseOrderLineItem.cs +++ b/src/Merge.Client/Accounting/Types/PurchaseOrderLineItem.cs @@ -48,7 +48,6 @@ public record PurchaseOrderLineItem public double? Quantity { get; set; } [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/PurchaseOrderLineItemRequest.cs b/src/Merge.Client/Accounting/Types/PurchaseOrderLineItemRequest.cs index 9b9c67ec..a02fda5b 100644 --- a/src/Merge.Client/Accounting/Types/PurchaseOrderLineItemRequest.cs +++ b/src/Merge.Client/Accounting/Types/PurchaseOrderLineItemRequest.cs @@ -33,7 +33,6 @@ public record PurchaseOrderLineItemRequest public double? Quantity { get; set; } [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/PurchaseOrderRequest.cs b/src/Merge.Client/Accounting/Types/PurchaseOrderRequest.cs index 0540479e..10a4d1a1 100644 --- a/src/Merge.Client/Accounting/Types/PurchaseOrderRequest.cs +++ b/src/Merge.Client/Accounting/Types/PurchaseOrderRequest.cs @@ -36,7 +36,6 @@ public record PurchaseOrderRequest /// The purchase order's delivery address. /// [JsonPropertyName("delivery_address")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? DeliveryAddress { get; set; } /// @@ -49,7 +48,6 @@ public record PurchaseOrderRequest /// The party fulfilling the purchase order. /// [JsonPropertyName("vendor")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Vendor { get; set; } /// @@ -62,7 +60,6 @@ public record PurchaseOrderRequest /// The company the purchase order belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -391,12 +388,6 @@ public record PurchaseOrderRequest public string? ExchangeRate { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } [JsonPropertyName("line_items")] diff --git a/src/Merge.Client/Accounting/Types/RemoteFieldApi.cs b/src/Merge.Client/Accounting/Types/RemoteFieldApi.cs index 18e0d8b3..f3bcb070 100644 --- a/src/Merge.Client/Accounting/Types/RemoteFieldApi.cs +++ b/src/Merge.Client/Accounting/Types/RemoteFieldApi.cs @@ -24,7 +24,6 @@ public record RemoteFieldApi public AdvancedMetadata? AdvancedMetadata { get; set; } [JsonPropertyName("coverage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Coverage { get; set; } public override string ToString() diff --git a/src/Merge.Client/Accounting/Types/TaxRate.cs b/src/Merge.Client/Accounting/Types/TaxRate.cs index 83747c51..52a38ae4 100644 --- a/src/Merge.Client/Accounting/Types/TaxRate.cs +++ b/src/Merge.Client/Accounting/Types/TaxRate.cs @@ -51,7 +51,6 @@ public record TaxRate /// The subsidiary that the tax rate belongs to (in the case of multi-entity systems). /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/TrackingCategory.cs b/src/Merge.Client/Accounting/Types/TrackingCategory.cs index 1d844bc7..373f9086 100644 --- a/src/Merge.Client/Accounting/Types/TrackingCategory.cs +++ b/src/Merge.Client/Accounting/Types/TrackingCategory.cs @@ -63,7 +63,6 @@ public record TrackingCategory /// The company the tracking category belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/Transaction.cs b/src/Merge.Client/Accounting/Types/Transaction.cs index d69316ee..fa55f618 100644 --- a/src/Merge.Client/Accounting/Types/Transaction.cs +++ b/src/Merge.Client/Accounting/Types/Transaction.cs @@ -51,14 +51,12 @@ public record Transaction /// The transaction's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The contact to whom the transaction relates to. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -393,12 +391,6 @@ public record Transaction public string? Company { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } [JsonPropertyName("line_items")] @@ -414,7 +406,6 @@ public record Transaction /// The accounting period that the Transaction was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/TransactionLineItem.cs b/src/Merge.Client/Accounting/Types/TransactionLineItem.cs index e815f895..af04410b 100644 --- a/src/Merge.Client/Accounting/Types/TransactionLineItem.cs +++ b/src/Merge.Client/Accounting/Types/TransactionLineItem.cs @@ -48,7 +48,6 @@ public record TransactionLineItem public string? Quantity { get; set; } [JsonPropertyName("item")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Item { get; set; } /// diff --git a/src/Merge.Client/Accounting/Types/VendorCredit.cs b/src/Merge.Client/Accounting/Types/VendorCredit.cs index 00a73ffc..41b95bc0 100644 --- a/src/Merge.Client/Accounting/Types/VendorCredit.cs +++ b/src/Merge.Client/Accounting/Types/VendorCredit.cs @@ -45,7 +45,6 @@ public record VendorCredit /// The vendor that owes the gift or refund. /// [JsonPropertyName("vendor")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Vendor { get; set; } /// @@ -377,19 +376,12 @@ public record VendorCredit /// The company the vendor credit belongs to. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } [JsonPropertyName("lines")] public IEnumerable? Lines { get; set; } [JsonPropertyName("tracking_categories")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? TrackingCategories { get; set; } /// @@ -402,7 +394,6 @@ public record VendorCredit /// The accounting period that the VendorCredit was generated in. /// [JsonPropertyName("accounting_period")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AccountingPeriod { get; set; } [JsonPropertyName("field_mappings")] diff --git a/src/Merge.Client/Accounting/Types/VendorCreditLine.cs b/src/Merge.Client/Accounting/Types/VendorCreditLine.cs index 7c080ca8..69e7c8a9 100644 --- a/src/Merge.Client/Accounting/Types/VendorCreditLine.cs +++ b/src/Merge.Client/Accounting/Types/VendorCreditLine.cs @@ -57,7 +57,6 @@ public record VendorCreditLine /// The line's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// diff --git a/src/Merge.Client/Ats/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Ats/AsyncPassthrough/AsyncPassthroughClient.cs index f9e0a72f..c8e50181 100644 --- a/src/Merge.Client/Ats/AsyncPassthrough/AsyncPassthroughClient.cs +++ b/src/Merge.Client/Ats/AsyncPassthrough/AsyncPassthroughClient.cs @@ -22,7 +22,11 @@ internal AsyncPassthroughClient(RawClient client) /// /// /// await client.Ats.AsyncPassthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Ats.DataPassthroughRequest + /// { + /// Method = Merge.Client.Ats.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Ats/Attachments/AttachmentsClient.cs b/src/Merge.Client/Ats/Attachments/AttachmentsClient.cs index 9a826fa8..828309f4 100644 --- a/src/Merge.Client/Ats/Attachments/AttachmentsClient.cs +++ b/src/Merge.Client/Ats/Attachments/AttachmentsClient.cs @@ -128,7 +128,7 @@ public async Task ListAsync( /// await client.Ats.Attachments.CreateAsync( /// new AttachmentEndpointRequest /// { - /// Model = new AttachmentRequest(), + /// Model = new Merge.Client.Ats.AttachmentRequest(), /// RemoteUserId = "remote_user_id", /// } /// ); diff --git a/src/Merge.Client/Ats/Candidates/CandidatesClient.cs b/src/Merge.Client/Ats/Candidates/CandidatesClient.cs index ed7c2831..1a6f3ad1 100644 --- a/src/Merge.Client/Ats/Candidates/CandidatesClient.cs +++ b/src/Merge.Client/Ats/Candidates/CandidatesClient.cs @@ -316,7 +316,10 @@ public async Task PartialUpdateAsync( /// /// await client.Ats.Candidates.IgnoreCreateAsync( /// "model_id", - /// new IgnoreCommonModelRequest { Reason = ReasonEnum.GeneralCustomerRequest } + /// new Merge.Client.Ats.IgnoreCommonModelRequest + /// { + /// Reason = Merge.Client.Ats.ReasonEnum.GeneralCustomerRequest, + /// } /// ); /// /// diff --git a/src/Merge.Client/Ats/LinkToken/LinkTokenClient.cs b/src/Merge.Client/Ats/LinkToken/LinkTokenClient.cs index 1fd03178..1bf3b1b0 100644 --- a/src/Merge.Client/Ats/LinkToken/LinkTokenClient.cs +++ b/src/Merge.Client/Ats/LinkToken/LinkTokenClient.cs @@ -27,7 +27,11 @@ internal LinkTokenClient(RawClient client) /// EndUserEmailAddress = "example@gmail.com", /// EndUserOrganizationName = "Test Organization", /// EndUserOriginId = "12345", - /// Categories = new List() { CategoriesEnum.Hris, CategoriesEnum.Ats }, + /// Categories = new List() + /// { + /// Merge.Client.Ats.CategoriesEnum.Hris, + /// Merge.Client.Ats.CategoriesEnum.Ats, + /// }, /// } /// ); /// diff --git a/src/Merge.Client/Ats/Passthrough/PassthroughClient.cs b/src/Merge.Client/Ats/Passthrough/PassthroughClient.cs index 16748b4f..2f18be1e 100644 --- a/src/Merge.Client/Ats/Passthrough/PassthroughClient.cs +++ b/src/Merge.Client/Ats/Passthrough/PassthroughClient.cs @@ -22,7 +22,11 @@ internal PassthroughClient(RawClient client) /// /// /// await client.Ats.Passthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Ats.DataPassthroughRequest + /// { + /// Method = Merge.Client.Ats.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Ats/Scopes/ScopesClient.cs b/src/Merge.Client/Ats/Scopes/ScopesClient.cs index d1d7f74f..84c62ff7 100644 --- a/src/Merge.Client/Ats/Scopes/ScopesClient.cs +++ b/src/Merge.Client/Ats/Scopes/ScopesClient.cs @@ -110,31 +110,43 @@ public async Task LinkedAccountScopesRetrieveAsync( /// await client.Ats.Scopes.LinkedAccountScopesCreateAsync( /// new LinkedAccountCommonModelScopeDeserializerRequest /// { - /// CommonModels = new List() + /// CommonModels = new List() /// { - /// new IndividualCommonModelScopeDeserializerRequest + /// new Merge.Client.Ats.IndividualCommonModelScopeDeserializerRequest /// { /// ModelName = "Employee", - /// ModelPermissions = new Dictionary() + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Ats.ModelPermissionDeserializerRequest + /// >() /// { /// { /// "READ", - /// new ModelPermissionDeserializerRequest { IsEnabled = true } + /// new Merge.Client.Ats.ModelPermissionDeserializerRequest { IsEnabled = true } /// }, /// { /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// new Merge.Client.Ats.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } /// }, /// }, /// }, - /// new IndividualCommonModelScopeDeserializerRequest + /// new Merge.Client.Ats.IndividualCommonModelScopeDeserializerRequest /// { /// ModelName = "Benefit", - /// ModelPermissions = new Dictionary() + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Ats.ModelPermissionDeserializerRequest + /// >() /// { /// { /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// new Merge.Client.Ats.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } /// }, /// }, /// }, diff --git a/src/Merge.Client/Ats/Types/Activity.cs b/src/Merge.Client/Ats/Types/Activity.cs index abe988d6..85bfcd0a 100644 --- a/src/Merge.Client/Ats/Types/Activity.cs +++ b/src/Merge.Client/Ats/Types/Activity.cs @@ -33,7 +33,6 @@ public record Activity /// The user that performed the action. /// [JsonPropertyName("user")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? User { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/ActivityRequest.cs b/src/Merge.Client/Ats/Types/ActivityRequest.cs index 8cc9db77..26884c67 100644 --- a/src/Merge.Client/Ats/Types/ActivityRequest.cs +++ b/src/Merge.Client/Ats/Types/ActivityRequest.cs @@ -12,7 +12,6 @@ public record ActivityRequest /// The user that performed the action. /// [JsonPropertyName("user")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? User { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/Application.cs b/src/Merge.Client/Ats/Types/Application.cs index 3c7adee1..9c306a4d 100644 --- a/src/Merge.Client/Ats/Types/Application.cs +++ b/src/Merge.Client/Ats/Types/Application.cs @@ -33,14 +33,12 @@ public record Application /// The candidate applying. /// [JsonPropertyName("candidate")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Candidate { get; set; } /// /// The job being applied for. /// [JsonPropertyName("job")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Job { get; set; } /// @@ -56,12 +54,6 @@ public record Application public DateTime? RejectedAt { get; set; } [JsonPropertyName("offers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Offers { get; set; } /// @@ -74,16 +66,9 @@ public record Application /// The user credited for this application. /// [JsonPropertyName("credited_to")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? CreditedTo { get; set; } [JsonPropertyName("screening_question_answers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable< OneOf >? ScreeningQuestionAnswers { get; set; } @@ -92,14 +77,12 @@ public IEnumerable< /// The application's current stage. /// [JsonPropertyName("current_stage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? CurrentStage { get; set; } /// /// The application's reason for rejection. /// [JsonPropertyName("reject_reason")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? RejectReason { get; set; } [JsonPropertyName("remote_was_deleted")] diff --git a/src/Merge.Client/Ats/Types/ApplicationRequest.cs b/src/Merge.Client/Ats/Types/ApplicationRequest.cs index 20de2aed..f75e1e3f 100644 --- a/src/Merge.Client/Ats/Types/ApplicationRequest.cs +++ b/src/Merge.Client/Ats/Types/ApplicationRequest.cs @@ -12,14 +12,12 @@ public record ApplicationRequest /// The candidate applying. /// [JsonPropertyName("candidate")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Candidate { get; set; } /// /// The job being applied for. /// [JsonPropertyName("job")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Job { get; set; } /// @@ -35,12 +33,6 @@ public record ApplicationRequest public DateTime? RejectedAt { get; set; } [JsonPropertyName("offers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Offers { get; set; } /// @@ -53,16 +45,9 @@ public record ApplicationRequest /// The user credited for this application. /// [JsonPropertyName("credited_to")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? CreditedTo { get; set; } [JsonPropertyName("screening_question_answers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable< OneOf >? ScreeningQuestionAnswers { get; set; } @@ -71,14 +56,12 @@ public IEnumerable< /// The application's current stage. /// [JsonPropertyName("current_stage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? CurrentStage { get; set; } /// /// The application's reason for rejection. /// [JsonPropertyName("reject_reason")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? RejectReason { get; set; } [JsonPropertyName("remote_template_id")] diff --git a/src/Merge.Client/Ats/Types/Candidate.cs b/src/Merge.Client/Ats/Types/Candidate.cs index d0bc6237..230278a3 100644 --- a/src/Merge.Client/Ats/Types/Candidate.cs +++ b/src/Merge.Client/Ats/Types/Candidate.cs @@ -108,24 +108,12 @@ public record Candidate /// Array of `Application` object IDs. /// [JsonPropertyName("applications")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Applications { get; set; } /// /// Array of `Attachment` object IDs. /// [JsonPropertyName("attachments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Attachments { get; set; } [JsonPropertyName("remote_was_deleted")] diff --git a/src/Merge.Client/Ats/Types/CandidateRequest.cs b/src/Merge.Client/Ats/Types/CandidateRequest.cs index 1061ce00..f38c67ca 100644 --- a/src/Merge.Client/Ats/Types/CandidateRequest.cs +++ b/src/Merge.Client/Ats/Types/CandidateRequest.cs @@ -75,24 +75,12 @@ public record CandidateRequest /// Array of `Application` object IDs. /// [JsonPropertyName("applications")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Applications { get; set; } /// /// Array of `Attachment` object IDs. /// [JsonPropertyName("attachments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Attachments { get; set; } [JsonPropertyName("remote_template_id")] diff --git a/src/Merge.Client/Ats/Types/Eeoc.cs b/src/Merge.Client/Ats/Types/Eeoc.cs index 62fd12ad..99bc217d 100644 --- a/src/Merge.Client/Ats/Types/Eeoc.cs +++ b/src/Merge.Client/Ats/Types/Eeoc.cs @@ -33,7 +33,6 @@ public record Eeoc /// The candidate being represented. /// [JsonPropertyName("candidate")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Candidate { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/Job.cs b/src/Merge.Client/Ats/Types/Job.cs index 6dcb2440..97678fcc 100644 --- a/src/Merge.Client/Ats/Types/Job.cs +++ b/src/Merge.Client/Ats/Types/Job.cs @@ -100,48 +100,24 @@ public record Job /// IDs of `Department` objects for this `Job`. /// [JsonPropertyName("departments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Departments { get; set; } /// /// IDs of `Office` objects for this `Job`. /// [JsonPropertyName("offices")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Offices { get; set; } /// /// IDs of `RemoteUser` objects that serve as hiring managers for this `Job`. /// [JsonPropertyName("hiring_managers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? HiringManagers { get; set; } /// /// IDs of `RemoteUser` objects that serve as recruiters for this `Job`. /// [JsonPropertyName("recruiters")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Recruiters { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/JobInterviewStage.cs b/src/Merge.Client/Ats/Types/JobInterviewStage.cs index 150647a3..9137a6f2 100644 --- a/src/Merge.Client/Ats/Types/JobInterviewStage.cs +++ b/src/Merge.Client/Ats/Types/JobInterviewStage.cs @@ -39,7 +39,6 @@ public record JobInterviewStage /// This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated. /// [JsonPropertyName("job")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Job { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/JobPosting.cs b/src/Merge.Client/Ats/Types/JobPosting.cs index ac6ba214..e07057e8 100644 --- a/src/Merge.Client/Ats/Types/JobPosting.cs +++ b/src/Merge.Client/Ats/Types/JobPosting.cs @@ -39,16 +39,12 @@ public record JobPosting /// The Url object is used to represent hyperlinks for a candidate to apply to a given job. /// [JsonPropertyName("job_posting_urls")] - [JsonConverter( - typeof(CollectionItemSerializer, OneOfSerializer>>) - )] public IEnumerable>? JobPostingUrls { get; set; } /// /// ID of `Job` object for this `JobPosting`. /// [JsonPropertyName("job")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Job { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/Offer.cs b/src/Merge.Client/Ats/Types/Offer.cs index 674b678d..7085494a 100644 --- a/src/Merge.Client/Ats/Types/Offer.cs +++ b/src/Merge.Client/Ats/Types/Offer.cs @@ -33,14 +33,12 @@ public record Offer /// The application who is receiving the offer. /// [JsonPropertyName("application")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Application { get; set; } /// /// The user who created the offer. /// [JsonPropertyName("creator")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Creator { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/RemoteFieldApi.cs b/src/Merge.Client/Ats/Types/RemoteFieldApi.cs index 1175c595..34d90409 100644 --- a/src/Merge.Client/Ats/Types/RemoteFieldApi.cs +++ b/src/Merge.Client/Ats/Types/RemoteFieldApi.cs @@ -24,7 +24,6 @@ public record RemoteFieldApi public AdvancedMetadata? AdvancedMetadata { get; set; } [JsonPropertyName("coverage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Coverage { get; set; } public override string ToString() diff --git a/src/Merge.Client/Ats/Types/ScheduledInterview.cs b/src/Merge.Client/Ats/Types/ScheduledInterview.cs index b6bdd2e7..d7279796 100644 --- a/src/Merge.Client/Ats/Types/ScheduledInterview.cs +++ b/src/Merge.Client/Ats/Types/ScheduledInterview.cs @@ -33,33 +33,24 @@ public record ScheduledInterview /// The application being interviewed. /// [JsonPropertyName("application")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Application { get; set; } /// /// The stage of the interview. /// [JsonPropertyName("job_interview_stage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? JobInterviewStage { get; set; } /// /// The user organizing the interview. /// [JsonPropertyName("organizer")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Organizer { get; set; } /// /// Array of `RemoteUser` IDs. /// [JsonPropertyName("interviewers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Interviewers { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/ScheduledInterviewRequest.cs b/src/Merge.Client/Ats/Types/ScheduledInterviewRequest.cs index cea5fef5..afc10c53 100644 --- a/src/Merge.Client/Ats/Types/ScheduledInterviewRequest.cs +++ b/src/Merge.Client/Ats/Types/ScheduledInterviewRequest.cs @@ -12,33 +12,24 @@ public record ScheduledInterviewRequest /// The application being interviewed. /// [JsonPropertyName("application")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Application { get; set; } /// /// The stage of the interview. /// [JsonPropertyName("job_interview_stage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? JobInterviewStage { get; set; } /// /// The user organizing the interview. /// [JsonPropertyName("organizer")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Organizer { get; set; } /// /// Array of `RemoteUser` IDs. /// [JsonPropertyName("interviewers")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Interviewers { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/Scorecard.cs b/src/Merge.Client/Ats/Types/Scorecard.cs index ce95c927..2fa6a269 100644 --- a/src/Merge.Client/Ats/Types/Scorecard.cs +++ b/src/Merge.Client/Ats/Types/Scorecard.cs @@ -33,21 +33,18 @@ public record Scorecard /// The application being scored. /// [JsonPropertyName("application")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Application { get; set; } /// /// The interview being scored. /// [JsonPropertyName("interview")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Interview { get; set; } /// /// The interviewer doing the scoring. /// [JsonPropertyName("interviewer")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Interviewer { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/ScreeningQuestion.cs b/src/Merge.Client/Ats/Types/ScreeningQuestion.cs index 259a6fca..de3da8a9 100644 --- a/src/Merge.Client/Ats/Types/ScreeningQuestion.cs +++ b/src/Merge.Client/Ats/Types/ScreeningQuestion.cs @@ -33,7 +33,6 @@ public record ScreeningQuestion /// The job associated with the screening question. /// [JsonPropertyName("job")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Job { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/ScreeningQuestionAnswer.cs b/src/Merge.Client/Ats/Types/ScreeningQuestionAnswer.cs index 59cefed8..27b09939 100644 --- a/src/Merge.Client/Ats/Types/ScreeningQuestionAnswer.cs +++ b/src/Merge.Client/Ats/Types/ScreeningQuestionAnswer.cs @@ -33,7 +33,6 @@ public record ScreeningQuestionAnswer /// The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. /// [JsonPropertyName("question")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Question { get; set; } /// diff --git a/src/Merge.Client/Ats/Types/ScreeningQuestionAnswerRequest.cs b/src/Merge.Client/Ats/Types/ScreeningQuestionAnswerRequest.cs index 3b6e6d94..c3854056 100644 --- a/src/Merge.Client/Ats/Types/ScreeningQuestionAnswerRequest.cs +++ b/src/Merge.Client/Ats/Types/ScreeningQuestionAnswerRequest.cs @@ -18,7 +18,6 @@ public record ScreeningQuestionAnswerRequest /// The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. /// [JsonPropertyName("question")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Question { get; set; } /// diff --git a/src/Merge.Client/Core/JsonConfiguration.cs b/src/Merge.Client/Core/JsonConfiguration.cs index aa9fc0e1..cf25cda2 100644 --- a/src/Merge.Client/Core/JsonConfiguration.cs +++ b/src/Merge.Client/Core/JsonConfiguration.cs @@ -11,7 +11,7 @@ static JsonOptions() { JsonSerializerOptions = new JsonSerializerOptions { - Converters = { new DateTimeSerializer() }, + Converters = { new DateTimeSerializer(), new OneOfSerializer() }, WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, }; diff --git a/src/Merge.Client/Core/OneOfSerializer.cs b/src/Merge.Client/Core/OneOfSerializer.cs index e28e9e3e..f8290bbd 100644 --- a/src/Merge.Client/Core/OneOfSerializer.cs +++ b/src/Merge.Client/Core/OneOfSerializer.cs @@ -5,10 +5,9 @@ namespace Merge.Client.Core; -internal class OneOfSerializer : JsonConverter - where TOneOf : IOneOf +internal class OneOfSerializer : JsonConverter { - public override TOneOf? Read( + public override IOneOf? Read( ref Utf8JsonReader reader, System.Type typeToConvert, JsonSerializerOptions options @@ -17,14 +16,14 @@ JsonSerializerOptions options if (reader.TokenType is JsonTokenType.Null) return default; - foreach (var (type, cast) in s_types) + foreach (var (type, cast) in GetOneOfTypes(typeToConvert)) { try { var readerCopy = reader; var result = JsonSerializer.Deserialize(ref readerCopy, type, options); reader.Skip(); - return (TOneOf)cast.Invoke(null, [result])!; + return (IOneOf)cast.Invoke(null, [result])!; } catch (JsonException) { } } @@ -34,20 +33,18 @@ JsonSerializerOptions options ); } - private static readonly (System.Type type, MethodInfo cast)[] s_types = GetOneOfTypes(); - - public override void Write(Utf8JsonWriter writer, TOneOf value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, IOneOf value, JsonSerializerOptions options) { JsonSerializer.Serialize(writer, value.Value, options); } - private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() + private static (System.Type type, MethodInfo cast)[] GetOneOfTypes(System.Type typeToConvert) { - var casts = typeof(TOneOf) + var casts = typeToConvert .GetRuntimeMethods() .Where(m => m.IsSpecialName && m.Name == "op_Implicit") .ToArray(); - var type = typeof(TOneOf); + var type = typeToConvert; while (type != null) { if ( @@ -62,6 +59,11 @@ private static (System.Type type, MethodInfo cast)[] GetOneOfTypes() type = type.BaseType; } - throw new InvalidOperationException($"{typeof(TOneOf)} isn't OneOf or OneOfBase"); + throw new InvalidOperationException($"{type} isn't OneOf or OneOfBase"); + } + + public override bool CanConvert(System.Type typeToConvert) + { + return typeof(IOneOf).IsAssignableFrom(typeToConvert); } } diff --git a/src/Merge.Client/Core/Public/Version.cs b/src/Merge.Client/Core/Public/Version.cs new file mode 100644 index 00000000..52cc6b5f --- /dev/null +++ b/src/Merge.Client/Core/Public/Version.cs @@ -0,0 +1,6 @@ +namespace Merge.Client; + +internal class Version +{ + public const string Current = "0.2.2"; +} diff --git a/src/Merge.Client/Core/RawClient.cs b/src/Merge.Client/Core/RawClient.cs index 5e81a5d0..cef78b3c 100644 --- a/src/Merge.Client/Core/RawClient.cs +++ b/src/Merge.Client/Core/RawClient.cs @@ -11,8 +11,11 @@ namespace Merge.Client.Core; /// internal class RawClient(ClientOptions clientOptions) { + private const int InitialRetryDelayMs = 1000; + private const int MaxRetryDelayMs = 60000; + /// - /// The http client used to make requests. + /// The client options applied on every request. /// public readonly ClientOptions Options = clientOptions; @@ -21,36 +24,13 @@ public async Task MakeRequestAsync( CancellationToken cancellationToken = default ) { - var url = BuildUrl(request); - var httpRequest = new HttpRequestMessage(request.Method, url); - if (request.ContentType != null) - { - request.Headers.Add("Content-Type", request.ContentType); - } - SetHeaders(httpRequest, Options.Headers); - SetHeaders(httpRequest, request.Headers); - SetHeaders(httpRequest, request.Options?.Headers ?? new()); + // Apply the request timeout. + var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + var timeout = request.Options?.Timeout ?? Options.Timeout; + cts.CancelAfter(timeout); - // Add the request body to the request - if (request is JsonApiRequest jsonRequest) - { - if (jsonRequest.Body != null) - { - httpRequest.Content = new StringContent( - JsonUtils.Serialize(jsonRequest.Body), - Encoding.UTF8, - "application/json" - ); - } - } - else if (request is StreamApiRequest { Body: not null } streamRequest) - { - httpRequest.Content = new StreamContent(streamRequest.Body); - } - // Send the request - var httpClient = request.Options?.HttpClient ?? Options.HttpClient; - var response = await httpClient.SendAsync(httpRequest, cancellationToken); - return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; + // Send the request. + return await SendWithRetriesAsync(request, cts.Token); } public record BaseApiRequest @@ -96,19 +76,67 @@ public record ApiResponse public required HttpResponseMessage Raw { get; init; } } - private void SetHeaders(HttpRequestMessage httpRequest, Headers headers) + private async Task SendWithRetriesAsync( + BaseApiRequest request, + CancellationToken cancellationToken + ) { - foreach (var header in headers) + var httpClient = request.Options?.HttpClient ?? Options.HttpClient; + var maxRetries = request.Options?.MaxRetries ?? Options.MaxRetries; + var response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); + for (var i = 0; i < maxRetries; i++) { - var value = header.Value?.Match(str => str, func => func.Invoke()); - if (value != null) + if (!ShouldRetry(response)) { - httpRequest.Headers.TryAddWithoutValidation(header.Key, value); + break; + } + var delayMs = Math.Min(InitialRetryDelayMs * (int)Math.Pow(2, i), MaxRetryDelayMs); + await System.Threading.Tasks.Task.Delay(delayMs, cancellationToken); + response = await httpClient.SendAsync(BuildHttpRequest(request), cancellationToken); + } + return new ApiResponse { StatusCode = (int)response.StatusCode, Raw = response }; + } + + private static bool ShouldRetry(HttpResponseMessage response) + { + var statusCode = (int)response.StatusCode; + return statusCode is 408 or 429 or >= 500; + } + + private HttpRequestMessage BuildHttpRequest(BaseApiRequest request) + { + var url = BuildUrl(request); + var httpRequest = new HttpRequestMessage(request.Method, url); + switch (request) + { + // Add the request body to the request. + case JsonApiRequest jsonRequest: + { + if (jsonRequest.Body != null) + { + httpRequest.Content = new StringContent( + JsonUtils.Serialize(jsonRequest.Body), + Encoding.UTF8, + "application/json" + ); + } + break; } + case StreamApiRequest { Body: not null } streamRequest: + httpRequest.Content = new StreamContent(streamRequest.Body); + break; + } + if (request.ContentType != null) + { + request.Headers.Add("Content-Type", request.ContentType); } + SetHeaders(httpRequest, Options.Headers); + SetHeaders(httpRequest, request.Headers); + SetHeaders(httpRequest, request.Options?.Headers ?? new Headers()); + return httpRequest; } - private string BuildUrl(BaseApiRequest request) + private static string BuildUrl(BaseApiRequest request) { var baseUrl = request.Options?.BaseUrl ?? request.BaseUrl; var trimmedBaseUrl = baseUrl.TrimEnd('/'); @@ -139,7 +167,19 @@ private string BuildUrl(BaseApiRequest request) return current; } ); - url = url.Substring(0, url.Length - 1); + url = url[..^1]; return url; } + + private static void SetHeaders(HttpRequestMessage httpRequest, Headers headers) + { + foreach (var header in headers) + { + var value = header.Value?.Match(str => str, func => func.Invoke()); + if (value != null) + { + httpRequest.Headers.TryAddWithoutValidation(header.Key, value); + } + } + } } diff --git a/src/Merge.Client/Crm/Accounts/AccountsClient.cs b/src/Merge.Client/Crm/Accounts/AccountsClient.cs index 366e8012..54579fb9 100644 --- a/src/Merge.Client/Crm/Accounts/AccountsClient.cs +++ b/src/Merge.Client/Crm/Accounts/AccountsClient.cs @@ -126,7 +126,7 @@ public async Task ListAsync( /// /// /// await client.Crm.Accounts.CreateAsync( - /// new CrmAccountEndpointRequest { Model = new AccountRequest() } + /// new CrmAccountEndpointRequest { Model = new Merge.Client.Crm.AccountRequest() } /// ); /// /// diff --git a/src/Merge.Client/Crm/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Crm/AsyncPassthrough/AsyncPassthroughClient.cs index 0a3cd834..22de756f 100644 --- a/src/Merge.Client/Crm/AsyncPassthrough/AsyncPassthroughClient.cs +++ b/src/Merge.Client/Crm/AsyncPassthrough/AsyncPassthroughClient.cs @@ -22,7 +22,11 @@ internal AsyncPassthroughClient(RawClient client) /// /// /// await client.Crm.AsyncPassthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Crm.DataPassthroughRequest + /// { + /// Method = Merge.Client.Crm.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Crm/Contacts/ContactsClient.cs b/src/Merge.Client/Crm/Contacts/ContactsClient.cs index f742cfef..cb2b6821 100644 --- a/src/Merge.Client/Crm/Contacts/ContactsClient.cs +++ b/src/Merge.Client/Crm/Contacts/ContactsClient.cs @@ -130,7 +130,7 @@ public async Task ListAsync( /// /// /// await client.Crm.Contacts.CreateAsync( - /// new CrmContactEndpointRequest { Model = new ContactRequest() } + /// new CrmContactEndpointRequest { Model = new Merge.Client.Crm.ContactRequest() } /// ); /// /// @@ -308,7 +308,7 @@ public async Task PartialUpdateAsync( /// /// await client.Crm.Contacts.IgnoreCreateAsync( /// "model_id", - /// new IgnoreCommonModelRequest { Reason = ReasonEnum.GeneralCustomerRequest } + /// new IgnoreCommonModelRequest { Reason = Merge.Client.Crm.ReasonEnum.GeneralCustomerRequest } /// ); /// /// diff --git a/src/Merge.Client/Crm/LinkToken/LinkTokenClient.cs b/src/Merge.Client/Crm/LinkToken/LinkTokenClient.cs index 67ab1ab0..ed4227dc 100644 --- a/src/Merge.Client/Crm/LinkToken/LinkTokenClient.cs +++ b/src/Merge.Client/Crm/LinkToken/LinkTokenClient.cs @@ -27,7 +27,11 @@ internal LinkTokenClient(RawClient client) /// EndUserEmailAddress = "example@gmail.com", /// EndUserOrganizationName = "Test Organization", /// EndUserOriginId = "12345", - /// Categories = new List() { CategoriesEnum.Hris, CategoriesEnum.Ats }, + /// Categories = new List() + /// { + /// Merge.Client.Crm.CategoriesEnum.Hris, + /// Merge.Client.Crm.CategoriesEnum.Ats, + /// }, /// } /// ); /// diff --git a/src/Merge.Client/Crm/Passthrough/PassthroughClient.cs b/src/Merge.Client/Crm/Passthrough/PassthroughClient.cs index f150f351..bf5f1d09 100644 --- a/src/Merge.Client/Crm/Passthrough/PassthroughClient.cs +++ b/src/Merge.Client/Crm/Passthrough/PassthroughClient.cs @@ -22,7 +22,11 @@ internal PassthroughClient(RawClient client) /// /// /// await client.Crm.Passthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Crm.DataPassthroughRequest + /// { + /// Method = Merge.Client.Crm.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Crm/Scopes/ScopesClient.cs b/src/Merge.Client/Crm/Scopes/ScopesClient.cs index b712b8e4..cdf46fef 100644 --- a/src/Merge.Client/Crm/Scopes/ScopesClient.cs +++ b/src/Merge.Client/Crm/Scopes/ScopesClient.cs @@ -110,31 +110,43 @@ public async Task LinkedAccountScopesRetrieveAsync( /// await client.Crm.Scopes.LinkedAccountScopesCreateAsync( /// new LinkedAccountCommonModelScopeDeserializerRequest /// { - /// CommonModels = new List() + /// CommonModels = new List() /// { - /// new IndividualCommonModelScopeDeserializerRequest + /// new Merge.Client.Crm.IndividualCommonModelScopeDeserializerRequest /// { /// ModelName = "Employee", - /// ModelPermissions = new Dictionary() + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Crm.ModelPermissionDeserializerRequest + /// >() /// { /// { /// "READ", - /// new ModelPermissionDeserializerRequest { IsEnabled = true } + /// new Merge.Client.Crm.ModelPermissionDeserializerRequest { IsEnabled = true } /// }, /// { /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// new Merge.Client.Crm.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } /// }, /// }, /// }, - /// new IndividualCommonModelScopeDeserializerRequest + /// new Merge.Client.Crm.IndividualCommonModelScopeDeserializerRequest /// { /// ModelName = "Benefit", - /// ModelPermissions = new Dictionary() + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Crm.ModelPermissionDeserializerRequest + /// >() /// { /// { /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// new Merge.Client.Crm.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } /// }, /// }, /// }, diff --git a/src/Merge.Client/Crm/Types/Account.cs b/src/Merge.Client/Crm/Types/Account.cs index a3c499d7..59b2acf6 100644 --- a/src/Merge.Client/Crm/Types/Account.cs +++ b/src/Merge.Client/Crm/Types/Account.cs @@ -33,7 +33,6 @@ public record Account /// The account's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/AccountRequest.cs b/src/Merge.Client/Crm/Types/AccountRequest.cs index 5b2041d3..697f9b80 100644 --- a/src/Merge.Client/Crm/Types/AccountRequest.cs +++ b/src/Merge.Client/Crm/Types/AccountRequest.cs @@ -12,7 +12,6 @@ public record AccountRequest /// The account's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/Association.cs b/src/Merge.Client/Crm/Types/Association.cs index d9ee8395..a2701827 100644 --- a/src/Merge.Client/Crm/Types/Association.cs +++ b/src/Merge.Client/Crm/Types/Association.cs @@ -30,7 +30,6 @@ public record Association /// The association type the association belongs to. /// [JsonPropertyName("association_type")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? AssociationType { get; set; } public override string ToString() diff --git a/src/Merge.Client/Crm/Types/Contact.cs b/src/Merge.Client/Crm/Types/Contact.cs index e9c5368a..a88a31e9 100644 --- a/src/Merge.Client/Crm/Types/Contact.cs +++ b/src/Merge.Client/Crm/Types/Contact.cs @@ -45,14 +45,12 @@ public record Contact /// The contact's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The contact's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } [JsonPropertyName("addresses")] diff --git a/src/Merge.Client/Crm/Types/ContactRequest.cs b/src/Merge.Client/Crm/Types/ContactRequest.cs index 10f48124..1291c4a6 100644 --- a/src/Merge.Client/Crm/Types/ContactRequest.cs +++ b/src/Merge.Client/Crm/Types/ContactRequest.cs @@ -24,14 +24,12 @@ public record ContactRequest /// The contact's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The contact's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } [JsonPropertyName("addresses")] diff --git a/src/Merge.Client/Crm/Types/Engagement.cs b/src/Merge.Client/Crm/Types/Engagement.cs index 2ed26df7..eb85551b 100644 --- a/src/Merge.Client/Crm/Types/Engagement.cs +++ b/src/Merge.Client/Crm/Types/Engagement.cs @@ -33,7 +33,6 @@ public record Engagement /// The engagement's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// @@ -61,7 +60,6 @@ public record Engagement /// The engagement type of the engagement. /// [JsonPropertyName("engagement_type")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? EngagementType { get; set; } /// @@ -80,16 +78,9 @@ public record Engagement /// The account of the engagement. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } [JsonPropertyName("contacts")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Contacts { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/EngagementRequest.cs b/src/Merge.Client/Crm/Types/EngagementRequest.cs index c3a513c5..468bedb7 100644 --- a/src/Merge.Client/Crm/Types/EngagementRequest.cs +++ b/src/Merge.Client/Crm/Types/EngagementRequest.cs @@ -12,7 +12,6 @@ public record EngagementRequest /// The engagement's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// @@ -40,7 +39,6 @@ public record EngagementRequest /// The engagement type of the engagement. /// [JsonPropertyName("engagement_type")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? EngagementType { get; set; } /// @@ -59,16 +57,9 @@ public record EngagementRequest /// The account of the engagement. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } [JsonPropertyName("contacts")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Contacts { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Crm/Types/Lead.cs b/src/Merge.Client/Crm/Types/Lead.cs index 5e2d7fed..6dac8f4f 100644 --- a/src/Merge.Client/Crm/Types/Lead.cs +++ b/src/Merge.Client/Crm/Types/Lead.cs @@ -33,7 +33,6 @@ public record Lead /// The lead's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// @@ -97,14 +96,12 @@ public record Lead /// The contact of the converted lead. /// [JsonPropertyName("converted_contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ConvertedContact { get; set; } /// /// The account of the converted lead. /// [JsonPropertyName("converted_account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ConvertedAccount { get; set; } [JsonPropertyName("remote_was_deleted")] diff --git a/src/Merge.Client/Crm/Types/LeadRequest.cs b/src/Merge.Client/Crm/Types/LeadRequest.cs index 7d08cec9..e8eece49 100644 --- a/src/Merge.Client/Crm/Types/LeadRequest.cs +++ b/src/Merge.Client/Crm/Types/LeadRequest.cs @@ -12,7 +12,6 @@ public record LeadRequest /// The lead's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// @@ -64,14 +63,12 @@ public record LeadRequest /// The contact of the converted lead. /// [JsonPropertyName("converted_contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ConvertedContact { get; set; } /// /// The account of the converted lead. /// [JsonPropertyName("converted_account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ConvertedAccount { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Crm/Types/Note.cs b/src/Merge.Client/Crm/Types/Note.cs index 5397e6b0..b6b052ac 100644 --- a/src/Merge.Client/Crm/Types/Note.cs +++ b/src/Merge.Client/Crm/Types/Note.cs @@ -33,7 +33,6 @@ public record Note /// The note's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// @@ -46,21 +45,18 @@ public record Note /// The note's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The note's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The note's opportunity. /// [JsonPropertyName("opportunity")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Opportunity { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/NoteRequest.cs b/src/Merge.Client/Crm/Types/NoteRequest.cs index 2d330e56..087e0e36 100644 --- a/src/Merge.Client/Crm/Types/NoteRequest.cs +++ b/src/Merge.Client/Crm/Types/NoteRequest.cs @@ -12,7 +12,6 @@ public record NoteRequest /// The note's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// @@ -25,21 +24,18 @@ public record NoteRequest /// The note's contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The note's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The note's opportunity. /// [JsonPropertyName("opportunity")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Opportunity { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Crm/Types/Opportunity.cs b/src/Merge.Client/Crm/Types/Opportunity.cs index 0b4979b7..82387a27 100644 --- a/src/Merge.Client/Crm/Types/Opportunity.cs +++ b/src/Merge.Client/Crm/Types/Opportunity.cs @@ -51,21 +51,18 @@ public record Opportunity /// The opportunity's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// /// The account of the opportunity. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The stage of the opportunity. /// [JsonPropertyName("stage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Stage { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/OpportunityRequest.cs b/src/Merge.Client/Crm/Types/OpportunityRequest.cs index 3979111a..5f40ab42 100644 --- a/src/Merge.Client/Crm/Types/OpportunityRequest.cs +++ b/src/Merge.Client/Crm/Types/OpportunityRequest.cs @@ -30,21 +30,18 @@ public record OpportunityRequest /// The opportunity's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// /// The account of the opportunity. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The stage of the opportunity. /// [JsonPropertyName("stage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Stage { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/PatchedContactRequest.cs b/src/Merge.Client/Crm/Types/PatchedContactRequest.cs index 18d9e489..c424ec9e 100644 --- a/src/Merge.Client/Crm/Types/PatchedContactRequest.cs +++ b/src/Merge.Client/Crm/Types/PatchedContactRequest.cs @@ -30,7 +30,6 @@ public record PatchedContactRequest /// The contact's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } [JsonPropertyName("addresses")] diff --git a/src/Merge.Client/Crm/Types/RemoteField.cs b/src/Merge.Client/Crm/Types/RemoteField.cs index b5181cef..77e3fc2c 100644 --- a/src/Merge.Client/Crm/Types/RemoteField.cs +++ b/src/Merge.Client/Crm/Types/RemoteField.cs @@ -9,7 +9,6 @@ namespace Merge.Client.Crm; public record RemoteField { [JsonPropertyName("remote_field_class")] - [JsonConverter(typeof(OneOfSerializer>))] public required OneOf RemoteFieldClass { get; set; } [JsonPropertyName("value")] diff --git a/src/Merge.Client/Crm/Types/RemoteFieldApi.cs b/src/Merge.Client/Crm/Types/RemoteFieldApi.cs index 3fef8c8f..405c0548 100644 --- a/src/Merge.Client/Crm/Types/RemoteFieldApi.cs +++ b/src/Merge.Client/Crm/Types/RemoteFieldApi.cs @@ -24,7 +24,6 @@ public record RemoteFieldApi public AdvancedMetadata? AdvancedMetadata { get; set; } [JsonPropertyName("coverage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Coverage { get; set; } public override string ToString() diff --git a/src/Merge.Client/Crm/Types/RemoteFieldRequest.cs b/src/Merge.Client/Crm/Types/RemoteFieldRequest.cs index efb38b95..b9765648 100644 --- a/src/Merge.Client/Crm/Types/RemoteFieldRequest.cs +++ b/src/Merge.Client/Crm/Types/RemoteFieldRequest.cs @@ -9,7 +9,6 @@ namespace Merge.Client.Crm; public record RemoteFieldRequest { [JsonPropertyName("remote_field_class")] - [JsonConverter(typeof(OneOfSerializer>))] public required OneOf RemoteFieldClass { get; set; } [JsonPropertyName("value")] diff --git a/src/Merge.Client/Crm/Types/Task.cs b/src/Merge.Client/Crm/Types/Task.cs index ed87eeb0..3b48b733 100644 --- a/src/Merge.Client/Crm/Types/Task.cs +++ b/src/Merge.Client/Crm/Types/Task.cs @@ -45,21 +45,18 @@ public record Task /// The task's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// /// The task's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The task's opportunity. /// [JsonPropertyName("opportunity")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Opportunity { get; set; } /// diff --git a/src/Merge.Client/Crm/Types/TaskRequest.cs b/src/Merge.Client/Crm/Types/TaskRequest.cs index 1209ae98..94aeeb3c 100644 --- a/src/Merge.Client/Crm/Types/TaskRequest.cs +++ b/src/Merge.Client/Crm/Types/TaskRequest.cs @@ -24,21 +24,18 @@ public record TaskRequest /// The task's owner. /// [JsonPropertyName("owner")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Owner { get; set; } /// /// The task's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The task's opportunity. /// [JsonPropertyName("opportunity")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Opportunity { get; set; } /// diff --git a/src/Merge.Client/Crm/Users/UsersClient.cs b/src/Merge.Client/Crm/Users/UsersClient.cs index 25dc85e1..273ccc9d 100644 --- a/src/Merge.Client/Crm/Users/UsersClient.cs +++ b/src/Merge.Client/Crm/Users/UsersClient.cs @@ -170,7 +170,7 @@ public async Task RetrieveAsync( /// /// await client.Crm.Users.IgnoreCreateAsync( /// "model_id", - /// new IgnoreCommonModelRequest { Reason = ReasonEnum.GeneralCustomerRequest } + /// new IgnoreCommonModelRequest { Reason = Merge.Client.Crm.ReasonEnum.GeneralCustomerRequest } /// ); /// /// diff --git a/src/Merge.Client/Filestorage/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Filestorage/AsyncPassthrough/AsyncPassthroughClient.cs index ac949e74..ec482d51 100644 --- a/src/Merge.Client/Filestorage/AsyncPassthrough/AsyncPassthroughClient.cs +++ b/src/Merge.Client/Filestorage/AsyncPassthrough/AsyncPassthroughClient.cs @@ -22,7 +22,11 @@ internal AsyncPassthroughClient(RawClient client) /// /// /// await client.Filestorage.AsyncPassthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Filestorage.DataPassthroughRequest + /// { + /// Method = Merge.Client.Filestorage.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Filestorage/LinkToken/LinkTokenClient.cs b/src/Merge.Client/Filestorage/LinkToken/LinkTokenClient.cs index 688f7507..df723513 100644 --- a/src/Merge.Client/Filestorage/LinkToken/LinkTokenClient.cs +++ b/src/Merge.Client/Filestorage/LinkToken/LinkTokenClient.cs @@ -27,7 +27,11 @@ internal LinkTokenClient(RawClient client) /// EndUserEmailAddress = "example@gmail.com", /// EndUserOrganizationName = "Test Organization", /// EndUserOriginId = "12345", - /// Categories = new List() { CategoriesEnum.Hris, CategoriesEnum.Ats }, + /// Categories = new List() + /// { + /// Merge.Client.Filestorage.CategoriesEnum.Hris, + /// Merge.Client.Filestorage.CategoriesEnum.Ats, + /// }, /// } /// ); /// diff --git a/src/Merge.Client/Filestorage/Passthrough/PassthroughClient.cs b/src/Merge.Client/Filestorage/Passthrough/PassthroughClient.cs index 0f6ca000..258aed28 100644 --- a/src/Merge.Client/Filestorage/Passthrough/PassthroughClient.cs +++ b/src/Merge.Client/Filestorage/Passthrough/PassthroughClient.cs @@ -22,7 +22,11 @@ internal PassthroughClient(RawClient client) /// /// /// await client.Filestorage.Passthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Filestorage.DataPassthroughRequest + /// { + /// Method = Merge.Client.Filestorage.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Filestorage/Scopes/ScopesClient.cs b/src/Merge.Client/Filestorage/Scopes/ScopesClient.cs index f5e9155c..3a2e41ba 100644 --- a/src/Merge.Client/Filestorage/Scopes/ScopesClient.cs +++ b/src/Merge.Client/Filestorage/Scopes/ScopesClient.cs @@ -110,35 +110,51 @@ public async Task LinkedAccountScopesRetrieveAsync( /// await client.Filestorage.Scopes.LinkedAccountScopesCreateAsync( /// new LinkedAccountCommonModelScopeDeserializerRequest /// { - /// CommonModels = new List() - /// { - /// new IndividualCommonModelScopeDeserializerRequest + /// CommonModels = + /// new List() /// { - /// ModelName = "Employee", - /// ModelPermissions = new Dictionary() + /// new Merge.Client.Filestorage.IndividualCommonModelScopeDeserializerRequest /// { + /// ModelName = "Employee", + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Filestorage.ModelPermissionDeserializerRequest + /// >() /// { - /// "READ", - /// new ModelPermissionDeserializerRequest { IsEnabled = true } - /// }, - /// { - /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// { + /// "READ", + /// new Merge.Client.Filestorage.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = true, + /// } + /// }, + /// { + /// "WRITE", + /// new Merge.Client.Filestorage.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } + /// }, /// }, /// }, - /// }, - /// new IndividualCommonModelScopeDeserializerRequest - /// { - /// ModelName = "Benefit", - /// ModelPermissions = new Dictionary() + /// new Merge.Client.Filestorage.IndividualCommonModelScopeDeserializerRequest /// { + /// ModelName = "Benefit", + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Filestorage.ModelPermissionDeserializerRequest + /// >() /// { - /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// { + /// "WRITE", + /// new Merge.Client.Filestorage.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } + /// }, /// }, /// }, /// }, - /// }, /// } /// ); /// diff --git a/src/Merge.Client/Filestorage/Types/File.cs b/src/Merge.Client/Filestorage/Types/File.cs index 62553c34..513db594 100644 --- a/src/Merge.Client/Filestorage/Types/File.cs +++ b/src/Merge.Client/Filestorage/Types/File.cs @@ -69,18 +69,12 @@ public record File /// The folder that the file belongs to. /// [JsonPropertyName("folder")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Folder { get; set; } /// /// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. /// [JsonPropertyName("permissions")] - [JsonConverter( - typeof(OneOfSerializer< - OneOf>> - >) - )] public OneOf< string, PermissionRequest, @@ -91,7 +85,6 @@ public OneOf< /// The drive that the file belongs to. /// [JsonPropertyName("drive")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Drive { get; set; } /// diff --git a/src/Merge.Client/Filestorage/Types/FileRequest.cs b/src/Merge.Client/Filestorage/Types/FileRequest.cs index 3eb0a96e..1997fd7d 100644 --- a/src/Merge.Client/Filestorage/Types/FileRequest.cs +++ b/src/Merge.Client/Filestorage/Types/FileRequest.cs @@ -48,18 +48,12 @@ public record FileRequest /// The folder that the file belongs to. /// [JsonPropertyName("folder")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Folder { get; set; } /// /// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. /// [JsonPropertyName("permissions")] - [JsonConverter( - typeof(OneOfSerializer< - OneOf>> - >) - )] public OneOf< string, PermissionRequest, @@ -70,7 +64,6 @@ public OneOf< /// The drive that the file belongs to. /// [JsonPropertyName("drive")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Drive { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Filestorage/Types/Folder.cs b/src/Merge.Client/Filestorage/Types/Folder.cs index 5182de94..95bf60fd 100644 --- a/src/Merge.Client/Filestorage/Types/Folder.cs +++ b/src/Merge.Client/Filestorage/Types/Folder.cs @@ -57,25 +57,18 @@ public record Folder /// The folder that the folder belongs to. /// [JsonPropertyName("parent_folder")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ParentFolder { get; set; } /// /// The drive that the folder belongs to. /// [JsonPropertyName("drive")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Drive { get; set; } /// /// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. /// [JsonPropertyName("permissions")] - [JsonConverter( - typeof(OneOfSerializer< - OneOf>> - >) - )] public OneOf< string, PermissionRequest, diff --git a/src/Merge.Client/Filestorage/Types/FolderRequest.cs b/src/Merge.Client/Filestorage/Types/FolderRequest.cs index 138f6a22..af0799d5 100644 --- a/src/Merge.Client/Filestorage/Types/FolderRequest.cs +++ b/src/Merge.Client/Filestorage/Types/FolderRequest.cs @@ -36,25 +36,18 @@ public record FolderRequest /// The folder that the folder belongs to. /// [JsonPropertyName("parent_folder")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ParentFolder { get; set; } /// /// The drive that the folder belongs to. /// [JsonPropertyName("drive")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Drive { get; set; } /// /// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. /// [JsonPropertyName("permissions")] - [JsonConverter( - typeof(OneOfSerializer< - OneOf>> - >) - )] public OneOf< string, PermissionRequest, diff --git a/src/Merge.Client/Filestorage/Types/Permission.cs b/src/Merge.Client/Filestorage/Types/Permission.cs index da672e35..1c0c9870 100644 --- a/src/Merge.Client/Filestorage/Types/Permission.cs +++ b/src/Merge.Client/Filestorage/Types/Permission.cs @@ -33,14 +33,12 @@ public record Permission /// The user that is granted this permission. /// [JsonPropertyName("user")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? User { get; set; } /// /// The group that is granted this permission. /// [JsonPropertyName("group")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Group { get; set; } /// diff --git a/src/Merge.Client/Filestorage/Types/PermissionRequest.cs b/src/Merge.Client/Filestorage/Types/PermissionRequest.cs index 73deb972..17b328d8 100644 --- a/src/Merge.Client/Filestorage/Types/PermissionRequest.cs +++ b/src/Merge.Client/Filestorage/Types/PermissionRequest.cs @@ -18,14 +18,12 @@ public record PermissionRequest /// The user that is granted this permission. /// [JsonPropertyName("user")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? User { get; set; } /// /// The group that is granted this permission. /// [JsonPropertyName("group")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Group { get; set; } /// diff --git a/src/Merge.Client/Filestorage/Types/RemoteFieldApi.cs b/src/Merge.Client/Filestorage/Types/RemoteFieldApi.cs index b4fbab4e..55ebd126 100644 --- a/src/Merge.Client/Filestorage/Types/RemoteFieldApi.cs +++ b/src/Merge.Client/Filestorage/Types/RemoteFieldApi.cs @@ -24,7 +24,6 @@ public record RemoteFieldApi public AdvancedMetadata? AdvancedMetadata { get; set; } [JsonPropertyName("coverage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Coverage { get; set; } public override string ToString() diff --git a/src/Merge.Client/Hris/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Hris/AsyncPassthrough/AsyncPassthroughClient.cs index e65b6a7c..3eb63875 100644 --- a/src/Merge.Client/Hris/AsyncPassthrough/AsyncPassthroughClient.cs +++ b/src/Merge.Client/Hris/AsyncPassthrough/AsyncPassthroughClient.cs @@ -22,7 +22,11 @@ internal AsyncPassthroughClient(RawClient client) /// /// /// await client.Hris.AsyncPassthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Hris.DataPassthroughRequest + /// { + /// Method = Merge.Client.Hris.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Hris/Employees/EmployeesClient.cs b/src/Merge.Client/Hris/Employees/EmployeesClient.cs index bd260a60..724fbbfa 100644 --- a/src/Merge.Client/Hris/Employees/EmployeesClient.cs +++ b/src/Merge.Client/Hris/Employees/EmployeesClient.cs @@ -334,7 +334,10 @@ public async Task RetrieveAsync( /// /// await client.Hris.Employees.IgnoreCreateAsync( /// "model_id", - /// new IgnoreCommonModelRequest { Reason = ReasonEnum.GeneralCustomerRequest } + /// new Merge.Client.Hris.IgnoreCommonModelRequest + /// { + /// Reason = Merge.Client.Hris.ReasonEnum.GeneralCustomerRequest, + /// } /// ); /// /// diff --git a/src/Merge.Client/Hris/LinkToken/LinkTokenClient.cs b/src/Merge.Client/Hris/LinkToken/LinkTokenClient.cs index 3d0fe2c9..6a4a8c30 100644 --- a/src/Merge.Client/Hris/LinkToken/LinkTokenClient.cs +++ b/src/Merge.Client/Hris/LinkToken/LinkTokenClient.cs @@ -27,7 +27,11 @@ internal LinkTokenClient(RawClient client) /// EndUserEmailAddress = "example@gmail.com", /// EndUserOrganizationName = "Test Organization", /// EndUserOriginId = "12345", - /// Categories = new List() { CategoriesEnum.Hris, CategoriesEnum.Ats }, + /// Categories = new List() + /// { + /// Merge.Client.Hris.CategoriesEnum.Hris, + /// Merge.Client.Hris.CategoriesEnum.Ats, + /// }, /// } /// ); /// diff --git a/src/Merge.Client/Hris/Passthrough/PassthroughClient.cs b/src/Merge.Client/Hris/Passthrough/PassthroughClient.cs index c6b68040..77eddea7 100644 --- a/src/Merge.Client/Hris/Passthrough/PassthroughClient.cs +++ b/src/Merge.Client/Hris/Passthrough/PassthroughClient.cs @@ -22,7 +22,11 @@ internal PassthroughClient(RawClient client) /// /// /// await client.Hris.Passthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Hris.DataPassthroughRequest + /// { + /// Method = Merge.Client.Hris.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Hris/Scopes/ScopesClient.cs b/src/Merge.Client/Hris/Scopes/ScopesClient.cs index 1ccd4ea9..4ad50672 100644 --- a/src/Merge.Client/Hris/Scopes/ScopesClient.cs +++ b/src/Merge.Client/Hris/Scopes/ScopesClient.cs @@ -110,31 +110,46 @@ public async Task LinkedAccountScopesRetrieveAsync( /// await client.Hris.Scopes.LinkedAccountScopesCreateAsync( /// new LinkedAccountCommonModelScopeDeserializerRequest /// { - /// CommonModels = new List() + /// CommonModels = new List() /// { - /// new IndividualCommonModelScopeDeserializerRequest + /// new Merge.Client.Hris.IndividualCommonModelScopeDeserializerRequest /// { /// ModelName = "Employee", - /// ModelPermissions = new Dictionary() + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Hris.ModelPermissionDeserializerRequest + /// >() /// { /// { /// "READ", - /// new ModelPermissionDeserializerRequest { IsEnabled = true } + /// new Merge.Client.Hris.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = true, + /// } /// }, /// { /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// new Merge.Client.Hris.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } /// }, /// }, /// }, - /// new IndividualCommonModelScopeDeserializerRequest + /// new Merge.Client.Hris.IndividualCommonModelScopeDeserializerRequest /// { /// ModelName = "Benefit", - /// ModelPermissions = new Dictionary() + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Hris.ModelPermissionDeserializerRequest + /// >() /// { /// { /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// new Merge.Client.Hris.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } /// }, /// }, /// }, diff --git a/src/Merge.Client/Hris/Types/BankInfo.cs b/src/Merge.Client/Hris/Types/BankInfo.cs index a11a2897..8cc812a8 100644 --- a/src/Merge.Client/Hris/Types/BankInfo.cs +++ b/src/Merge.Client/Hris/Types/BankInfo.cs @@ -33,7 +33,6 @@ public record BankInfo /// The employee with this bank account. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/Benefit.cs b/src/Merge.Client/Hris/Types/Benefit.cs index 7adf1e49..34076d34 100644 --- a/src/Merge.Client/Hris/Types/Benefit.cs +++ b/src/Merge.Client/Hris/Types/Benefit.cs @@ -33,7 +33,6 @@ public record Benefit /// The employee on the plan. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/Employee.cs b/src/Merge.Client/Hris/Types/Employee.cs index 4202c11b..c04da06a 100644 --- a/src/Merge.Client/Hris/Types/Employee.cs +++ b/src/Merge.Client/Hris/Types/Employee.cs @@ -39,7 +39,6 @@ public record Employee /// The ID of the employee's company. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -73,12 +72,6 @@ public record Employee public string? Username { get; set; } [JsonPropertyName("groups")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Groups { get; set; } /// @@ -103,47 +96,36 @@ public record Employee /// Array of `Employment` IDs for this Employee. /// [JsonPropertyName("employments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Employments { get; set; } /// /// The employee's home address. /// [JsonPropertyName("home_location")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? HomeLocation { get; set; } /// /// The employee's work address. /// [JsonPropertyName("work_location")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? WorkLocation { get; set; } /// /// The employee ID of the employee's manager. /// [JsonPropertyName("manager")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Manager { get; set; } /// /// The employee's team. /// [JsonPropertyName("team")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Team { get; set; } /// /// The employee's pay group /// [JsonPropertyName("pay_group")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? PayGroup { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/EmployeePayrollRun.cs b/src/Merge.Client/Hris/Types/EmployeePayrollRun.cs index ee6b8e58..d2bf2ce2 100644 --- a/src/Merge.Client/Hris/Types/EmployeePayrollRun.cs +++ b/src/Merge.Client/Hris/Types/EmployeePayrollRun.cs @@ -33,14 +33,12 @@ public record EmployeePayrollRun /// The employee whose payroll is being run. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// /// The payroll being run. /// [JsonPropertyName("payroll_run")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? PayrollRun { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/EmployeeRequest.cs b/src/Merge.Client/Hris/Types/EmployeeRequest.cs index 3e06c359..32fccd49 100644 --- a/src/Merge.Client/Hris/Types/EmployeeRequest.cs +++ b/src/Merge.Client/Hris/Types/EmployeeRequest.cs @@ -18,7 +18,6 @@ public record EmployeeRequest /// The ID of the employee's company. /// [JsonPropertyName("company")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Company { get; set; } /// @@ -52,12 +51,6 @@ public record EmployeeRequest public string? Username { get; set; } [JsonPropertyName("groups")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Groups { get; set; } /// @@ -82,47 +75,36 @@ public record EmployeeRequest /// Array of `Employment` IDs for this Employee. /// [JsonPropertyName("employments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Employments { get; set; } /// /// The employee's home address. /// [JsonPropertyName("home_location")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? HomeLocation { get; set; } /// /// The employee's work address. /// [JsonPropertyName("work_location")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? WorkLocation { get; set; } /// /// The employee ID of the employee's manager. /// [JsonPropertyName("manager")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Manager { get; set; } /// /// The employee's team. /// [JsonPropertyName("team")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Team { get; set; } /// /// The employee's pay group /// [JsonPropertyName("pay_group")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? PayGroup { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/Employment.cs b/src/Merge.Client/Hris/Types/Employment.cs index 2533f72d..e0c8c79f 100644 --- a/src/Merge.Client/Hris/Types/Employment.cs +++ b/src/Merge.Client/Hris/Types/Employment.cs @@ -33,7 +33,6 @@ public record Employment /// The employee holding this position. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// @@ -397,7 +396,6 @@ public record Employment /// The employment's pay group /// [JsonPropertyName("pay_group")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? PayGroup { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/RemoteFieldApi.cs b/src/Merge.Client/Hris/Types/RemoteFieldApi.cs index 9012d1cf..5f10f7ba 100644 --- a/src/Merge.Client/Hris/Types/RemoteFieldApi.cs +++ b/src/Merge.Client/Hris/Types/RemoteFieldApi.cs @@ -24,7 +24,6 @@ public record RemoteFieldApi public AdvancedMetadata? AdvancedMetadata { get; set; } [JsonPropertyName("coverage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Coverage { get; set; } public override string ToString() diff --git a/src/Merge.Client/Hris/Types/Team.cs b/src/Merge.Client/Hris/Types/Team.cs index aba1a01d..bab5e084 100644 --- a/src/Merge.Client/Hris/Types/Team.cs +++ b/src/Merge.Client/Hris/Types/Team.cs @@ -39,7 +39,6 @@ public record Team /// The team's parent team. /// [JsonPropertyName("parent_team")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ParentTeam { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/TimeOff.cs b/src/Merge.Client/Hris/Types/TimeOff.cs index dadd37f2..74ce8c3c 100644 --- a/src/Merge.Client/Hris/Types/TimeOff.cs +++ b/src/Merge.Client/Hris/Types/TimeOff.cs @@ -33,14 +33,12 @@ public record TimeOff /// The employee requesting time off. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// /// The Merge ID of the employee with the ability to approve the time off request. /// [JsonPropertyName("approver")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Approver { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/TimeOffBalance.cs b/src/Merge.Client/Hris/Types/TimeOffBalance.cs index 8c9447aa..46cf2dca 100644 --- a/src/Merge.Client/Hris/Types/TimeOffBalance.cs +++ b/src/Merge.Client/Hris/Types/TimeOffBalance.cs @@ -33,7 +33,6 @@ public record TimeOffBalance /// The employee the balance belongs to. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// diff --git a/src/Merge.Client/Hris/Types/TimeOffRequest.cs b/src/Merge.Client/Hris/Types/TimeOffRequest.cs index f528aae1..21bfafe0 100644 --- a/src/Merge.Client/Hris/Types/TimeOffRequest.cs +++ b/src/Merge.Client/Hris/Types/TimeOffRequest.cs @@ -12,14 +12,12 @@ public record TimeOffRequest /// The employee requesting time off. /// [JsonPropertyName("employee")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Employee { get; set; } /// /// The Merge ID of the employee with the ability to approve the time off request. /// [JsonPropertyName("approver")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Approver { get; set; } /// diff --git a/src/Merge.Client/Merge.Client.csproj b/src/Merge.Client/Merge.Client.csproj index a3c07a60..6445c840 100644 --- a/src/Merge.Client/Merge.Client.csproj +++ b/src/Merge.Client/Merge.Client.csproj @@ -7,7 +7,7 @@ false 12 enable - 0.2.1 + 0.2.2 README.md LICENSE https://github.com/merge-api/merge-csharp-client diff --git a/src/Merge.Client/Merge.cs b/src/Merge.Client/Merge.cs index 8bab0c13..6e790cf6 100644 --- a/src/Merge.Client/Merge.cs +++ b/src/Merge.Client/Merge.cs @@ -27,8 +27,8 @@ public Merge( { "X-Account-Token", accountToken }, { "X-Fern-Language", "C#" }, { "X-Fern-SDK-Name", "Merge.Client" }, - { "X-Fern-SDK-Version", "0.2.1" }, - { "User-Agent", "Merge.Client/0.2.1" }, + { "X-Fern-SDK-Version", Version.Current }, + { "User-Agent", "Merge.Client/0.2.2" }, } ); clientOptions ??= new ClientOptions(); @@ -40,20 +40,20 @@ public Merge( } } _client = new RawClient(clientOptions); - Filestorage = new FilestorageClient(_client); Ats = new AtsClient(_client); Crm = new CrmClient(_client); + Filestorage = new FilestorageClient(_client); Hris = new HrisClient(_client); Ticketing = new TicketingClient(_client); Accounting = new AccountingClient(_client); } - public FilestorageClient Filestorage { get; init; } - public AtsClient Ats { get; init; } public CrmClient Crm { get; init; } + public FilestorageClient Filestorage { get; init; } + public HrisClient Hris { get; init; } public TicketingClient Ticketing { get; init; } diff --git a/src/Merge.Client/Ticketing/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Ticketing/AsyncPassthrough/AsyncPassthroughClient.cs index 34521d60..2238889c 100644 --- a/src/Merge.Client/Ticketing/AsyncPassthrough/AsyncPassthroughClient.cs +++ b/src/Merge.Client/Ticketing/AsyncPassthrough/AsyncPassthroughClient.cs @@ -22,7 +22,11 @@ internal AsyncPassthroughClient(RawClient client) /// /// /// await client.Ticketing.AsyncPassthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Ticketing.DataPassthroughRequest + /// { + /// Method = Merge.Client.Ticketing.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Ticketing/Attachments/AttachmentsClient.cs b/src/Merge.Client/Ticketing/Attachments/AttachmentsClient.cs index 054ceb35..23443c84 100644 --- a/src/Merge.Client/Ticketing/Attachments/AttachmentsClient.cs +++ b/src/Merge.Client/Ticketing/Attachments/AttachmentsClient.cs @@ -124,7 +124,10 @@ public async Task ListAsync( /// /// /// await client.Ticketing.Attachments.CreateAsync( - /// new TicketingAttachmentEndpointRequest { Model = new AttachmentRequest() } + /// new TicketingAttachmentEndpointRequest + /// { + /// Model = new Merge.Client.Ticketing.AttachmentRequest(), + /// } /// ); /// /// diff --git a/src/Merge.Client/Ticketing/Contacts/ContactsClient.cs b/src/Merge.Client/Ticketing/Contacts/ContactsClient.cs index 50c1612c..a043cea0 100644 --- a/src/Merge.Client/Ticketing/Contacts/ContactsClient.cs +++ b/src/Merge.Client/Ticketing/Contacts/ContactsClient.cs @@ -114,7 +114,7 @@ public async Task ListAsync( /// /// /// await client.Ticketing.Contacts.CreateAsync( - /// new TicketingContactEndpointRequest { Model = new ContactRequest() } + /// new TicketingContactEndpointRequest { Model = new Merge.Client.Ticketing.ContactRequest() } /// ); /// /// diff --git a/src/Merge.Client/Ticketing/LinkToken/LinkTokenClient.cs b/src/Merge.Client/Ticketing/LinkToken/LinkTokenClient.cs index 6241654c..d7091687 100644 --- a/src/Merge.Client/Ticketing/LinkToken/LinkTokenClient.cs +++ b/src/Merge.Client/Ticketing/LinkToken/LinkTokenClient.cs @@ -27,7 +27,11 @@ internal LinkTokenClient(RawClient client) /// EndUserEmailAddress = "example@gmail.com", /// EndUserOrganizationName = "Test Organization", /// EndUserOriginId = "12345", - /// Categories = new List() { CategoriesEnum.Hris, CategoriesEnum.Ats }, + /// Categories = new List() + /// { + /// Merge.Client.Ticketing.CategoriesEnum.Hris, + /// Merge.Client.Ticketing.CategoriesEnum.Ats, + /// }, /// } /// ); /// diff --git a/src/Merge.Client/Ticketing/Passthrough/PassthroughClient.cs b/src/Merge.Client/Ticketing/Passthrough/PassthroughClient.cs index 9633e506..6102777e 100644 --- a/src/Merge.Client/Ticketing/Passthrough/PassthroughClient.cs +++ b/src/Merge.Client/Ticketing/Passthrough/PassthroughClient.cs @@ -22,7 +22,11 @@ internal PassthroughClient(RawClient client) /// /// /// await client.Ticketing.Passthrough.CreateAsync( - /// new DataPassthroughRequest { Method = MethodEnum.Get, Path = "/scooters" } + /// new Merge.Client.Ticketing.DataPassthroughRequest + /// { + /// Method = Merge.Client.Ticketing.MethodEnum.Get, + /// Path = "/scooters", + /// } /// ); /// /// diff --git a/src/Merge.Client/Ticketing/Scopes/ScopesClient.cs b/src/Merge.Client/Ticketing/Scopes/ScopesClient.cs index 374dead4..7cacdcb0 100644 --- a/src/Merge.Client/Ticketing/Scopes/ScopesClient.cs +++ b/src/Merge.Client/Ticketing/Scopes/ScopesClient.cs @@ -110,35 +110,51 @@ public async Task LinkedAccountScopesRetrieveAsync( /// await client.Ticketing.Scopes.LinkedAccountScopesCreateAsync( /// new LinkedAccountCommonModelScopeDeserializerRequest /// { - /// CommonModels = new List() - /// { - /// new IndividualCommonModelScopeDeserializerRequest + /// CommonModels = + /// new List() /// { - /// ModelName = "Employee", - /// ModelPermissions = new Dictionary() + /// new Merge.Client.Ticketing.IndividualCommonModelScopeDeserializerRequest /// { + /// ModelName = "Employee", + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Ticketing.ModelPermissionDeserializerRequest + /// >() /// { - /// "READ", - /// new ModelPermissionDeserializerRequest { IsEnabled = true } - /// }, - /// { - /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// { + /// "READ", + /// new Merge.Client.Ticketing.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = true, + /// } + /// }, + /// { + /// "WRITE", + /// new Merge.Client.Ticketing.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } + /// }, /// }, /// }, - /// }, - /// new IndividualCommonModelScopeDeserializerRequest - /// { - /// ModelName = "Benefit", - /// ModelPermissions = new Dictionary() + /// new Merge.Client.Ticketing.IndividualCommonModelScopeDeserializerRequest /// { + /// ModelName = "Benefit", + /// ModelPermissions = new Dictionary< + /// string, + /// Merge.Client.Ticketing.ModelPermissionDeserializerRequest + /// >() /// { - /// "WRITE", - /// new ModelPermissionDeserializerRequest { IsEnabled = false } + /// { + /// "WRITE", + /// new Merge.Client.Ticketing.ModelPermissionDeserializerRequest + /// { + /// IsEnabled = false, + /// } + /// }, /// }, /// }, /// }, - /// }, /// } /// ); /// diff --git a/src/Merge.Client/Ticketing/Types/Attachment.cs b/src/Merge.Client/Ticketing/Types/Attachment.cs index 50494fb9..368ad7a4 100644 --- a/src/Merge.Client/Ticketing/Types/Attachment.cs +++ b/src/Merge.Client/Ticketing/Types/Attachment.cs @@ -39,7 +39,6 @@ public record Attachment /// The ticket associated with the attachment. /// [JsonPropertyName("ticket")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Ticket { get; set; } /// diff --git a/src/Merge.Client/Ticketing/Types/AttachmentRequest.cs b/src/Merge.Client/Ticketing/Types/AttachmentRequest.cs index 00b4fc09..9bf6ea07 100644 --- a/src/Merge.Client/Ticketing/Types/AttachmentRequest.cs +++ b/src/Merge.Client/Ticketing/Types/AttachmentRequest.cs @@ -18,7 +18,6 @@ public record AttachmentRequest /// The ticket associated with the attachment. /// [JsonPropertyName("ticket")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Ticket { get; set; } /// diff --git a/src/Merge.Client/Ticketing/Types/Collection.cs b/src/Merge.Client/Ticketing/Types/Collection.cs index 2536c69a..60498b25 100644 --- a/src/Merge.Client/Ticketing/Types/Collection.cs +++ b/src/Merge.Client/Ticketing/Types/Collection.cs @@ -54,7 +54,6 @@ public record Collection /// The parent collection for this collection. /// [JsonPropertyName("parent_collection")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ParentCollection { get; set; } /// diff --git a/src/Merge.Client/Ticketing/Types/Comment.cs b/src/Merge.Client/Ticketing/Types/Comment.cs index e9b52c0d..3dc8efde 100644 --- a/src/Merge.Client/Ticketing/Types/Comment.cs +++ b/src/Merge.Client/Ticketing/Types/Comment.cs @@ -33,14 +33,12 @@ public record Comment /// The author of the Comment, if the author is a User. /// [JsonPropertyName("user")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? User { get; set; } /// /// The author of the Comment, if the author is a Contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -59,7 +57,6 @@ public record Comment /// The ticket associated with the comment. /// [JsonPropertyName("ticket")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Ticket { get; set; } /// diff --git a/src/Merge.Client/Ticketing/Types/CommentRequest.cs b/src/Merge.Client/Ticketing/Types/CommentRequest.cs index 238cd545..e71bcc6d 100644 --- a/src/Merge.Client/Ticketing/Types/CommentRequest.cs +++ b/src/Merge.Client/Ticketing/Types/CommentRequest.cs @@ -12,14 +12,12 @@ public record CommentRequest /// The author of the Comment, if the author is a User. /// [JsonPropertyName("user")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? User { get; set; } /// /// The author of the Comment, if the author is a Contact. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// @@ -38,7 +36,6 @@ public record CommentRequest /// The ticket associated with the comment. /// [JsonPropertyName("ticket")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Ticket { get; set; } /// diff --git a/src/Merge.Client/Ticketing/Types/Contact.cs b/src/Merge.Client/Ticketing/Types/Contact.cs index 0498f087..c9251c3f 100644 --- a/src/Merge.Client/Ticketing/Types/Contact.cs +++ b/src/Merge.Client/Ticketing/Types/Contact.cs @@ -57,7 +57,6 @@ public record Contact /// The contact's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// diff --git a/src/Merge.Client/Ticketing/Types/ContactRequest.cs b/src/Merge.Client/Ticketing/Types/ContactRequest.cs index c5d80165..8328af3b 100644 --- a/src/Merge.Client/Ticketing/Types/ContactRequest.cs +++ b/src/Merge.Client/Ticketing/Types/ContactRequest.cs @@ -36,7 +36,6 @@ public record ContactRequest /// The contact's account. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } [JsonPropertyName("integration_params")] diff --git a/src/Merge.Client/Ticketing/Types/RemoteField.cs b/src/Merge.Client/Ticketing/Types/RemoteField.cs index c793063b..7192887a 100644 --- a/src/Merge.Client/Ticketing/Types/RemoteField.cs +++ b/src/Merge.Client/Ticketing/Types/RemoteField.cs @@ -9,7 +9,6 @@ namespace Merge.Client.Ticketing; public record RemoteField { [JsonPropertyName("remote_field_class")] - [JsonConverter(typeof(OneOfSerializer>))] public required OneOf RemoteFieldClass { get; set; } [JsonPropertyName("value")] diff --git a/src/Merge.Client/Ticketing/Types/RemoteFieldApi.cs b/src/Merge.Client/Ticketing/Types/RemoteFieldApi.cs index 83409e09..35766fc7 100644 --- a/src/Merge.Client/Ticketing/Types/RemoteFieldApi.cs +++ b/src/Merge.Client/Ticketing/Types/RemoteFieldApi.cs @@ -24,7 +24,6 @@ public record RemoteFieldApi public AdvancedMetadata? AdvancedMetadata { get; set; } [JsonPropertyName("coverage")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Coverage { get; set; } public override string ToString() diff --git a/src/Merge.Client/Ticketing/Types/RemoteFieldRequest.cs b/src/Merge.Client/Ticketing/Types/RemoteFieldRequest.cs index 6740ef30..a2d946be 100644 --- a/src/Merge.Client/Ticketing/Types/RemoteFieldRequest.cs +++ b/src/Merge.Client/Ticketing/Types/RemoteFieldRequest.cs @@ -9,7 +9,6 @@ namespace Merge.Client.Ticketing; public record RemoteFieldRequest { [JsonPropertyName("remote_field_class")] - [JsonConverter(typeof(OneOfSerializer>))] public required OneOf RemoteFieldClass { get; set; } [JsonPropertyName("value")] diff --git a/src/Merge.Client/Ticketing/Types/Ticket.cs b/src/Merge.Client/Ticketing/Types/Ticket.cs index ebab03ce..4564e8de 100644 --- a/src/Merge.Client/Ticketing/Types/Ticket.cs +++ b/src/Merge.Client/Ticketing/Types/Ticket.cs @@ -36,16 +36,12 @@ public record Ticket public string? Name { get; set; } [JsonPropertyName("assignees")] - [JsonConverter( - typeof(CollectionItemSerializer, OneOfSerializer>>) - )] public IEnumerable>? Assignees { get; set; } /// /// The user who created this ticket. /// [JsonPropertyName("creator")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Creator { get; set; } /// @@ -72,12 +68,6 @@ public record Ticket public string? Description { get; set; } [JsonPropertyName("collections")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Collections { get; set; } /// @@ -90,30 +80,21 @@ public record Ticket /// The account associated with the ticket. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The contact associated with the ticket. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The ticket's parent ticket. /// [JsonPropertyName("parent_ticket")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ParentTicket { get; set; } [JsonPropertyName("attachments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Attachments { get; set; } [JsonPropertyName("tags")] diff --git a/src/Merge.Client/Ticketing/Types/TicketRequest.cs b/src/Merge.Client/Ticketing/Types/TicketRequest.cs index 1ac3dc67..6662ed20 100644 --- a/src/Merge.Client/Ticketing/Types/TicketRequest.cs +++ b/src/Merge.Client/Ticketing/Types/TicketRequest.cs @@ -15,16 +15,12 @@ public record TicketRequest public string? Name { get; set; } [JsonPropertyName("assignees")] - [JsonConverter( - typeof(CollectionItemSerializer, OneOfSerializer>>) - )] public IEnumerable>? Assignees { get; set; } /// /// The user who created this ticket. /// [JsonPropertyName("creator")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Creator { get; set; } /// @@ -51,12 +47,6 @@ public record TicketRequest public string? Description { get; set; } [JsonPropertyName("collections")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Collections { get; set; } /// @@ -69,30 +59,21 @@ public record TicketRequest /// The account associated with the ticket. /// [JsonPropertyName("account")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Account { get; set; } /// /// The contact associated with the ticket. /// [JsonPropertyName("contact")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? Contact { get; set; } /// /// The ticket's parent ticket. /// [JsonPropertyName("parent_ticket")] - [JsonConverter(typeof(OneOfSerializer>))] public OneOf? ParentTicket { get; set; } [JsonPropertyName("attachments")] - [JsonConverter( - typeof(CollectionItemSerializer< - OneOf, - OneOfSerializer> - >) - )] public IEnumerable>? Attachments { get; set; } [JsonPropertyName("tags")] diff --git a/src/Merge.Client/Ticketing/Types/User.cs b/src/Merge.Client/Ticketing/Types/User.cs index b4a865c4..72601695 100644 --- a/src/Merge.Client/Ticketing/Types/User.cs +++ b/src/Merge.Client/Ticketing/Types/User.cs @@ -48,15 +48,9 @@ public record User public bool? IsActive { get; set; } [JsonPropertyName("teams")] - [JsonConverter( - typeof(CollectionItemSerializer, OneOfSerializer>>) - )] public IEnumerable>? Teams { get; set; } [JsonPropertyName("roles")] - [JsonConverter( - typeof(CollectionItemSerializer, OneOfSerializer>>) - )] public IEnumerable>? Roles { get; set; } ///