Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Detect which params and build URL appropriately
- if ($PSCmdlet.MyInvocation.BoundParameters.Location) {
- if ($queryParams){
- #Variable present, need to update
- $queryParams += ',location'
- }
- else{#Variable not present, need to create
- $queryParams = '?patchFields=location'
- }
- }
- if ($PSCmdlet.MyInvocation.BoundParameters.LocationStatus){
- if ($queryParams){
- #Variable present, need to update
- $queryParams += ',f0x.location_status'
- }
- else{#Variable not present, need to create
- $queryParams = '?patchFields=f0x.location_status'
- }
- }
- if ($PSCmdlet.MyInvocation.BoundParameters.Phone) {
- if ($queryParams){
- #Variable present, need to update
- $queryParams += ',f0x.phone'
- }
- else{#Variable not present, need to create
- $queryParams = '?patchFields=f0x.phone'
- }
- }
- if ($PSCmdlet.MyInvocation.BoundParameters.Operator) {
- if ($queryParams){
- #Variable present, need to update
- $queryParams += ',f0x.operator'
- }
- else{#Variable not present, need to create
- $queryParams = '?patchFields=f0x.operator'
- }
- }
- if ($PSCmdlet.MyInvocation.BoundParameters.TimeZone) {
- if ($queryParams){
- #Variable present, need to update
- $queryParams += ',f0x.timezone'
- }
- else{#Variable not present, need to create
- $queryParams = '?patchFields=f0x.timezone'
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement