Skip to content

Commit 1abdf95

Browse files
committed
update
1 parent 06c9c0e commit 1abdf95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+9089
-0
lines changed

.php_cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
return Symfony\CS\Config::create()
4+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
5+
->setUsingCache(true)
6+
->fixers(
7+
[
8+
'ordered_use',
9+
'phpdoc_order',
10+
'short_array_syntax',
11+
'strict',
12+
'strict_param'
13+
]
14+
)
15+
->finder(
16+
Symfony\CS\Finder\DefaultFinder::create()
17+
->in(__DIR__)
18+
);

.swagger-codegen-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Swagger Codegen Ignore
2+
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.swagger-codegen/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0.25

README.md

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
#
2+
This is an API defintion for accesssing the Mail.Baby mail service.
3+
4+
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
5+
6+
- API version: 1.0.0
7+
- Package version: 1.0.0
8+
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
9+
For more information, please visit [https://www.interserver.net/contact-information.html](https://www.interserver.net/contact-information.html)
10+
11+
## Requirements
12+
13+
PHP 5.5 and later
14+
15+
## Installation & Usage
16+
### Composer
17+
18+
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
19+
20+
```
21+
{
22+
"repositories": [
23+
{
24+
"type": "git",
25+
"url": "https://github.com/interserver/mailbaby-client-php.git"
26+
}
27+
],
28+
"require": {
29+
"interserver/mailbaby-client-php": "*@dev"
30+
}
31+
}
32+
```
33+
34+
Then run `composer install`
35+
36+
### Manual Installation
37+
38+
Download the files and include `autoload.php`:
39+
40+
```php
41+
require_once('/path/to//vendor/autoload.php');
42+
```
43+
44+
## Tests
45+
46+
To run the unit tests:
47+
48+
```
49+
composer install
50+
./vendor/bin/phpunit
51+
```
52+
53+
## Getting Started
54+
55+
Please follow the [installation procedure](#installation--usage) and then run the following:
56+
57+
```php
58+
<?php
59+
require_once(__DIR__ . '/vendor/autoload.php');
60+
61+
// Configure API key authorization: apiKeyAuth
62+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
63+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
64+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
65+
66+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
67+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
68+
// This is optional, `GuzzleHttp\Client` will be used as default.
69+
new GuzzleHttp\Client(),
70+
$config
71+
);
72+
$id = 789; // int | User ID
73+
74+
try {
75+
$result = $apiInstance->getMailById($id);
76+
print_r($result);
77+
} catch (Exception $e) {
78+
echo 'Exception when calling DefaultApi->getMailById: ', $e->getMessage(), PHP_EOL;
79+
}
80+
81+
// Configure API key authorization: apiKeyAuth
82+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
83+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
84+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
85+
86+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
87+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
88+
// This is optional, `GuzzleHttp\Client` will be used as default.
89+
new GuzzleHttp\Client(),
90+
$config
91+
);
92+
93+
try {
94+
$result = $apiInstance->getMailOrders();
95+
print_r($result);
96+
} catch (Exception $e) {
97+
echo 'Exception when calling DefaultApi->getMailOrders: ', $e->getMessage(), PHP_EOL;
98+
}
99+
100+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
101+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
102+
// This is optional, `GuzzleHttp\Client` will be used as default.
103+
new GuzzleHttp\Client()
104+
);
105+
106+
try {
107+
$apiInstance->pingServer();
108+
} catch (Exception $e) {
109+
echo 'Exception when calling DefaultApi->pingServer: ', $e->getMessage(), PHP_EOL;
110+
}
111+
112+
// Configure API key authorization: apiKeyAuth
113+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
114+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
115+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
116+
117+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
118+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
119+
// This is optional, `GuzzleHttp\Client` will be used as default.
120+
new GuzzleHttp\Client(),
121+
$config
122+
);
123+
$body = new \Interserver\Mailbaby\Model\MailOrder(); // \Interserver\Mailbaby\Model\MailOrder | Inventory item to add
124+
125+
try {
126+
$apiInstance->placeMailOrder($body);
127+
} catch (Exception $e) {
128+
echo 'Exception when calling DefaultApi->placeMailOrder: ', $e->getMessage(), PHP_EOL;
129+
}
130+
131+
// Configure API key authorization: apiKeyAuth
132+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
133+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
134+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
135+
136+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
137+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
138+
// This is optional, `GuzzleHttp\Client` will be used as default.
139+
new GuzzleHttp\Client(),
140+
$config
141+
);
142+
$body = new \Interserver\Mailbaby\Model\SendMail(); // \Interserver\Mailbaby\Model\SendMail |
143+
$id = 789; // int | User ID
144+
145+
try {
146+
$result = $apiInstance->sendAdvMailById($body, $id);
147+
print_r($result);
148+
} catch (Exception $e) {
149+
echo 'Exception when calling DefaultApi->sendAdvMailById: ', $e->getMessage(), PHP_EOL;
150+
}
151+
152+
// Configure API key authorization: apiKeyAuth
153+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
154+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
155+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
156+
157+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
158+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
159+
// This is optional, `GuzzleHttp\Client` will be used as default.
160+
new GuzzleHttp\Client(),
161+
$config
162+
);
163+
$id = 789; // int | User ID
164+
$subject = "subject_example"; // string |
165+
$body = "body_example"; // string |
166+
$to = "to_example"; // string |
167+
$toName = "toName_example"; // string |
168+
$from = "from_example"; // string |
169+
$fromName = "fromName_example"; // string |
170+
171+
try {
172+
$result = $apiInstance->sendMailById($id, $subject, $body, $to, $toName, $from, $fromName);
173+
print_r($result);
174+
} catch (Exception $e) {
175+
echo 'Exception when calling DefaultApi->sendMailById: ', $e->getMessage(), PHP_EOL;
176+
}
177+
178+
// Configure API key authorization: apiKeyAuth
179+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
180+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
181+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
182+
183+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
184+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
185+
// This is optional, `GuzzleHttp\Client` will be used as default.
186+
new GuzzleHttp\Client(),
187+
$config
188+
);
189+
190+
try {
191+
$apiInstance->validateMailOrder();
192+
} catch (Exception $e) {
193+
echo 'Exception when calling DefaultApi->validateMailOrder: ', $e->getMessage(), PHP_EOL;
194+
}
195+
196+
// Configure API key authorization: apiKeyAuth
197+
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
198+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
199+
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
200+
201+
$apiInstance = new Interserver\Mailbaby\Api\DefaultApi(
202+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
203+
// This is optional, `GuzzleHttp\Client` will be used as default.
204+
new GuzzleHttp\Client(),
205+
$config
206+
);
207+
$id = 789; // int | User ID
208+
$searchString = "searchString_example"; // string | pass an optional search string for looking up inventory
209+
$skip = 56; // int | number of records to skip for pagination
210+
$limit = 56; // int | maximum number of records to return
211+
212+
try {
213+
$result = $apiInstance->viewMailLogById($id, $searchString, $skip, $limit);
214+
print_r($result);
215+
} catch (Exception $e) {
216+
echo 'Exception when calling DefaultApi->viewMailLogById: ', $e->getMessage(), PHP_EOL;
217+
}
218+
?>
219+
```
220+
221+
## Documentation for API Endpoints
222+
223+
All URIs are relative to *https://api.mailbaby.net/*
224+
225+
Class | Method | HTTP request | Description
226+
------------ | ------------- | ------------- | -------------
227+
*DefaultApi* | [**getMailById**](docs/Api/DefaultApi.md#getmailbyid) | **GET** /mail/{id} | Gets mail order information by id
228+
*DefaultApi* | [**getMailOrders**](docs/Api/DefaultApi.md#getmailorders) | **GET** /mail | displays a list of mail service orders
229+
*DefaultApi* | [**pingServer**](docs/Api/DefaultApi.md#pingserver) | **GET** /ping | Checks if the server is running
230+
*DefaultApi* | [**placeMailOrder**](docs/Api/DefaultApi.md#placemailorder) | **POST** /mail/order | places a mail order
231+
*DefaultApi* | [**sendAdvMailById**](docs/Api/DefaultApi.md#sendadvmailbyid) | **POST** /mail/{id}/advsend | Sends an Email with Advanced Options
232+
*DefaultApi* | [**sendMailById**](docs/Api/DefaultApi.md#sendmailbyid) | **POST** /mail/{id}/send | Sends an Email
233+
*DefaultApi* | [**validateMailOrder**](docs/Api/DefaultApi.md#validatemailorder) | **GET** /mail/order | validatess order details before placing an order
234+
*DefaultApi* | [**viewMailLogById**](docs/Api/DefaultApi.md#viewmaillogbyid) | **GET** /mail/{id}/log | displays the mail log
235+
236+
## Documentation For Models
237+
238+
- [ErrorResponse](docs/Model/ErrorResponse.md)
239+
- [GenericResponse](docs/Model/GenericResponse.md)
240+
- [MailAttachment](docs/Model/MailAttachment.md)
241+
- [MailContact](docs/Model/MailContact.md)
242+
- [MailLog](docs/Model/MailLog.md)
243+
- [MailOrder](docs/Model/MailOrder.md)
244+
- [MailOrders](docs/Model/MailOrders.md)
245+
- [SendMail](docs/Model/SendMail.md)
246+
- [SendMailForm](docs/Model/SendMailForm.md)
247+
248+
## Documentation For Authorization
249+
250+
251+
## apiKeyAuth
252+
253+
- **Type**: API key
254+
- **API key parameter name**: X-API-KEY
255+
- **Location**: HTTP header
256+
257+
## apiLoginAuth
258+
259+
- **Type**: API key
260+
- **API key parameter name**: X-API-LOGIN
261+
- **Location**: HTTP header
262+
263+
## apiPasswordAuth
264+
265+
- **Type**: API key
266+
- **API key parameter name**: X-API-PASS
267+
- **Location**: HTTP header
268+
269+
270+
## Author
271+
272+
detain@interserver.net
273+

composer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "interserver/mailbaby-client-php",
3+
"version": "1.0.0",
4+
"description": "",
5+
"keywords": [
6+
"swagger",
7+
"php",
8+
"sdk",
9+
"api"
10+
],
11+
"homepage": "http://swagger.io",
12+
"license": "proprietary",
13+
"authors": [
14+
{
15+
"name": "Swagger and contributors",
16+
"homepage": "https://github.com/swagger-api/swagger-codegen"
17+
}
18+
],
19+
"require": {
20+
"php": ">=5.5",
21+
"ext-curl": "*",
22+
"ext-json": "*",
23+
"ext-mbstring": "*",
24+
"guzzlehttp/guzzle": "^6.2"
25+
},
26+
"require-dev": {
27+
"phpunit/phpunit": "^4.8",
28+
"squizlabs/php_codesniffer": "~2.6",
29+
"friendsofphp/php-cs-fixer": "~1.12"
30+
},
31+
"autoload": {
32+
"psr-4": { "Interserver\\Mailbaby\\" : "src/" }
33+
},
34+
"autoload-dev": {
35+
"psr-4": { "Interserver\\Mailbaby\\" : "test/" }
36+
}
37+
}

0 commit comments

Comments
 (0)