OrderJsonSerializer

Extends \AbstractJsonSerializer

Class OrderJsonSerializer

This class will serialize and deserialize an Order entity. It can be used into many places where PHP interacts with external requests such as AJAX or API communication.

category

System

package

Extensions

subpackage

Serializers

Methods

AbstractJsonSerializer Constructor

__construct() 
inherited

If you override this constructor do not forget to call it from the child class.

deserialize

deserialize( $string,  $baseObject = null) 
inherited abstract

Arguments

$string

$baseObject

deserializeAddress

deserializeAddress( $json) 

Arguments

$json

deserializeAttribute

deserializeAttribute( $json,  $baseObject = null) 

Arguments

$json

$baseObject

deserializeOrderItem

deserializeOrderItem( $json,  $baseObject = null) 

Arguments

$json

$baseObject

deserializeOrderTotal

deserializeOrderTotal( $json,  $baseObject = null) 

Arguments

$json

$baseObject

JSON Encode Wrapper

jsonEncode(array $data) : string
inherited

This function provides PHP v5.3 compatibility and it should be used when serialized objects need to be encoded directly from the serializer instance.

Arguments

$data

array

Contains the data to be JSON encoded.

Response

string

Returns the encoded JSON string that represents the data.

serialize

serialize( $object,  $encode = true) 
inherited abstract

Arguments

$object

$encode

serializeAddress

serializeAddress(\AddressBlockInterface $addressBlock) 

Arguments

$addressBlock

\AddressBlockInterface

serializeAttribute

serializeAttribute(\OrderItemAttributeInterface $orderItemAttribute) 

Arguments

$orderItemAttribute

\OrderItemAttributeInterface

serializeOrderItem

serializeOrderItem(\OrderItemInterface $orderItem) 

Arguments

$orderItem

\OrderItemInterface

serializeOrderStatusHistoryListItem

serializeOrderStatusHistoryListItem(\OrderStatusHistoryListItem $orderStatusHistoryListItem) 

Arguments

$orderStatusHistoryListItem

\OrderStatusHistoryListItem

serializeOrderTotal

serializeOrderTotal(\OrderTotalInterface $orderTotal) 

Arguments

$orderTotal

\OrderTotalInterface

Properties