Public/MT4/Invoke-MT4BackupRestoreOrders.ps1
|
function Invoke-MT4BackupRestoreOrders { <# .SYNOPSIS Restore orders from backup #> [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')] param( [Parameter()][string] $TradePlatform, [Parameter()][switch] $ConfirmQuery, [Parameter()][object] $Body, [Parameter()][Nullable[guid]] $CacheId, [Parameter()][int] $CacheTimeout, [Parameter()][string] $IdempotencyKey ) if (-not $PSCmdlet.ShouldProcess('MT4/BackupRestoreOrders')) { return } $q = @{} if ($ConfirmQuery) { $q['confirm'] = 'true' } $reqArgs = @{ Method = 'Post'; Path = "/api/v2/MT4/{tradePlatform}/BackupRestoreOrders"; TradePlatform = $TradePlatform; Query = $q; Body = $Body } if ($PSBoundParameters.ContainsKey('CacheId')) { $reqArgs.CacheId = $CacheId } if ($PSBoundParameters.ContainsKey('CacheTimeout')) { $reqArgs.CacheTimeout = $CacheTimeout } if ($PSBoundParameters.ContainsKey('IdempotencyKey')) { $reqArgs.IdempotencyKey = $IdempotencyKey } Invoke-MyWebApiRequest @reqArgs } |