diff --git a/README.md b/README.md
index 23a4cae..61390a0 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,7 @@ To run your project, right click on your PHP file inside your Test project and c
## Initialize the API Client
-**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/client.md)
+**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/client.md)
The following parameters are configurable for the API Client:
@@ -115,7 +115,7 @@ The following parameters are configurable for the API Client:
| `retryOnTimeout` | `bool` | Whether to retry on request timeout.
*Default*: `true` |
| `httpStatusCodesToRetry` | `array` | Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524` |
| `httpMethodsToRetry` | `array` | Http methods to retry against.
*Default*: `'GET', 'PUT'` |
-| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/$a/https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/basic-authentication.md) | The Credentials Setter for Basic Authentication |
+| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/$a/https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/basic-authentication.md) | The Credentials Setter for Basic Authentication |
The API client can be initialized as follows:
@@ -135,7 +135,7 @@ $client = PagarmeApiSDKClientBuilder::init()
This API uses the following authentication schemes.
-* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/$a/https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/basic-authentication.md)
+* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/$a/https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/basic-authentication.md)
## API Errors
@@ -143,31 +143,31 @@ Here is the list of errors that the API might throw.
| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
-| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/models/error-exception.md) |
-| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/models/error-exception.md) |
-| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/models/error-exception.md) |
-| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/models/error-exception.md) |
-| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/models/error-exception.md) |
-| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/models/error-exception.md) |
+| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/models/error-exception.md) |
+| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/models/error-exception.md) |
+| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/models/error-exception.md) |
+| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/models/error-exception.md) |
+| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/models/error-exception.md) |
+| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/models/error-exception.md) |
## List of APIs
-* [Subscriptions](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/subscriptions.md)
-* [Orders](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/orders.md)
-* [Plans](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/plans.md)
-* [Invoices](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/invoices.md)
-* [Customers](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/customers.md)
-* [Charges](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/charges.md)
-* [Recipients](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/recipients.md)
-* [Tokens](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/tokens.md)
-* [Transactions](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/transactions.md)
-* [Transfers](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/transfers.md)
-* [Payables](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/payables.md)
-* [Balance Operations](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/controllers/balance-operations.md)
+* [Subscriptions](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/subscriptions.md)
+* [Orders](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/orders.md)
+* [Plans](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/plans.md)
+* [Invoices](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/invoices.md)
+* [Customers](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/customers.md)
+* [Charges](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/charges.md)
+* [Recipients](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/recipients.md)
+* [Tokens](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/tokens.md)
+* [Transactions](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/transactions.md)
+* [Transfers](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/transfers.md)
+* [Payables](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/payables.md)
+* [Balance Operations](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/controllers/balance-operations.md)
## Classes Documentation
-* [ApiException](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/api-exception.md)
-* [HttpRequest](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/http-request.md)
-* [HttpResponse](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.8/doc/http-response.md)
+* [ApiException](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/api-exception.md)
+* [HttpRequest](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/http-request.md)
+* [HttpResponse](https://www.github.com/pagarme/pagarme-php-sdk/tree/6.8.9/doc/http-response.md)
diff --git a/composer.json b/composer.json
index 0bf44ed..fb364ce 100644
--- a/composer.json
+++ b/composer.json
@@ -22,8 +22,8 @@
"php": "^7.2 || ^8.0",
"ext-json": "*",
"apimatic/unirest-php": "^4.0.0",
- "apimatic/core-interfaces": "~0.1.4",
- "apimatic/core": "~0.3.8"
+ "apimatic/core-interfaces": "~0.1.5",
+ "apimatic/core": "~0.3.9"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.5",
diff --git a/doc/models/create-managing-partner-request.md b/doc/models/create-managing-partner-request.md
index f836932..01ae854 100644
--- a/doc/models/create-managing-partner-request.md
+++ b/doc/models/create-managing-partner-request.md
@@ -14,7 +14,7 @@ Managing Partner Request
| `name` | `string` | Required | - | getName(): string | setName(string name): void |
| `email` | `string` | Required | - | getEmail(): string | setEmail(string email): void |
| `document` | `string` | Required | - | getDocument(): string | setDocument(string document): void |
-| `motherName` | `string` | Required | - | getMotherName(): string | setMotherName(string motherName): void |
+| `motherName` | `?string` | Optional | - | getMotherName(): ?string | setMotherName(?string motherName): void |
| `birthdate` | `string` | Required | - | getBirthdate(): string | setBirthdate(string birthdate): void |
| `monthlyIncome` | `int` | Required | - | getMonthlyIncome(): int | setMonthlyIncome(int monthlyIncome): void |
| `professionalOccupation` | `string` | Required | - | getProfessionalOccupation(): string | setProfessionalOccupation(string professionalOccupation): void |
@@ -29,7 +29,6 @@ Managing Partner Request
"name": "name4",
"email": "email2",
"document": "document2",
- "mother_name": "mother_name0",
"birthdate": "birthdate8",
"monthly_income": 70,
"professional_occupation": "professional_occupation8",
@@ -50,7 +49,8 @@ Managing Partner Request
"number": "number2",
"type": "type0"
}
- ]
+ ],
+ "mother_name": "mother_name0"
}
```
diff --git a/doc/models/create-register-information-corporation-request.md b/doc/models/create-register-information-corporation-request.md
index 841f7fe..9c45945 100644
--- a/doc/models/create-register-information-corporation-request.md
+++ b/doc/models/create-register-information-corporation-request.md
@@ -44,7 +44,6 @@
"name": "name4",
"email": "email2",
"document": "document8",
- "mother_name": "mother_name0",
"birthdate": "birthdate8",
"monthly_income": 202,
"professional_occupation": "professional_occupation8",
@@ -65,7 +64,8 @@
"number": "number2",
"type": "type0"
}
- ]
+ ],
+ "mother_name": "mother_name0"
}
],
"main_address": {
diff --git a/src/Models/Builders/CreateManagingPartnerRequestBuilder.php b/src/Models/Builders/CreateManagingPartnerRequestBuilder.php
index e5f6104..7296c7b 100644
--- a/src/Models/Builders/CreateManagingPartnerRequestBuilder.php
+++ b/src/Models/Builders/CreateManagingPartnerRequestBuilder.php
@@ -38,7 +38,6 @@ public static function init(
string $name,
string $email,
string $document,
- string $motherName,
string $birthdate,
int $monthlyIncome,
string $professionalOccupation,
@@ -50,7 +49,6 @@ public static function init(
$name,
$email,
$document,
- $motherName,
$birthdate,
$monthlyIncome,
$professionalOccupation,
@@ -60,6 +58,24 @@ public static function init(
));
}
+ /**
+ * Sets mother name field.
+ */
+ public function motherName(?string $value): self
+ {
+ $this->instance->setMotherName($value);
+ return $this;
+ }
+
+ /**
+ * Unsets mother name field.
+ */
+ public function unsetMotherName(): self
+ {
+ $this->instance->unsetMotherName();
+ return $this;
+ }
+
/**
* Initializes a new create managing partner request object.
*/
diff --git a/src/Models/CreateManagingPartnerRequest.php b/src/Models/CreateManagingPartnerRequest.php
index 74a8aca..bb4ac03 100644
--- a/src/Models/CreateManagingPartnerRequest.php
+++ b/src/Models/CreateManagingPartnerRequest.php
@@ -33,9 +33,9 @@ class CreateManagingPartnerRequest implements \JsonSerializable
private $document;
/**
- * @var string
+ * @var array
*/
- private $motherName;
+ private $motherName = [];
/**
* @var string
@@ -71,7 +71,6 @@ class CreateManagingPartnerRequest implements \JsonSerializable
* @param string $name
* @param string $email
* @param string $document
- * @param string $motherName
* @param string $birthdate
* @param int $monthlyIncome
* @param string $professionalOccupation
@@ -83,7 +82,6 @@ public function __construct(
string $name,
string $email,
string $document,
- string $motherName,
string $birthdate,
int $monthlyIncome,
string $professionalOccupation,
@@ -94,7 +92,6 @@ public function __construct(
$this->name = $name;
$this->email = $email;
$this->document = $document;
- $this->motherName = $motherName;
$this->birthdate = $birthdate;
$this->monthlyIncome = $monthlyIncome;
$this->professionalOccupation = $professionalOccupation;
@@ -163,20 +160,30 @@ public function setDocument(string $document): void
/**
* Returns Mother Name.
*/
- public function getMotherName(): string
+ public function getMotherName(): ?string
{
- return $this->motherName;
+ if (count($this->motherName) == 0) {
+ return null;
+ }
+ return $this->motherName['value'];
}
/**
* Sets Mother Name.
*
- * @required
* @maps mother_name
*/
- public function setMotherName(string $motherName): void
+ public function setMotherName(?string $motherName): void
+ {
+ $this->motherName['value'] = $motherName;
+ }
+
+ /**
+ * Unsets Mother Name.
+ */
+ public function unsetMotherName(): void
{
- $this->motherName = $motherName;
+ $this->motherName = [];
}
/**
@@ -312,7 +319,9 @@ public function jsonSerialize(bool $asArrayWhenEmpty = false)
$json['name'] = $this->name;
$json['email'] = $this->email;
$json['document'] = $this->document;
- $json['mother_name'] = $this->motherName;
+ if (!empty($this->motherName)) {
+ $json['mother_name'] = $this->motherName['value'];
+ }
$json['birthdate'] = $this->birthdate;
$json['monthly_income'] = $this->monthlyIncome;
$json['professional_occupation'] = $this->professionalOccupation;
diff --git a/src/PagarmeApiSDKClient.php b/src/PagarmeApiSDKClient.php
index c48a679..7713e74 100644
--- a/src/PagarmeApiSDKClient.php
+++ b/src/PagarmeApiSDKClient.php
@@ -82,7 +82,7 @@ public function __construct(array $config = [])
->converter(new CompatibilityConverter())
->jsonHelper(ApiHelper::getJsonHelper())
->apiCallback($this->config['httpCallback'] ?? null)
- ->userAgent('PagarmeApiSDK - PHP 6.8.8')
+ ->userAgent('PagarmeApiSDK - PHP 6.8.9')
->globalConfig($this->getGlobalConfiguration())
->globalErrors($this->getGlobalErrors())
->serverUrls(self::ENVIRONMENT_MAP[$this->getEnvironment()], Server::DEFAULT_)