File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
33## Version [ 0.5.0] ( https://github.com/MC2IT/Agicap.ps1/compare/v0.4.0...v0.5.0 )
4- - ** Payments:** added the ` New-SynchronizedBeneficiary ` cmdlets.
4+ - ** Payments:** added the ` New-SynchronizedBeneficiary ` , ` Sync-Beneficiary ` cmdlets.
55
66## Version [ 0.4.0] ( https://github.com/MC2IT/Agicap.ps1/compare/v0.3.0...v0.4.0 )
77- Added the ` -Scope ` parameter to the ` New-Client ` cmdlet.
Original file line number Diff line number Diff line change 1+ using namespace Mc2it.Agicap
2+ using namespace System.Net.Http
3+
4+ <#
5+ . SYNOPSIS
6+ Starts a bulk synchronization of beneficiaries from the ERP software.
7+ . OUTPUTS
8+ The identifier of the newly started synchronization.
9+ #>
10+ function Sync-Beneficiary {
11+ [CmdletBinding ()]
12+ [OutputType ([guid ])]
13+ param (
14+ # The API client.
15+ [Parameter (Mandatory , Position = 1 )]
16+ [Client ] $Client ,
17+
18+ # The beneficiaries to synchronize.
19+ [Parameter (Mandatory , Position = 2 )]
20+ [SynchronizedBeneficiary []] $Beneficiaries
21+ )
22+
23+ begin {
24+ $api = $Client.Payments.Beneficiaries ($EntityId ).Synchronization
25+ }
26+
27+ process {
28+ try { $api.Create ($Beneficiaries ) }
29+ catch [HttpRequestException ] { Write-Error $_ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments