/**
  * List countries available in the Voxbone coverage
  * @param  int             $pageNumber        Required parameter: The page number, starting at 0
  * @param  int             $pageSize          Required parameter: The page size (max number of entities that are displayed in the response).
  * @param  string|null     $countryCodeA3     Optional parameter: The three letter identifier for the country
  * @param  string|null     $didType           Optional parameter: DID services offered in the country
  * @return mixed response from the API call*/
 public function getCountries($pageNumber, $pageSize, $countryCodeA3 = NULL, $didType = NULL)
 {
     //the base uri for api requests
     $queryBuilder = Configuration::BASEURI;
     //prepare query string for API call
     $queryBuilder = $queryBuilder . '/inventory/country';
     //process optional query parameters
     APIHelper::appendUrlWithQueryParameters($queryBuilder, array('pageNumber' => $pageNumber, 'pageSize' => $pageSize, 'countryCodeA3' => $countryCodeA3, 'didType' => $didType));
     //validate and preprocess url
     $queryUrl = APIHelper::cleanUrl($queryBuilder);
     //prepare headers
     $headers = array('user-agent' => 'APIMATIC 2.0', 'Accept' => 'application/json');
     //prepare API request
     $request = Unirest::get($queryUrl, $headers);
     //and invoke the API call request to fetch the response
     $response = Unirest::getResponse($request);
     //Error handling using HTTP status codes
     if ($response->code < 200 || $response->code > 206) {
         //[200,206] = HTTP OK
         throw new APIException("HTTP Response Not OK", $response->code);
     }
     return $response->body;
 }
 /**
  * List available sms links
  * @param  int|null        $groupId       Optional parameter: The identifier of the sms link's group
  * @param  string|null     $type          Optional parameter: The protocol of the sms link
  * @param  string|null     $direction     Optional parameter: the direction of the sms link
  * @param  string|null     $smsLinkId     Optional parameter: The identifier of the sms link
  * @return mixed response from the API call*/
 public function getSmsLinks($groupId = NULL, $type = NULL, $direction = NULL, $smsLinkId = NULL)
 {
     //the base uri for api requests
     $queryBuilder = Configuration::BASEURI;
     //prepare query string for API call
     $queryBuilder = $queryBuilder . '/configuration/smslink';
     //process optional query parameters
     APIHelper::appendUrlWithQueryParameters($queryBuilder, array('groupId' => $groupId, 'type' => $type, 'direction' => $direction, 'smsLinkId' => $smsLinkId));
     //validate and preprocess url
     $queryUrl = APIHelper::cleanUrl($queryBuilder);
     //prepare headers
     $headers = array('User-Agent' => 'APIMATIC 2.0', 'Accept' => 'application/json');
     //prepare API request
     $request = Unirest::get($queryUrl, $headers);
     //and invoke the API call request to fetch the response
     $response = Unirest::getResponse($request);
     //Error handling using HTTP status codes
     if ($response->code < 200 || $response->code > 206) {
         //[200,206] = HTTP OK
         throw new APIException("HTTP Response Not OK", $response->code);
     }
     return $response->body;
 }
 /**
  * List or search your orders
  * @param  int             $pageNumber            Required parameter: The page number, starting at 0
  * @param  int             $pageSize              Required parameter: The page size (max number of entities that are displayed in the response)
  * @param  string|null     $reference             Optional parameter: The reference assigned to the order by voxbone
  * @param  string|null     $customerReference     Optional parameter: The custom reference assigned to the cart that created the order
  * @param  string|null     $status                Optional parameter: The current order status
  * @param  string|null     $dateFrom              Optional parameter: The earliest date at which the order was created ('yyyy-MM-dd HH:mm:ss' format)
  * @param  string|null     $dateTo                Optional parameter: The latest date at which the order was created ('yyyy-MM-dd HH:mm:ss' format)
  * @return mixed response from the API call*/
 public function getOrders($pageNumber, $pageSize, $reference = NULL, $customerReference = NULL, $status = NULL, $dateFrom = NULL, $dateTo = NULL)
 {
     //the base uri for api requests
     $queryBuilder = Configuration::BASEURI;
     //prepare query string for API call
     $queryBuilder = $queryBuilder . '/ordering/order';
     //process optional query parameters
     APIHelper::appendUrlWithQueryParameters($queryBuilder, array('pageNumber' => $pageNumber, 'pageSize' => $pageSize, 'reference' => $reference, 'customerReference' => $customerReference, 'status' => $status, 'dateFrom' => $dateFrom, 'dateTo' => $dateTo));
     //validate and preprocess url
     $queryUrl = APIHelper::cleanUrl($queryBuilder);
     //prepare headers
     $headers = array('User-Agent' => 'APIMATIC 2.0', 'Accept' => 'application/json');
     //prepare API request
     $request = Unirest::get($queryUrl, $headers);
     //and invoke the API call request to fetch the response
     $response = Unirest::getResponse($request);
     //Error handling using HTTP status codes
     if ($response->code < 200 || $response->code > 206) {
         //[200,206] = HTTP OK
         throw new APIException("HTTP Response Not OK", $response->code);
     }
     return $response->body;
 }
 /**
  * Check if an address is valid to unblock numbers from a given country and type
  * @param  string     $addressId                    Required parameter: The address identifier
  * @param  string     $didType                      Required parameter: The number type
  * @param  string     $destinationCountryCodeA3     Required parameter: The three letter identifier for the country
  * @return mixed response from the API call*/
 public function getAddressValidation($addressId, $didType, $destinationCountryCodeA3)
 {
     //the base uri for api requests
     $queryBuilder = Configuration::BASEURI;
     //prepare query string for API call
     $queryBuilder = $queryBuilder . '/regulation/address/{addressId}/validation';
     //process optional query parameters
     APIHelper::appendUrlWithTemplateParameters($queryBuilder, array('addressId' => $addressId));
     //process optional query parameters
     APIHelper::appendUrlWithQueryParameters($queryBuilder, array('didType' => $didType, 'destinationCountryCodeA3' => $destinationCountryCodeA3));
     //validate and preprocess url
     $queryUrl = APIHelper::cleanUrl($queryBuilder);
     //prepare headers
     $headers = array('User-Agent' => 'APIMATIC 2.0', 'Accept' => 'application/json');
     //prepare API request
     $request = Unirest::get($queryUrl, $headers);
     //and invoke the API call request to fetch the response
     $response = Unirest::getResponse($request);
     //Error handling using HTTP status codes
     if ($response->code < 200 || $response->code > 206) {
         //[200,206] = HTTP OK
         throw new APIException("HTTP Response Not OK", $response->code);
     }
     return $response->body;
 }