'string',
'type' => 'string',
'state' => 'string',
'pickup_details' => '\SquareConnect\Model\OrderFulfillmentPickupDetails',
'shipment_details' => '\SquareConnect\Model\OrderFulfillmentShipmentDetails'
);
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'uid' => 'uid',
'type' => 'type',
'state' => 'state',
'pickup_details' => 'pickup_details',
'shipment_details' => 'shipment_details'
);
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'uid' => 'setUid',
'type' => 'setType',
'state' => 'setState',
'pickup_details' => 'setPickupDetails',
'shipment_details' => 'setShipmentDetails'
);
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'uid' => 'getUid',
'type' => 'getType',
'state' => 'getState',
'pickup_details' => 'getPickupDetails',
'shipment_details' => 'getShipmentDetails'
);
/**
* $uid Unique ID that identifies the fulfillment only within this order.
* @var string
*/
protected $uid;
/**
* $type The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
* @var string
*/
protected $type;
/**
* $state The state of the fulfillment. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values
* @var string
*/
protected $state;
/**
* $pickup_details Contains details for a pickup fulfillment. Required when fulfillment type is `PICKUP`.
* @var \SquareConnect\Model\OrderFulfillmentPickupDetails
*/
protected $pickup_details;
/**
* $shipment_details Contains details for a shipment fulfillment. Required when fulfillment type is `SHIPMENT`. A shipment fulfillment's relationship to fulfillment `state`: `PROPOSED`: A shipment is requested. `RESERVED`: Fulfillment accepted. Shipment processing. `PREPARED`: Shipment packaged. Shipping label created. `COMPLETED`: Package has been shipped. `CANCELED`: Shipment has been canceled. `FAILED`: Shipment has failed.
* @var \SquareConnect\Model\OrderFulfillmentShipmentDetails
*/
protected $shipment_details;
/**
* Constructor
* @param mixed[] $data Associated array of property value initializing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
if (isset($data["uid"])) {
$this->uid = $data["uid"];
} else {
$this->uid = null;
}
if (isset($data["type"])) {
$this->type = $data["type"];
} else {
$this->type = null;
}
if (isset($data["state"])) {
$this->state = $data["state"];
} else {
$this->state = null;
}
if (isset($data["pickup_details"])) {
$this->pickup_details = $data["pickup_details"];
} else {
$this->pickup_details = null;
}
if (isset($data["shipment_details"])) {
$this->shipment_details = $data["shipment_details"];
} else {
$this->shipment_details = null;
}
}
}
/**
* Gets uid
* @return string
*/
public function getUid()
{
return $this->uid;
}
/**
* Sets uid
* @param string $uid Unique ID that identifies the fulfillment only within this order.
* @return $this
*/
public function setUid($uid)
{
$this->uid = $uid;
return $this;
}
/**
* Gets type
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Sets type
* @param string $type The type of the fulfillment. See [OrderFulfillmentType](#type-orderfulfillmenttype) for possible values
* @return $this
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Gets state
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* Sets state
* @param string $state The state of the fulfillment. See [OrderFulfillmentState](#type-orderfulfillmentstate) for possible values
* @return $this
*/
public function setState($state)
{
$this->state = $state;
return $this;
}
/**
* Gets pickup_details
* @return \SquareConnect\Model\OrderFulfillmentPickupDetails
*/
public function getPickupDetails()
{
return $this->pickup_details;
}
/**
* Sets pickup_details
* @param \SquareConnect\Model\OrderFulfillmentPickupDetails $pickup_details Contains details for a pickup fulfillment. Required when fulfillment type is `PICKUP`.
* @return $this
*/
public function setPickupDetails($pickup_details)
{
$this->pickup_details = $pickup_details;
return $this;
}
/**
* Gets shipment_details
* @return \SquareConnect\Model\OrderFulfillmentShipmentDetails
*/
public function getShipmentDetails()
{
return $this->shipment_details;
}
/**
* Sets shipment_details
* @param \SquareConnect\Model\OrderFulfillmentShipmentDetails $shipment_details Contains details for a shipment fulfillment. Required when fulfillment type is `SHIPMENT`. A shipment fulfillment's relationship to fulfillment `state`: `PROPOSED`: A shipment is requested. `RESERVED`: Fulfillment accepted. Shipment processing. `PREPARED`: Shipment packaged. Shipping label created. `COMPLETED`: Package has been shipped. `CANCELED`: Shipment has been canceled. `FAILED`: Shipment has failed.
* @return $this
*/
public function setShipmentDetails($shipment_details)
{
$this->shipment_details = $shipment_details;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->$offset);
}
/**
* Gets offset.
* @param integer $offset Offset
* @return mixed
*/
public function offsetGet($offset)
{
return $this->$offset;
}
/**
* Sets value based on offset.
* @param integer $offset Offset
* @param mixed $value Value to be set
* @return void
*/
public function offsetSet($offset, $value)
{
$this->$offset = $value;
}
/**
* Unsets offset.
* @param integer $offset Offset
* @return void
*/
public function offsetUnset($offset)
{
unset($this->$offset);
}
/**
* Gets the string presentation of the object
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SquareConnect\ObjectSerializer::sanitizeForSerialization($this));
}
}
}