Exemplo n.º 1
0
 public function build()
 {
     Verify::verifyArrayNonEmpty($this->items, 'items');
     Verify::verifyArrayNonEmpty($this->total, 'total');
     return array('total' => (object) $this->total, 'items' => array_map(function (CheckoutItem $item) {
         return $item->build();
     }, $this->items));
 }
Exemplo n.º 2
0
 public function build()
 {
     Verify::verifyIntRange($this->count, 'count', 1);
     Verify::verifyStringNonEmpty($this->sku, 'sku');
     Verify::verifyArrayNonEmpty($this->price, 'price');
     Verify::verifyArrayNonEmpty($this->name, 'name');
     return array('count' => $this->count, 'name' => (object) $this->name, 'sku' => $this->sku, 'external_id' => $this->externalId, 'price' => (object) $this->price);
 }
Exemplo n.º 3
0
 public function build()
 {
     Verify::verifyStringNonEmpty($this->email, 'email');
     return array('email' => $this->email, 'external_id' => $this->externalId);
 }