diff --git a/.gitignore b/.gitignore
index 5e57f180..11014f2b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,484 +1,484 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from `dotnet new gitignore`
-
-# dotenv files
-.env
-
-# User-specific files
-*.rsuser
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Mono auto generated files
-mono_crash.*
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-[Ww][Ii][Nn]32/
-[Aa][Rr][Mm]/
-[Aa][Rr][Mm]64/
-bld/
-[Bb]in/
-[Oo]bj/
-[Ll]og/
-[Ll]ogs/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUnit
-*.VisualState.xml
-TestResult.xml
-nunit-*.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET
-project.lock.json
-project.fragment.lock.json
-artifacts/
-
-# Tye
-.tye/
-
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_h.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*_wpftmp.csproj
-*.log
-*.tlog
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio 6 auto-generated project file (contains which files were open etc.)
-*.vbp
-
-# Visual Studio 6 workspace and project file (working project files containing files to include in project)
-*.dsw
-*.dsp
-
-# Visual Studio 6 technical files
-*.ncb
-*.aps
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# Visual Studio History (VSHistory) files
-.vshistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
-
-# VS Code files for those working on multiple tools
-.vscode/*
-!.vscode/settings.json
-!.vscode/tasks.json
-!.vscode/launch.json
-!.vscode/extensions.json
-*.code-workspace
-
-# Local History for Visual Studio Code
-.history/
-
-# Windows Installer files from build outputs
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# JetBrains Rider
-*.sln.iml
-.idea
-
-##
-## Visual studio for Mac
-##
-
-
-# globs
-Makefile.in
-*.userprefs
-*.usertasks
-config.make
-config.status
-aclocal.m4
-install-sh
-autom4te.cache/
-*.tar.gz
-tarballs/
-test-results/
-
-# Mac bundle stuff
-*.dmg
-*.app
-
-# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
-# General
-.DS_Store
-.AppleDouble
-.LSOverride
-
-# Icon must end with two \r
-Icon
-
-
-# Thumbnails
-._*
-
-# Files that might appear in the root of a volume
-.DocumentRevisions-V100
-.fseventsd
-.Spotlight-V100
-.TemporaryItems
-.Trashes
-.VolumeIcon.icns
-.com.apple.timemachine.donotpresent
-
-# Directories potentially created on remote AFP share
-.AppleDB
-.AppleDesktop
-Network Trash Folder
-Temporary Items
-.apdisk
-
-# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
-# Windows thumbnail cache files
-Thumbs.db
-ehthumbs.db
-ehthumbs_vista.db
-
-# Dump file
-*.stackdump
-
-# Folder config file
-[Dd]esktop.ini
-
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
-
-# Windows Installer files
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
-
-# Windows shortcuts
-*.lnk
-
-# Vim temporary swap files
-*.swp
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+## This is based on `dotnet new gitignore` and customized by Fern
+
+# dotenv files
+.env
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+# [Rr]elease/ (Ignored by Fern)
+# [Rr]eleases/ (Ignored by Fern)
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+# [Ll]og/ (Ignored by Fern)
+# [Ll]ogs/ (Ignored by Fern)
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# Tye
+.tye/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.tlog
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio 6 auto-generated project file (contains which files were open etc.)
+*.vbp
+
+# Visual Studio 6 workspace and project file (working project files containing files to include in project)
+*.dsw
+*.dsp
+
+# Visual Studio 6 technical files
+*.ncb
+*.aps
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# Visual Studio History (VSHistory) files
+.vshistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
+
+# VS Code files for those working on multiple tools
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+*.code-workspace
+
+# Local History for Visual Studio Code
+.history/
+
+# Windows Installer files from build outputs
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# JetBrains Rider
+*.sln.iml
+.idea
+
+##
+## Visual studio for Mac
+##
+
+
+# globs
+Makefile.in
+*.userprefs
+*.usertasks
+config.make
+config.status
+aclocal.m4
+install-sh
+autom4te.cache/
+*.tar.gz
+tarballs/
+test-results/
+
+# Mac bundle stuff
+*.dmg
+*.app
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# Vim temporary swap files
+*.swp
diff --git a/reference.md b/reference.md
index d0c9749e..2bd76856 100644
--- a/reference.md
+++ b/reference.md
@@ -3370,4 +3370,8169 @@ await client.Ats.Offices.RetrieveAsync("id", new OfficesRetrieveRequest());
-
\ No newline at end of file
+
+
+
+## Ats Passthrough
+client.Ats.Passthrough.CreateAsync (Ats.DataPassthroughRequest { ... }) -> Ats.RemoteResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.Passthrough.CreateAsync(
+ new Merge.Client.Ats.DataPassthroughRequest
+ {
+ Method = Merge.Client.Ats.MethodEnum.Get,
+ Path = "/scooters",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `Ats.DataPassthroughRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats RegenerateKey
+client.Ats.RegenerateKey.CreateAsync (RemoteKeyForRegenerationRequest { ... }) -> Ats.RemoteKey
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Exchange remote keys.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.RegenerateKey.CreateAsync(
+ new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `RemoteKeyForRegenerationRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats RejectReasons
+client.Ats.RejectReasons.ListAsync (RejectReasonsListRequest { ... }) -> PaginatedRejectReasonList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RejectReason` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.RejectReasons.ListAsync(new RejectReasonsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `RejectReasonsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Ats.RejectReasons.RetrieveAsync (id, RejectReasonsRetrieveRequest { ... }) -> RejectReason
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `RejectReason` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.RejectReasons.RetrieveAsync("id", new RejectReasonsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `RejectReasonsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats Scorecards
+client.Ats.Scorecards.ListAsync (ScorecardsListRequest { ... }) -> PaginatedScorecardList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Scorecard` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.Scorecards.ListAsync(new ScorecardsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `ScorecardsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Ats.Scorecards.RetrieveAsync (id, ScorecardsRetrieveRequest { ... }) -> Scorecard
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Scorecard` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.Scorecards.RetrieveAsync("id", new ScorecardsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `ScorecardsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats SyncStatus
+client.Ats.SyncStatus.ListAsync (SyncStatusListRequest { ... }) -> Ats.PaginatedSyncStatusList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.SyncStatus.ListAsync(new SyncStatusListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `SyncStatusListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats ForceResync
+client.Ats.ForceResync.SyncStatusResyncCreateAsync () -> IEnumerable
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.ForceResync.SyncStatusResyncCreateAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Ats Tags
+client.Ats.Tags.ListAsync (TagsListRequest { ... }) -> Ats.PaginatedTagList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Tag` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.Tags.ListAsync(new TagsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `TagsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats Users
+client.Ats.Users.ListAsync (UsersListRequest { ... }) -> PaginatedRemoteUserList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteUser` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.Users.ListAsync(new UsersListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `UsersListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Ats.Users.RetrieveAsync (id, UsersRetrieveRequest { ... }) -> RemoteUser
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `RemoteUser` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.Users.RetrieveAsync("id", new UsersRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `UsersRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Ats WebhookReceivers
+client.Ats.WebhookReceivers.ListAsync () -> IEnumerable
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.WebhookReceivers.ListAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Ats.WebhookReceivers.CreateAsync (WebhookReceiverRequest { ... }) -> Ats.WebhookReceiver
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Ats.WebhookReceivers.CreateAsync(
+ new WebhookReceiverRequest { Event = "event", IsActive = true }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `WebhookReceiverRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm AccountDetails
+client.Crm.AccountDetails.RetrieveAsync () -> Crm.AccountDetails
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get details for a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AccountDetails.RetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Crm AccountToken
+client.Crm.AccountToken.RetrieveAsync (publicToken) -> Crm.AccountToken
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AccountToken.RetrieveAsync("public_token");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**publicToken:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Accounts
+client.Crm.Accounts.ListAsync (AccountsListRequest { ... }) -> Crm.PaginatedAccountList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Account` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.ListAsync(new AccountsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `AccountsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Accounts.CreateAsync (CrmAccountEndpointRequest { ... }) -> CrmAccountResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates an `Account` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.CreateAsync(
+ new CrmAccountEndpointRequest { Model = new Merge.Client.Crm.AccountRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `CrmAccountEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Accounts.RetrieveAsync (id, AccountsRetrieveRequest { ... }) -> Crm.Account
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns an `Account` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.RetrieveAsync("id", new AccountsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `AccountsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Accounts.PartialUpdateAsync (id, PatchedCrmAccountEndpointRequest { ... }) -> CrmAccountResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Updates an `Account` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.PartialUpdateAsync(
+ "id",
+ new PatchedCrmAccountEndpointRequest { Model = new PatchedAccountRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedCrmAccountEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Accounts.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `CRMAccount` PATCHs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.MetaPatchRetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Accounts.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `CRMAccount` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Accounts.RemoteFieldClassesListAsync (AccountsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Accounts.RemoteFieldClassesListAsync(new AccountsRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `AccountsRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm AsyncPassthrough
+client.Crm.AsyncPassthrough.CreateAsync (Crm.DataPassthroughRequest { ... }) -> Crm.AsyncPassthroughReciept
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AsyncPassthrough.CreateAsync(
+ new Merge.Client.Crm.DataPassthroughRequest
+ {
+ Method = Merge.Client.Crm.MethodEnum.Get,
+ Path = "/scooters",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `Crm.DataPassthroughRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.AsyncPassthrough.RetrieveAsync (asyncPassthroughReceiptId) -> OneOf
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**asyncPassthroughReceiptId:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Crm AuditTrail
+client.Crm.AuditTrail.ListAsync (AuditTrailListRequest { ... }) -> Crm.PaginatedAuditLogEventList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AuditTrail.ListAsync(new AuditTrailListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `AuditTrailListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm AvailableActions
+client.Crm.AvailableActions.RetrieveAsync () -> Crm.AvailableActions
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AvailableActions.RetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Crm Contacts
+client.Crm.Contacts.ListAsync (ContactsListRequest { ... }) -> Crm.PaginatedContactList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Contact` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.ListAsync(new ContactsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `ContactsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.CreateAsync (CrmContactEndpointRequest { ... }) -> CrmContactResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `Contact` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.CreateAsync(
+ new CrmContactEndpointRequest { Model = new Merge.Client.Crm.ContactRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `CrmContactEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.RetrieveAsync (id, ContactsRetrieveRequest { ... }) -> Crm.Contact
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Contact` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.RetrieveAsync("id", new ContactsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `ContactsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.PartialUpdateAsync (id, PatchedCrmContactEndpointRequest { ... }) -> CrmContactResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Updates a `Contact` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.PartialUpdateAsync(
+ "id",
+ new PatchedCrmContactEndpointRequest { Model = new PatchedContactRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedCrmContactEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.IgnoreCreateAsync (modelId, IgnoreCommonModelRequest { ... })
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.IgnoreCreateAsync(
+ "model_id",
+ new IgnoreCommonModelRequest { Reason = Merge.Client.Crm.ReasonEnum.GeneralCustomerRequest }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**modelId:** `string`
+
+
+
+
+
+
+
+**request:** `IgnoreCommonModelRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `CRMContact` PATCHs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.MetaPatchRetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `CRMContact` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Contacts.RemoteFieldClassesListAsync (ContactsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Contacts.RemoteFieldClassesListAsync(new ContactsRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `ContactsRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm CustomObjectClasses
+client.Crm.CustomObjectClasses.ListAsync (CustomObjectClassesListRequest { ... }) -> PaginatedCustomObjectClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `CustomObjectClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjectClasses.ListAsync(new CustomObjectClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.CustomObjectClasses.RetrieveAsync (id, CustomObjectClassesRetrieveRequest { ... }) -> CustomObjectClass
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `CustomObjectClass` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjectClasses.RetrieveAsync("id", new CustomObjectClassesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm AssociationTypes
+client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesListAsync (customObjectClassId, CustomObjectClassesAssociationTypesListRequest { ... }) -> PaginatedAssociationTypeList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `AssociationType` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesListAsync(
+ "custom_object_class_id",
+ new CustomObjectClassesAssociationTypesListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesAssociationTypesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesCreateAsync (customObjectClassId, CrmAssociationTypeEndpointRequest { ... }) -> CrmAssociationTypeResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates an `AssociationType` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesCreateAsync(
+ "custom_object_class_id",
+ new CrmAssociationTypeEndpointRequest
+ {
+ Model = new AssociationTypeRequestRequest
+ {
+ SourceObjectClass = new ObjectClassDescriptionRequest
+ {
+ Id = "id",
+ OriginType = OriginTypeEnum.CustomObject,
+ },
+ TargetObjectClasses = new List()
+ {
+ new ObjectClassDescriptionRequest
+ {
+ Id = "id",
+ OriginType = OriginTypeEnum.CustomObject,
+ },
+ },
+ RemoteKeyName = "remote_key_name",
+ },
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**request:** `CrmAssociationTypeEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesRetrieveAsync (customObjectClassId, id, CustomObjectClassesAssociationTypesRetrieveRequest { ... }) -> AssociationType
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns an `AssociationType` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesRetrieveAsync(
+ "custom_object_class_id",
+ "id",
+ new CustomObjectClassesAssociationTypesRetrieveRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesAssociationTypesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesMetaPostRetrieveAsync (customObjectClassId) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `CRMAssociationType` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.AssociationTypes.CustomObjectClassesAssociationTypesMetaPostRetrieveAsync(
+ "custom_object_class_id"
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Crm CustomObjects
+client.Crm.CustomObjects.CustomObjectClassesCustomObjectsListAsync (customObjectClassId, CustomObjectClassesCustomObjectsListRequest { ... }) -> PaginatedCustomObjectList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `CustomObject` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsListAsync(
+ "custom_object_class_id",
+ new CustomObjectClassesCustomObjectsListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesCustomObjectsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.CustomObjects.CustomObjectClassesCustomObjectsCreateAsync (customObjectClassId, CrmCustomObjectEndpointRequest { ... }) -> CrmCustomObjectResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `CustomObject` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsCreateAsync(
+ "custom_object_class_id",
+ new CrmCustomObjectEndpointRequest
+ {
+ Model = new CustomObjectRequest
+ {
+ Fields = new Dictionary() { { "test_field", "hello" } },
+ },
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**request:** `CrmCustomObjectEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRetrieveAsync (customObjectClassId, id, CustomObjectClassesCustomObjectsRetrieveRequest { ... }) -> CustomObject
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `CustomObject` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRetrieveAsync(
+ "custom_object_class_id",
+ "id",
+ new CustomObjectClassesCustomObjectsRetrieveRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesCustomObjectsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.CustomObjects.CustomObjectClassesCustomObjectsMetaPostRetrieveAsync (customObjectClassId) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `CRMCustomObject` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsMetaPostRetrieveAsync(
+ "custom_object_class_id"
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRemoteFieldClassesListAsync (CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.CustomObjects.CustomObjectClassesCustomObjectsRemoteFieldClassesListAsync(
+ new CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Associations
+client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsListAsync (customObjectClassId, objectId, CustomObjectClassesCustomObjectsAssociationsListRequest { ... }) -> PaginatedAssociationList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Association` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsListAsync(
+ "custom_object_class_id",
+ "object_id",
+ new CustomObjectClassesCustomObjectsAssociationsListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**customObjectClassId:** `string`
+
+
+
+
+
+
+
+**objectId:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesCustomObjectsAssociationsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsUpdateAsync (associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId, CustomObjectClassesCustomObjectsAssociationsUpdateRequest { ... }) -> Association
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Associations.CustomObjectClassesCustomObjectsAssociationsUpdateAsync(
+ "association_type_id",
+ "source_class_id",
+ "source_object_id",
+ "target_class_id",
+ "target_object_id",
+ new CustomObjectClassesCustomObjectsAssociationsUpdateRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**associationTypeId:** `string`
+
+
+
+
+
+
+
+**sourceClassId:** `string`
+
+
+
+
+
+
+
+**sourceObjectId:** `string`
+
+
+
+
+
+
+
+**targetClassId:** `string`
+
+
+
+
+
+
+
+**targetObjectId:** `string`
+
+
+
+
+
+
+
+**request:** `CustomObjectClassesCustomObjectsAssociationsUpdateRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Scopes
+client.Crm.Scopes.DefaultScopesRetrieveAsync () -> Crm.CommonModelScopeApi
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Scopes.DefaultScopesRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Scopes.LinkedAccountScopesRetrieveAsync () -> Crm.CommonModelScopeApi
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Scopes.LinkedAccountScopesRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Scopes.LinkedAccountScopesCreateAsync (LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Crm.CommonModelScopeApi
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Scopes.LinkedAccountScopesCreateAsync(
+ new LinkedAccountCommonModelScopeDeserializerRequest
+ {
+ CommonModels = new List()
+ {
+ new Merge.Client.Crm.IndividualCommonModelScopeDeserializerRequest
+ {
+ ModelName = "Employee",
+ ModelPermissions = new Dictionary<
+ string,
+ Merge.Client.Crm.ModelPermissionDeserializerRequest
+ >()
+ {
+ {
+ "READ",
+ new Merge.Client.Crm.ModelPermissionDeserializerRequest { IsEnabled = true }
+ },
+ {
+ "WRITE",
+ new Merge.Client.Crm.ModelPermissionDeserializerRequest
+ {
+ IsEnabled = false,
+ }
+ },
+ },
+ FieldPermissions = new Merge.Client.Crm.FieldPermissionDeserializerRequest
+ {
+ EnabledFields = new List() { "avatar", "home_location" },
+ DisabledFields = new List() { "work_location" },
+ },
+ },
+ new Merge.Client.Crm.IndividualCommonModelScopeDeserializerRequest
+ {
+ ModelName = "Benefit",
+ ModelPermissions = new Dictionary<
+ string,
+ Merge.Client.Crm.ModelPermissionDeserializerRequest
+ >()
+ {
+ {
+ "WRITE",
+ new Merge.Client.Crm.ModelPermissionDeserializerRequest
+ {
+ IsEnabled = false,
+ }
+ },
+ },
+ },
+ },
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LinkedAccountCommonModelScopeDeserializerRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm DeleteAccount
+client.Crm.DeleteAccount.DeleteAsync ()
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Delete a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.DeleteAccount.DeleteAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Crm EngagementTypes
+client.Crm.EngagementTypes.ListAsync (EngagementTypesListRequest { ... }) -> PaginatedEngagementTypeList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `EngagementType` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.EngagementTypes.ListAsync(new EngagementTypesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EngagementTypesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.EngagementTypes.RetrieveAsync (id, EngagementTypesRetrieveRequest { ... }) -> EngagementType
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns an `EngagementType` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.EngagementTypes.RetrieveAsync("id", new EngagementTypesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `EngagementTypesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.EngagementTypes.RemoteFieldClassesListAsync (EngagementTypesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.EngagementTypes.RemoteFieldClassesListAsync(
+ new EngagementTypesRemoteFieldClassesListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EngagementTypesRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Engagements
+client.Crm.Engagements.ListAsync (EngagementsListRequest { ... }) -> PaginatedEngagementList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Engagement` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.ListAsync(new EngagementsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EngagementsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Engagements.CreateAsync (EngagementEndpointRequest { ... }) -> EngagementResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates an `Engagement` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.CreateAsync(
+ new EngagementEndpointRequest { Model = new EngagementRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EngagementEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Engagements.RetrieveAsync (id, EngagementsRetrieveRequest { ... }) -> Engagement
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns an `Engagement` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.RetrieveAsync("id", new EngagementsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `EngagementsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Engagements.PartialUpdateAsync (id, PatchedEngagementEndpointRequest { ... }) -> EngagementResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Updates an `Engagement` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.PartialUpdateAsync(
+ "id",
+ new PatchedEngagementEndpointRequest { Model = new PatchedEngagementRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedEngagementEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Engagements.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Engagement` PATCHs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.MetaPatchRetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Engagements.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Engagement` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Engagements.RemoteFieldClassesListAsync (EngagementsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Engagements.RemoteFieldClassesListAsync(
+ new EngagementsRemoteFieldClassesListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EngagementsRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm FieldMapping
+client.Crm.FieldMapping.FieldMappingsRetrieveAsync (FieldMappingsRetrieveRequest { ... }) -> Crm.FieldMappingApiInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.FieldMapping.FieldMappingsRetrieveAsync(new FieldMappingsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `FieldMappingsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.FieldMapping.FieldMappingsCreateAsync (CreateFieldMappingRequest { ... }) -> Crm.FieldMappingInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.FieldMapping.FieldMappingsCreateAsync(
+ new CreateFieldMappingRequest
+ {
+ TargetFieldName = "example_target_field_name",
+ TargetFieldDescription = "this is a example description of the target field",
+ RemoteFieldTraversalPath = new List() { "example_remote_field" },
+ RemoteMethod = "GET",
+ RemoteUrlPath = "/example-url-path",
+ CommonModelName = "ExampleCommonModel",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `CreateFieldMappingRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.FieldMapping.FieldMappingsDestroyAsync (fieldMappingId) -> Crm.FieldMappingInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**fieldMappingId:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.FieldMapping.FieldMappingsPartialUpdateAsync (fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Crm.FieldMappingInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.FieldMapping.FieldMappingsPartialUpdateAsync(
+ "field_mapping_id",
+ new PatchedEditFieldMappingRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**fieldMappingId:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedEditFieldMappingRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.FieldMapping.RemoteFieldsRetrieveAsync (RemoteFieldsRetrieveRequest { ... }) -> Crm.RemoteFieldApiResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `RemoteFieldsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.FieldMapping.TargetFieldsRetrieveAsync () -> Crm.ExternalTargetFieldApiResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.FieldMapping.TargetFieldsRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Crm GenerateKey
+client.Crm.GenerateKey.CreateAsync (GenerateRemoteKeyRequest { ... }) -> Crm.RemoteKey
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Create a remote key.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.GenerateKey.CreateAsync(
+ new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `GenerateRemoteKeyRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Issues
+client.Crm.Issues.ListAsync (IssuesListRequest { ... }) -> Crm.PaginatedIssueList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Gets all issues for Organization.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Issues.ListAsync(new IssuesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `IssuesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Issues.RetrieveAsync (id) -> Crm.Issue
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get a specific issue.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Issues.RetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Leads
+client.Crm.Leads.ListAsync (LeadsListRequest { ... }) -> PaginatedLeadList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Lead` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Leads.ListAsync(new LeadsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LeadsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Leads.CreateAsync (LeadEndpointRequest { ... }) -> LeadResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `Lead` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Leads.CreateAsync(new LeadEndpointRequest { Model = new LeadRequest() });
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LeadEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Leads.RetrieveAsync (id, LeadsRetrieveRequest { ... }) -> Lead
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Lead` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Leads.RetrieveAsync("id", new LeadsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `LeadsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Leads.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Lead` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Leads.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Leads.RemoteFieldClassesListAsync (LeadsRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Leads.RemoteFieldClassesListAsync(new LeadsRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LeadsRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm LinkToken
+client.Crm.LinkToken.CreateAsync (EndUserDetailsRequest { ... }) -> Crm.LinkToken
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.LinkToken.CreateAsync(
+ new EndUserDetailsRequest
+ {
+ EndUserEmailAddress = "example@gmail.com",
+ EndUserOrganizationName = "Test Organization",
+ EndUserOriginId = "12345",
+ Categories = new List()
+ {
+ Merge.Client.Crm.CategoriesEnum.Hris,
+ Merge.Client.Crm.CategoriesEnum.Ats,
+ },
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EndUserDetailsRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm LinkedAccounts
+client.Crm.LinkedAccounts.ListAsync (LinkedAccountsListRequest { ... }) -> Crm.PaginatedAccountDetailsAndActionsList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+List linked accounts for your organization.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.LinkedAccounts.ListAsync(new LinkedAccountsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LinkedAccountsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Notes
+client.Crm.Notes.ListAsync (NotesListRequest { ... }) -> PaginatedNoteList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Note` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Notes.ListAsync(new NotesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `NotesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Notes.CreateAsync (NoteEndpointRequest { ... }) -> NoteResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `Note` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Notes.CreateAsync(new NoteEndpointRequest { Model = new NoteRequest() });
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `NoteEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Notes.RetrieveAsync (id, NotesRetrieveRequest { ... }) -> Note
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Note` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Notes.RetrieveAsync("id", new NotesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `NotesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Notes.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Note` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Notes.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Notes.RemoteFieldClassesListAsync (NotesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Notes.RemoteFieldClassesListAsync(new NotesRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `NotesRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Opportunities
+client.Crm.Opportunities.ListAsync (OpportunitiesListRequest { ... }) -> PaginatedOpportunityList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Opportunity` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.ListAsync(new OpportunitiesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `OpportunitiesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Opportunities.CreateAsync (OpportunityEndpointRequest { ... }) -> OpportunityResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates an `Opportunity` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.CreateAsync(
+ new OpportunityEndpointRequest { Model = new OpportunityRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `OpportunityEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Opportunities.RetrieveAsync (id, OpportunitiesRetrieveRequest { ... }) -> Opportunity
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns an `Opportunity` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.RetrieveAsync("id", new OpportunitiesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `OpportunitiesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Opportunities.PartialUpdateAsync (id, PatchedOpportunityEndpointRequest { ... }) -> OpportunityResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Updates an `Opportunity` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.PartialUpdateAsync(
+ "id",
+ new PatchedOpportunityEndpointRequest { Model = new PatchedOpportunityRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedOpportunityEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Opportunities.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Opportunity` PATCHs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.MetaPatchRetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Opportunities.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Opportunity` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Opportunities.RemoteFieldClassesListAsync (OpportunitiesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Opportunities.RemoteFieldClassesListAsync(
+ new OpportunitiesRemoteFieldClassesListRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `OpportunitiesRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Passthrough
+client.Crm.Passthrough.CreateAsync (Crm.DataPassthroughRequest { ... }) -> Crm.RemoteResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Passthrough.CreateAsync(
+ new Merge.Client.Crm.DataPassthroughRequest
+ {
+ Method = Merge.Client.Crm.MethodEnum.Get,
+ Path = "/scooters",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `Crm.DataPassthroughRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm RegenerateKey
+client.Crm.RegenerateKey.CreateAsync (RemoteKeyForRegenerationRequest { ... }) -> Crm.RemoteKey
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Exchange remote keys.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.RegenerateKey.CreateAsync(
+ new RemoteKeyForRegenerationRequest { Name = "Remote Deployment Key 1" }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `RemoteKeyForRegenerationRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Stages
+client.Crm.Stages.ListAsync (StagesListRequest { ... }) -> PaginatedStageList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Stage` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Stages.ListAsync(new StagesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `StagesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Stages.RetrieveAsync (id, StagesRetrieveRequest { ... }) -> Stage
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Stage` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Stages.RetrieveAsync("id", new StagesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `StagesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Stages.RemoteFieldClassesListAsync (StagesRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Stages.RemoteFieldClassesListAsync(new StagesRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `StagesRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm SyncStatus
+client.Crm.SyncStatus.ListAsync (SyncStatusListRequest { ... }) -> Crm.PaginatedSyncStatusList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.SyncStatus.ListAsync(new SyncStatusListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `SyncStatusListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm ForceResync
+client.Crm.ForceResync.SyncStatusResyncCreateAsync () -> IEnumerable
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.ForceResync.SyncStatusResyncCreateAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Crm Tasks
+client.Crm.Tasks.ListAsync (TasksListRequest { ... }) -> PaginatedTaskList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Task` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.ListAsync(new TasksListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `TasksListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Tasks.CreateAsync (TaskEndpointRequest { ... }) -> TaskResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `Task` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.CreateAsync(new TaskEndpointRequest { Model = new TaskRequest() });
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `TaskEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Tasks.RetrieveAsync (id, TasksRetrieveRequest { ... }) -> Task
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Task` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.RetrieveAsync("id", new TasksRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `TasksRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Tasks.PartialUpdateAsync (id, PatchedTaskEndpointRequest { ... }) -> TaskResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Updates a `Task` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.PartialUpdateAsync(
+ "id",
+ new PatchedTaskEndpointRequest { Model = new PatchedTaskRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedTaskEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Tasks.MetaPatchRetrieveAsync (id) -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Task` PATCHs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.MetaPatchRetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Tasks.MetaPostRetrieveAsync () -> Crm.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `Task` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.Tasks.RemoteFieldClassesListAsync (TasksRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Tasks.RemoteFieldClassesListAsync(new TasksRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `TasksRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm Users
+client.Crm.Users.ListAsync (UsersListRequest { ... }) -> Crm.PaginatedUserList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `User` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Users.ListAsync(new UsersListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `UsersListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Users.RetrieveAsync (id, UsersRetrieveRequest { ... }) -> Crm.User
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `User` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Users.RetrieveAsync("id", new UsersRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `UsersRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Users.IgnoreCreateAsync (modelId, IgnoreCommonModelRequest { ... })
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Users.IgnoreCreateAsync(
+ "model_id",
+ new IgnoreCommonModelRequest { Reason = Merge.Client.Crm.ReasonEnum.GeneralCustomerRequest }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**modelId:** `string`
+
+
+
+
+
+
+
+**request:** `IgnoreCommonModelRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Crm.Users.RemoteFieldClassesListAsync (UsersRemoteFieldClassesListRequest { ... }) -> Crm.PaginatedRemoteFieldClassList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `RemoteFieldClass` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.Users.RemoteFieldClassesListAsync(new UsersRemoteFieldClassesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `UsersRemoteFieldClassesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Crm WebhookReceivers
+client.Crm.WebhookReceivers.ListAsync () -> IEnumerable
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `WebhookReceiver` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.WebhookReceivers.ListAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Crm.WebhookReceivers.CreateAsync (WebhookReceiverRequest { ... }) -> Crm.WebhookReceiver
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `WebhookReceiver` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Crm.WebhookReceivers.CreateAsync(
+ new WebhookReceiverRequest { Event = "event", IsActive = true }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `WebhookReceiverRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AccountDetails
+client.Filestorage.AccountDetails.RetrieveAsync () -> Filestorage.AccountDetails
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get details for a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.AccountDetails.RetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Filestorage AccountToken
+client.Filestorage.AccountToken.RetrieveAsync (publicToken) -> Filestorage.AccountToken
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns the account token for the end user with the provided public token.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.AccountToken.RetrieveAsync("public_token");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**publicToken:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AsyncPassthrough
+client.Filestorage.AsyncPassthrough.CreateAsync (Filestorage.DataPassthroughRequest { ... }) -> Filestorage.AsyncPassthroughReciept
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Asynchronously pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.AsyncPassthrough.CreateAsync(
+ new Merge.Client.Filestorage.DataPassthroughRequest
+ {
+ Method = Merge.Client.Filestorage.MethodEnum.Get,
+ Path = "/scooters",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `Filestorage.DataPassthroughRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.AsyncPassthrough.RetrieveAsync (asyncPassthroughReceiptId) -> OneOf
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Retrieves data from earlier async-passthrough POST request
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**asyncPassthroughReceiptId:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AuditTrail
+client.Filestorage.AuditTrail.ListAsync (AuditTrailListRequest { ... }) -> Filestorage.PaginatedAuditLogEventList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Gets a list of audit trail events.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.AuditTrail.ListAsync(new AuditTrailListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `AuditTrailListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage AvailableActions
+client.Filestorage.AvailableActions.RetrieveAsync () -> Filestorage.AvailableActions
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of models and actions available for an account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.AvailableActions.RetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Filestorage Scopes
+client.Filestorage.Scopes.DefaultScopesRetrieveAsync () -> Filestorage.CommonModelScopeApi
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Scopes.DefaultScopesRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Scopes.LinkedAccountScopesRetrieveAsync () -> Filestorage.CommonModelScopeApi
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Scopes.LinkedAccountScopesRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Scopes.LinkedAccountScopesCreateAsync (LinkedAccountCommonModelScopeDeserializerRequest { ... }) -> Filestorage.CommonModelScopeApi
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes)
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Scopes.LinkedAccountScopesCreateAsync(
+ new LinkedAccountCommonModelScopeDeserializerRequest
+ {
+ CommonModels =
+ new List()
+ {
+ new Merge.Client.Filestorage.IndividualCommonModelScopeDeserializerRequest
+ {
+ ModelName = "Employee",
+ ModelPermissions = new Dictionary<
+ string,
+ Merge.Client.Filestorage.ModelPermissionDeserializerRequest
+ >()
+ {
+ {
+ "READ",
+ new Merge.Client.Filestorage.ModelPermissionDeserializerRequest
+ {
+ IsEnabled = true,
+ }
+ },
+ {
+ "WRITE",
+ new Merge.Client.Filestorage.ModelPermissionDeserializerRequest
+ {
+ IsEnabled = false,
+ }
+ },
+ },
+ FieldPermissions =
+ new Merge.Client.Filestorage.FieldPermissionDeserializerRequest
+ {
+ EnabledFields = new List() { "avatar", "home_location" },
+ DisabledFields = new List() { "work_location" },
+ },
+ },
+ new Merge.Client.Filestorage.IndividualCommonModelScopeDeserializerRequest
+ {
+ ModelName = "Benefit",
+ ModelPermissions = new Dictionary<
+ string,
+ Merge.Client.Filestorage.ModelPermissionDeserializerRequest
+ >()
+ {
+ {
+ "WRITE",
+ new Merge.Client.Filestorage.ModelPermissionDeserializerRequest
+ {
+ IsEnabled = false,
+ }
+ },
+ },
+ },
+ },
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LinkedAccountCommonModelScopeDeserializerRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage DeleteAccount
+client.Filestorage.DeleteAccount.DeleteAsync ()
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Delete a linked account.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.DeleteAccount.DeleteAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Filestorage Drives
+client.Filestorage.Drives.ListAsync (DrivesListRequest { ... }) -> PaginatedDriveList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Drive` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Drives.ListAsync(new DrivesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `DrivesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Drives.RetrieveAsync (id, DrivesRetrieveRequest { ... }) -> Drive
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Drive` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Drives.RetrieveAsync("id", new DrivesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `DrivesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage FieldMapping
+client.Filestorage.FieldMapping.FieldMappingsRetrieveAsync (FieldMappingsRetrieveRequest { ... }) -> Filestorage.FieldMappingApiInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.FieldMapping.FieldMappingsRetrieveAsync(
+ new FieldMappingsRetrieveRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `FieldMappingsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.FieldMapping.FieldMappingsCreateAsync (CreateFieldMappingRequest { ... }) -> Filestorage.FieldMappingInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.FieldMapping.FieldMappingsCreateAsync(
+ new CreateFieldMappingRequest
+ {
+ TargetFieldName = "example_target_field_name",
+ TargetFieldDescription = "this is a example description of the target field",
+ RemoteFieldTraversalPath = new List() { "example_remote_field" },
+ RemoteMethod = "GET",
+ RemoteUrlPath = "/example-url-path",
+ CommonModelName = "ExampleCommonModel",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `CreateFieldMappingRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.FieldMapping.FieldMappingsDestroyAsync (fieldMappingId) -> Filestorage.FieldMappingInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.FieldMapping.FieldMappingsDestroyAsync("field_mapping_id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**fieldMappingId:** `string`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.FieldMapping.FieldMappingsPartialUpdateAsync (fieldMappingId, PatchedEditFieldMappingRequest { ... }) -> Filestorage.FieldMappingInstanceResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.FieldMapping.FieldMappingsPartialUpdateAsync(
+ "field_mapping_id",
+ new PatchedEditFieldMappingRequest()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**fieldMappingId:** `string`
+
+
+
+
+
+
+
+**request:** `PatchedEditFieldMappingRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.FieldMapping.RemoteFieldsRetrieveAsync (RemoteFieldsRetrieveRequest { ... }) -> Filestorage.RemoteFieldApiResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.FieldMapping.RemoteFieldsRetrieveAsync(new RemoteFieldsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `RemoteFieldsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.FieldMapping.TargetFieldsRetrieveAsync () -> Filestorage.ExternalTargetFieldApiResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/).
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.FieldMapping.TargetFieldsRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Filestorage Files
+client.Filestorage.Files.ListAsync (FilesListRequest { ... }) -> PaginatedFileList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `File` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Files.ListAsync(new FilesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `FilesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Files.CreateAsync (FileStorageFileEndpointRequest { ... }) -> FileStorageFileResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `File` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Files.CreateAsync(
+ new FileStorageFileEndpointRequest { Model = new FileRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `FileStorageFileEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Files.RetrieveAsync (id, FilesRetrieveRequest { ... }) -> File
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `File` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Files.RetrieveAsync("id", new FilesRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `FilesRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Files.DownloadRetrieveAsync (id, FilesDownloadRetrieveRequest { ... })
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns the `File` content with the given `id` as a stream of bytes.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Files.DownloadRetrieveAsync(
+ "string",
+ new FilesDownloadRetrieveRequest { MimeType = "string" }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `FilesDownloadRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Files.MetaPostRetrieveAsync () -> Filestorage.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `FileStorageFile` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Files.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Filestorage Folders
+client.Filestorage.Folders.ListAsync (FoldersListRequest { ... }) -> PaginatedFolderList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Folder` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Folders.ListAsync(new FoldersListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `FoldersListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Folders.CreateAsync (FileStorageFolderEndpointRequest { ... }) -> FileStorageFolderResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a `Folder` object with the given values.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Folders.CreateAsync(
+ new FileStorageFolderEndpointRequest { Model = new FolderRequest() }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `FileStorageFolderEndpointRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Folders.RetrieveAsync (id, FoldersRetrieveRequest { ... }) -> Folder
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Folder` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Folders.RetrieveAsync("id", new FoldersRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `FoldersRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Folders.MetaPostRetrieveAsync () -> Filestorage.MetaResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns metadata for `FileStorageFolder` POSTs.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Folders.MetaPostRetrieveAsync();
+```
+
+
+
+
+
+
+
+
+
+
+## Filestorage GenerateKey
+client.Filestorage.GenerateKey.CreateAsync (GenerateRemoteKeyRequest { ... }) -> Filestorage.RemoteKey
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Create a remote key.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.GenerateKey.CreateAsync(
+ new GenerateRemoteKeyRequest { Name = "Remote Deployment Key 1" }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `GenerateRemoteKeyRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Groups
+client.Filestorage.Groups.ListAsync (GroupsListRequest { ... }) -> Filestorage.PaginatedGroupList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a list of `Group` objects.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Groups.ListAsync(new GroupsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `GroupsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Groups.RetrieveAsync (id, GroupsRetrieveRequest { ... }) -> Filestorage.Group
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Returns a `Group` object with the given `id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Groups.RetrieveAsync("id", new GroupsRetrieveRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+**request:** `GroupsRetrieveRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Issues
+client.Filestorage.Issues.ListAsync (IssuesListRequest { ... }) -> Filestorage.PaginatedIssueList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Gets all issues for Organization.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Issues.ListAsync(new IssuesListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `IssuesListRequest`
+
+
+
+
+
+
+
+
+
+
+
+client.Filestorage.Issues.RetrieveAsync (id) -> Filestorage.Issue
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Get a specific issue.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Issues.RetrieveAsync("id");
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage LinkToken
+client.Filestorage.LinkToken.CreateAsync (EndUserDetailsRequest { ... }) -> Filestorage.LinkToken
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Creates a link token to be used when linking a new end user.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.LinkToken.CreateAsync(
+ new EndUserDetailsRequest
+ {
+ EndUserEmailAddress = "example@gmail.com",
+ EndUserOrganizationName = "Test Organization",
+ EndUserOriginId = "12345",
+ Categories = new List()
+ {
+ Merge.Client.Filestorage.CategoriesEnum.Hris,
+ Merge.Client.Filestorage.CategoriesEnum.Ats,
+ },
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `EndUserDetailsRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage LinkedAccounts
+client.Filestorage.LinkedAccounts.ListAsync (LinkedAccountsListRequest { ... }) -> Filestorage.PaginatedAccountDetailsAndActionsList
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+List linked accounts for your organization.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.LinkedAccounts.ListAsync(new LinkedAccountsListRequest());
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `LinkedAccountsListRequest`
+
+
+
+
+
+
+
+
+
+
+
+## Filestorage Passthrough
+client.Filestorage.Passthrough.CreateAsync (Filestorage.DataPassthroughRequest { ... }) -> Filestorage.RemoteResponse
+
+
+
+#### 📝 Description
+
+
+
+
+
+
+
+Pull data from an endpoint not currently supported by Merge.
+
+
+
+
+
+#### 🔌 Usage
+
+
+
+
+
+
+
+```csharp
+await client.Filestorage.Passthrough.CreateAsync(
+ new Merge.Client.Filestorage.DataPassthroughRequest
+ {
+ Method = Merge.Client.Filestorage.MethodEnum.Get,
+ Path = "/scooters",
+ }
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+
+
+
+
+
+**request:** `Filestorage.DataPassthroughRequest`
+
+
+
+
+
+
+
+
+
+
+
+## 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
\ No newline at end of file
diff --git a/src/Merge.Client.Test/Core/EnumSerializerTests.cs b/src/Merge.Client.Test/Core/EnumSerializerTests.cs
new file mode 100644
index 00000000..71066fe3
--- /dev/null
+++ b/src/Merge.Client.Test/Core/EnumSerializerTests.cs
@@ -0,0 +1,59 @@
+using System.Runtime.Serialization;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Merge.Client.Core;
+using NUnit.Framework;
+
+namespace Merge.Client.Test.Core;
+
+[TestFixture]
+public class StringEnumSerializerTests
+{
+ private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true };
+
+ private const DummyEnum KnownEnumValue2 = DummyEnum.KnownValue2;
+ private const string KnownEnumValue2String = "known_value2";
+
+ private const string JsonWithKnownEnum2 = $$"""
+ {
+ "enum_property": "{{KnownEnumValue2String}}"
+ }
+ """;
+
+ [Test]
+ public void ShouldParseKnownEnumValue2()
+ {
+ var obj = JsonSerializer.Deserialize(JsonWithKnownEnum2, JsonOptions);
+ Assert.That(obj, Is.Not.Null);
+ Assert.That(obj.EnumProperty, Is.EqualTo(KnownEnumValue2));
+ }
+
+ [Test]
+ public void ShouldSerializeKnownEnumValue2()
+ {
+ var json = JsonSerializer.SerializeToElement(
+ new DummyObject { EnumProperty = KnownEnumValue2 },
+ JsonOptions
+ );
+ TestContext.Out.WriteLine("Serialized JSON: \n" + json);
+ var enumString = json.GetProperty("enum_property").GetString();
+ Assert.That(enumString, Is.Not.Null);
+ Assert.That(enumString, Is.EqualTo(KnownEnumValue2String));
+ }
+}
+
+public class DummyObject
+{
+ [JsonPropertyName("enum_property")]
+ public DummyEnum EnumProperty { get; set; }
+}
+
+[JsonConverter(typeof(EnumSerializer))]
+public enum DummyEnum
+{
+ [EnumMember(Value = "known_value1")]
+ KnownValue1,
+
+ [EnumMember(Value = "known_value2")]
+ KnownValue2,
+}
diff --git a/src/Merge.Client.Test/Core/OneOfSerializerTests.cs b/src/Merge.Client.Test/Core/OneOfSerializerTests.cs
new file mode 100644
index 00000000..7bff6992
--- /dev/null
+++ b/src/Merge.Client.Test/Core/OneOfSerializerTests.cs
@@ -0,0 +1,310 @@
+using System.Text.Json;
+using System.Text.Json.Serialization;
+using Merge.Client.Core;
+using NUnit.Framework;
+using OneOf;
+
+namespace Merge.Client.Test.Core;
+
+[TestFixture]
+public class OneOfSerializerTests
+{
+ private class Foo
+ {
+ [JsonPropertyName("string_prop")]
+ public required string StringProp { get; set; }
+ }
+
+ private class Bar
+ {
+ [JsonPropertyName("int_prop")]
+ public required int IntProp { get; set; }
+ }
+
+ private static readonly OneOf OneOf1 = OneOf<
+ string,
+ int,
+ object,
+ Foo,
+ Bar
+ >.FromT2(new { });
+ private const string OneOf1String = "{}";
+
+ private static readonly OneOf OneOf2 = OneOf<
+ string,
+ int,
+ object,
+ Foo,
+ Bar
+ >.FromT0("test");
+ private const string OneOf2String = "\"test\"";
+
+ private static readonly OneOf OneOf3 = OneOf<
+ string,
+ int,
+ object,
+ Foo,
+ Bar
+ >.FromT1(123);
+ private const string OneOf3String = "123";
+
+ private static readonly OneOf OneOf4 = OneOf<
+ string,
+ int,
+ object,
+ Foo,
+ Bar
+ >.FromT3(new Foo { StringProp = "test" });
+ private const string OneOf4String = "{\n \"string_prop\": \"test\"\n}";
+
+ private static readonly OneOf OneOf5 = OneOf<
+ string,
+ int,
+ object,
+ Foo,
+ Bar
+ >.FromT4(new Bar { IntProp = 5 });
+ private const string OneOf5String = "{\n \"int_prop\": 5\n}";
+
+ [Test]
+ public void Serialize_OneOfs_Should_Return_Expected_String()
+ {
+ (OneOf, string)[] testData =
+ [
+ (OneOf1, OneOf1String),
+ (OneOf2, OneOf2String),
+ (OneOf3, OneOf3String),
+ (OneOf4, OneOf4String),
+ (OneOf5, OneOf5String),
+ ];
+ Assert.Multiple(() =>
+ {
+ foreach (var (oneOf, expected) in testData)
+ {
+ var result = JsonUtils.Serialize(oneOf);
+ Assert.That(result, Is.EqualTo(expected));
+ }
+ });
+ }
+
+ [Test]
+ public void OneOfs_Should_Deserialize_From_String()
+ {
+ (OneOf, string)[] testData =
+ [
+ (OneOf1, OneOf1String),
+ (OneOf2, OneOf2String),
+ (OneOf3, OneOf3String),
+ (OneOf4, OneOf4String),
+ (OneOf5, OneOf5String),
+ ];
+ Assert.Multiple(() =>
+ {
+ foreach (var (oneOf, json) in testData)
+ {
+ var result = JsonUtils.Deserialize>(json);
+ Assert.That(result.Index, Is.EqualTo(oneOf.Index));
+ Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result.Value)));
+ }
+ });
+ }
+
+ private static readonly OneOf? NullableOneOf1 = null;
+ private const string NullableOneOf1String = "null";
+
+ private static readonly OneOf? NullableOneOf2 = OneOf<
+ string,
+ int,
+ object,
+ Foo,
+ Bar
+ >.FromT4(new Bar { IntProp = 5 });
+ private const string NullableOneOf2String = "{\n \"int_prop\": 5\n}";
+
+ [Test]
+ public void Serialize_NullableOneOfs_Should_Return_Expected_String()
+ {
+ (OneOf?, string)[] testData =
+ [
+ (NullableOneOf1, NullableOneOf1String),
+ (NullableOneOf2, NullableOneOf2String),
+ ];
+ Assert.Multiple(() =>
+ {
+ foreach (var (oneOf, expected) in testData)
+ {
+ var result = JsonUtils.Serialize(oneOf);
+ Assert.That(result, Is.EqualTo(expected));
+ }
+ });
+ }
+
+ [Test]
+ public void NullableOneOfs_Should_Deserialize_From_String()
+ {
+ (OneOf?, string)[] testData =
+ [
+ (NullableOneOf1, NullableOneOf1String),
+ (NullableOneOf2, NullableOneOf2String),
+ ];
+ Assert.Multiple(() =>
+ {
+ foreach (var (oneOf, json) in testData)
+ {
+ var result = JsonUtils.Deserialize?>(json);
+ Assert.That(result?.Index, Is.EqualTo(oneOf?.Index));
+ Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result?.Value)));
+ }
+ });
+ }
+
+ private static readonly OneOf OneOfWithNullable1 = OneOf<
+ string,
+ int,
+ Foo?
+ >.FromT2(null);
+ private const string OneOfWithNullable1String = "null";
+
+ private static readonly OneOf OneOfWithNullable2 = OneOf<
+ string,
+ int,
+ Foo?
+ >.FromT2(new Foo { StringProp = "test" });
+ private const string OneOfWithNullable2String = "{\n \"string_prop\": \"test\"\n}";
+
+ private static readonly OneOf OneOfWithNullable3 = OneOf<
+ string,
+ int,
+ Foo?
+ >.FromT0("test");
+ private const string OneOfWithNullable3String = "\"test\"";
+
+ [Test]
+ public void Serialize_OneOfWithNullables_Should_Return_Expected_String()
+ {
+ (OneOf, string)[] testData =
+ [
+ (OneOfWithNullable1, OneOfWithNullable1String),
+ (OneOfWithNullable2, OneOfWithNullable2String),
+ (OneOfWithNullable3, OneOfWithNullable3String),
+ ];
+ Assert.Multiple(() =>
+ {
+ foreach (var (oneOf, expected) in testData)
+ {
+ var result = JsonUtils.Serialize(oneOf);
+ Assert.That(result, Is.EqualTo(expected));
+ }
+ });
+ }
+
+ [Test]
+ public void OneOfWithNullables_Should_Deserialize_From_String()
+ {
+ (OneOf, string)[] testData =
+ [
+ // (OneOfWithNullable1, OneOfWithNullable1String), // not possible with .NET's JSON serializer
+ (OneOfWithNullable2, OneOfWithNullable2String),
+ (OneOfWithNullable3, OneOfWithNullable3String),
+ ];
+ Assert.Multiple(() =>
+ {
+ foreach (var (oneOf, json) in testData)
+ {
+ var result = JsonUtils.Deserialize>(json);
+ Assert.That(result.Index, Is.EqualTo(oneOf.Index));
+ Assert.That(json, Is.EqualTo(JsonUtils.Serialize(result.Value)));
+ }
+ });
+ }
+
+ [Test]
+ public void Serialize_OneOfWithObjectLast_Should_Return_Expected_String()
+ {
+ var oneOfWithObjectLast = OneOf.FromT4(
+ new { random = "data" }
+ );
+ const string oneOfWithObjectLastString = "{\n \"random\": \"data\"\n}";
+
+ var result = JsonUtils.Serialize(oneOfWithObjectLast);
+ Assert.That(result, Is.EqualTo(oneOfWithObjectLastString));
+ }
+
+ [Test]
+ public void OneOfWithObjectLast_Should_Deserialize_From_String()
+ {
+ const string oneOfWithObjectLastString = "{\n \"random\": \"data\"\n}";
+ var result = JsonUtils.Deserialize>(
+ oneOfWithObjectLastString
+ );
+ Assert.Multiple(() =>
+ {
+ Assert.That(result.Index, Is.EqualTo(4));
+ Assert.That(result.Value, Is.InstanceOf());
+ Assert.That(JsonUtils.Serialize(result.Value), Is.EqualTo(oneOfWithObjectLastString));
+ });
+ }
+
+ [Test]
+ public void Serialize_OneOfWithObjectNotLast_Should_Return_Expected_String()
+ {
+ var oneOfWithObjectNotLast = OneOf.FromT1(
+ new { random = "data" }
+ );
+ const string oneOfWithObjectNotLastString = "{\n \"random\": \"data\"\n}";
+
+ var result = JsonUtils.Serialize(oneOfWithObjectNotLast);
+ Assert.That(result, Is.EqualTo(oneOfWithObjectNotLastString));
+ }
+
+ [Test]
+ public void OneOfWithObjectNotLast_Should_Deserialize_From_String()
+ {
+ const string oneOfWithObjectNotLastString = "{\n \"random\": \"data\"\n}";
+ var result = JsonUtils.Deserialize>(
+ oneOfWithObjectNotLastString
+ );
+ Assert.Multiple(() =>
+ {
+ Assert.That(result.Index, Is.EqualTo(1));
+ Assert.That(result.Value, Is.InstanceOf());
+ Assert.That(
+ JsonUtils.Serialize(result.Value),
+ Is.EqualTo(oneOfWithObjectNotLastString)
+ );
+ });
+ }
+
+ [Test]
+ public void Serialize_OneOfSingleType_Should_Return_Expected_String()
+ {
+ var oneOfSingle = OneOf.FromT0("single");
+ const string oneOfSingleString = "\"single\"";
+
+ var result = JsonUtils.Serialize(oneOfSingle);
+ Assert.That(result, Is.EqualTo(oneOfSingleString));
+ }
+
+ [Test]
+ public void OneOfSingleType_Should_Deserialize_From_String()
+ {
+ const string oneOfSingleString = "\"single\"";
+ var result = JsonUtils.Deserialize>(oneOfSingleString);
+ Assert.Multiple(() =>
+ {
+ Assert.That(result.Index, Is.EqualTo(0));
+ Assert.That(result.Value, Is.EqualTo("single"));
+ });
+ }
+
+ [Test]
+ public void Deserialize_InvalidData_Should_Throw_Exception()
+ {
+ const string invalidJson = "{\"invalid\": \"data\"}";
+
+ Assert.Throws(() =>
+ {
+ JsonUtils.Deserialize>(invalidJson);
+ });
+ }
+}
diff --git a/src/Merge.Client.Test/Core/RawClientTests.cs b/src/Merge.Client.Test/Core/RawClientTests.cs
index cf369f18..f65ae64f 100644
--- a/src/Merge.Client.Test/Core/RawClientTests.cs
+++ b/src/Merge.Client.Test/Core/RawClientTests.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Net.Http;
-using FluentAssertions;
using Merge.Client.Core;
using NUnit.Framework;
using WireMock.Server;
@@ -8,106 +5,101 @@
using WireMockRequest = WireMock.RequestBuilders.Request;
using WireMockResponse = WireMock.ResponseBuilders.Response;
-namespace Merge.Client.Test.Core
+namespace Merge.Client.Test.Core;
+
+[TestFixture]
+public class RawClientTests
{
- [TestFixture]
- public class RawClientTests
+ private const int MaxRetries = 3;
+ private WireMockServer _server;
+ private HttpClient _httpClient;
+ private RawClient _rawClient;
+ private string _baseUrl;
+
+ [SetUp]
+ public void SetUp()
{
- 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 = 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
{
- _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()
+ 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
{
- _server.Dispose();
- _httpClient.Dispose();
- }
+ BaseUrl = _baseUrl,
+ Method = HttpMethod.Get,
+ Path = "/test",
+ };
+
+ var response = await _rawClient.MakeRequestAsync(request);
+ Assert.That(response.StatusCode, Is.EqualTo(statusCode));
+
+ var content = await response.Raw.Content.ReadAsStringAsync();
+ Assert.That(content, Is.EqualTo("Failure"));
+
+ Assert.That(_server.LogEntries.Count, Is.EqualTo(1));
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ _server.Dispose();
+ _httpClient.Dispose();
}
}
diff --git a/src/Merge.Client.Test/Merge.Client.Test.Custom.props b/src/Merge.Client.Test/Merge.Client.Test.Custom.props
new file mode 100644
index 00000000..55e683b0
--- /dev/null
+++ b/src/Merge.Client.Test/Merge.Client.Test.Custom.props
@@ -0,0 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/Merge.Client.Test/Merge.Client.Test.csproj b/src/Merge.Client.Test/Merge.Client.Test.csproj
index b4bab06c..a0308daa 100644
--- a/src/Merge.Client.Test/Merge.Client.Test.csproj
+++ b/src/Merge.Client.Test/Merge.Client.Test.csproj
@@ -2,25 +2,37 @@
net8.0
+ 12
enable
enable
-
false
true
+ true
-
-
-
-
-
-
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
-
+
+
\ No newline at end of file
diff --git a/src/Merge.Client.Test/TestClient.cs b/src/Merge.Client.Test/TestClient.cs
index 80f1e36c..cbaa0525 100644
--- a/src/Merge.Client.Test/TestClient.cs
+++ b/src/Merge.Client.Test/TestClient.cs
@@ -1,8 +1,6 @@
using NUnit.Framework;
-#nullable enable
-
namespace Merge.Client.Test;
[TestFixture]
-public class TestClient { }
+public class TestClient;
diff --git a/src/Merge.Client.sln b/src/Merge.Client.sln
index 8cd1a822..c8535a67 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", "{C1E0DE18-D918-424C-B042-91116EB0FDC3}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client", "Merge.Client\Merge.Client.csproj", "{B4C8E526-3750-4397-987D-39CB13E87572}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{71C77395-C6E2-4283-A545-1EC194300EE7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Merge.Client.Test", "Merge.Client.Test\Merge.Client.Test.csproj", "{05522DC0-DBF4-4703-984E-24331AAF6D41}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C1E0DE18-D918-424C-B042-91116EB0FDC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C1E0DE18-D918-424C-B042-91116EB0FDC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C1E0DE18-D918-424C-B042-91116EB0FDC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C1E0DE18-D918-424C-B042-91116EB0FDC3}.Release|Any CPU.Build.0 = Release|Any CPU
- {71C77395-C6E2-4283-A545-1EC194300EE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {71C77395-C6E2-4283-A545-1EC194300EE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {71C77395-C6E2-4283-A545-1EC194300EE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {71C77395-C6E2-4283-A545-1EC194300EE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B4C8E526-3750-4397-987D-39CB13E87572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B4C8E526-3750-4397-987D-39CB13E87572}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B4C8E526-3750-4397-987D-39CB13E87572}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B4C8E526-3750-4397-987D-39CB13E87572}.Release|Any CPU.Build.0 = Release|Any CPU
+ {05522DC0-DBF4-4703-984E-24331AAF6D41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {05522DC0-DBF4-4703-984E-24331AAF6D41}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {05522DC0-DBF4-4703-984E-24331AAF6D41}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {05522DC0-DBF4-4703-984E-24331AAF6D41}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
diff --git a/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs b/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs
index ba5c5520..c6cd5c39 100644
--- a/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs
+++ b/src/Merge.Client/Accounting/AccountDetails/AccountDetailsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AccountDetailsClient
@@ -24,21 +22,23 @@ internal AccountDetailsClient(RawClient client)
/// await client.Accounting.AccountDetails.RetrieveAsync();
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/account-details",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/account-details",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs b/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs
index 66436c18..e1cd1f61 100644
--- a/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs
+++ b/src/Merge.Client/Accounting/AccountToken/AccountTokenClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AccountTokenClient
@@ -24,22 +22,24 @@ internal AccountTokenClient(RawClient client)
/// await client.Accounting.AccountToken.RetrieveAsync("public_token");
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string publicToken,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/account-token/{publicToken}",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/account-token/{publicToken}",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/AccountingClient.cs b/src/Merge.Client/Accounting/AccountingClient.cs
index c0d3d33a..d8ad1aa2 100644
--- a/src/Merge.Client/Accounting/AccountingClient.cs
+++ b/src/Merge.Client/Accounting/AccountingClient.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AccountingClient
diff --git a/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs b/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs
index e0743443..3beb3516 100644
--- a/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs
+++ b/src/Merge.Client/Accounting/AccountingPeriods/AccountingPeriodsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AccountingPeriodsClient
@@ -24,7 +22,7 @@ internal AccountingPeriodsClient(RawClient client)
/// await client.Accounting.AccountingPeriods.ListAsync(new AccountingPeriodsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
AccountingPeriodsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -37,31 +35,33 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/accounting-periods",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/accounting-periods",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -93,7 +93,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
AccountingPeriodsRetrieveRequest request,
RequestOptions? options = null,
@@ -103,19 +103,21 @@ public async Task RetrieveAsync(
var _query = new Dictionary();
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/accounting-periods/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/accounting-periods/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs
index 39ab79cf..d982218f 100644
--- a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs
+++ b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AccountingPeriodsListRequest
diff --git a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs
index e1bfa5d9..c597e5a0 100644
--- a/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/AccountingPeriods/Requests/AccountingPeriodsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AccountingPeriodsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/Accounts/AccountsClient.cs b/src/Merge.Client/Accounting/Accounts/AccountsClient.cs
index 0e5ddd60..58db9b77 100644
--- a/src/Merge.Client/Accounting/Accounts/AccountsClient.cs
+++ b/src/Merge.Client/Accounting/Accounts/AccountsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AccountsClient
@@ -24,7 +22,7 @@ internal AccountsClient(RawClient client)
/// await client.Accounting.Accounts.ListAsync(new AccountsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
AccountsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -59,15 +57,15 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -83,7 +81,7 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteFields != null)
{
@@ -97,17 +95,19 @@ public async Task ListAsync(
{
_query["show_enum_origins"] = request.ShowEnumOrigins.Value.Stringify();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/accounts",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/accounts",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -138,7 +138,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
AccountEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -147,25 +147,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/accounts",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/accounts",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -194,7 +197,7 @@ public async Task CreateAsync(
/// await client.Accounting.Accounts.RetrieveAsync("id", new AccountsRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
AccountsRetrieveRequest request,
RequestOptions? options = null,
@@ -208,7 +211,7 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.RemoteFields != null)
{
@@ -218,17 +221,19 @@ public async Task RetrieveAsync(
{
_query["show_enum_origins"] = request.ShowEnumOrigins.Value.Stringify();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/accounts/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/accounts/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -257,21 +262,23 @@ public async Task RetrieveAsync(
/// await client.Accounting.Accounts.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/accounts/meta/post",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/accounts/meta/post",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs b/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs
index 86305fd6..27290725 100644
--- a/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/Accounts/Requests/AccountEndpointRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AccountEndpointRequest
diff --git a/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs b/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs
index f22e79a3..55f250af 100644
--- a/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs
+++ b/src/Merge.Client/Accounting/Accounts/Requests/AccountsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AccountsListRequest
diff --git a/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs b/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs
index 5d3a3e31..f044a15f 100644
--- a/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Accounts/Requests/AccountsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AccountsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestRemoteFields.cs b/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestRemoteFields.cs
index d98e8b45..f986be8d 100644
--- a/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestRemoteFields.cs
+++ b/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestRemoteFields.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum AccountsListRequestRemoteFields
{
[EnumMember(Value = "classification")]
diff --git a/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestShowEnumOrigins.cs b/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestShowEnumOrigins.cs
index cc2ec19e..48e101e3 100644
--- a/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestShowEnumOrigins.cs
+++ b/src/Merge.Client/Accounting/Accounts/Types/AccountsListRequestShowEnumOrigins.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum AccountsListRequestShowEnumOrigins
{
[EnumMember(Value = "classification")]
diff --git a/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestRemoteFields.cs b/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestRemoteFields.cs
index e7324b91..2d60de93 100644
--- a/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestRemoteFields.cs
+++ b/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestRemoteFields.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum AccountsRetrieveRequestRemoteFields
{
[EnumMember(Value = "classification")]
diff --git a/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestShowEnumOrigins.cs b/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestShowEnumOrigins.cs
index b9e7202f..904c610f 100644
--- a/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestShowEnumOrigins.cs
+++ b/src/Merge.Client/Accounting/Accounts/Types/AccountsRetrieveRequestShowEnumOrigins.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum AccountsRetrieveRequestShowEnumOrigins
{
[EnumMember(Value = "classification")]
diff --git a/src/Merge.Client/Accounting/Addresses/AddressesClient.cs b/src/Merge.Client/Accounting/Addresses/AddressesClient.cs
index 1c2bf0fa..c9cfb8ac 100644
--- a/src/Merge.Client/Accounting/Addresses/AddressesClient.cs
+++ b/src/Merge.Client/Accounting/Addresses/AddressesClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AddressesClient
@@ -24,7 +22,7 @@ internal AddressesClient(RawClient client)
/// await client.Accounting.Addresses.RetrieveAsync("id", new AddressesRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
AddressesRetrieveRequest request,
RequestOptions? options = null,
@@ -34,7 +32,7 @@ public async Task RetrieveAsync(
var _query = new Dictionary();
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.RemoteFields != null)
{
@@ -44,17 +42,19 @@ public async Task RetrieveAsync(
{
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/addresses/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/addresses/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs b/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs
index 17dcf907..38a47b27 100644
--- a/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Addresses/Requests/AddressesRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AddressesRetrieveRequest
diff --git a/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs b/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs
index 446db1f5..a2cde885 100644
--- a/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs
+++ b/src/Merge.Client/Accounting/AsyncPassthrough/AsyncPassthroughClient.cs
@@ -4,8 +4,6 @@
using Merge.Client.Core;
using OneOf;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AsyncPassthroughClient
@@ -31,23 +29,26 @@ internal AsyncPassthroughClient(RawClient client)
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
DataPassthroughRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/async-passthrough",
- Body = request,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/async-passthrough",
+ Body = request,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -76,22 +77,24 @@ public async Task CreateAsync(
/// await client.Accounting.AsyncPassthrough.RetrieveAsync("async_passthrough_receipt_id");
///
///
- public async Task> RetrieveAsync(
+ public async System.Threading.Tasks.Task> RetrieveAsync(
string asyncPassthroughReceiptId,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/async-passthrough/{asyncPassthroughReceiptId}",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/async-passthrough/{asyncPassthroughReceiptId}",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs b/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs
index 257927f9..367f6774 100644
--- a/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs
+++ b/src/Merge.Client/Accounting/AsyncTasks/AsyncTasksClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AsyncTasksClient
@@ -24,22 +22,24 @@ internal AsyncTasksClient(RawClient client)
/// await client.Accounting.AsyncTasks.RetrieveAsync("id");
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/async-tasks/{id}",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/async-tasks/{id}",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs b/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
index 5298ec50..5701feb2 100644
--- a/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
+++ b/src/Merge.Client/Accounting/Attachments/AttachmentsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AttachmentsClient
@@ -24,7 +22,7 @@ internal AttachmentsClient(RawClient client)
/// await client.Accounting.Attachments.ListAsync(new AttachmentsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
AttachmentsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -51,15 +49,15 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -75,23 +73,25 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteId != null)
{
_query["remote_id"] = request.RemoteId;
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/attachments",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/attachments",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -122,7 +122,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
AccountingAttachmentEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -131,25 +131,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/attachments",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/attachments",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -178,7 +181,7 @@ public async Task CreateAsync(
/// await client.Accounting.Attachments.RetrieveAsync("id", new AttachmentsRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
AttachmentsRetrieveRequest request,
RequestOptions? options = null,
@@ -188,19 +191,21 @@ public async Task RetrieveAsync(
var _query = new Dictionary();
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/attachments/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/attachments/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -229,21 +234,23 @@ public async Task RetrieveAsync(
/// await client.Accounting.Attachments.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/attachments/meta/post",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/attachments/meta/post",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs b/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs
index 6daa8e7a..2535c457 100644
--- a/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/Attachments/Requests/AccountingAttachmentEndpointRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AccountingAttachmentEndpointRequest
diff --git a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs
index afc4fff7..5f88a575 100644
--- a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs
+++ b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AttachmentsListRequest
diff --git a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs
index 5b4d0c74..11c9307e 100644
--- a/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Attachments/Requests/AttachmentsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AttachmentsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs b/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
index e5fb7388..0f947620 100644
--- a/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
+++ b/src/Merge.Client/Accounting/AuditTrail/AuditTrailClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AuditTrailClient
@@ -24,7 +22,7 @@ internal AuditTrailClient(RawClient client)
/// await client.Accounting.AuditTrail.ListAsync(new AuditTrailListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
AuditTrailListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -45,7 +43,7 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.StartDate != null)
{
@@ -55,17 +53,19 @@ public async Task ListAsync(
{
_query["user_email"] = request.UserEmail;
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/audit-trail",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/audit-trail",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs b/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs
index abd216e0..39cae663 100644
--- a/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs
+++ b/src/Merge.Client/Accounting/AuditTrail/Requests/AuditTrailListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record AuditTrailListRequest
diff --git a/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs b/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs
index 37a4c6b9..95322274 100644
--- a/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs
+++ b/src/Merge.Client/Accounting/AvailableActions/AvailableActionsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class AvailableActionsClient
@@ -24,21 +22,23 @@ internal AvailableActionsClient(RawClient client)
/// await client.Accounting.AvailableActions.RetrieveAsync();
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/available-actions",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/available-actions",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs b/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs
index 4e68986e..25316188 100644
--- a/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs
+++ b/src/Merge.Client/Accounting/BalanceSheets/BalanceSheetsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class BalanceSheetsClient
@@ -24,7 +22,7 @@ internal BalanceSheetsClient(RawClient client)
/// await client.Accounting.BalanceSheets.ListAsync(new BalanceSheetsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
BalanceSheetsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -55,15 +53,15 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -79,23 +77,25 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteId != null)
{
_query["remote_id"] = request.RemoteId;
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/balance-sheets",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/balance-sheets",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -124,7 +124,7 @@ public async Task ListAsync(
/// await client.Accounting.BalanceSheets.RetrieveAsync("id", new BalanceSheetsRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
BalanceSheetsRetrieveRequest request,
RequestOptions? options = null,
@@ -138,19 +138,21 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
- }
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/balance-sheets/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
+ }
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/balance-sheets/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs
index 412f095d..c52a8ed5 100644
--- a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs
+++ b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BalanceSheetsListRequest
diff --git a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs
index 333a7774..e014f9a2 100644
--- a/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/BalanceSheets/Requests/BalanceSheetsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BalanceSheetsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs b/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs
index 9ba163df..cf2876c0 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/BankFeedAccountsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class BankFeedAccountsClient
@@ -24,7 +22,7 @@ internal BankFeedAccountsClient(RawClient client)
/// await client.Accounting.BankFeedAccounts.ListAsync(new BankFeedAccountsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
BankFeedAccountsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -37,31 +35,33 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/bank-feed-accounts",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/bank-feed-accounts",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -92,7 +92,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
BankFeedAccountEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -101,25 +101,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/bank-feed-accounts",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/bank-feed-accounts",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -148,7 +151,7 @@ public async Task CreateAsync(
/// await client.Accounting.BankFeedAccounts.RetrieveAsync("id", new BankFeedAccountsRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
BankFeedAccountsRetrieveRequest request,
RequestOptions? options = null,
@@ -158,19 +161,21 @@ public async Task RetrieveAsync(
var _query = new Dictionary();
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/bank-feed-accounts/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/bank-feed-accounts/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -199,21 +204,23 @@ public async Task RetrieveAsync(
/// await client.Accounting.BankFeedAccounts.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/bank-feed-accounts/meta/post",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/bank-feed-accounts/meta/post",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs
index 538cccc9..00be1aa7 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountEndpointRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BankFeedAccountEndpointRequest
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs
index 5e189270..a1e4323f 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BankFeedAccountsListRequest
diff --git a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs
index db056409..95cabd74 100644
--- a/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedAccounts/Requests/BankFeedAccountsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BankFeedAccountsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs b/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs
index be424b8f..a9a54d3d 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/BankFeedTransactionsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class BankFeedTransactionsClient
@@ -24,7 +22,7 @@ internal BankFeedTransactionsClient(RawClient client)
/// await client.Accounting.BankFeedTransactions.ListAsync(new BankFeedTransactionsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
BankFeedTransactionsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -51,19 +49,19 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.IsProcessed != null)
{
- _query["is_processed"] = request.IsProcessed.ToString();
+ _query["is_processed"] = JsonUtils.Serialize(request.IsProcessed.Value);
}
if (request.ModifiedAfter != null)
{
@@ -79,23 +77,25 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteId != null)
{
_query["remote_id"] = request.RemoteId;
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/bank-feed-transactions",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/bank-feed-transactions",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -126,7 +126,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
BankFeedTransactionEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -135,25 +135,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/bank-feed-transactions",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/bank-feed-transactions",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -185,7 +188,7 @@ public async Task CreateAsync(
/// );
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
BankFeedTransactionsRetrieveRequest request,
RequestOptions? options = null,
@@ -199,19 +202,21 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/bank-feed-transactions/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/bank-feed-transactions/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -240,21 +245,23 @@ public async Task RetrieveAsync(
/// await client.Accounting.BankFeedTransactions.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/bank-feed-transactions/meta/post",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/bank-feed-transactions/meta/post",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs
index 9ef75861..732d5f54 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionEndpointRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BankFeedTransactionEndpointRequest
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs
index 6b92a907..64015df1 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BankFeedTransactionsListRequest
diff --git a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs
index 2f36d716..ab912749 100644
--- a/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/BankFeedTransactions/Requests/BankFeedTransactionsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record BankFeedTransactionsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs b/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs
index 7407d97b..90c74589 100644
--- a/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs
+++ b/src/Merge.Client/Accounting/CashFlowStatements/CashFlowStatementsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class CashFlowStatementsClient
@@ -24,7 +22,7 @@ internal CashFlowStatementsClient(RawClient client)
/// await client.Accounting.CashFlowStatements.ListAsync(new CashFlowStatementsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
CashFlowStatementsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -55,15 +53,15 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -79,23 +77,25 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteId != null)
{
_query["remote_id"] = request.RemoteId;
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/cash-flow-statements",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/cash-flow-statements",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -127,7 +127,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
CashFlowStatementsRetrieveRequest request,
RequestOptions? options = null,
@@ -141,19 +141,21 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
- }
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/cash-flow-statements/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
+ }
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/cash-flow-statements/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs
index 76163c73..1e352e45 100644
--- a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs
+++ b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CashFlowStatementsListRequest
diff --git a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs
index 94e2f6f2..520101d1 100644
--- a/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/CashFlowStatements/Requests/CashFlowStatementsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CashFlowStatementsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs b/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
index b127fa16..fc271dbf 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/CompanyInfoClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class CompanyInfoClient
@@ -24,7 +22,7 @@ internal CompanyInfoClient(RawClient client)
/// await client.Accounting.CompanyInfo.ListAsync(new CompanyInfoListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
CompanyInfoListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -51,15 +49,15 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -75,23 +73,25 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteId != null)
{
_query["remote_id"] = request.RemoteId;
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/company-info",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/company-info",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -120,7 +120,7 @@ public async Task ListAsync(
/// await client.Accounting.CompanyInfo.RetrieveAsync("id", new CompanyInfoRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
CompanyInfoRetrieveRequest request,
RequestOptions? options = null,
@@ -134,19 +134,21 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/company-info/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/company-info/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
index 65736585..0e2117f6 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CompanyInfoListRequest
diff --git a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs
index d81879c1..5737aa39 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/Requests/CompanyInfoRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CompanyInfoRetrieveRequest
diff --git a/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoListRequestExpand.cs b/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoListRequestExpand.cs
index 80bcf510..4932bc2b 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoListRequestExpand.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoListRequestExpand.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CompanyInfoListRequestExpand
{
[EnumMember(Value = "addresses")]
diff --git a/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoRetrieveRequestExpand.cs b/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoRetrieveRequestExpand.cs
index 35f6bb4a..c27d30e5 100644
--- a/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoRetrieveRequestExpand.cs
+++ b/src/Merge.Client/Accounting/CompanyInfo/Types/CompanyInfoRetrieveRequestExpand.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CompanyInfoRetrieveRequestExpand
{
[EnumMember(Value = "addresses")]
diff --git a/src/Merge.Client/Accounting/Contacts/ContactsClient.cs b/src/Merge.Client/Accounting/Contacts/ContactsClient.cs
index 1e77d9e9..d2668875 100644
--- a/src/Merge.Client/Accounting/Contacts/ContactsClient.cs
+++ b/src/Merge.Client/Accounting/Contacts/ContactsClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class ContactsClient
@@ -24,7 +22,7 @@ internal ContactsClient(RawClient client)
/// await client.Accounting.Contacts.ListAsync(new ContactsListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
ContactsListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -59,19 +57,21 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeRemoteFields != null)
{
- _query["include_remote_fields"] = request.IncludeRemoteFields.ToString();
+ _query["include_remote_fields"] = JsonUtils.Serialize(
+ request.IncludeRemoteFields.Value
+ );
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.IsCustomer != null)
{
@@ -99,7 +99,7 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteFields != null)
{
@@ -113,17 +113,19 @@ public async Task ListAsync(
{
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/contacts",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/contacts",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -154,7 +156,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
ContactEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -163,25 +165,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/contacts",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/contacts",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -210,7 +215,7 @@ public async Task CreateAsync(
/// await client.Accounting.Contacts.RetrieveAsync("id", new ContactsRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
ContactsRetrieveRequest request,
RequestOptions? options = null,
@@ -224,11 +229,13 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeRemoteFields != null)
{
- _query["include_remote_fields"] = request.IncludeRemoteFields.ToString();
+ _query["include_remote_fields"] = JsonUtils.Serialize(
+ request.IncludeRemoteFields.Value
+ );
}
if (request.RemoteFields != null)
{
@@ -238,17 +245,19 @@ public async Task RetrieveAsync(
{
_query["show_enum_origins"] = request.ShowEnumOrigins.ToString();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/contacts/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/contacts/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -277,21 +286,23 @@ public async Task RetrieveAsync(
/// await client.Accounting.Contacts.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/contacts/meta/post",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/contacts/meta/post",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -322,7 +333,7 @@ public async Task MetaPostRetrieveAsync(
/// );
///
///
- public async Task RemoteFieldClassesListAsync(
+ public async System.Threading.Tasks.Task RemoteFieldClassesListAsync(
ContactsRemoteFieldClassesListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -335,35 +346,37 @@ public async Task RemoteFieldClassesListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.IsCommonModelField != null)
{
- _query["is_common_model_field"] = request.IsCommonModelField.ToString();
+ _query["is_common_model_field"] = JsonUtils.Serialize(request.IsCommonModelField.Value);
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
- }
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/contacts/remote-field-classes",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ _query["page_size"] = request.PageSize.Value.ToString();
+ }
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/contacts/remote-field-classes",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/Contacts/Requests/ContactEndpointRequest.cs b/src/Merge.Client/Accounting/Contacts/Requests/ContactEndpointRequest.cs
index 2777fc18..d0a4c987 100644
--- a/src/Merge.Client/Accounting/Contacts/Requests/ContactEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/Contacts/Requests/ContactEndpointRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record ContactEndpointRequest
diff --git a/src/Merge.Client/Accounting/Contacts/Requests/ContactsListRequest.cs b/src/Merge.Client/Accounting/Contacts/Requests/ContactsListRequest.cs
index c7ac58b2..2dea66a1 100644
--- a/src/Merge.Client/Accounting/Contacts/Requests/ContactsListRequest.cs
+++ b/src/Merge.Client/Accounting/Contacts/Requests/ContactsListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record ContactsListRequest
diff --git a/src/Merge.Client/Accounting/Contacts/Requests/ContactsRemoteFieldClassesListRequest.cs b/src/Merge.Client/Accounting/Contacts/Requests/ContactsRemoteFieldClassesListRequest.cs
index 18536cf4..09f023f4 100644
--- a/src/Merge.Client/Accounting/Contacts/Requests/ContactsRemoteFieldClassesListRequest.cs
+++ b/src/Merge.Client/Accounting/Contacts/Requests/ContactsRemoteFieldClassesListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record ContactsRemoteFieldClassesListRequest
diff --git a/src/Merge.Client/Accounting/Contacts/Requests/ContactsRetrieveRequest.cs b/src/Merge.Client/Accounting/Contacts/Requests/ContactsRetrieveRequest.cs
index eba46ca3..b1bd8bcf 100644
--- a/src/Merge.Client/Accounting/Contacts/Requests/ContactsRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Contacts/Requests/ContactsRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record ContactsRetrieveRequest
diff --git a/src/Merge.Client/Accounting/Contacts/Types/ContactsListRequestExpand.cs b/src/Merge.Client/Accounting/Contacts/Types/ContactsListRequestExpand.cs
index caecf6a4..fae4e3cf 100644
--- a/src/Merge.Client/Accounting/Contacts/Types/ContactsListRequestExpand.cs
+++ b/src/Merge.Client/Accounting/Contacts/Types/ContactsListRequestExpand.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum ContactsListRequestExpand
{
[EnumMember(Value = "addresses")]
diff --git a/src/Merge.Client/Accounting/Contacts/Types/ContactsRetrieveRequestExpand.cs b/src/Merge.Client/Accounting/Contacts/Types/ContactsRetrieveRequestExpand.cs
index 205e70b6..cb2cf93c 100644
--- a/src/Merge.Client/Accounting/Contacts/Types/ContactsRetrieveRequestExpand.cs
+++ b/src/Merge.Client/Accounting/Contacts/Types/ContactsRetrieveRequestExpand.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum ContactsRetrieveRequestExpand
{
[EnumMember(Value = "addresses")]
diff --git a/src/Merge.Client/Accounting/CreditNotes/CreditNotesClient.cs b/src/Merge.Client/Accounting/CreditNotes/CreditNotesClient.cs
index c82b950a..d6675301 100644
--- a/src/Merge.Client/Accounting/CreditNotes/CreditNotesClient.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/CreditNotesClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class CreditNotesClient
@@ -24,7 +22,7 @@ internal CreditNotesClient(RawClient client)
/// await client.Accounting.CreditNotes.ListAsync(new CreditNotesListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
CreditNotesListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -55,15 +53,15 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -79,7 +77,7 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteFields != null)
{
@@ -105,17 +103,19 @@ public async Task ListAsync(
Constants.DateTimeFormat
);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/credit-notes",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/credit-notes",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -146,7 +146,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
CreditNoteEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -155,25 +155,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/credit-notes",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/credit-notes",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -202,7 +205,7 @@ public async Task CreateAsync(
/// await client.Accounting.CreditNotes.RetrieveAsync("id", new CreditNotesRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
CreditNotesRetrieveRequest request,
RequestOptions? options = null,
@@ -216,7 +219,7 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.RemoteFields != null)
{
@@ -226,17 +229,19 @@ public async Task RetrieveAsync(
{
_query["show_enum_origins"] = request.ShowEnumOrigins.Value.Stringify();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/credit-notes/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/credit-notes/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -265,21 +270,23 @@ public async Task RetrieveAsync(
/// await client.Accounting.CreditNotes.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task MetaPostRetrieveAsync(
RequestOptions? options = null,
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/credit-notes/meta/post",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/credit-notes/meta/post",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNoteEndpointRequest.cs b/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNoteEndpointRequest.cs
index 3619f74e..ad1fd8c2 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNoteEndpointRequest.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNoteEndpointRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CreditNoteEndpointRequest
diff --git a/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesListRequest.cs b/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesListRequest.cs
index 6604653d..99492fde 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesListRequest.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CreditNotesListRequest
diff --git a/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesRetrieveRequest.cs b/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesRetrieveRequest.cs
index 32598b57..6a3bb6c6 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Requests/CreditNotesRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record CreditNotesRetrieveRequest
diff --git a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestExpand.cs b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestExpand.cs
index ea61052c..cf7c40fb 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestExpand.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestExpand.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CreditNotesListRequestExpand
{
[EnumMember(Value = "accounting_period")]
diff --git a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestRemoteFields.cs b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestRemoteFields.cs
index 5fa69b23..989ad8c0 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestRemoteFields.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestRemoteFields.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CreditNotesListRequestRemoteFields
{
[EnumMember(Value = "status")]
diff --git a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestShowEnumOrigins.cs b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestShowEnumOrigins.cs
index 2c3daf33..79a0d000 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestShowEnumOrigins.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesListRequestShowEnumOrigins.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CreditNotesListRequestShowEnumOrigins
{
[EnumMember(Value = "status")]
diff --git a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestExpand.cs b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestExpand.cs
index a1418629..19397fe6 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestExpand.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestExpand.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CreditNotesRetrieveRequestExpand
{
[EnumMember(Value = "accounting_period")]
diff --git a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestRemoteFields.cs b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestRemoteFields.cs
index 85856759..7602451d 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestRemoteFields.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestRemoteFields.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CreditNotesRetrieveRequestRemoteFields
{
[EnumMember(Value = "status")]
diff --git a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestShowEnumOrigins.cs b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestShowEnumOrigins.cs
index 35a4d72d..4875d246 100644
--- a/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestShowEnumOrigins.cs
+++ b/src/Merge.Client/Accounting/CreditNotes/Types/CreditNotesRetrieveRequestShowEnumOrigins.cs
@@ -2,11 +2,9 @@
using System.Text.Json.Serialization;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
-[JsonConverter(typeof(StringEnumSerializer))]
+[JsonConverter(typeof(EnumSerializer))]
public enum CreditNotesRetrieveRequestShowEnumOrigins
{
[EnumMember(Value = "status")]
diff --git a/src/Merge.Client/Accounting/DeleteAccount/DeleteAccountClient.cs b/src/Merge.Client/Accounting/DeleteAccount/DeleteAccountClient.cs
index 75559a6d..76483b9f 100644
--- a/src/Merge.Client/Accounting/DeleteAccount/DeleteAccountClient.cs
+++ b/src/Merge.Client/Accounting/DeleteAccount/DeleteAccountClient.cs
@@ -2,8 +2,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class DeleteAccountClient
@@ -28,16 +26,18 @@ public async System.Threading.Tasks.Task DeleteAsync(
CancellationToken cancellationToken = default
)
{
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/delete-account",
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/delete-account",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
if (response.StatusCode is >= 200 and < 400)
{
return;
diff --git a/src/Merge.Client/Accounting/Employees/EmployeesClient.cs b/src/Merge.Client/Accounting/Employees/EmployeesClient.cs
index a85700a8..e0602e70 100644
--- a/src/Merge.Client/Accounting/Employees/EmployeesClient.cs
+++ b/src/Merge.Client/Accounting/Employees/EmployeesClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class EmployeesClient
@@ -24,7 +22,7 @@ internal EmployeesClient(RawClient client)
/// await client.Accounting.Employees.ListAsync(new EmployeesListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
EmployeesListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -41,31 +39,33 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/employees",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/employees",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -94,7 +94,7 @@ public async Task ListAsync(
/// await client.Accounting.Employees.RetrieveAsync("id", new EmployeesRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
EmployeesRetrieveRequest request,
RequestOptions? options = null,
@@ -108,19 +108,21 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/employees/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/employees/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
diff --git a/src/Merge.Client/Accounting/Employees/Requests/EmployeesListRequest.cs b/src/Merge.Client/Accounting/Employees/Requests/EmployeesListRequest.cs
index 1cfdb05b..27824461 100644
--- a/src/Merge.Client/Accounting/Employees/Requests/EmployeesListRequest.cs
+++ b/src/Merge.Client/Accounting/Employees/Requests/EmployeesListRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record EmployeesListRequest
diff --git a/src/Merge.Client/Accounting/Employees/Requests/EmployeesRetrieveRequest.cs b/src/Merge.Client/Accounting/Employees/Requests/EmployeesRetrieveRequest.cs
index bd329f7a..4c865932 100644
--- a/src/Merge.Client/Accounting/Employees/Requests/EmployeesRetrieveRequest.cs
+++ b/src/Merge.Client/Accounting/Employees/Requests/EmployeesRetrieveRequest.cs
@@ -1,7 +1,5 @@
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public record EmployeesRetrieveRequest
diff --git a/src/Merge.Client/Accounting/Expenses/ExpensesClient.cs b/src/Merge.Client/Accounting/Expenses/ExpensesClient.cs
index ded8711c..9990b86a 100644
--- a/src/Merge.Client/Accounting/Expenses/ExpensesClient.cs
+++ b/src/Merge.Client/Accounting/Expenses/ExpensesClient.cs
@@ -3,8 +3,6 @@
using System.Threading;
using Merge.Client.Core;
-#nullable enable
-
namespace Merge.Client.Accounting;
public partial class ExpensesClient
@@ -24,7 +22,7 @@ internal ExpensesClient(RawClient client)
/// await client.Accounting.Expenses.ListAsync(new ExpensesListRequest());
///
///
- public async Task ListAsync(
+ public async System.Threading.Tasks.Task ListAsync(
ExpensesListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -55,19 +53,21 @@ public async Task ListAsync(
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeRemoteFields != null)
{
- _query["include_remote_fields"] = request.IncludeRemoteFields.ToString();
+ _query["include_remote_fields"] = JsonUtils.Serialize(
+ request.IncludeRemoteFields.Value
+ );
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.ModifiedAfter != null)
{
@@ -83,7 +83,7 @@ public async Task ListAsync(
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
+ _query["page_size"] = request.PageSize.Value.ToString();
}
if (request.RemoteId != null)
{
@@ -101,17 +101,19 @@ public async Task ListAsync(
Constants.DateTimeFormat
);
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/expenses",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/expenses",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -142,7 +144,7 @@ public async Task ListAsync(
/// );
///
///
- public async Task CreateAsync(
+ public async System.Threading.Tasks.Task CreateAsync(
ExpenseEndpointRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -151,25 +153,28 @@ public async Task CreateAsync(
var _query = new Dictionary();
if (request.IsDebugMode != null)
{
- _query["is_debug_mode"] = request.IsDebugMode.ToString();
+ _query["is_debug_mode"] = JsonUtils.Serialize(request.IsDebugMode.Value);
}
if (request.RunAsync != null)
{
- _query["run_async"] = request.RunAsync.ToString();
+ _query["run_async"] = JsonUtils.Serialize(request.RunAsync.Value);
}
var requestBody = new Dictionary() { { "model", request.Model } };
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Post,
- Path = "accounting/v1/expenses",
- Body = requestBody,
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Post,
+ Path = "accounting/v1/expenses",
+ Body = requestBody,
+ Query = _query,
+ ContentType = "application/json",
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -198,7 +203,7 @@ public async Task CreateAsync(
/// await client.Accounting.Expenses.RetrieveAsync("id", new ExpensesRetrieveRequest());
///
///
- public async Task RetrieveAsync(
+ public async System.Threading.Tasks.Task RetrieveAsync(
string id,
ExpensesRetrieveRequest request,
RequestOptions? options = null,
@@ -212,23 +217,27 @@ public async Task RetrieveAsync(
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeRemoteFields != null)
{
- _query["include_remote_fields"] = request.IncludeRemoteFields.ToString();
+ _query["include_remote_fields"] = JsonUtils.Serialize(
+ request.IncludeRemoteFields.Value
+ );
}
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = $"accounting/v1/expenses/{id}",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = $"accounting/v1/expenses/{id}",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -259,7 +268,7 @@ public async Task RetrieveAsync(
/// );
///
///
- public async Task LinesRemoteFieldClassesListAsync(
+ public async System.Threading.Tasks.Task LinesRemoteFieldClassesListAsync(
ExpensesLinesRemoteFieldClassesListRequest request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
@@ -272,35 +281,37 @@ public async Task LinesRemoteFieldClassesListAsyn
}
if (request.IncludeDeletedData != null)
{
- _query["include_deleted_data"] = request.IncludeDeletedData.ToString();
+ _query["include_deleted_data"] = JsonUtils.Serialize(request.IncludeDeletedData.Value);
}
if (request.IncludeRemoteData != null)
{
- _query["include_remote_data"] = request.IncludeRemoteData.ToString();
+ _query["include_remote_data"] = JsonUtils.Serialize(request.IncludeRemoteData.Value);
}
if (request.IncludeShellData != null)
{
- _query["include_shell_data"] = request.IncludeShellData.ToString();
+ _query["include_shell_data"] = JsonUtils.Serialize(request.IncludeShellData.Value);
}
if (request.IsCommonModelField != null)
{
- _query["is_common_model_field"] = request.IsCommonModelField.ToString();
+ _query["is_common_model_field"] = JsonUtils.Serialize(request.IsCommonModelField.Value);
}
if (request.PageSize != null)
{
- _query["page_size"] = request.PageSize.ToString();
- }
- var response = await _client.MakeRequestAsync(
- new RawClient.JsonApiRequest
- {
- BaseUrl = _client.Options.BaseUrl,
- Method = HttpMethod.Get,
- Path = "accounting/v1/expenses/lines/remote-field-classes",
- Query = _query,
- Options = options,
- },
- cancellationToken
- );
+ _query["page_size"] = request.PageSize.Value.ToString();
+ }
+ var response = await _client
+ .MakeRequestAsync(
+ new RawClient.JsonApiRequest
+ {
+ BaseUrl = _client.Options.BaseUrl,
+ Method = HttpMethod.Get,
+ Path = "accounting/v1/expenses/lines/remote-field-classes",
+ Query = _query,
+ Options = options,
+ },
+ cancellationToken
+ )
+ .ConfigureAwait(false);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
if (response.StatusCode is >= 200 and < 400)
{
@@ -329,21 +340,23 @@ public async Task LinesRemoteFieldClassesListAsyn
/// await client.Accounting.Expenses.MetaPostRetrieveAsync();
///
///
- public async Task MetaPostRetrieveAsync(
+ public async System.Threading.Tasks.Task