Skip to content

Commit

Permalink
add email, address and website info to divisions dto
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko Heller committed Aug 7, 2024
1 parent 9bbdabb commit e6b6ac6
Show file tree
Hide file tree
Showing 17 changed files with 309 additions and 33 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verdigado/gruene-api-client",
"version": "0.6.0",
"version": "0.7.0",
"description": "PHP client library for gruene api",
"keywords": [
"openapitools",
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/DivisionsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\DivisionsApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.
All URIs are relative to http://0.0.0.0:5000, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/HealthApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\HealthApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.
All URIs are relative to http://0.0.0.0:5000, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/NbApiApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\NbApiApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.
All URIs are relative to http://0.0.0.0:5000, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/OffboardingApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\OffboardingApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.
All URIs are relative to http://0.0.0.0:5000, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down
4 changes: 2 additions & 2 deletions docs/Api/ProfilesApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\ProfilesApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.
All URIs are relative to http://0.0.0.0:5000, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down Expand Up @@ -585,7 +585,7 @@ try {

### HTTP request headers

- **Content-Type**: `multipart/form-data`, `application/json`
- **Content-Type**: `multipart/form-data`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
Expand Down
2 changes: 1 addition & 1 deletion docs/Api/UsersApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Verdigado\GrueneApiClient\UsersApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.
All URIs are relative to http://0.0.0.0:5000, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
Expand Down
2 changes: 2 additions & 0 deletions docs/Model/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**city** | **string** | Location city |
**zip** | **string** | Location zip code |
**line1** | **string** | First address line for street and house number |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
1 change: 1 addition & 0 deletions docs/Model/Division.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**urls** | **string[]** | List of internet presences |
**id** | **string** | The division id |
**division_key** | **string** | The division key |
**name1** | **string** | |
Expand Down
2 changes: 2 additions & 0 deletions docs/Model/DivisionEmail.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tags** | **string[]** | Tags associated with email as string values |
**purposes** | **string[]** | Purposes associated with email |
**address** | **string** | Email address |
**is_favorite** | **bool** | Indicate if this email is preferred for general inquiries |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 2 additions & 0 deletions docs/Model/DivisionOfficeAddress.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**city** | **string** | Location city |
**zip** | **string** | Location zip code |
**line1** | **string** | First address line for street and house number |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10 changes: 7 additions & 3 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ class Configuration
*
* @var string
*/
protected $host = 'https://api.gruene.de';
protected $host = 'http://0.0.0.0:5000';

/**
* User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/0.6.0/PHP';
protected $userAgent = 'OpenAPI-Generator/0.7.0/PHP';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -433,7 +433,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 0.1.0' . PHP_EOL;
$report .= ' SDK Package Version: 0.6.0' . PHP_EOL;
$report .= ' SDK Package Version: 0.7.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down Expand Up @@ -472,6 +472,10 @@ public function getApiKeyWithPrefix($apiKeyIdentifier)
public function getHostSettings()
{
return [
[
"url" => "http://0.0.0.0:5000",
"description" => "localhost",
],
[
"url" => "https://api.gruene.de",
"description" => "Production",
Expand Down
1 change: 0 additions & 1 deletion lib/apis/ProfilesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class ProfilesApi
],
'updateProfileImage' => [
'multipart/form-data',
'application/json',
],
];

Expand Down
86 changes: 80 additions & 6 deletions lib/models/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class Address implements ModelInterface, ArrayAccess, \JsonSerializable
* @var string[]
*/
protected static $openAPITypes = [
'zip' => 'string'
'city' => 'string',
'zip' => 'string',
'line1' => 'string'
];

/**
Expand All @@ -68,7 +70,9 @@ class Address implements ModelInterface, ArrayAccess, \JsonSerializable
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'zip' => null
'city' => null,
'zip' => null,
'line1' => null
];

/**
Expand All @@ -77,7 +81,9 @@ class Address implements ModelInterface, ArrayAccess, \JsonSerializable
* @var boolean[]
*/
protected static array $openAPINullables = [
'zip' => false
'city' => false,
'zip' => false,
'line1' => false
];

/**
Expand Down Expand Up @@ -166,7 +172,9 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $attributeMap = [
'zip' => 'zip'
'city' => 'city',
'zip' => 'zip',
'line1' => 'line1'
];

/**
Expand All @@ -175,7 +183,9 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $setters = [
'zip' => 'setZip'
'city' => 'setCity',
'zip' => 'setZip',
'line1' => 'setLine1'
];

/**
Expand All @@ -184,7 +194,9 @@ public function isNullableSetToNull(string $property): bool
* @var string[]
*/
protected static $getters = [
'zip' => 'getZip'
'city' => 'getCity',
'zip' => 'getZip',
'line1' => 'getLine1'
];

/**
Expand Down Expand Up @@ -244,7 +256,9 @@ public function getModelName()
*/
public function __construct(array $data = null)
{
$this->setIfExists('city', $data ?? [], null);
$this->setIfExists('zip', $data ?? [], null);
$this->setIfExists('line1', $data ?? [], null);
}

/**
Expand Down Expand Up @@ -274,9 +288,15 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if ($this->container['city'] === null) {
$invalidProperties[] = "'city' can't be null";
}
if ($this->container['zip'] === null) {
$invalidProperties[] = "'zip' can't be null";
}
if ($this->container['line1'] === null) {
$invalidProperties[] = "'line1' can't be null";
}
return $invalidProperties;
}

Expand All @@ -292,6 +312,33 @@ public function valid()
}


/**
* Gets city
*
* @return string
*/
public function getCity()
{
return $this->container['city'];
}

/**
* Sets city
*
* @param string $city Location city
*
* @return self
*/
public function setCity($city)
{
if (is_null($city)) {
throw new \InvalidArgumentException('non-nullable city cannot be null');
}
$this->container['city'] = $city;

return $this;
}

/**
* Gets zip
*
Expand All @@ -318,6 +365,33 @@ public function setZip($zip)

return $this;
}

/**
* Gets line1
*
* @return string
*/
public function getLine1()
{
return $this->container['line1'];
}

/**
* Sets line1
*
* @param string $line1 First address line for street and house number
*
* @return self
*/
public function setLine1($line1)
{
if (is_null($line1)) {
throw new \InvalidArgumentException('non-nullable line1 cannot be null');
}
$this->container['line1'] = $line1;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
Loading

0 comments on commit e6b6ac6

Please sign in to comment.