UpdateOutcomeGroupDTO
extends AbstractBaseDto
in package
Data Transfer Object for updating outcome groups.
Table of Contents
Properties
- $description : string|null
- $parentOutcomeGroupId : int|null
- $title : string|null
- $vendorGuid : string|null
- $apiPropertyName : string
- The name of the property in the API
Methods
- __construct() : mixed
- BaseDto constructor.
- hasUpdates() : bool
- Check if any field is set for update.
- moveToParent() : self
- Update the parent group (move group).
- toApiArray() : array<string|int, mixed>
- Convert the DTO to an array for API requests
- toArray() : array<int, array{name: string, contents: string}>
- Convert DTO to array for API request.
- updateDescription() : self
- Update only the description.
- updateTitle() : self
- Update only the title.
- updateVendorGuid() : self
- Update vendor GUID.
- withFields() : self
- Create an UpdateOutcomeGroupDTO with only specific fields.
Properties
$description
public
string|null
$description
= null
$parentOutcomeGroupId
public
int|null
$parentOutcomeGroupId
= null
$title
public
string|null
$title
= null
$vendorGuid
public
string|null
$vendorGuid
= null
$apiPropertyName
The name of the property in the API
protected
string
$apiPropertyName
= 'outcome_group'
Methods
__construct()
BaseDto constructor.
public
__construct([array<string, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string, mixed> = []
hasUpdates()
Check if any field is set for update.
public
hasUpdates() : bool
Return values
boolmoveToParent()
Update the parent group (move group).
public
static moveToParent(int $parentGroupId) : self
Parameters
- $parentGroupId : int
Return values
selftoApiArray()
Convert the DTO to an array for API requests
public
toApiArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
Convert DTO to array for API request.
public
toArray() : array<int, array{name: string, contents: string}>
Return values
array<int, array{name: string, contents: string}>updateDescription()
Update only the description.
public
static updateDescription(string $description) : self
Parameters
- $description : string
Return values
selfupdateTitle()
Update only the title.
public
static updateTitle(string $title) : self
Parameters
- $title : string
Return values
selfupdateVendorGuid()
Update vendor GUID.
public
static updateVendorGuid(string $vendorGuid) : self
Parameters
- $vendorGuid : string
Return values
selfwithFields()
Create an UpdateOutcomeGroupDTO with only specific fields.
public
static withFields(array<string, mixed> $fields) : self
Parameters
- $fields : array<string, mixed>