/** * Set Order Option * * @param object $handle * @param array $options */ public function setOptions($handle, array $options) { foreach ($options as $option => $value) { switch (strtolower($option)) { case 'vat': $this->client->Order_SetIsVatIncluded(['orderHandle' => $handle, 'value' => $value]); break; case 'text1': $this->client->Order_SetTextLine1(['orderHandle' => $handle, 'value' => $value]); break; case 'termsofdelivery': $this->client->Order_SetTermsOfDelivery(['orderHandle' => $handle, 'value' => $value]); break; case 'deliveryaddress': $this->client->Order_SetDeliveryAddress(['orderHandle' => $handle, 'value' => $value]); break; case 'deliverycity': $this->client->Order_SetDeliveryCity(['orderHandle' => $handle, 'value' => $value]); break; case 'deliverycountry': $this->client->Order_SetDeliveryCountry(['orderHandle' => $handle, 'value' => $value]); break; case 'deliverypostalcode': $this->client->Order_SetDeliveryPostalCode(['orderHandle' => $handle, 'value' => $value]); break; case 'otherreference': $this->client->Order_SetOtherReference(['orderHandle' => $handle, 'value' => $value]); break; case 'date': $this->client->Order_SetDate(['orderHandle' => $handle, 'value' => $value]); break; case 'layout': $this->client->Order_SetLayout(['orderHandle' => $handle, 'value' => $value]); break; } } }