Scripts/Internal/ConvertTo-DigitalOceanAction.ps1
function ConvertTo-DigitalOceanAction { [CmdletBinding()] param ( # Parameter help description [Parameter(ValueFromPipeline=$true, Mandatory=$true)] [System.Collections.Hashtable] $rawObject ) begin { } process { New-Object PSObject -Property @{ Id = $rawObject.id Status = $rawObject.status Type = $rawObject.type StartedAt = [datetime]$rawObject.started_at CompletedAt = [datetime]$rawObject.completed_at ResourceId = $rawObject.resource_id ResourceType = $rawObject.resource_type Region = $rawObject.region_slug } } end { } } |