This commit is contained in:
steven 2025-08-11 22:23:30 +02:00
commit 72a26edcff
22092 changed files with 2101903 additions and 0 deletions

142
lib/sms/README.md Normal file
View file

@ -0,0 +1,142 @@
# SwaggerClient-php
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 4.0.0
- Package version: v0.0.1
- Build date: 2018-05-16T00:56:54.871+01:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
PHP 5.4.0 and later
## Installation & Usage
### Composer
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
```
{
"repositories": [
{
"type": "git",
"url": "https://github.com/smsgatewayme/client-php.git"
}
],
"require": {
"smsgatewayme/client": "^0.0.1"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
require_once('/path/to/SwaggerClient-php/autoload.php');
```
## Tests
To run the unit tests:
```
composer install
./vendor/bin/phpunit lib/Tests
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\CallbackApi();
$callback = new \SMSGatewayMe\Client\Model\CreateCallbackRequest(); // \SMSGatewayMe\Client\Model\CreateCallbackRequest | callback to create
try {
$result = $api_instance->createCallback($callback);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallbackApi->createCallback: ', $e->getMessage(), "\n";
}
?>
```
## Documentation for API Endpoints
All URIs are relative to *https://smsgateway.me/api/v4*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CallbackApi* | [**createCallback**](docs/CallbackApi.md#createcallback) | **POST** /callback | Create Callback
*CallbackApi* | [**getCallback**](docs/CallbackApi.md#getcallback) | **GET** /callback/{id} | Get a specific callback
*CallbackApi* | [**searchCallbacks**](docs/CallbackApi.md#searchcallbacks) | **POST** /callback/search | Search callbacks
*CallbackApi* | [**updateCallback**](docs/CallbackApi.md#updatecallback) | **PUT** /callback/{id} | Update callback
*ContactApi* | [**addPhoneNumber**](docs/ContactApi.md#addphonenumber) | **PUT** /contact/{id}/phone-number/{phone-number} | The phone number to add
*ContactApi* | [**createContacts**](docs/ContactApi.md#createcontacts) | **POST** /contact | Create Contacts
*ContactApi* | [**deletePhoneNumber**](docs/ContactApi.md#deletephonenumber) | **DELETE** /contact/{id}/phone-number/{phone-number} | The phone number to delete
*ContactApi* | [**getContact**](docs/ContactApi.md#getcontact) | **GET** /contact/{id} | Get a specific contact
*ContactApi* | [**searchContacts**](docs/ContactApi.md#searchcontacts) | **POST** /contact/search | Search contacts
*ContactApi* | [**updateContact**](docs/ContactApi.md#updatecontact) | **PUT** /contact/{id} | Update contact
*DeviceApi* | [**getDevice**](docs/DeviceApi.md#getdevice) | **GET** /device/{id} | Get a specific device
*DeviceApi* | [**searchDevices**](docs/DeviceApi.md#searchdevices) | **POST** /device/search | Search devices
*MessageApi* | [**cancelMessages**](docs/MessageApi.md#cancelmessages) | **POST** /message/cancel | Cancel messages
*MessageApi* | [**getMessage**](docs/MessageApi.md#getmessage) | **GET** /message/{id} | Get a specific message
*MessageApi* | [**searchMessages**](docs/MessageApi.md#searchmessages) | **POST** /message/search | Search messages
*MessageApi* | [**sendMessages**](docs/MessageApi.md#sendmessages) | **POST** /message/send | Send messages
## Documentation For Models
- [Callback](docs/Callback.md)
- [CallbackSearchResult](docs/CallbackSearchResult.md)
- [CancelMessageRequest](docs/CancelMessageRequest.md)
- [Contact](docs/Contact.md)
- [ContactSearchResult](docs/ContactSearchResult.md)
- [CreateCallbackRequest](docs/CreateCallbackRequest.md)
- [CreateContactRequest](docs/CreateContactRequest.md)
- [Device](docs/Device.md)
- [DeviceAttributes](docs/DeviceAttributes.md)
- [DeviceSearchResult](docs/DeviceSearchResult.md)
- [Error](docs/Error.md)
- [ErrorResponse](docs/ErrorResponse.md)
- [FatalResponse](docs/FatalResponse.md)
- [Message](docs/Message.md)
- [MessageLog](docs/MessageLog.md)
- [MessageSearchResult](docs/MessageSearchResult.md)
- [Search](docs/Search.md)
- [SearchFilter](docs/SearchFilter.md)
- [SearchOrderBy](docs/SearchOrderBy.md)
- [SendMessageRequest](docs/SendMessageRequest.md)
- [UpdateCallbackRequest](docs/UpdateCallbackRequest.md)
- [UpdateContactRequest](docs/UpdateContactRequest.md)
## Documentation For Authorization
## Authorization
- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header
## Author

33
lib/sms/_composer.json Normal file
View file

@ -0,0 +1,33 @@
{
"name": "smsgatewayme/client",
"version": "v0.0.1",
"description": "",
"keywords": [
"swagger",
"php",
"sdk",
"api"
],
"homepage": "https://smsgateway.me",
"license": "Apache v2",
"authors": [
{
"name": "SMS Gateway Me",
"homepage": "https://smsgateway.me"
}
],
"require": {
"php": ">=5.3.3",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"satooshi/php-coveralls": "~0.6.1",
"squizlabs/php_codesniffer": "~2.0"
},
"autoload": {
"psr-4": { "SMSGatewayMe\\Client\\" : "lib/" }
}
}

2131
lib/sms/_composer.lock generated Normal file

File diff suppressed because it is too large Load diff

41
lib/sms/autoload.php Normal file
View file

@ -0,0 +1,41 @@
<?php
/**
* An example of a project-specific implementation.
*
* After registering this autoload function with SPL, the following line
* would cause the function to attempt to load the \SMSGatewayMe\Client\Baz\Qux class
* from /path/to/project/lib/Baz/Qux.php:
*
* new \SMSGatewayMe\Client\Baz\Qux;
*
* @param string $class The fully-qualified class name.
* @return void
*/
spl_autoload_register(function ($class) {
// project-specific namespace prefix
$prefix = 'SMSGatewayMe\\Client\\';
// base directory for the namespace prefix
$base_dir = __DIR__ . '/lib/sms';
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
// no, move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require $file;
}
});

18
lib/sms/docs/Callback.md Normal file
View file

@ -0,0 +1,18 @@
# Callback
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**name** | **string** | | [optional]
**event** | **string** | | [optional]
**deviceId** | **int** | | [optional]
**filterType** | **string** | | [optional]
**filter** | **string** | | [optional]
**method** | **string** | | [optional]
**action** | **string** | | [optional]
**secret** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

206
lib/sms/docs/CallbackApi.md Normal file
View file

@ -0,0 +1,206 @@
# SMSGatewayMe\Client\CallbackApi
All URIs are relative to *https://smsgateway.me/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createCallback**](CallbackApi.md#createCallback) | **POST** /callback | Create Callback
[**getCallback**](CallbackApi.md#getCallback) | **GET** /callback/{id} | Get a specific callback
[**searchCallbacks**](CallbackApi.md#searchCallbacks) | **POST** /callback/search | Search callbacks
[**updateCallback**](CallbackApi.md#updateCallback) | **PUT** /callback/{id} | Update callback
# **createCallback**
> \SMSGatewayMe\Client\Model\Callback createCallback($callback)
Create Callback
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\CallbackApi();
$callback = new \SMSGatewayMe\Client\Model\CreateCallbackRequest(); // \SMSGatewayMe\Client\Model\CreateCallbackRequest | callback to create
try {
$result = $api_instance->createCallback($callback);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallbackApi->createCallback: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**callback** | [**\SMSGatewayMe\Client\Model\CreateCallbackRequest**](\SMSGatewayMe\Client\Model\CreateCallbackRequest.md)| callback to create |
### Return type
[**\SMSGatewayMe\Client\Model\Callback**](Callback.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCallback**
> \SMSGatewayMe\Client\Model\Callback getCallback($id)
Get a specific callback
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\CallbackApi();
$id = "id_example"; // string |
try {
$result = $api_instance->getCallback($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallbackApi->getCallback: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
### Return type
[**\SMSGatewayMe\Client\Model\Callback**](Callback.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **searchCallbacks**
> \SMSGatewayMe\Client\Model\CallbackSearchResult searchCallbacks($search)
Search callbacks
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\CallbackApi();
$search = new \SMSGatewayMe\Client\Model\Search(); // \SMSGatewayMe\Client\Model\Search | Search Criteria
try {
$result = $api_instance->searchCallbacks($search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallbackApi->searchCallbacks: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | [**\SMSGatewayMe\Client\Model\Search**](\SMSGatewayMe\Client\Model\Search.md)| Search Criteria | [optional]
### Return type
[**\SMSGatewayMe\Client\Model\CallbackSearchResult**](CallbackSearchResult.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateCallback**
> \SMSGatewayMe\Client\Model\Callback updateCallback($id, $callback)
Update callback
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\CallbackApi();
$id = "id_example"; // string |
$callback = array(new UpdateCallbackRequest()); // \SMSGatewayMe\Client\Model\UpdateCallbackRequest[] | callback update data
try {
$result = $api_instance->updateCallback($id, $callback);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CallbackApi->updateCallback: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
**callback** | [**\SMSGatewayMe\Client\Model\UpdateCallbackRequest[]**](UpdateCallbackRequest.md)| callback update data |
### Return type
[**\SMSGatewayMe\Client\Model\Callback**](Callback.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# CallbackSearchResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | Total number of results | [optional]
**results** | [**\SMSGatewayMe\Client\Model\Callback[]**](Callback.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,10 @@
# CancelMessageRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | The id of the message you wish to cancel | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

14
lib/sms/docs/Contact.md Normal file
View file

@ -0,0 +1,14 @@
# Contact
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **string** | | [optional]
**phoneNumbers** | **string[]** | | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

308
lib/sms/docs/ContactApi.md Normal file
View file

@ -0,0 +1,308 @@
# SMSGatewayMe\Client\ContactApi
All URIs are relative to *https://smsgateway.me/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addPhoneNumber**](ContactApi.md#addPhoneNumber) | **PUT** /contact/{id}/phone-number/{phone-number} | The phone number to add
[**createContacts**](ContactApi.md#createContacts) | **POST** /contact | Create Contacts
[**deletePhoneNumber**](ContactApi.md#deletePhoneNumber) | **DELETE** /contact/{id}/phone-number/{phone-number} | The phone number to delete
[**getContact**](ContactApi.md#getContact) | **GET** /contact/{id} | Get a specific contact
[**searchContacts**](ContactApi.md#searchContacts) | **POST** /contact/search | Search contacts
[**updateContact**](ContactApi.md#updateContact) | **PUT** /contact/{id} | Update contact
# **addPhoneNumber**
> \SMSGatewayMe\Client\Model\Contact addPhoneNumber($id, $phoneNumber)
The phone number to add
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\ContactApi();
$id = "id_example"; // string |
$phoneNumber = "phoneNumber_example"; // string | phone number to add
try {
$result = $api_instance->addPhoneNumber($id, $phoneNumber);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactApi->addPhoneNumber: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
**phoneNumber** | **string**| phone number to add |
### Return type
[**\SMSGatewayMe\Client\Model\Contact**](Contact.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **createContacts**
> \SMSGatewayMe\Client\Model\Contact[] createContacts($contacts)
Create Contacts
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\ContactApi();
$contacts = array(new CreateContactRequest()); // \SMSGatewayMe\Client\Model\CreateContactRequest[] | contacts to create
try {
$result = $api_instance->createContacts($contacts);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactApi->createContacts: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contacts** | [**\SMSGatewayMe\Client\Model\CreateContactRequest[]**](CreateContactRequest.md)| contacts to create |
### Return type
[**\SMSGatewayMe\Client\Model\Contact[]**](Contact.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deletePhoneNumber**
> \SMSGatewayMe\Client\Model\Contact deletePhoneNumber($id, $phoneNumber)
The phone number to delete
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\ContactApi();
$id = "id_example"; // string |
$phoneNumber = "phoneNumber_example"; // string | phone number to add
try {
$result = $api_instance->deletePhoneNumber($id, $phoneNumber);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactApi->deletePhoneNumber: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
**phoneNumber** | **string**| phone number to add |
### Return type
[**\SMSGatewayMe\Client\Model\Contact**](Contact.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getContact**
> \SMSGatewayMe\Client\Model\Contact getContact($id)
Get a specific contact
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\ContactApi();
$id = "id_example"; // string |
try {
$result = $api_instance->getContact($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactApi->getContact: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
### Return type
[**\SMSGatewayMe\Client\Model\Contact**](Contact.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **searchContacts**
> \SMSGatewayMe\Client\Model\ContactSearchResult searchContacts($search)
Search contacts
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\ContactApi();
$search = new \SMSGatewayMe\Client\Model\Search(); // \SMSGatewayMe\Client\Model\Search | Search Criteria
try {
$result = $api_instance->searchContacts($search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactApi->searchContacts: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | [**\SMSGatewayMe\Client\Model\Search**](\SMSGatewayMe\Client\Model\Search.md)| Search Criteria | [optional]
### Return type
[**\SMSGatewayMe\Client\Model\ContactSearchResult**](ContactSearchResult.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateContact**
> \SMSGatewayMe\Client\Model\Contact updateContact($id, $contact)
Update contact
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\ContactApi();
$id = "id_example"; // string |
$contact = new \SMSGatewayMe\Client\Model\UpdateContactRequest(); // \SMSGatewayMe\Client\Model\UpdateContactRequest | contacts details
try {
$result = $api_instance->updateContact($id, $contact);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContactApi->updateContact: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
**contact** | [**\SMSGatewayMe\Client\Model\UpdateContactRequest**](\SMSGatewayMe\Client\Model\UpdateContactRequest.md)| contacts details |
### Return type
[**\SMSGatewayMe\Client\Model\Contact**](Contact.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# ContactSearchResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | Total number of results | [optional]
**results** | [**\SMSGatewayMe\Client\Model\Contact[]**](Contact.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,17 @@
# CreateCallbackRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**event** | **string** | | [optional]
**deviceId** | **int** | | [optional]
**filterType** | **string** | | [optional]
**filter** | **string** | | [optional]
**method** | **string** | | [optional]
**action** | **string** | | [optional]
**secret** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# CreateContactRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**phoneNumbers** | **string[]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

12
lib/sms/docs/Device.md Normal file
View file

@ -0,0 +1,12 @@
# Device
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **string** | | [optional]
**attributes** | [**\SMSGatewayMe\Client\Model\DeviceAttributes**](DeviceAttributes.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

106
lib/sms/docs/DeviceApi.md Normal file
View file

@ -0,0 +1,106 @@
# SMSGatewayMe\Client\DeviceApi
All URIs are relative to *https://smsgateway.me/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getDevice**](DeviceApi.md#getDevice) | **GET** /device/{id} | Get a specific device
[**searchDevices**](DeviceApi.md#searchDevices) | **POST** /device/search | Search devices
# **getDevice**
> \SMSGatewayMe\Client\Model\Device getDevice($id)
Get a specific device
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\DeviceApi();
$id = "id_example"; // string |
try {
$result = $api_instance->getDevice($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeviceApi->getDevice: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
### Return type
[**\SMSGatewayMe\Client\Model\Device**](Device.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **searchDevices**
> \SMSGatewayMe\Client\Model\DeviceSearchResult searchDevices($search)
Search devices
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\DeviceApi();
$search = new \SMSGatewayMe\Client\Model\Search(); // \SMSGatewayMe\Client\Model\Search | Search Criteria
try {
$result = $api_instance->searchDevices($search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeviceApi->searchDevices: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | [**\SMSGatewayMe\Client\Model\Search**](\SMSGatewayMe\Client\Model\Search.md)| Search Criteria | [optional]
### Return type
[**\SMSGatewayMe\Client\Model\DeviceSearchResult**](DeviceSearchResult.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -0,0 +1,21 @@
# DeviceAttributes
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**phoneNumber** | **string** | | [optional]
**make** | **string** | | [optional]
**model** | **string** | | [optional]
**provider** | **string** | | [optional]
**country** | **string** | | [optional]
**connectionType** | **string** | | [optional]
**battery** | **string** | | [optional]
**signalPercent** | **string** | | [optional]
**wifi** | **bool** | | [optional]
**lat** | **string** | | [optional]
**lng** | **string** | | [optional]
**lastSeen** | [**\DateTime**](\DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# DeviceSearchResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | Total number of results | [optional]
**results** | [**\SMSGatewayMe\Client\Model\Device[]**](Device.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

12
lib/sms/docs/Error.md Normal file
View file

@ -0,0 +1,12 @@
# Error
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key** | **string** | | [optional]
**errors** | **string[]** | | [optional]
**children** | [**\SMSGatewayMe\Client\Model\Error[]**](Error.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# ErrorResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **string** | | [optional]
**data** | [**\SMSGatewayMe\Client\Model\Error[]**](Error.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,10 @@
# FatalResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

16
lib/sms/docs/Message.md Normal file
View file

@ -0,0 +1,16 @@
# Message
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**deviceId** | **int** | | [optional]
**message** | **string** | | [optional]
**status** | **string** | | [optional]
**log** | [**\SMSGatewayMe\Client\Model\MessageLog[]**](MessageLog.md) | | [optional]
**createdAt** | [**\DateTime**](\DateTime.md) | | [optional]
**updatedAt** | [**\DateTime**](\DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

204
lib/sms/docs/MessageApi.md Normal file
View file

@ -0,0 +1,204 @@
# SMSGatewayMe\Client\MessageApi
All URIs are relative to *https://smsgateway.me/api/v4*
Method | HTTP request | Description
------------- | ------------- | -------------
[**cancelMessages**](MessageApi.md#cancelMessages) | **POST** /message/cancel | Cancel messages
[**getMessage**](MessageApi.md#getMessage) | **GET** /message/{id} | Get a specific message
[**searchMessages**](MessageApi.md#searchMessages) | **POST** /message/search | Search messages
[**sendMessages**](MessageApi.md#sendMessages) | **POST** /message/send | Send messages
# **cancelMessages**
> \SMSGatewayMe\Client\Model\Message[] cancelMessages($messages)
Cancel messages
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\MessageApi();
$messages = array(new CancelMessageRequest()); // \SMSGatewayMe\Client\Model\CancelMessageRequest[] | messages to cancel
try {
$result = $api_instance->cancelMessages($messages);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageApi->cancelMessages: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**messages** | [**\SMSGatewayMe\Client\Model\CancelMessageRequest[]**](CancelMessageRequest.md)| messages to cancel |
### Return type
[**\SMSGatewayMe\Client\Model\Message[]**](Message.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getMessage**
> \SMSGatewayMe\Client\Model\Message getMessage($id)
Get a specific message
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\MessageApi();
$id = "id_example"; // string |
try {
$result = $api_instance->getMessage($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageApi->getMessage: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **string**| |
### Return type
[**\SMSGatewayMe\Client\Model\Message**](Message.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **searchMessages**
> \SMSGatewayMe\Client\Model\MessageSearchResult searchMessages($search)
Search messages
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\MessageApi();
$search = new \SMSGatewayMe\Client\Model\Search(); // \SMSGatewayMe\Client\Model\Search | Search Criteria
try {
$result = $api_instance->searchMessages($search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageApi->searchMessages: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**search** | [**\SMSGatewayMe\Client\Model\Search**](\SMSGatewayMe\Client\Model\Search.md)| Search Criteria | [optional]
### Return type
[**\SMSGatewayMe\Client\Model\MessageSearchResult**](MessageSearchResult.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sendMessages**
> \SMSGatewayMe\Client\Model\Message[] sendMessages($messages)
Send messages
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// SMSGatewayMe\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'BEARER');
$api_instance = new SMSGatewayMe\Client\Api\MessageApi();
$messages = array(new SendMessageRequest()); // \SMSGatewayMe\Client\Model\SendMessageRequest[] | messages to send
try {
$result = $api_instance->sendMessages($messages);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MessageApi->sendMessages: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**messages** | [**\SMSGatewayMe\Client\Model\SendMessageRequest[]**](SendMessageRequest.md)| messages to send |
### Return type
[**\SMSGatewayMe\Client\Model\Message[]**](Message.md)
### Authorization
[Authorization](../README.md#Authorization)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# MessageLog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | **string** | | [optional]
**occurredAt** | [**\DateTime**](\DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# MessageSearchResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | Total number of results | [optional]
**results** | [**\SMSGatewayMe\Client\Model\Message[]**](Message.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

13
lib/sms/docs/Search.md Normal file
View file

@ -0,0 +1,13 @@
# Search
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**filters** | [**\SMSGatewayMe\Client\Model\SearchFilter[][]**](array.md) | | [optional]
**orderBy** | [**\SMSGatewayMe\Client\Model\SearchOrderBy[]**](SearchOrderBy.md) | | [optional]
**limit** | **int** | | [optional]
**offset** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,12 @@
# SearchFilter
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | |
**operator** | **string** | |
**value** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# SearchOrderBy
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | **string** | |
**direction** | **string** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,12 @@
# SendMessageRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**phoneNumber** | **string** | The number you wish to send the message to | [optional]
**message** | **string** | The message you wish to send | [optional]
**deviceId** | **int** | The device you wish to send the message using | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,17 @@
# UpdateCallbackRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**event** | **string** | | [optional]
**deviceId** | **int** | | [optional]
**filterType** | **string** | | [optional]
**filter** | **string** | | [optional]
**method** | **string** | | [optional]
**action** | **string** | | [optional]
**secret** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,11 @@
# UpdateContactRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**phoneNumbers** | **string[]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,580 @@
<?php
/**
* CallbackApi
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* CallbackApi Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CallbackApi
{
/**
* API Client
* @var \SMSGatewayMe\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
* @param \SMSGatewayMe\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
$apiClient->getConfig()->setHost('https://smsgateway.me/api/v4');
}
$this->apiClient = $apiClient;
}
/**
* Get API client
* @return \SMSGatewayMe\Client\ApiClient get the API client
*/
public function getApiClient()
{
return $this->apiClient;
}
/**
* Set the API client
* @param \SMSGatewayMe\Client\ApiClient $apiClient set the API client
* @return CallbackApi
*/
public function setApiClient(ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
}
/**
* createCallback
*
* Create Callback
*
* @param \SMSGatewayMe\Client\Model\CreateCallbackRequest $callback callback to create (required)
* @return \SMSGatewayMe\Client\Model\Callback
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function createCallback($callback)
{
list($response, $statusCode, $httpHeader) = $this->createCallbackWithHttpInfo ($callback);
return $response;
}
/**
* createCallbackWithHttpInfo
*
* Create Callback
*
* @param \SMSGatewayMe\Client\Model\CreateCallbackRequest $callback callback to create (required)
* @return Array of \SMSGatewayMe\Client\Model\Callback, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function createCallbackWithHttpInfo($callback)
{
// verify the required parameter 'callback' is set
if ($callback === null) {
throw new \InvalidArgumentException('Missing the required parameter $callback when calling createCallback');
}
// parse inputs
$resourcePath = "/callback";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($callback)) {
$_tempBody = $callback;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Callback'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Callback', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Callback', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* getCallback
*
* Get a specific callback
*
* @param string $id (required)
* @return \SMSGatewayMe\Client\Model\Callback
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getCallback($id)
{
list($response, $statusCode, $httpHeader) = $this->getCallbackWithHttpInfo ($id);
return $response;
}
/**
* getCallbackWithHttpInfo
*
* Get a specific callback
*
* @param string $id (required)
* @return Array of \SMSGatewayMe\Client\Model\Callback, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getCallbackWithHttpInfo($id)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling getCallback');
}
// parse inputs
$resourcePath = "/callback/{id}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Callback'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Callback', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Callback', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* searchCallbacks
*
* Search callbacks
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return \SMSGatewayMe\Client\Model\CallbackSearchResult
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchCallbacks($search = null)
{
list($response, $statusCode, $httpHeader) = $this->searchCallbacksWithHttpInfo ($search);
return $response;
}
/**
* searchCallbacksWithHttpInfo
*
* Search callbacks
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return Array of \SMSGatewayMe\Client\Model\CallbackSearchResult, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchCallbacksWithHttpInfo($search = null)
{
// parse inputs
$resourcePath = "/callback/search";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($search)) {
$_tempBody = $search;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\CallbackSearchResult'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\CallbackSearchResult', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\CallbackSearchResult', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* updateCallback
*
* Update callback
*
* @param string $id (required)
* @param \SMSGatewayMe\Client\Model\UpdateCallbackRequest[] $callback callback update data (required)
* @return \SMSGatewayMe\Client\Model\Callback
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function updateCallback($id, $callback)
{
list($response, $statusCode, $httpHeader) = $this->updateCallbackWithHttpInfo ($id, $callback);
return $response;
}
/**
* updateCallbackWithHttpInfo
*
* Update callback
*
* @param string $id (required)
* @param \SMSGatewayMe\Client\Model\UpdateCallbackRequest[] $callback callback update data (required)
* @return Array of \SMSGatewayMe\Client\Model\Callback, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function updateCallbackWithHttpInfo($id, $callback)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling updateCallback');
}
// verify the required parameter 'callback' is set
if ($callback === null) {
throw new \InvalidArgumentException('Missing the required parameter $callback when calling updateCallback');
}
// parse inputs
$resourcePath = "/callback/{id}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($callback)) {
$_tempBody = $callback;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'PUT',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Callback'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Callback', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Callback', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
}

View file

@ -0,0 +1,852 @@
<?php
/**
* ContactApi
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* ContactApi Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ContactApi
{
/**
* API Client
* @var \SMSGatewayMe\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
* @param \SMSGatewayMe\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
$apiClient->getConfig()->setHost('https://smsgateway.me/api/v4');
}
$this->apiClient = $apiClient;
}
/**
* Get API client
* @return \SMSGatewayMe\Client\ApiClient get the API client
*/
public function getApiClient()
{
return $this->apiClient;
}
/**
* Set the API client
* @param \SMSGatewayMe\Client\ApiClient $apiClient set the API client
* @return ContactApi
*/
public function setApiClient(ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
}
/**
* addPhoneNumber
*
* The phone number to add
*
* @param string $id (required)
* @param string $phoneNumber phone number to add (required)
* @return \SMSGatewayMe\Client\Model\Contact
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function addPhoneNumber($id, $phoneNumber)
{
list($response, $statusCode, $httpHeader) = $this->addPhoneNumberWithHttpInfo ($id, $phoneNumber);
return $response;
}
/**
* addPhoneNumberWithHttpInfo
*
* The phone number to add
*
* @param string $id (required)
* @param string $phoneNumber phone number to add (required)
* @return Array of \SMSGatewayMe\Client\Model\Contact, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function addPhoneNumberWithHttpInfo($id, $phoneNumber)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling addPhoneNumber');
}
// verify the required parameter 'phoneNumber' is set
if ($phoneNumber === null) {
throw new \InvalidArgumentException('Missing the required parameter $phoneNumber when calling addPhoneNumber');
}
// parse inputs
$resourcePath = "/contact/{id}/phone-number/{phone-number}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}// path params
if ($phoneNumber !== null) {
$resourcePath = str_replace(
"{" . "phone-number" . "}",
$this->apiClient->getSerializer()->toPathValue($phoneNumber),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'PUT',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Contact'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Contact', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Contact', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* createContacts
*
* Create Contacts
*
* @param \SMSGatewayMe\Client\Model\CreateContactRequest[] $contacts contacts to create (required)
* @return \SMSGatewayMe\Client\Model\Contact[]
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function createContacts($contacts)
{
list($response, $statusCode, $httpHeader) = $this->createContactsWithHttpInfo ($contacts);
return $response;
}
/**
* createContactsWithHttpInfo
*
* Create Contacts
*
* @param \SMSGatewayMe\Client\Model\CreateContactRequest[] $contacts contacts to create (required)
* @return Array of \SMSGatewayMe\Client\Model\Contact[], HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function createContactsWithHttpInfo($contacts)
{
// verify the required parameter 'contacts' is set
if ($contacts === null) {
throw new \InvalidArgumentException('Missing the required parameter $contacts when calling createContacts');
}
// parse inputs
$resourcePath = "/contact";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($contacts)) {
$_tempBody = $contacts;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Contact[]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Contact[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Contact[]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* deletePhoneNumber
*
* The phone number to delete
*
* @param string $id (required)
* @param string $phoneNumber phone number to add (required)
* @return \SMSGatewayMe\Client\Model\Contact
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function deletePhoneNumber($id, $phoneNumber)
{
list($response, $statusCode, $httpHeader) = $this->deletePhoneNumberWithHttpInfo ($id, $phoneNumber);
return $response;
}
/**
* deletePhoneNumberWithHttpInfo
*
* The phone number to delete
*
* @param string $id (required)
* @param string $phoneNumber phone number to add (required)
* @return Array of \SMSGatewayMe\Client\Model\Contact, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function deletePhoneNumberWithHttpInfo($id, $phoneNumber)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling deletePhoneNumber');
}
// verify the required parameter 'phoneNumber' is set
if ($phoneNumber === null) {
throw new \InvalidArgumentException('Missing the required parameter $phoneNumber when calling deletePhoneNumber');
}
// parse inputs
$resourcePath = "/contact/{id}/phone-number/{phone-number}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}// path params
if ($phoneNumber !== null) {
$resourcePath = str_replace(
"{" . "phone-number" . "}",
$this->apiClient->getSerializer()->toPathValue($phoneNumber),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'DELETE',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Contact'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Contact', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Contact', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* getContact
*
* Get a specific contact
*
* @param string $id (required)
* @return \SMSGatewayMe\Client\Model\Contact
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getContact($id)
{
list($response, $statusCode, $httpHeader) = $this->getContactWithHttpInfo ($id);
return $response;
}
/**
* getContactWithHttpInfo
*
* Get a specific contact
*
* @param string $id (required)
* @return Array of \SMSGatewayMe\Client\Model\Contact, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getContactWithHttpInfo($id)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling getContact');
}
// parse inputs
$resourcePath = "/contact/{id}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Contact'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Contact', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Contact', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* searchContacts
*
* Search contacts
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return \SMSGatewayMe\Client\Model\ContactSearchResult
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchContacts($search = null)
{
list($response, $statusCode, $httpHeader) = $this->searchContactsWithHttpInfo ($search);
return $response;
}
/**
* searchContactsWithHttpInfo
*
* Search contacts
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return Array of \SMSGatewayMe\Client\Model\ContactSearchResult, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchContactsWithHttpInfo($search = null)
{
// parse inputs
$resourcePath = "/contact/search";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($search)) {
$_tempBody = $search;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\ContactSearchResult'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\ContactSearchResult', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ContactSearchResult', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* updateContact
*
* Update contact
*
* @param string $id (required)
* @param \SMSGatewayMe\Client\Model\UpdateContactRequest $contact contacts details (required)
* @return \SMSGatewayMe\Client\Model\Contact
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function updateContact($id, $contact)
{
list($response, $statusCode, $httpHeader) = $this->updateContactWithHttpInfo ($id, $contact);
return $response;
}
/**
* updateContactWithHttpInfo
*
* Update contact
*
* @param string $id (required)
* @param \SMSGatewayMe\Client\Model\UpdateContactRequest $contact contacts details (required)
* @return Array of \SMSGatewayMe\Client\Model\Contact, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function updateContactWithHttpInfo($id, $contact)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling updateContact');
}
// verify the required parameter 'contact' is set
if ($contact === null) {
throw new \InvalidArgumentException('Missing the required parameter $contact when calling updateContact');
}
// parse inputs
$resourcePath = "/contact/{id}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($contact)) {
$_tempBody = $contact;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'PUT',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Contact'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Contact', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Contact', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
}

View file

@ -0,0 +1,330 @@
<?php
/**
* DeviceApi
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* DeviceApi Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceApi
{
/**
* API Client
* @var \SMSGatewayMe\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
* @param \SMSGatewayMe\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
$apiClient->getConfig()->setHost('https://smsgateway.me/api/v4');
}
$this->apiClient = $apiClient;
}
/**
* Get API client
* @return \SMSGatewayMe\Client\ApiClient get the API client
*/
public function getApiClient()
{
return $this->apiClient;
}
/**
* Set the API client
* @param \SMSGatewayMe\Client\ApiClient $apiClient set the API client
* @return DeviceApi
*/
public function setApiClient(ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
}
/**
* getDevice
*
* Get a specific device
*
* @param string $id (required)
* @return \SMSGatewayMe\Client\Model\Device
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getDevice($id)
{
list($response, $statusCode, $httpHeader) = $this->getDeviceWithHttpInfo ($id);
return $response;
}
/**
* getDeviceWithHttpInfo
*
* Get a specific device
*
* @param string $id (required)
* @return Array of \SMSGatewayMe\Client\Model\Device, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getDeviceWithHttpInfo($id)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling getDevice');
}
// parse inputs
$resourcePath = "/device/{id}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Device'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Device', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Device', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* searchDevices
*
* Search devices
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return \SMSGatewayMe\Client\Model\DeviceSearchResult
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchDevices($search = null)
{
list($response, $statusCode, $httpHeader) = $this->searchDevicesWithHttpInfo ($search);
return $response;
}
/**
* searchDevicesWithHttpInfo
*
* Search devices
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return Array of \SMSGatewayMe\Client\Model\DeviceSearchResult, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchDevicesWithHttpInfo($search = null)
{
// parse inputs
$resourcePath = "/device/search";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($search)) {
$_tempBody = $search;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\DeviceSearchResult'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\DeviceSearchResult', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\DeviceSearchResult', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
}

View file

@ -0,0 +1,566 @@
<?php
/**
* MessageApi
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* MessageApi Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageApi
{
/**
* API Client
* @var \SMSGatewayMe\Client\ApiClient instance of the ApiClient
*/
protected $apiClient;
/**
* Constructor
* @param \SMSGatewayMe\Client\ApiClient|null $apiClient The api client to use
*/
function __construct($apiClient = null)
{
if ($apiClient == null) {
$apiClient = new ApiClient();
$apiClient->getConfig()->setHost('https://smsgateway.me/api/v4');
}
$this->apiClient = $apiClient;
}
/**
* Get API client
* @return \SMSGatewayMe\Client\ApiClient get the API client
*/
public function getApiClient()
{
return $this->apiClient;
}
/**
* Set the API client
* @param \SMSGatewayMe\Client\ApiClient $apiClient set the API client
* @return MessageApi
*/
public function setApiClient(ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
}
/**
* cancelMessages
*
* Cancel messages
*
* @param \SMSGatewayMe\Client\Model\CancelMessageRequest[] $messages messages to cancel (required)
* @return \SMSGatewayMe\Client\Model\Message[]
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function cancelMessages($messages)
{
list($response, $statusCode, $httpHeader) = $this->cancelMessagesWithHttpInfo ($messages);
return $response;
}
/**
* cancelMessagesWithHttpInfo
*
* Cancel messages
*
* @param \SMSGatewayMe\Client\Model\CancelMessageRequest[] $messages messages to cancel (required)
* @return Array of \SMSGatewayMe\Client\Model\Message[], HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function cancelMessagesWithHttpInfo($messages)
{
// verify the required parameter 'messages' is set
if ($messages === null) {
throw new \InvalidArgumentException('Missing the required parameter $messages when calling cancelMessages');
}
// parse inputs
$resourcePath = "/message/cancel";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($messages)) {
$_tempBody = $messages;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Message[]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Message[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Message[]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* getMessage
*
* Get a specific message
*
* @param string $id (required)
* @return \SMSGatewayMe\Client\Model\Message
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getMessage($id)
{
list($response, $statusCode, $httpHeader) = $this->getMessageWithHttpInfo ($id);
return $response;
}
/**
* getMessageWithHttpInfo
*
* Get a specific message
*
* @param string $id (required)
* @return Array of \SMSGatewayMe\Client\Model\Message, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function getMessageWithHttpInfo($id)
{
// verify the required parameter 'id' is set
if ($id === null) {
throw new \InvalidArgumentException('Missing the required parameter $id when calling getMessage');
}
// parse inputs
$resourcePath = "/message/{id}";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// path params
if ($id !== null) {
$resourcePath = str_replace(
"{" . "id" . "}",
$this->apiClient->getSerializer()->toPathValue($id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Message'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Message', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Message', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* searchMessages
*
* Search messages
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return \SMSGatewayMe\Client\Model\MessageSearchResult
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchMessages($search = null)
{
list($response, $statusCode, $httpHeader) = $this->searchMessagesWithHttpInfo ($search);
return $response;
}
/**
* searchMessagesWithHttpInfo
*
* Search messages
*
* @param \SMSGatewayMe\Client\Model\Search $search Search Criteria (optional)
* @return Array of \SMSGatewayMe\Client\Model\MessageSearchResult, HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function searchMessagesWithHttpInfo($search = null)
{
// parse inputs
$resourcePath = "/message/search";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($search)) {
$_tempBody = $search;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\MessageSearchResult'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\MessageSearchResult', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\MessageSearchResult', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* sendMessages
*
* Send messages
*
* @param \SMSGatewayMe\Client\Model\SendMessageRequest[] $messages messages to send (required)
* @return \SMSGatewayMe\Client\Model\Message[]
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function sendMessages($messages)
{
list($response, $statusCode, $httpHeader) = $this->sendMessagesWithHttpInfo ($messages);
return $response;
}
/**
* sendMessagesWithHttpInfo
*
* Send messages
*
* @param \SMSGatewayMe\Client\Model\SendMessageRequest[] $messages messages to send (required)
* @return Array of \SMSGatewayMe\Client\Model\Message[], HTTP status code, HTTP response headers (array of strings)
* @throws \SMSGatewayMe\Client\ApiException on non-2xx response
*/
public function sendMessagesWithHttpInfo($messages)
{
// verify the required parameter 'messages' is set
if ($messages === null) {
throw new \InvalidArgumentException('Missing the required parameter $messages when calling sendMessages');
}
// parse inputs
$resourcePath = "/message/send";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);
// body params
$_tempBody = null;
if (isset($messages)) {
$_tempBody = $messages;
}
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
if (strlen($apiKey) !== 0) {
$headerParams['Authorization'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams, '\SMSGatewayMe\Client\Model\Message[]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\SMSGatewayMe\Client\ObjectSerializer::deserialize($response, '\SMSGatewayMe\Client\Model\Message[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\Message[]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 400:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 401:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 403:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\ErrorResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
case 500:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
default:
$data = \SMSGatewayMe\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\SMSGatewayMe\Client\Model\FatalResponse', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
}

338
lib/sms/lib/ApiClient.php Normal file
View file

@ -0,0 +1,338 @@
<?php
/**
* ApiClient
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client;
/**
* ApiClient Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ApiClient
{
public static $PATCH = "PATCH";
public static $POST = "POST";
public static $GET = "GET";
public static $HEAD = "HEAD";
public static $OPTIONS = "OPTIONS";
public static $PUT = "PUT";
public static $DELETE = "DELETE";
/**
* Configuration
* @var Configuration
*/
protected $config;
/**
* Object Serializer
* @var ObjectSerializer
*/
protected $serializer;
/**
* Constructor of the class
* @param Configuration $config config for this ApiClient
*/
public function __construct(Configuration $config = null)
{
if ($config == null) {
$config = Configuration::getDefaultConfiguration();
}
$this->config = $config;
$this->serializer = new ObjectSerializer();
}
/**
* Get the config
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Get the serializer
* @return ObjectSerializer
*/
public function getSerializer()
{
return $this->serializer;
}
/**
* Get API key (with prefix if set)
* @param string $apiKeyIdentifier name of apikey
* @return string API key with the prefix
*/
public function getApiKeyWithPrefix($apiKeyIdentifier)
{
$prefix = $this->config->getApiKeyPrefix($apiKeyIdentifier);
$apiKey = $this->config->getApiKey($apiKeyIdentifier);
if (!isset($apiKey)) {
return null;
}
if (isset($prefix)) {
$keyWithPrefix = $prefix." ".$apiKey;
} else {
$keyWithPrefix = $apiKey;
}
return $keyWithPrefix;
}
/**
* Make the HTTP call (Sync)
* @param string $resourcePath path to method endpoint
* @param string $method method to call
* @param array $queryParams parameters to be place in query URL
* @param array $postData parameters to be placed in POST body
* @param array $headerParams parameters to be place in request header
* @param string $responseType expected response type of the endpoint
* @throws \SMSGatewayMe\Client\ApiException on a non 2xx response
* @return mixed
*/
public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null)
{
$headers = array();
// construct the http header
$headerParams = array_merge(
(array)$this->config->getDefaultHeaders(),
(array)$headerParams
);
foreach ($headerParams as $key => $val) {
$headers[] = "$key: $val";
}
// form data
if ($postData and in_array('Content-Type: application/x-www-form-urlencoded', $headers)) {
$postData = http_build_query($postData);
} elseif ((is_object($postData) or is_array($postData)) and !in_array('Content-Type: multipart/form-data', $headers)) { // json model
$postData = json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($postData));
}
$url = $this->config->getHost() . $resourcePath;
$curl = curl_init();
// set timeout, if needed
if ($this->config->getCurlTimeout() != 0) {
curl_setopt($curl, CURLOPT_TIMEOUT, $this->config->getCurlTimeout());
}
// return the result on success, rather than just true
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
// disable SSL verification, if needed
if ($this->config->getSSLVerification() == false) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
}
if (! empty($queryParams)) {
$url = ($url . '?' . http_build_query($queryParams));
}
if ($method == self::$POST) {
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
} elseif ($method == self::$HEAD) {
curl_setopt($curl, CURLOPT_NOBODY, true);
} elseif ($method == self::$OPTIONS) {
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "OPTIONS");
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
} elseif ($method == self::$PATCH) {
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
} elseif ($method == self::$PUT) {
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
} elseif ($method == self::$DELETE) {
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($curl, CURLOPT_POSTFIELDS, $postData);
} elseif ($method != self::$GET) {
throw new ApiException('Method ' . $method . ' is not recognized.');
}
curl_setopt($curl, CURLOPT_URL, $url);
// Set user agent
curl_setopt($curl, CURLOPT_USERAGENT, $this->config->getUserAgent());
// debugging for curl
if ($this->config->getDebug()) {
error_log("[DEBUG] HTTP Request body ~BEGIN~\n".print_r($postData, true)."\n~END~\n", 3, $this->config->getDebugFile());
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a'));
} else {
curl_setopt($curl, CURLOPT_VERBOSE, 0);
}
// obtain the HTTP response headers
curl_setopt($curl, CURLOPT_HEADER, 1);
// Make the request
$response = curl_exec($curl);
$http_header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
$http_header = $this->http_parse_headers(substr($response, 0, $http_header_size));
$http_body = substr($response, $http_header_size);
$response_info = curl_getinfo($curl);
// debug HTTP response body
if ($this->config->getDebug()) {
error_log("[DEBUG] HTTP Response body ~BEGIN~\n".print_r($http_body, true)."\n~END~\n", 3, $this->config->getDebugFile());
}
// Handle the response
if ($response_info['http_code'] == 0) {
throw new ApiException("API call to $url timed out: ".serialize($response_info), 0, null, null);
} elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
// return raw body if response is a file
if ($responseType == '\SplFileObject' || $responseType == 'string') {
return array($http_body, $response_info['http_code'], $http_header);
}
$data = json_decode($http_body);
if (json_last_error() > 0) { // if response is a string
$data = $http_body;
}
} else {
$data = json_decode($http_body);
if (json_last_error() > 0) { // if response is a string
$data = $http_body;
}
throw new ApiException(
"[".$response_info['http_code']."] Error connecting to the API ($url)",
$response_info['http_code'], $http_header, $data
);
}
return array($data, $response_info['http_code'], $http_header);
}
/**
* Return the header 'Accept' based on an array of Accept provided
*
* @param string[] $accept Array of header
*
* @return string Accept (e.g. application/json)
*/
public static function selectHeaderAccept($accept)
{
if (count($accept) === 0 or (count($accept) === 1 and $accept[0] === '')) {
return null;
} elseif (preg_grep("/application\/json/i", $accept)) {
return 'application/json';
} else {
return implode(',', $accept);
}
}
/**
* Return the content type based on an array of content-type provided
*
* @param string[] $content_type Array fo content-type
*
* @return string Content-Type (e.g. application/json)
*/
public static function selectHeaderContentType($content_type)
{
if (count($content_type) === 0 or (count($content_type) === 1 and $content_type[0] === '')) {
return 'application/json';
} elseif (preg_grep("/application\/json/i", $content_type)) {
return 'application/json';
} else {
return implode(',', $content_type);
}
}
/**
* Return an array of HTTP response headers
*
* @param string $raw_headers A string of raw HTTP response headers
*
* @return string[] Array of HTTP response heaers
*/
protected function http_parse_headers($raw_headers)
{
// ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986
$headers = array();
$key = ''; // [+]
foreach(explode("\n", $raw_headers) as $i => $h)
{
$h = explode(':', $h, 2);
if (isset($h[1]))
{
if (!isset($headers[$h[0]]))
$headers[$h[0]] = trim($h[1]);
elseif (is_array($headers[$h[0]]))
{
// $tmp = array_merge($headers[$h[0]], array(trim($h[1]))); // [-]
// $headers[$h[0]] = $tmp; // [-]
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1]))); // [+]
}
else
{
// $tmp = array_merge(array($headers[$h[0]]), array(trim($h[1]))); // [-]
// $headers[$h[0]] = $tmp; // [-]
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1]))); // [+]
}
$key = $h[0]; // [+]
}
else // [+]
{ // [+]
if (substr($h[0], 0, 1) == "\t") // [+]
$headers[$key] .= "\r\n\t".trim($h[0]); // [+]
elseif (!$key) // [+]
$headers[0] = trim($h[0]);trim($h[0]); // [+]
} // [+]
}
return $headers;
}
}

View file

@ -0,0 +1,120 @@
<?php
/**
* ApiException
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client;
use \Exception;
/**
* ApiException Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ApiException extends Exception
{
/**
* The HTTP body of the server response either as Json or string.
* @var mixed
*/
protected $responseBody;
/**
* The HTTP header of the server response.
* @var string[]
*/
protected $responseHeaders;
/**
* The deserialized response object
* @var $responseObject;
*/
protected $responseObject;
/**
* Constructor
* @param string $message Error message
* @param int $code HTTP status code
* @param string $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
*/
public function __construct($message="", $code=0, $responseHeaders=null, $responseBody=null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
$this->responseBody = $responseBody;
}
/**
* Gets the HTTP response header
*
* @return string HTTP response header
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* Gets the HTTP body of the server response either as Json or string
*
* @return mixed HTTP body of the server response either as Json or string
*/
public function getResponseBody()
{
return $this->responseBody;
}
/**
* Sets the deseralized response object (during deserialization)
* @param mixed $obj Deserialized response object
* @return void
*/
public function setResponseObject($obj)
{
$this->responseObject = $obj;
}
/**
* Gets the deseralized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
public function getResponseObject()
{
return $this->responseObject;
}
}

View file

@ -0,0 +1,81 @@
<?php
namespace SMSGatewayMe\Client;
use SMSGatewayMe\Client\Api\CallbackApi;
use SMSGatewayMe\Client\Api\ContactApi;
use SMSGatewayMe\Client\Api\DeviceApi;
use SMSGatewayMe\Client\Api\MessageApi;
class ClientProvider
{
/**
* @var DeviceApi
*/
private $deviceClient;
/**
* @var MessageApi
*/
private $messageClient;
/**
* @var ContactApi
*/
private $contactClient;
/**
* @var CallbackApi
*/
private $callbackClient;
/**
* ClientFactory constructor.
*
* @param string $apiToken
*/
public function __construct($apiToken)
{
// Configure client
$config = Configuration::getDefaultConfiguration();
$config->setApiKey('Authorization',$apiToken);
$apiClient = new ApiClient($config);
$this->deviceClient = new DeviceApi($apiClient);
$this->messageClient = new MessageApi($apiClient);
$this->contactClient = new ContactApi($apiClient);
$this->callbackClient = new CallbackApi($apiClient);
}
/**
* @return DeviceApi
*/
public function getDeviceClient()
{
return $this->deviceClient;
}
/**
* @return MessageApi
*/
public function getMessageClient()
{
return $this->messageClient;
}
/**
* @return ContactApi
*/
public function getContactClient()
{
return $this->contactClient;
}
/**
* @return CallbackApi
*/
public function getCallbackClient()
{
return $this->callbackClient;
}
}

View file

@ -0,0 +1,526 @@
<?php
/**
* Configuration
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client;
/**
* Configuration Class Doc Comment
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Configuration
{
private static $_defaultConfiguration = null;
/**
* Associate array to store API key(s)
*
* @var string[]
*/
protected $apiKeys = array();
/**
* Associate array to store API prefix (e.g. Bearer)
*
* @var string[]
*/
protected $apiKeyPrefixes = array();
/**
* Access token for OAuth
*
* @var string
*/
protected $accessToken = '';
/**
* Username for HTTP basic authentication
*
* @var string
*/
protected $username = '';
/**
* Password for HTTP basic authentication
*
* @var string
*/
protected $password = '';
/**
* The default instance of ApiClient
*
* @var \SMSGatewayMe\Client\ApiClient
*/
protected $defaultHeaders = array();
/**
* The host
*
* @var string
*/
protected $host = 'https://smsgateway.me/api/v4';
/**
* Timeout (second) of the HTTP request, by default set to 0, no timeout
*
* @var string
*/
protected $curlTimeout = 0;
/**
* User agent of the HTTP request, set to "PHP-Swagger" by default
*
* @var string
*/
protected $userAgent = "Swagger-Codegen/v0.0.1/php";
/**
* Debug switch (default set to false)
*
* @var bool
*/
protected $debug = false;
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $debugFile = 'php://output';
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $tempFolderPath;
/**
* Indicates if SSL verification should be enabled or disabled.
*
* This is useful if the host uses a self-signed SSL certificate.
*
* @var boolean True if the certificate should be validated, false otherwise.
*/
protected $sslVerification = true;
/**
* Constructor
*/
public function __construct()
{
$this->tempFolderPath = sys_get_temp_dir();
}
/**
* Sets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $key API key or token
*
* @return Configuration
*/
public function setApiKey($apiKeyIdentifier, $key)
{
$this->apiKeys[$apiKeyIdentifier] = $key;
return $this;
}
/**
* Gets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return string API key or token
*/
public function getApiKey($apiKeyIdentifier)
{
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
}
/**
* Sets the prefix for API key (e.g. Bearer)
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $prefix API key prefix, e.g. Bearer
*
* @return Configuration
*/
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
{
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
return $this;
}
/**
* Gets API key prefix
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return string
*/
public function getApiKeyPrefix($apiKeyIdentifier)
{
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
}
/**
* Sets the access token for OAuth
*
* @param string $accessToken Token for OAuth
*
* @return Configuration
*/
public function setAccessToken($accessToken)
{
$this->accessToken = $accessToken;
return $this;
}
/**
* Gets the access token for OAuth
*
* @return string Access token for OAuth
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* Sets the username for HTTP basic authentication
*
* @param string $username Username for HTTP basic authentication
*
* @return Configuration
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Gets the username for HTTP basic authentication
*
* @return string Username for HTTP basic authentication
*/
public function getUsername()
{
return $this->username;
}
/**
* Sets the password for HTTP basic authentication
*
* @param string $password Password for HTTP basic authentication
*
* @return Configuration
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Gets the password for HTTP basic authentication
*
* @return string Password for HTTP basic authentication
*/
public function getPassword()
{
return $this->password;
}
/**
* Adds a default header
*
* @param string $headerName header name (e.g. Token)
* @param string $headerValue header value (e.g. 1z8wp3)
*
* @return ApiClient
*/
public function addDefaultHeader($headerName, $headerValue)
{
if (!is_string($headerName)) {
throw new \InvalidArgumentException('Header name must be a string.');
}
$this->defaultHeaders[$headerName] = $headerValue;
return $this;
}
/**
* Gets the default header
*
* @return array An array of default header(s)
*/
public function getDefaultHeaders()
{
return $this->defaultHeaders;
}
/**
* Deletes a default header
*
* @param string $headerName the header to delete
*
* @return Configuration
*/
public function deleteDefaultHeader($headerName)
{
unset($this->defaultHeaders[$headerName]);
}
/**
* Sets the host
*
* @param string $host Host
*
* @return Configuration
*/
public function setHost($host)
{
$this->host = $host;
return $this;
}
/**
* Gets the host
*
* @return string Host
*/
public function getHost()
{
return $this->host;
}
/**
* Sets the user agent of the api client
*
* @param string $userAgent the user agent of the api client
*
* @return ApiClient
*/
public function setUserAgent($userAgent)
{
if (!is_string($userAgent)) {
throw new \InvalidArgumentException('User-agent must be a string.');
}
$this->userAgent = $userAgent;
return $this;
}
/**
* Gets the user agent of the api client
*
* @return string user agent
*/
public function getUserAgent()
{
return $this->userAgent;
}
/**
* Sets the HTTP timeout value
*
* @param integer $seconds Number of seconds before timing out [set to 0 for no timeout]
*
* @return ApiClient
*/
public function setCurlTimeout($seconds)
{
if (!is_numeric($seconds) || $seconds < 0) {
throw new \InvalidArgumentException('Timeout value must be numeric and a non-negative number.');
}
$this->curlTimeout = $seconds;
return $this;
}
/**
* Gets the HTTP timeout value
*
* @return string HTTP timeout value
*/
public function getCurlTimeout()
{
return $this->curlTimeout;
}
/**
* Sets debug flag
*
* @param bool $debug Debug flag
*
* @return Configuration
*/
public function setDebug($debug)
{
$this->debug = $debug;
return $this;
}
/**
* Gets the debug flag
*
* @return bool
*/
public function getDebug()
{
return $this->debug;
}
/**
* Sets the debug file
*
* @param string $debugFile Debug file
*
* @return Configuration
*/
public function setDebugFile($debugFile)
{
$this->debugFile = $debugFile;
return $this;
}
/**
* Gets the debug file
*
* @return string
*/
public function getDebugFile()
{
return $this->debugFile;
}
/**
* Sets the temp folder path
*
* @param string $tempFolderPath Temp folder path
*
* @return Configuration
*/
public function setTempFolderPath($tempFolderPath)
{
$this->tempFolderPath = $tempFolderPath;
return $this;
}
/**
* Gets the temp folder path
*
* @return string Temp folder path
*/
public function getTempFolderPath()
{
return $this->tempFolderPath;
}
/**
* Sets if SSL verification should be enabled or disabled
*
* @param boolean $sslVerification True if the certificate should be validated, false otherwise
*
* @return Configuration
*/
public function setSSLVerification($sslVerification)
{
$this->sslVerification = $sslVerification;
return $this;
}
/**
* Gets if SSL verification should be enabled or disabled
*
* @return boolean True if the certificate should be validated, false otherwise
*/
public function getSSLVerification()
{
return $this->sslVerification;
}
/**
* Gets the default configuration instance
*
* @return Configuration
*/
public static function getDefaultConfiguration()
{
if (self::$_defaultConfiguration == null) {
self::$_defaultConfiguration = new Configuration();
}
return self::$_defaultConfiguration;
}
/**
* Sets the detault configuration instance
*
* @param Configuration $config An instance of the Configuration Object
*
* @return void
*/
public static function setDefaultConfiguration(Configuration $config)
{
self::$_defaultConfiguration = $config;
}
/**
* Gets the essential information for debugging
*
* @return string The report for debugging
*/
public static function toDebugReport()
{
$report = "PHP SDK (SMSGatewayMe\Client) Debug Report:\n";
$report .= " OS: ".php_uname()."\n";
$report .= " PHP Version: ".phpversion()."\n";
$report .= " OpenAPI Spec Version: 4.0.0\n";
$report .= " SDK Package Version: v0.0.1\n";
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
return $report;
}
}

View file

@ -0,0 +1,447 @@
<?php
/**
* Callback
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* Callback Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Callback implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'id' => 'string',
'name' => 'string',
'event' => 'string',
'deviceId' => 'int',
'filterType' => 'string',
'filter' => 'string',
'method' => 'string',
'action' => 'string',
'secret' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
'name' => 'name',
'event' => 'event',
'deviceId' => 'device_id',
'filterType' => 'filter_type',
'filter' => 'filter',
'method' => 'method',
'action' => 'action',
'secret' => 'secret'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'id' => 'setId',
'name' => 'setName',
'event' => 'setEvent',
'deviceId' => 'setDeviceId',
'filterType' => 'setFilterType',
'filter' => 'setFilter',
'method' => 'setMethod',
'action' => 'setAction',
'secret' => 'setSecret'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'id' => 'getId',
'name' => 'getName',
'event' => 'getEvent',
'deviceId' => 'getDeviceId',
'filterType' => 'getFilterType',
'filter' => 'getFilter',
'method' => 'getMethod',
'action' => 'getAction',
'secret' => 'getSecret'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var string
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* $event
* @var string
*/
protected $event;
/**
* $deviceId
* @var int
*/
protected $deviceId;
/**
* $filterType
* @var string
*/
protected $filterType;
/**
* $filter
* @var string
*/
protected $filter;
/**
* $method
* @var string
*/
protected $method;
/**
* $action
* @var string
*/
protected $action;
/**
* $secret
* @var string
*/
protected $secret;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->name = $data["name"];
$this->event = $data["event"];
$this->deviceId = $data["deviceId"];
$this->filterType = $data["filterType"];
$this->filter = $data["filter"];
$this->method = $data["method"];
$this->action = $data["action"];
$this->secret = $data["secret"];
}
}
/**
* Gets id
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* Sets id
* @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets event
* @return string
*/
public function getEvent()
{
return $this->event;
}
/**
* Sets event
* @param string $event
* @return $this
*/
public function setEvent($event)
{
$this->event = $event;
return $this;
}
/**
* Gets deviceId
* @return int
*/
public function getDeviceId()
{
return $this->deviceId;
}
/**
* Sets deviceId
* @param int $deviceId
* @return $this
*/
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
return $this;
}
/**
* Gets filterType
* @return string
*/
public function getFilterType()
{
return $this->filterType;
}
/**
* Sets filterType
* @param string $filterType
* @return $this
*/
public function setFilterType($filterType)
{
$this->filterType = $filterType;
return $this;
}
/**
* Gets filter
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* Sets filter
* @param string $filter
* @return $this
*/
public function setFilter($filter)
{
$this->filter = $filter;
return $this;
}
/**
* Gets method
* @return string
*/
public function getMethod()
{
return $this->method;
}
/**
* Sets method
* @param string $method
* @return $this
*/
public function setMethod($method)
{
$this->method = $method;
return $this;
}
/**
* Gets action
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* Sets action
* @param string $action
* @return $this
*/
public function setAction($action)
{
$this->action = $action;
return $this;
}
/**
* Gets secret
* @return string
*/
public function getSecret()
{
return $this->secret;
}
/**
* Sets secret
* @param string $secret
* @return $this
*/
public function setSecret($secret)
{
$this->secret = $secret;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* CallbackSearchResult
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* CallbackSearchResult Class Doc Comment
*
* @category Class
* @description Callback search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CallbackSearchResult implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'count' => 'int',
'results' => '\SMSGatewayMe\Client\Model\Callback[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'count' => 'count',
'results' => 'results'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'count' => 'setCount',
'results' => 'setResults'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'count' => 'getCount',
'results' => 'getResults'
);
static function getters() {
return self::$getters;
}
/**
* $count Total number of results
* @var int
*/
protected $count;
/**
* $results
* @var \SMSGatewayMe\Client\Model\Callback[]
*/
protected $results;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->count = $data["count"];
$this->results = $data["results"];
}
}
/**
* Gets count
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Sets count
* @param int $count Total number of results
* @return $this
*/
public function setCount($count)
{
$this->count = $count;
return $this;
}
/**
* Gets results
* @return \SMSGatewayMe\Client\Model\Callback[]
*/
public function getResults()
{
return $this->results;
}
/**
* Sets results
* @param \SMSGatewayMe\Client\Model\Callback[] $results
* @return $this
*/
public function setResults($results)
{
$this->results = $results;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,191 @@
<?php
/**
* CancelMessageRequest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* CancelMessageRequest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CancelMessageRequest implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'id' => 'int'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'id' => 'id'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'id' => 'setId'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'id' => 'getId'
);
static function getters() {
return self::$getters;
}
/**
* $id The id of the message you wish to cancel
* @var int
*/
protected $id;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
}
}
/**
* Gets id
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Sets id
* @param int $id The id of the message you wish to cancel
* @return $this
*/
public function setId($id)
{
$this->id = $id;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,319 @@
<?php
/**
* Contact
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* Contact Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Contact implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'id' => 'int',
'name' => 'string',
'phoneNumbers' => 'string[]',
'createdAt' => '\DateTime',
'updatedAt' => '\DateTime'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
'name' => 'name',
'phoneNumbers' => 'phone_numbers',
'createdAt' => 'created_at',
'updatedAt' => 'updated_at'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'id' => 'setId',
'name' => 'setName',
'phoneNumbers' => 'setPhoneNumbers',
'createdAt' => 'setCreatedAt',
'updatedAt' => 'setUpdatedAt'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'id' => 'getId',
'name' => 'getName',
'phoneNumbers' => 'getPhoneNumbers',
'createdAt' => 'getCreatedAt',
'updatedAt' => 'getUpdatedAt'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* $phoneNumbers
* @var string[]
*/
protected $phoneNumbers;
/**
* $createdAt
* @var \DateTime
*/
protected $createdAt;
/**
* $updatedAt
* @var \DateTime
*/
protected $updatedAt;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->name = $data["name"];
$this->phoneNumbers = $data["phoneNumbers"];
$this->createdAt = $data["createdAt"];
$this->updatedAt = $data["updatedAt"];
}
}
/**
* Gets id
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Sets id
* @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets phoneNumbers
* @return string[]
*/
public function getPhoneNumbers()
{
return $this->phoneNumbers;
}
/**
* Sets phoneNumbers
* @param string[] $phoneNumbers
* @return $this
*/
public function setPhoneNumbers($phoneNumbers)
{
$this->phoneNumbers = $phoneNumbers;
return $this;
}
/**
* Gets createdAt
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Sets createdAt
* @param \DateTime $createdAt
* @return $this
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Gets updatedAt
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Sets updatedAt
* @param \DateTime $updatedAt
* @return $this
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* ContactSearchResult
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* ContactSearchResult Class Doc Comment
*
* @category Class
* @description Contact search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ContactSearchResult implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'count' => 'int',
'results' => '\SMSGatewayMe\Client\Model\Contact[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'count' => 'count',
'results' => 'results'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'count' => 'setCount',
'results' => 'setResults'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'count' => 'getCount',
'results' => 'getResults'
);
static function getters() {
return self::$getters;
}
/**
* $count Total number of results
* @var int
*/
protected $count;
/**
* $results
* @var \SMSGatewayMe\Client\Model\Contact[]
*/
protected $results;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->count = $data["count"];
$this->results = $data["results"];
}
}
/**
* Gets count
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Sets count
* @param int $count Total number of results
* @return $this
*/
public function setCount($count)
{
$this->count = $count;
return $this;
}
/**
* Gets results
* @return \SMSGatewayMe\Client\Model\Contact[]
*/
public function getResults()
{
return $this->results;
}
/**
* Sets results
* @param \SMSGatewayMe\Client\Model\Contact[] $results
* @return $this
*/
public function setResults($results)
{
$this->results = $results;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,421 @@
<?php
/**
* CreateCallbackRequest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* CreateCallbackRequest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateCallbackRequest implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'name' => 'string',
'event' => 'string',
'deviceId' => 'int',
'filterType' => 'string',
'filter' => 'string',
'method' => 'string',
'action' => 'string',
'secret' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'name' => 'name',
'event' => 'event',
'deviceId' => 'device_id',
'filterType' => 'filter_type',
'filter' => 'filter',
'method' => 'method',
'action' => 'action',
'secret' => 'secret'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'name' => 'setName',
'event' => 'setEvent',
'deviceId' => 'setDeviceId',
'filterType' => 'setFilterType',
'filter' => 'setFilter',
'method' => 'setMethod',
'action' => 'setAction',
'secret' => 'setSecret'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'name' => 'getName',
'event' => 'getEvent',
'deviceId' => 'getDeviceId',
'filterType' => 'getFilterType',
'filter' => 'getFilter',
'method' => 'getMethod',
'action' => 'getAction',
'secret' => 'getSecret'
);
static function getters() {
return self::$getters;
}
/**
* $name
* @var string
*/
protected $name;
/**
* $event
* @var string
*/
protected $event;
/**
* $deviceId
* @var int
*/
protected $deviceId;
/**
* $filterType
* @var string
*/
protected $filterType;
/**
* $filter
* @var string
*/
protected $filter;
/**
* $method
* @var string
*/
protected $method;
/**
* $action
* @var string
*/
protected $action;
/**
* $secret
* @var string
*/
protected $secret;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->name = $data["name"];
$this->event = $data["event"];
$this->deviceId = $data["deviceId"];
$this->filterType = $data["filterType"];
$this->filter = $data["filter"];
$this->method = $data["method"];
$this->action = $data["action"];
$this->secret = $data["secret"];
}
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets event
* @return string
*/
public function getEvent()
{
return $this->event;
}
/**
* Sets event
* @param string $event
* @return $this
*/
public function setEvent($event)
{
$allowed_values = array("MESSAGE_UPDATED", "MESSAGE_CANCELED", "MESSAGE_DELIVERED", "MESSAGE_FAILED", "MESSAGE_MANUALLY_SENT", "MESSAGE_PENDING", "MESSAGE_QUEUED", "MESSAGE_RECEIVED", "MESSAGE_SENT");
if (!in_array($event, $allowed_values)) {
throw new \InvalidArgumentException("Invalid value for 'event', must be one of 'MESSAGE_UPDATED', 'MESSAGE_CANCELED', 'MESSAGE_DELIVERED', 'MESSAGE_FAILED', 'MESSAGE_MANUALLY_SENT', 'MESSAGE_PENDING', 'MESSAGE_QUEUED', 'MESSAGE_RECEIVED', 'MESSAGE_SENT'");
}
$this->event = $event;
return $this;
}
/**
* Gets deviceId
* @return int
*/
public function getDeviceId()
{
return $this->deviceId;
}
/**
* Sets deviceId
* @param int $deviceId
* @return $this
*/
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
return $this;
}
/**
* Gets filterType
* @return string
*/
public function getFilterType()
{
return $this->filterType;
}
/**
* Sets filterType
* @param string $filterType
* @return $this
*/
public function setFilterType($filterType)
{
$allowed_values = array("Starts With", "Is From", "Contains");
if (!in_array($filterType, $allowed_values)) {
throw new \InvalidArgumentException("Invalid value for 'filterType', must be one of 'Starts With', 'Is From', 'Contains'");
}
$this->filterType = $filterType;
return $this;
}
/**
* Gets filter
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* Sets filter
* @param string $filter
* @return $this
*/
public function setFilter($filter)
{
$this->filter = $filter;
return $this;
}
/**
* Gets method
* @return string
*/
public function getMethod()
{
return $this->method;
}
/**
* Sets method
* @param string $method
* @return $this
*/
public function setMethod($method)
{
$this->method = $method;
return $this;
}
/**
* Gets action
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* Sets action
* @param string $action
* @return $this
*/
public function setAction($action)
{
$this->action = $action;
return $this;
}
/**
* Gets secret
* @return string
*/
public function getSecret()
{
return $this->secret;
}
/**
* Sets secret
* @param string $secret
* @return $this
*/
public function setSecret($secret)
{
$this->secret = $secret;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* CreateContactRequest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* CreateContactRequest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateContactRequest implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'name' => 'string',
'phoneNumbers' => 'string[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'name' => 'name',
'phoneNumbers' => 'phone_numbers'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'name' => 'setName',
'phoneNumbers' => 'setPhoneNumbers'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'name' => 'getName',
'phoneNumbers' => 'getPhoneNumbers'
);
static function getters() {
return self::$getters;
}
/**
* $name
* @var string
*/
protected $name;
/**
* $phoneNumbers
* @var string[]
*/
protected $phoneNumbers;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->name = $data["name"];
$this->phoneNumbers = $data["phoneNumbers"];
}
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets phoneNumbers
* @return string[]
*/
public function getPhoneNumbers()
{
return $this->phoneNumbers;
}
/**
* Sets phoneNumbers
* @param string[] $phoneNumbers
* @return $this
*/
public function setPhoneNumbers($phoneNumbers)
{
$this->phoneNumbers = $phoneNumbers;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,255 @@
<?php
/**
* Device
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* Device Class Doc Comment
*
* @category Class
* @description Device
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Device implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'id' => 'int',
'name' => 'string',
'attributes' => '\SMSGatewayMe\Client\Model\DeviceAttributes'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
'name' => 'name',
'attributes' => 'attributes'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'id' => 'setId',
'name' => 'setName',
'attributes' => 'setAttributes'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'id' => 'getId',
'name' => 'getName',
'attributes' => 'getAttributes'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* $attributes
* @var \SMSGatewayMe\Client\Model\DeviceAttributes
*/
protected $attributes;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->name = $data["name"];
$this->attributes = $data["attributes"];
}
}
/**
* Gets id
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Sets id
* @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets attributes
* @return \SMSGatewayMe\Client\Model\DeviceAttributes
*/
public function getAttributes()
{
return $this->attributes;
}
/**
* Sets attributes
* @param \SMSGatewayMe\Client\Model\DeviceAttributes $attributes
* @return $this
*/
public function setAttributes($attributes)
{
$this->attributes = $attributes;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,543 @@
<?php
/**
* DeviceAttributes
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* DeviceAttributes Class Doc Comment
*
* @category Class
* @description Device attributes
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceAttributes implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'phoneNumber' => 'string',
'make' => 'string',
'model' => 'string',
'provider' => 'string',
'country' => 'string',
'connectionType' => 'string',
'battery' => 'string',
'signalPercent' => 'string',
'wifi' => 'bool',
'lat' => 'string',
'lng' => 'string',
'lastSeen' => '\DateTime'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'phoneNumber' => 'phone_number',
'make' => 'make',
'model' => 'model',
'provider' => 'provider',
'country' => 'country',
'connectionType' => 'connection_type',
'battery' => 'battery',
'signalPercent' => 'signal_percent',
'wifi' => 'wifi',
'lat' => 'lat',
'lng' => 'lng',
'lastSeen' => 'last_seen'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'phoneNumber' => 'setPhoneNumber',
'make' => 'setMake',
'model' => 'setModel',
'provider' => 'setProvider',
'country' => 'setCountry',
'connectionType' => 'setConnectionType',
'battery' => 'setBattery',
'signalPercent' => 'setSignalPercent',
'wifi' => 'setWifi',
'lat' => 'setLat',
'lng' => 'setLng',
'lastSeen' => 'setLastSeen'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'phoneNumber' => 'getPhoneNumber',
'make' => 'getMake',
'model' => 'getModel',
'provider' => 'getProvider',
'country' => 'getCountry',
'connectionType' => 'getConnectionType',
'battery' => 'getBattery',
'signalPercent' => 'getSignalPercent',
'wifi' => 'getWifi',
'lat' => 'getLat',
'lng' => 'getLng',
'lastSeen' => 'getLastSeen'
);
static function getters() {
return self::$getters;
}
/**
* $phoneNumber
* @var string
*/
protected $phoneNumber;
/**
* $make
* @var string
*/
protected $make;
/**
* $model
* @var string
*/
protected $model;
/**
* $provider
* @var string
*/
protected $provider;
/**
* $country
* @var string
*/
protected $country;
/**
* $connectionType
* @var string
*/
protected $connectionType;
/**
* $battery
* @var string
*/
protected $battery;
/**
* $signalPercent
* @var string
*/
protected $signalPercent;
/**
* $wifi
* @var bool
*/
protected $wifi;
/**
* $lat
* @var string
*/
protected $lat;
/**
* $lng
* @var string
*/
protected $lng;
/**
* $lastSeen
* @var \DateTime
*/
protected $lastSeen;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->phoneNumber = $data["phoneNumber"];
$this->make = $data["make"];
$this->model = $data["model"];
$this->provider = $data["provider"];
$this->country = $data["country"];
$this->connectionType = $data["connectionType"];
$this->battery = $data["battery"];
$this->signalPercent = $data["signalPercent"];
$this->wifi = $data["wifi"];
$this->lat = $data["lat"];
$this->lng = $data["lng"];
$this->lastSeen = $data["lastSeen"];
}
}
/**
* Gets phoneNumber
* @return string
*/
public function getPhoneNumber()
{
return $this->phoneNumber;
}
/**
* Sets phoneNumber
* @param string $phoneNumber
* @return $this
*/
public function setPhoneNumber($phoneNumber)
{
$this->phoneNumber = $phoneNumber;
return $this;
}
/**
* Gets make
* @return string
*/
public function getMake()
{
return $this->make;
}
/**
* Sets make
* @param string $make
* @return $this
*/
public function setMake($make)
{
$this->make = $make;
return $this;
}
/**
* Gets model
* @return string
*/
public function getModel()
{
return $this->model;
}
/**
* Sets model
* @param string $model
* @return $this
*/
public function setModel($model)
{
$this->model = $model;
return $this;
}
/**
* Gets provider
* @return string
*/
public function getProvider()
{
return $this->provider;
}
/**
* Sets provider
* @param string $provider
* @return $this
*/
public function setProvider($provider)
{
$this->provider = $provider;
return $this;
}
/**
* Gets country
* @return string
*/
public function getCountry()
{
return $this->country;
}
/**
* Sets country
* @param string $country
* @return $this
*/
public function setCountry($country)
{
$this->country = $country;
return $this;
}
/**
* Gets connectionType
* @return string
*/
public function getConnectionType()
{
return $this->connectionType;
}
/**
* Sets connectionType
* @param string $connectionType
* @return $this
*/
public function setConnectionType($connectionType)
{
$this->connectionType = $connectionType;
return $this;
}
/**
* Gets battery
* @return string
*/
public function getBattery()
{
return $this->battery;
}
/**
* Sets battery
* @param string $battery
* @return $this
*/
public function setBattery($battery)
{
$this->battery = $battery;
return $this;
}
/**
* Gets signalPercent
* @return string
*/
public function getSignalPercent()
{
return $this->signalPercent;
}
/**
* Sets signalPercent
* @param string $signalPercent
* @return $this
*/
public function setSignalPercent($signalPercent)
{
$this->signalPercent = $signalPercent;
return $this;
}
/**
* Gets wifi
* @return bool
*/
public function getWifi()
{
return $this->wifi;
}
/**
* Sets wifi
* @param bool $wifi
* @return $this
*/
public function setWifi($wifi)
{
$this->wifi = $wifi;
return $this;
}
/**
* Gets lat
* @return string
*/
public function getLat()
{
return $this->lat;
}
/**
* Sets lat
* @param string $lat
* @return $this
*/
public function setLat($lat)
{
$this->lat = $lat;
return $this;
}
/**
* Gets lng
* @return string
*/
public function getLng()
{
return $this->lng;
}
/**
* Sets lng
* @param string $lng
* @return $this
*/
public function setLng($lng)
{
$this->lng = $lng;
return $this;
}
/**
* Gets lastSeen
* @return \DateTime
*/
public function getLastSeen()
{
return $this->lastSeen;
}
/**
* Sets lastSeen
* @param \DateTime $lastSeen
* @return $this
*/
public function setLastSeen($lastSeen)
{
$this->lastSeen = $lastSeen;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* DeviceSearchResult
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* DeviceSearchResult Class Doc Comment
*
* @category Class
* @description Device search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceSearchResult implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'count' => 'int',
'results' => '\SMSGatewayMe\Client\Model\Device[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'count' => 'count',
'results' => 'results'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'count' => 'setCount',
'results' => 'setResults'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'count' => 'getCount',
'results' => 'getResults'
);
static function getters() {
return self::$getters;
}
/**
* $count Total number of results
* @var int
*/
protected $count;
/**
* $results
* @var \SMSGatewayMe\Client\Model\Device[]
*/
protected $results;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->count = $data["count"];
$this->results = $data["results"];
}
}
/**
* Gets count
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Sets count
* @param int $count Total number of results
* @return $this
*/
public function setCount($count)
{
$this->count = $count;
return $this;
}
/**
* Gets results
* @return \SMSGatewayMe\Client\Model\Device[]
*/
public function getResults()
{
return $this->results;
}
/**
* Sets results
* @param \SMSGatewayMe\Client\Model\Device[] $results
* @return $this
*/
public function setResults($results)
{
$this->results = $results;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

255
lib/sms/lib/Model/Error.php Normal file
View file

@ -0,0 +1,255 @@
<?php
/**
* Error
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* Error Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Error implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'key' => 'string',
'errors' => 'string[]',
'children' => '\SMSGatewayMe\Client\Model\Error[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'key' => 'key',
'errors' => 'errors',
'children' => 'children'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'key' => 'setKey',
'errors' => 'setErrors',
'children' => 'setChildren'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'key' => 'getKey',
'errors' => 'getErrors',
'children' => 'getChildren'
);
static function getters() {
return self::$getters;
}
/**
* $key
* @var string
*/
protected $key;
/**
* $errors
* @var string[]
*/
protected $errors;
/**
* $children
* @var \SMSGatewayMe\Client\Model\Error[]
*/
protected $children;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->key = $data["key"];
$this->errors = $data["errors"];
$this->children = $data["children"];
}
}
/**
* Gets key
* @return string
*/
public function getKey()
{
return $this->key;
}
/**
* Sets key
* @param string $key
* @return $this
*/
public function setKey($key)
{
$this->key = $key;
return $this;
}
/**
* Gets errors
* @return string[]
*/
public function getErrors()
{
return $this->errors;
}
/**
* Sets errors
* @param string[] $errors
* @return $this
*/
public function setErrors($errors)
{
$this->errors = $errors;
return $this;
}
/**
* Gets children
* @return \SMSGatewayMe\Client\Model\Error[]
*/
public function getChildren()
{
return $this->children;
}
/**
* Sets children
* @param \SMSGatewayMe\Client\Model\Error[] $children
* @return $this
*/
public function setChildren($children)
{
$this->children = $children;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* ErrorResponse
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* ErrorResponse Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ErrorResponse implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'message' => 'string',
'data' => '\SMSGatewayMe\Client\Model\Error[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'message' => 'message',
'data' => 'data'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'message' => 'setMessage',
'data' => 'setData'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'message' => 'getMessage',
'data' => 'getData'
);
static function getters() {
return self::$getters;
}
/**
* $message
* @var string
*/
protected $message;
/**
* $data
* @var \SMSGatewayMe\Client\Model\Error[]
*/
protected $data;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->message = $data["message"];
$this->data = $data["data"];
}
}
/**
* Gets message
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* Sets message
* @param string $message
* @return $this
*/
public function setMessage($message)
{
$this->message = $message;
return $this;
}
/**
* Gets data
* @return \SMSGatewayMe\Client\Model\Error[]
*/
public function getData()
{
return $this->data;
}
/**
* Sets data
* @param \SMSGatewayMe\Client\Model\Error[] $data
* @return $this
*/
public function setData($data)
{
$this->data = $data;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,191 @@
<?php
/**
* FatalResponse
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* FatalResponse Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class FatalResponse implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'message' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'message' => 'message'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'message' => 'setMessage'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'message' => 'getMessage'
);
static function getters() {
return self::$getters;
}
/**
* $message
* @var string
*/
protected $message;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->message = $data["message"];
}
}
/**
* Gets message
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* Sets message
* @param string $message
* @return $this
*/
public function setMessage($message)
{
$this->message = $message;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,383 @@
<?php
/**
* Message
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* Message Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Message implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'id' => 'int',
'deviceId' => 'int',
'message' => 'string',
'status' => 'string',
'log' => '\SMSGatewayMe\Client\Model\MessageLog[]',
'createdAt' => '\DateTime',
'updatedAt' => '\DateTime'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'id' => 'id',
'deviceId' => 'device_id',
'message' => 'message',
'status' => 'status',
'log' => 'log',
'createdAt' => 'created_at',
'updatedAt' => 'updated_at'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'id' => 'setId',
'deviceId' => 'setDeviceId',
'message' => 'setMessage',
'status' => 'setStatus',
'log' => 'setLog',
'createdAt' => 'setCreatedAt',
'updatedAt' => 'setUpdatedAt'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'id' => 'getId',
'deviceId' => 'getDeviceId',
'message' => 'getMessage',
'status' => 'getStatus',
'log' => 'getLog',
'createdAt' => 'getCreatedAt',
'updatedAt' => 'getUpdatedAt'
);
static function getters() {
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $deviceId
* @var int
*/
protected $deviceId;
/**
* $message
* @var string
*/
protected $message;
/**
* $status
* @var string
*/
protected $status;
/**
* $log
* @var \SMSGatewayMe\Client\Model\MessageLog[]
*/
protected $log;
/**
* $createdAt
* @var \DateTime
*/
protected $createdAt;
/**
* $updatedAt
* @var \DateTime
*/
protected $updatedAt;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->id = $data["id"];
$this->deviceId = $data["deviceId"];
$this->message = $data["message"];
$this->status = $data["status"];
$this->log = $data["log"];
$this->createdAt = $data["createdAt"];
$this->updatedAt = $data["updatedAt"];
}
}
/**
* Gets id
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Sets id
* @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Gets deviceId
* @return int
*/
public function getDeviceId()
{
return $this->deviceId;
}
/**
* Sets deviceId
* @param int $deviceId
* @return $this
*/
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
return $this;
}
/**
* Gets message
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* Sets message
* @param string $message
* @return $this
*/
public function setMessage($message)
{
$this->message = $message;
return $this;
}
/**
* Gets status
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* Sets status
* @param string $status
* @return $this
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Gets log
* @return \SMSGatewayMe\Client\Model\MessageLog[]
*/
public function getLog()
{
return $this->log;
}
/**
* Sets log
* @param \SMSGatewayMe\Client\Model\MessageLog[] $log
* @return $this
*/
public function setLog($log)
{
$this->log = $log;
return $this;
}
/**
* Gets createdAt
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Sets createdAt
* @param \DateTime $createdAt
* @return $this
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Gets updatedAt
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Sets updatedAt
* @param \DateTime $updatedAt
* @return $this
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* MessageLog
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* MessageLog Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageLog implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'status' => 'string',
'occurredAt' => '\DateTime'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'status' => 'status',
'occurredAt' => 'occurred_at'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'status' => 'setStatus',
'occurredAt' => 'setOccurredAt'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'status' => 'getStatus',
'occurredAt' => 'getOccurredAt'
);
static function getters() {
return self::$getters;
}
/**
* $status
* @var string
*/
protected $status;
/**
* $occurredAt
* @var \DateTime
*/
protected $occurredAt;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->status = $data["status"];
$this->occurredAt = $data["occurredAt"];
}
}
/**
* Gets status
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* Sets status
* @param string $status
* @return $this
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Gets occurredAt
* @return \DateTime
*/
public function getOccurredAt()
{
return $this->occurredAt;
}
/**
* Sets occurredAt
* @param \DateTime $occurredAt
* @return $this
*/
public function setOccurredAt($occurredAt)
{
$this->occurredAt = $occurredAt;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* MessageSearchResult
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* MessageSearchResult Class Doc Comment
*
* @category Class
* @description Message search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageSearchResult implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'count' => 'int',
'results' => '\SMSGatewayMe\Client\Model\Message[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'count' => 'count',
'results' => 'results'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'count' => 'setCount',
'results' => 'setResults'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'count' => 'getCount',
'results' => 'getResults'
);
static function getters() {
return self::$getters;
}
/**
* $count Total number of results
* @var int
*/
protected $count;
/**
* $results
* @var \SMSGatewayMe\Client\Model\Message[]
*/
protected $results;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->count = $data["count"];
$this->results = $data["results"];
}
}
/**
* Gets count
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Sets count
* @param int $count Total number of results
* @return $this
*/
public function setCount($count)
{
$this->count = $count;
return $this;
}
/**
* Gets results
* @return \SMSGatewayMe\Client\Model\Message[]
*/
public function getResults()
{
return $this->results;
}
/**
* Sets results
* @param \SMSGatewayMe\Client\Model\Message[] $results
* @return $this
*/
public function setResults($results)
{
$this->results = $results;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,287 @@
<?php
/**
* Search
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* Search Class Doc Comment
*
* @category Class
* @description A search criteria
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class Search implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'filters' => '\SMSGatewayMe\Client\Model\SearchFilter[][]',
'orderBy' => '\SMSGatewayMe\Client\Model\SearchOrderBy[]',
'limit' => 'int',
'offset' => 'int'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'filters' => 'filters',
'orderBy' => 'order_by',
'limit' => 'limit',
'offset' => 'offset'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'filters' => 'setFilters',
'orderBy' => 'setOrderBy',
'limit' => 'setLimit',
'offset' => 'setOffset'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'filters' => 'getFilters',
'orderBy' => 'getOrderBy',
'limit' => 'getLimit',
'offset' => 'getOffset'
);
static function getters() {
return self::$getters;
}
/**
* $filters
* @var \SMSGatewayMe\Client\Model\SearchFilter[][]
*/
protected $filters;
/**
* $orderBy
* @var \SMSGatewayMe\Client\Model\SearchOrderBy[]
*/
protected $orderBy;
/**
* $limit
* @var int
*/
protected $limit;
/**
* $offset
* @var int
*/
protected $offset;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->filters = $data["filters"];
$this->orderBy = $data["orderBy"];
$this->limit = $data["limit"];
$this->offset = $data["offset"];
}
}
/**
* Gets filters
* @return \SMSGatewayMe\Client\Model\SearchFilter[][]
*/
public function getFilters()
{
return $this->filters;
}
/**
* Sets filters
* @param \SMSGatewayMe\Client\Model\SearchFilter[][] $filters
* @return $this
*/
public function setFilters($filters)
{
$this->filters = $filters;
return $this;
}
/**
* Gets orderBy
* @return \SMSGatewayMe\Client\Model\SearchOrderBy[]
*/
public function getOrderBy()
{
return $this->orderBy;
}
/**
* Sets orderBy
* @param \SMSGatewayMe\Client\Model\SearchOrderBy[] $orderBy
* @return $this
*/
public function setOrderBy($orderBy)
{
$this->orderBy = $orderBy;
return $this;
}
/**
* Gets limit
* @return int
*/
public function getLimit()
{
return $this->limit;
}
/**
* Sets limit
* @param int $limit
* @return $this
*/
public function setLimit($limit)
{
$this->limit = $limit;
return $this;
}
/**
* Gets offset
* @return int
*/
public function getOffset()
{
return $this->offset;
}
/**
* Sets offset
* @param int $offset
* @return $this
*/
public function setOffset($offset)
{
$this->offset = $offset;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,255 @@
<?php
/**
* SearchFilter
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* SearchFilter Class Doc Comment
*
* @category Class
* @description A search criteria filter
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SearchFilter implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'field' => 'string',
'operator' => 'string',
'value' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'field' => 'field',
'operator' => 'operator',
'value' => 'value'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'field' => 'setField',
'operator' => 'setOperator',
'value' => 'setValue'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'field' => 'getField',
'operator' => 'getOperator',
'value' => 'getValue'
);
static function getters() {
return self::$getters;
}
/**
* $field
* @var string
*/
protected $field;
/**
* $operator
* @var string
*/
protected $operator;
/**
* $value
* @var string
*/
protected $value;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->field = $data["field"];
$this->operator = $data["operator"];
$this->value = $data["value"];
}
}
/**
* Gets field
* @return string
*/
public function getField()
{
return $this->field;
}
/**
* Sets field
* @param string $field
* @return $this
*/
public function setField($field)
{
$this->field = $field;
return $this;
}
/**
* Gets operator
* @return string
*/
public function getOperator()
{
return $this->operator;
}
/**
* Sets operator
* @param string $operator
* @return $this
*/
public function setOperator($operator)
{
$this->operator = $operator;
return $this;
}
/**
* Gets value
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Sets value
* @param string $value
* @return $this
*/
public function setValue($value)
{
$this->value = $value;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* SearchOrderBy
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* SearchOrderBy Class Doc Comment
*
* @category Class
* @description A search criteria order by
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SearchOrderBy implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'field' => 'string',
'direction' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'field' => 'field',
'direction' => 'direction'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'field' => 'setField',
'direction' => 'setDirection'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'field' => 'getField',
'direction' => 'getDirection'
);
static function getters() {
return self::$getters;
}
/**
* $field
* @var string
*/
protected $field;
/**
* $direction
* @var string
*/
protected $direction;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->field = $data["field"];
$this->direction = $data["direction"];
}
}
/**
* Gets field
* @return string
*/
public function getField()
{
return $this->field;
}
/**
* Sets field
* @param string $field
* @return $this
*/
public function setField($field)
{
$this->field = $field;
return $this;
}
/**
* Gets direction
* @return string
*/
public function getDirection()
{
return $this->direction;
}
/**
* Sets direction
* @param string $direction
* @return $this
*/
public function setDirection($direction)
{
$this->direction = $direction;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,255 @@
<?php
/**
* SendMessageRequest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* SendMessageRequest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SendMessageRequest implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'phoneNumber' => 'string',
'message' => 'string',
'deviceId' => 'int'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'phoneNumber' => 'phone_number',
'message' => 'message',
'deviceId' => 'device_id'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'phoneNumber' => 'setPhoneNumber',
'message' => 'setMessage',
'deviceId' => 'setDeviceId'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'phoneNumber' => 'getPhoneNumber',
'message' => 'getMessage',
'deviceId' => 'getDeviceId'
);
static function getters() {
return self::$getters;
}
/**
* $phoneNumber The number you wish to send the message to
* @var string
*/
protected $phoneNumber;
/**
* $message The message you wish to send
* @var string
*/
protected $message;
/**
* $deviceId The device you wish to send the message using
* @var int
*/
protected $deviceId;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->phoneNumber = $data["phoneNumber"];
$this->message = $data["message"];
$this->deviceId = $data["deviceId"];
}
}
/**
* Gets phoneNumber
* @return string
*/
public function getPhoneNumber()
{
return $this->phoneNumber;
}
/**
* Sets phoneNumber
* @param string $phoneNumber The number you wish to send the message to
* @return $this
*/
public function setPhoneNumber($phoneNumber)
{
$this->phoneNumber = $phoneNumber;
return $this;
}
/**
* Gets message
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* Sets message
* @param string $message The message you wish to send
* @return $this
*/
public function setMessage($message)
{
$this->message = $message;
return $this;
}
/**
* Gets deviceId
* @return int
*/
public function getDeviceId()
{
return $this->deviceId;
}
/**
* Sets deviceId
* @param int $deviceId The device you wish to send the message using
* @return $this
*/
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,421 @@
<?php
/**
* UpdateCallbackRequest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* UpdateCallbackRequest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class UpdateCallbackRequest implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'name' => 'string',
'event' => 'string',
'deviceId' => 'int',
'filterType' => 'string',
'filter' => 'string',
'method' => 'string',
'action' => 'string',
'secret' => 'string'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'name' => 'name',
'event' => 'event',
'deviceId' => 'device_id',
'filterType' => 'filter_type',
'filter' => 'filter',
'method' => 'method',
'action' => 'action',
'secret' => 'secret'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'name' => 'setName',
'event' => 'setEvent',
'deviceId' => 'setDeviceId',
'filterType' => 'setFilterType',
'filter' => 'setFilter',
'method' => 'setMethod',
'action' => 'setAction',
'secret' => 'setSecret'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'name' => 'getName',
'event' => 'getEvent',
'deviceId' => 'getDeviceId',
'filterType' => 'getFilterType',
'filter' => 'getFilter',
'method' => 'getMethod',
'action' => 'getAction',
'secret' => 'getSecret'
);
static function getters() {
return self::$getters;
}
/**
* $name
* @var string
*/
protected $name;
/**
* $event
* @var string
*/
protected $event;
/**
* $deviceId
* @var int
*/
protected $deviceId;
/**
* $filterType
* @var string
*/
protected $filterType;
/**
* $filter
* @var string
*/
protected $filter;
/**
* $method
* @var string
*/
protected $method;
/**
* $action
* @var string
*/
protected $action;
/**
* $secret
* @var string
*/
protected $secret;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->name = $data["name"];
$this->event = $data["event"];
$this->deviceId = $data["deviceId"];
$this->filterType = $data["filterType"];
$this->filter = $data["filter"];
$this->method = $data["method"];
$this->action = $data["action"];
$this->secret = $data["secret"];
}
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets event
* @return string
*/
public function getEvent()
{
return $this->event;
}
/**
* Sets event
* @param string $event
* @return $this
*/
public function setEvent($event)
{
$allowed_values = array("MESSAGE_UPDATED", "MESSAGE_CANCELED", "MESSAGE_DELIVERED", "MESSAGE_FAILED", "MESSAGE_MANUALLY_SENT", "MESSAGE_PENDING", "MESSAGE_QUEUED", "MESSAGE_RECEIVED", "MESSAGE_SENT");
if (!in_array($event, $allowed_values)) {
throw new \InvalidArgumentException("Invalid value for 'event', must be one of 'MESSAGE_UPDATED', 'MESSAGE_CANCELED', 'MESSAGE_DELIVERED', 'MESSAGE_FAILED', 'MESSAGE_MANUALLY_SENT', 'MESSAGE_PENDING', 'MESSAGE_QUEUED', 'MESSAGE_RECEIVED', 'MESSAGE_SENT'");
}
$this->event = $event;
return $this;
}
/**
* Gets deviceId
* @return int
*/
public function getDeviceId()
{
return $this->deviceId;
}
/**
* Sets deviceId
* @param int $deviceId
* @return $this
*/
public function setDeviceId($deviceId)
{
$this->deviceId = $deviceId;
return $this;
}
/**
* Gets filterType
* @return string
*/
public function getFilterType()
{
return $this->filterType;
}
/**
* Sets filterType
* @param string $filterType
* @return $this
*/
public function setFilterType($filterType)
{
$allowed_values = array("Starts With", "Is From", "Contains");
if (!in_array($filterType, $allowed_values)) {
throw new \InvalidArgumentException("Invalid value for 'filterType', must be one of 'Starts With', 'Is From', 'Contains'");
}
$this->filterType = $filterType;
return $this;
}
/**
* Gets filter
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* Sets filter
* @param string $filter
* @return $this
*/
public function setFilter($filter)
{
$this->filter = $filter;
return $this;
}
/**
* Gets method
* @return string
*/
public function getMethod()
{
return $this->method;
}
/**
* Sets method
* @param string $method
* @return $this
*/
public function setMethod($method)
{
$this->method = $method;
return $this;
}
/**
* Gets action
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* Sets action
* @param string $action
* @return $this
*/
public function setAction($action)
{
$this->action = $action;
return $this;
}
/**
* Gets secret
* @return string
*/
public function getSecret()
{
return $this->secret;
}
/**
* Sets secret
* @param string $secret
* @return $this
*/
public function setSecret($secret)
{
$this->secret = $secret;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,223 @@
<?php
/**
* UpdateContactRequest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client\Model;
use \ArrayAccess;
/**
* UpdateContactRequest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class UpdateContactRequest implements ArrayAccess
{
/**
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
static $swaggerTypes = array(
'name' => 'string',
'phoneNumbers' => 'string[]'
);
static function swaggerTypes() {
return self::$swaggerTypes;
}
/**
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
static $attributeMap = array(
'name' => 'name',
'phoneNumbers' => 'phone_numbers'
);
static function attributeMap() {
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
static $setters = array(
'name' => 'setName',
'phoneNumbers' => 'setPhoneNumbers'
);
static function setters() {
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
static $getters = array(
'name' => 'getName',
'phoneNumbers' => 'getPhoneNumbers'
);
static function getters() {
return self::$getters;
}
/**
* $name
* @var string
*/
protected $name;
/**
* $phoneNumbers
* @var string[]
*/
protected $phoneNumbers;
/**
* Constructor
* @param mixed[] $data Associated array of property value initalizing the model
*/
public function __construct(array $data = null)
{
if ($data != null) {
$this->name = $data["name"];
$this->phoneNumbers = $data["phoneNumbers"];
}
}
/**
* Gets name
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Sets name
* @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets phoneNumbers
* @return string[]
*/
public function getPhoneNumbers()
{
return $this->phoneNumbers;
}
/**
* Sets phoneNumbers
* @param string[] $phoneNumbers
* @return $this
*/
public function setPhoneNumbers($phoneNumbers)
{
$this->phoneNumbers = $phoneNumbers;
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(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\SMSGatewayMe\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}
}

View file

@ -0,0 +1,300 @@
<?php
/**
* ObjectSerializer
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace SMSGatewayMe\Client;
/**
* ObjectSerializer Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ObjectSerializer
{
/**
* Serialize data
*
* @param mixed $data the data to serialize
*
* @return string serialized form of $data
*/
public static function sanitizeForSerialization($data)
{
if (is_scalar($data) || null === $data) {
$sanitized = $data;
} elseif ($data instanceof \DateTime) {
$sanitized = $data->format(\DateTime::ATOM);
} elseif (is_array($data)) {
foreach ($data as $property => $value) {
$data[$property] = self::sanitizeForSerialization($value);
}
$sanitized = $data;
} elseif (is_object($data)) {
$values = array();
foreach (array_keys($data::swaggerTypes()) as $property) {
$getter = $data::getters()[$property];
if ($data->$getter() !== null) {
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($data->$getter());
}
}
$sanitized = (object)$values;
} else {
$sanitized = (string)$data;
}
return $sanitized;
}
/**
* Sanitize filename by removing path.
* e.g. ../../sun.gif becomes sun.gif
*
* @param string $filename filename to be sanitized
*
* @return string the sanitized filename
*/
public function sanitizeFilename($filename)
{
if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) {
return $match[1];
} else {
return $filename;
}
}
/**
* Take value and turn it into a string suitable for inclusion in
* the path, by url-encoding.
*
* @param string $value a string which will be part of the path
*
* @return string the serialized object
*/
public function toPathValue($value)
{
return rawurlencode($this->toString($value));
}
/**
* Take value and turn it into a string suitable for inclusion in
* the query, by imploding comma-separated if it's an object.
* If it's a string, pass through unchanged. It will be url-encoded
* later.
*
* @param object $object an object to be serialized to a string
*
* @return string the serialized object
*/
public function toQueryValue($object)
{
if (is_array($object)) {
return implode(',', $object);
} else {
return $this->toString($object);
}
}
/**
* Take value and turn it into a string suitable for inclusion in
* the header. If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
*
* @param string $value a string which will be part of the header
*
* @return string the header string
*/
public function toHeaderValue($value)
{
return $this->toString($value);
}
/**
* Take value and turn it into a string suitable for inclusion in
* the http body (form parameter). If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
*
* @param string $value the value of the form parameter
*
* @return string the form string
*/
public function toFormValue($value)
{
if ($value instanceof \SplFileObject) {
return $value->getRealPath();
} else {
return $this->toString($value);
}
}
/**
* Take value and turn it into a string suitable for inclusion in
* the parameter. If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
*
* @param string $value the value of the parameter
*
* @return string the header string
*/
public function toString($value)
{
if ($value instanceof \DateTime) { // datetime in ISO8601 format
return $value->format(\DateTime::ATOM);
} else {
return $value;
}
}
/**
* Serialize an array to a string.
*
* @param array $collection collection to serialize to a string
* @param string $collectionFormat the format use for serialization (csv,
* ssv, tsv, pipes, multi)
*
* @return string
*/
public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti=false)
{
if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
// http_build_query() almost does the job for us. We just
// need to fix the result of multidimensional arrays.
return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&'));
}
switch ($collectionFormat) {
case 'pipes':
return implode('|', $collection);
case 'tsv':
return implode("\t", $collection);
case 'ssv':
return implode(' ', $collection);
case 'csv':
// Deliberate fall through. CSV is default format.
default:
return implode(',', $collection);
}
}
/**
* Deserialize a JSON string into an object
*
* @param mixed $data object or primitive to be deserialized
* @param string $class class name is passed as a string
* @param string $httpHeaders HTTP headers
* @param string $discriminator discriminator if polymorphism is used
*
* @return object an instance of $class
*/
public static function deserialize($data, $class, $httpHeaders=null, $discriminator=null)
{
if (null === $data) {
$deserialized = null;
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
$inner = substr($class, 4, -1);
$deserialized = array();
if (strrpos($inner, ",") !== false) {
$subClass_array = explode(',', $inner, 2);
$subClass = $subClass_array[1];
foreach ($data as $key => $value) {
$deserialized[$key] = self::deserialize($value, $subClass, null, $discriminator);
}
}
} elseif (strcasecmp(substr($class, -2), '[]') == 0) {
$subClass = substr($class, 0, -2);
$values = array();
foreach ($data as $key => $value) {
$values[] = self::deserialize($value, $subClass, null, $discriminator);
}
$deserialized = $values;
} elseif ($class === 'object') {
settype($data, 'array');
$deserialized = $data;
} elseif ($class === '\DateTime') {
// Some API's return an invalid, empty string as a
// date-time property. DateTime::__construct() will return
// the current time for empty input which is probably not
// what is meant. The invalid empty string is probably to
// be interpreted as a missing field/value. Let's handle
// this graceful.
if (!empty($data)) {
$deserialized = new \DateTime($data);
} else {
$deserialized = null;
}
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
settype($data, $class);
$deserialized = $data;
} elseif ($class === '\SplFileObject') {
// determine file name
if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . sanitizeFilename($match[1]);
} else {
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
}
$deserialized = new \SplFileObject($filename, "w");
$byte_written = $deserialized->fwrite($data);
error_log("[INFO] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
} else {
// If a discriminator is defined and points to a valid subclass, use it.
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
$subclass = '\SMSGatewayMe\Client\Model\\' . $data->{$discriminator};
if (is_subclass_of($subclass, $class)) {
$class = $subclass;
}
}
$instance = new $class();
foreach ($instance::swaggerTypes() as $property => $type) {
$propertySetter = $instance::setters()[$property];
if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) {
continue;
}
$propertyValue = $data->{$instance::attributeMap()[$property]};
if (isset($propertyValue)) {
$instance->$propertySetter(self::deserialize($propertyValue, $type, null, $discriminator));
}
}
$deserialized = $instance;
}
return $deserialized;
}
}

View file

@ -0,0 +1,108 @@
<?php
/**
* CallbackApiTest
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the endpoint.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* CallbackApiTest Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CallbackApiTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test case for createCallback
*
* Create Callback
*
*/
public function test_createCallback() {
}
/**
* Test case for getCallback
*
* Get a specific callback
*
*/
public function test_getCallback() {
}
/**
* Test case for searchCallbacks
*
* Search callbacks
*
*/
public function test_searchCallbacks() {
}
/**
* Test case for updateCallback
*
* Update callback
*
*/
public function test_updateCallback() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* CallbackSearchResultTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* CallbackSearchResultTest Class Doc Comment
*
* @category Class
* @description Callback search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CallbackSearchResultTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test CallbackSearchResult
*/
public function testCallbackSearchResult() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* CallbackTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* CallbackTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CallbackTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test Callback
*/
public function testCallback() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* CancelMessageRequestTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* CancelMessageRequestTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CancelMessageRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test CancelMessageRequest
*/
public function testCancelMessageRequest() {
}
}

View file

@ -0,0 +1,128 @@
<?php
/**
* ContactApiTest
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the endpoint.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* ContactApiTest Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ContactApiTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test case for addPhoneNumber
*
* The phone number to add
*
*/
public function test_addPhoneNumber() {
}
/**
* Test case for createContacts
*
* Create Contacts
*
*/
public function test_createContacts() {
}
/**
* Test case for deletePhoneNumber
*
* The phone number to delete
*
*/
public function test_deletePhoneNumber() {
}
/**
* Test case for getContact
*
* Get a specific contact
*
*/
public function test_getContact() {
}
/**
* Test case for searchContacts
*
* Search contacts
*
*/
public function test_searchContacts() {
}
/**
* Test case for updateContact
*
* Update contact
*
*/
public function test_updateContact() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* ContactSearchResultTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* ContactSearchResultTest Class Doc Comment
*
* @category Class
* @description Contact search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ContactSearchResultTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test ContactSearchResult
*/
public function testContactSearchResult() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* ContactTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* ContactTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ContactTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test Contact
*/
public function testContact() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* CreateCallbackRequestTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* CreateCallbackRequestTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateCallbackRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test CreateCallbackRequest
*/
public function testCreateCallbackRequest() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* CreateContactRequestTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* CreateContactRequestTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class CreateContactRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test CreateContactRequest
*/
public function testCreateContactRequest() {
}
}

View file

@ -0,0 +1,88 @@
<?php
/**
* DeviceApiTest
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the endpoint.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* DeviceApiTest Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceApiTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test case for getDevice
*
* Get a specific device
*
*/
public function test_getDevice() {
}
/**
* Test case for searchDevices
*
* Search devices
*
*/
public function test_searchDevices() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* DeviceAttributesTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* DeviceAttributesTest Class Doc Comment
*
* @category Class
* @description Device attributes
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceAttributesTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test DeviceAttributes
*/
public function testDeviceAttributes() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* DeviceSearchResultTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* DeviceSearchResultTest Class Doc Comment
*
* @category Class
* @description Device search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceSearchResultTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test DeviceSearchResult
*/
public function testDeviceSearchResult() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* DeviceTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* DeviceTest Class Doc Comment
*
* @category Class
* @description Device
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class DeviceTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test Device
*/
public function testDevice() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* ErrorResponseTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* ErrorResponseTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ErrorResponseTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test ErrorResponse
*/
public function testErrorResponse() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* ErrorTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* ErrorTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ErrorTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test Error
*/
public function testError() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* FatalResponseTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* FatalResponseTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class FatalResponseTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test FatalResponse
*/
public function testFatalResponse() {
}
}

View file

@ -0,0 +1,108 @@
<?php
/**
* MessageApiTest
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the endpoint.
*/
namespace SMSGatewayMe\Client\Api;
use \SMSGatewayMe\Client\Configuration;
use \SMSGatewayMe\Client\ApiClient;
use \SMSGatewayMe\Client\ApiException;
use \SMSGatewayMe\Client\ObjectSerializer;
/**
* MessageApiTest Class Doc Comment
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageApiTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test case for cancelMessages
*
* Cancel messages
*
*/
public function test_cancelMessages() {
}
/**
* Test case for getMessage
*
* Get a specific message
*
*/
public function test_getMessage() {
}
/**
* Test case for searchMessages
*
* Search messages
*
*/
public function test_searchMessages() {
}
/**
* Test case for sendMessages
*
* Send messages
*
*/
public function test_sendMessages() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* MessageLogTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* MessageLogTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageLogTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test MessageLog
*/
public function testMessageLog() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* MessageSearchResultTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* MessageSearchResultTest Class Doc Comment
*
* @category Class
* @description Message search results
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageSearchResultTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test MessageSearchResult
*/
public function testMessageSearchResult() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* MessageTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* MessageTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class MessageTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test Message
*/
public function testMessage() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* SearchFilterTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* SearchFilterTest Class Doc Comment
*
* @category Class
* @description A search criteria filter
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SearchFilterTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test SearchFilter
*/
public function testSearchFilter() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* SearchOrderByTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* SearchOrderByTest Class Doc Comment
*
* @category Class
* @description A search criteria order by
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SearchOrderByTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test SearchOrderBy
*/
public function testSearchOrderBy() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* SearchTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* SearchTest Class Doc Comment
*
* @category Class
* @description A search criteria
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SearchTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test Search
*/
public function testSearch() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* SendMessageRequestTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* SendMessageRequestTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class SendMessageRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test SendMessageRequest
*/
public function testSendMessageRequest() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* UpdateCallbackRequestTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* UpdateCallbackRequestTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class UpdateCallbackRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test UpdateCallbackRequest
*/
public function testUpdateCallbackRequest() {
}
}

View file

@ -0,0 +1,70 @@
<?php
/**
* UpdateContactRequestTest
*
* PHP version 5
*
* @category Class
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace SMSGatewayMe\Client\Model;
/**
* UpdateContactRequestTest Class Doc Comment
*
* @category Class
* @description
* @package SMSGatewayMe\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class UpdateContactRequestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
*/
public static function setUpBeforeClass() {
}
/**
* Clean up after running each test case
*/
public static function tearDownAfterClass() {
}
/**
* Test UpdateContactRequest
*/
public function testUpdateContactRequest() {
}
}

7
lib/sms/vendor/autoload.php vendored Normal file
View file

@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit448fde876d4d4c407c727c3cafd1e991::getLoader();

572
lib/sms/vendor/composer/ClassLoader.php vendored Normal file
View file

@ -0,0 +1,572 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var ?string */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
/**
* @return string[]
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
}

View file

@ -0,0 +1,350 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}

21
lib/sms/vendor/composer/LICENSE vendored Normal file
View file

@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,10 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
);

View file

@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

View file

@ -0,0 +1,10 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'SMSGatewayMe\\Client\\' => array($baseDir . '/lib'),
);

View file

@ -0,0 +1,57 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit448fde876d4d4c407c727c3cafd1e991
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit448fde876d4d4c407c727c3cafd1e991', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit448fde876d4d4c407c727c3cafd1e991', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit448fde876d4d4c407c727c3cafd1e991::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
return $loader;
}
}

View file

@ -0,0 +1,36 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit448fde876d4d4c407c727c3cafd1e991
{
public static $prefixLengthsPsr4 = array (
'S' =>
array (
'SMSGatewayMe\\Client\\' => 20,
),
);
public static $prefixDirsPsr4 = array (
'SMSGatewayMe\\Client\\' =>
array (
0 => __DIR__ . '/../..' . '/lib',
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit448fde876d4d4c407c727c3cafd1e991::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit448fde876d4d4c407c727c3cafd1e991::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit448fde876d4d4c407c727c3cafd1e991::$classMap;
}, null, ClassLoader::class);
}
}

View file

@ -0,0 +1,5 @@
{
"packages": [],
"dev": false,
"dev-package-names": []
}

23
lib/sms/vendor/composer/installed.php vendored Normal file
View file

@ -0,0 +1,23 @@
<?php return array(
'root' => array(
'pretty_version' => 'v0.0.1',
'version' => '0.0.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'name' => 'smsgatewayme/client',
'dev' => false,
),
'versions' => array(
'smsgatewayme/client' => array(
'pretty_version' => 'v0.0.1',
'version' => '0.0.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => NULL,
'dev_requirement' => false,
),
),
);

View file

@ -0,0 +1,26 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 50303)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 5.3.3". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}