Entity

Generic entity

author

Klyde

copyright

EasyTransac

package

Default

Methods

__construct

__construct() 

Allows to fill the entity with data returned by the EasyTransac API

hydrate(Mixed $fields, Boolean $checkRequired = false) : \EasyTransac\Entities\Entity

Arguments

$fields

Mixed

Array or \stdClass

$checkRequired

Boolean

Response

\EasyTransac\Entities\Entity

Fill the entity with the API json response

hydrateWidthObject(\stdClass $fields, Boolean $checkRequired = false) 

Arguments

$fields

\stdClass

$checkRequired

Boolean

Fill the entity with an list of entity (see: CreditCardList with comment tag @array)

hydrateWithArray(\EasyTransac\Entities\Array<Entity> $itemsList, Boolean $checkRequired = false) 

Arguments

$itemsList

\EasyTransac\Entities\Array

$checkRequired

Boolean

Make the mapping between class attributes and API fields

makeMapping() 

Prepares an array with the class fields formatted for the API

toArray() : Array

Response

Array

Properties

mapping

mapping : 

Type(s)