From 91d09cf419aaaf82ab68680bc4b9ce00aeb9d782 Mon Sep 17 00:00:00 2001 From: Marcelo Marini Date: Thu, 21 Jan 2021 21:20:50 +0000 Subject: [PATCH] :art: Add document_type field --- README.md | 76 ++++++++++++++-------------- src/Controllers/BaseController.php | 2 +- src/Models/CreateCustomerRequest.php | 66 ++++++++++++++---------- src/Models/GetCustomerResponse.php | 13 ++++- src/Models/UpdateCustomerRequest.php | 66 ++++++++++++++---------- 5 files changed, 127 insertions(+), 96 deletions(-) diff --git a/README.md b/README.md index 46fe2f8..48756b9 100644 --- a/README.md +++ b/README.md @@ -302,8 +302,8 @@ function getAddresses( ```php $customerId = 'customer_id'; -$page = 147; -$size = 147; +$page = 122; +$size = 122; $result = $customers->getAddresses($customerId, $page, $size); @@ -534,8 +534,8 @@ function getAccessTokens( ```php $customerId = 'customer_id'; -$page = 105; -$size = 105; +$page = 122; +$size = 122; $result = $customers->getAccessTokens($customerId, $page, $size); @@ -673,8 +673,8 @@ function getCards( ```php $customerId = 'customer_id'; -$page = 105; -$size = 105; +$page = 122; +$size = 122; $result = $customers->getCards($customerId, $page, $size); @@ -1001,8 +1001,8 @@ function getCharges( #### Example Usage ```php -$page = 105; -$size = 105; +$page = 122; +$size = 122; $code = 'code'; $status = 'status'; $paymentMethod = 'payment_method'; @@ -1274,8 +1274,8 @@ function getChargeTransactions( ```php $chargeId = 'charge_id'; -$page = 105; -$size = 105; +$page = 80; +$size = 80; $result = $charges->getChargeTransactions($chargeId, $page, $size); @@ -1450,8 +1450,8 @@ function getRecipients( #### Example Usage ```php -$page = 105; -$size = 105; +$page = 80; +$size = 80; $result = $recipients->getRecipients($page, $size); @@ -1523,8 +1523,8 @@ function getAnticipations( ```php $recipientId = 'recipient_id'; -$page = 105; -$size = 105; +$page = 80; +$size = 80; $status = 'status'; $timeframe = 'timeframe'; $paymentDateSince = date("D M d, Y G:i"); @@ -1695,8 +1695,8 @@ function getTransfers( ```php $recipientId = 'recipient_id'; -$page = 105; -$size = 105; +$page = 80; +$size = 80; $status = 'status'; $createdSince = date("D M d, Y G:i"); $createdUntil = date("D M d, Y G:i"); @@ -1933,8 +1933,8 @@ function getWithdrawals( ```php $recipientId = 'recipient_id'; -$page = 197; -$size = 197; +$page = 80; +$size = 80; $status = 'status'; $createdSince = date("D M d, Y G:i"); $createdUntil = date("D M d, Y G:i"); @@ -2357,8 +2357,8 @@ function getUsagesDetails( ```php $subscriptionId = 'subscription_id'; $cycleId = 'cycle_id'; -$size = 197; -$page = 197; +$size = 80; +$page = 80; $itemId = 'item_id'; $group = 'group'; @@ -2560,8 +2560,8 @@ function getIncrements( ```php $subscriptionId = 'subscription_id'; -$page = 197; -$size = 197; +$page = 80; +$size = 80; $result = $subscriptions->getIncrements($subscriptionId, $page, $size); @@ -2672,8 +2672,8 @@ function getUsages( ```php $subscriptionId = 'subscription_id'; $itemId = 'item_id'; -$page = 197; -$size = 197; +$page = 172; +$size = 172; $code = 'code'; $group = 'group'; @@ -3007,8 +3007,8 @@ function getDiscounts( ```php $subscriptionId = 'subscription_id'; -$page = 197; -$size = 197; +$page = 172; +$size = 172; $result = $subscriptions->getDiscounts($subscriptionId, $page, $size); @@ -3092,8 +3092,8 @@ function getSubscriptions( #### Example Usage ```php -$page = 197; -$size = 197; +$page = 172; +$size = 172; $code = 'code'; $billingType = 'billing_type'; $customerId = 'customer_id'; @@ -3179,8 +3179,8 @@ function getSubscriptionItems( ```php $subscriptionId = 'subscription_id'; -$page = 197; -$size = 197; +$page = 172; +$size = 172; $name = 'name'; $code = 'code'; $status = 'status'; @@ -3499,8 +3499,8 @@ function getInvoices( #### Example Usage ```php -$page = 33; -$size = 33; +$page = 172; +$size = 172; $code = 'code'; $customerId = 'customer_id'; $subscriptionId = 'subscription_id'; @@ -3659,8 +3659,8 @@ function getOrders( #### Example Usage ```php -$page = 33; -$size = 33; +$page = 172; +$size = 172; $code = 'code'; $status = 'status'; $createdSince = date("D M d, Y G:i"); @@ -3980,8 +3980,8 @@ function getSellers( #### Example Usage ```php -$page = 33; -$size = 33; +$page = 172; +$size = 172; $name = 'name'; $document = 'document'; $code = 'code'; @@ -4284,8 +4284,8 @@ function getPlans( #### Example Usage ```php -$page = 33; -$size = 33; +$page = 130; +$size = 130; $name = 'name'; $status = 'status'; $billingType = 'billing_type'; diff --git a/src/Controllers/BaseController.php b/src/Controllers/BaseController.php index 6042e0f..2e9aadd 100644 --- a/src/Controllers/BaseController.php +++ b/src/Controllers/BaseController.php @@ -24,7 +24,7 @@ class BaseController * User-agent to be sent with API calls * @var string */ - const USER_AGENT = 'MundiSDK - PHP 0.16.18'; + const USER_AGENT = 'MundiSDK - PHP 0.16.19'; /** * HttpCallBack instance associated with this controller diff --git a/src/Models/CreateCustomerRequest.php b/src/Models/CreateCustomerRequest.php index 408a355..44ca49e 100644 --- a/src/Models/CreateCustomerRequest.php +++ b/src/Models/CreateCustomerRequest.php @@ -76,30 +76,39 @@ class CreateCustomerRequest implements JsonSerializable */ public $gender; + /** + * @todo Write general description for this property + * @maps document_type + * @var string|null $documentType public property + */ + public $documentType; + /** * Constructor to set initial or default values of member properties - * @param string $name Initialization value for $this->name - * @param string $email Initialization value for $this->email - * @param string $document Initialization value for $this->document - * @param string $type Initialization value for $this->type - * @param CreateAddressRequest $address Initialization value for $this->address - * @param array $metadata Initialization value for $this->metadata - * @param CreatePhonesRequest $phones Initialization value for $this->phones - * @param string $code Initialization value for $this->code - * @param string $gender Initialization value for $this->gender + * @param string $name Initialization value for $this->name + * @param string $email Initialization value for $this->email + * @param string $document Initialization value for $this->document + * @param string $type Initialization value for $this->type + * @param CreateAddressRequest $address Initialization value for $this->address + * @param array $metadata Initialization value for $this->metadata + * @param CreatePhonesRequest $phones Initialization value for $this->phones + * @param string $code Initialization value for $this->code + * @param string $gender Initialization value for $this->gender + * @param string $documentType Initialization value for $this->documentType */ public function __construct() { - if (9 == func_num_args()) { - $this->name = func_get_arg(0); - $this->email = func_get_arg(1); - $this->document = func_get_arg(2); - $this->type = func_get_arg(3); - $this->address = func_get_arg(4); - $this->metadata = func_get_arg(5); - $this->phones = func_get_arg(6); - $this->code = func_get_arg(7); - $this->gender = func_get_arg(8); + if (10 == func_num_args()) { + $this->name = func_get_arg(0); + $this->email = func_get_arg(1); + $this->document = func_get_arg(2); + $this->type = func_get_arg(3); + $this->address = func_get_arg(4); + $this->metadata = func_get_arg(5); + $this->phones = func_get_arg(6); + $this->code = func_get_arg(7); + $this->gender = func_get_arg(8); + $this->documentType = func_get_arg(9); } } @@ -110,15 +119,16 @@ public function __construct() public function jsonSerialize() { $json = array(); - $json['name'] = $this->name; - $json['email'] = $this->email; - $json['document'] = $this->document; - $json['type'] = $this->type; - $json['address'] = $this->address; - $json['metadata'] = $this->metadata; - $json['phones'] = $this->phones; - $json['code'] = $this->code; - $json['gender'] = $this->gender; + $json['name'] = $this->name; + $json['email'] = $this->email; + $json['document'] = $this->document; + $json['type'] = $this->type; + $json['address'] = $this->address; + $json['metadata'] = $this->metadata; + $json['phones'] = $this->phones; + $json['code'] = $this->code; + $json['gender'] = $this->gender; + $json['document_type'] = $this->documentType; return $json; } diff --git a/src/Models/GetCustomerResponse.php b/src/Models/GetCustomerResponse.php index 8619bb6..6ab517e 100644 --- a/src/Models/GetCustomerResponse.php +++ b/src/Models/GetCustomerResponse.php @@ -118,6 +118,14 @@ class GetCustomerResponse implements JsonSerializable */ public $code; + /** + * @todo Write general description for this property + * @required + * @maps document_type + * @var string $documentType public property + */ + public $documentType; + /** * Constructor to set initial or default values of member properties * @param string $id Initialization value for $this->id @@ -134,10 +142,11 @@ class GetCustomerResponse implements JsonSerializable * @param GetPhonesResponse $phones Initialization value for $this->phones * @param integer $fbId Initialization value for $this->fbId * @param string $code Initialization value for $this->code + * @param string $documentType Initialization value for $this->documentType */ public function __construct() { - if (14 == func_num_args()) { + if (15 == func_num_args()) { $this->id = func_get_arg(0); $this->name = func_get_arg(1); $this->email = func_get_arg(2); @@ -152,6 +161,7 @@ public function __construct() $this->phones = func_get_arg(11); $this->fbId = func_get_arg(12); $this->code = func_get_arg(13); + $this->documentType = func_get_arg(14); } } @@ -176,6 +186,7 @@ public function jsonSerialize() $json['phones'] = $this->phones; $json['fb_id'] = $this->fbId; $json['code'] = $this->code; + $json['document_type'] = $this->documentType; return $json; } diff --git a/src/Models/UpdateCustomerRequest.php b/src/Models/UpdateCustomerRequest.php index cd0eda6..e7ec809 100644 --- a/src/Models/UpdateCustomerRequest.php +++ b/src/Models/UpdateCustomerRequest.php @@ -68,30 +68,39 @@ class UpdateCustomerRequest implements JsonSerializable */ public $gender; + /** + * @todo Write general description for this property + * @maps document_type + * @var string|null $documentType public property + */ + public $documentType; + /** * Constructor to set initial or default values of member properties - * @param string $name Initialization value for $this->name - * @param string $email Initialization value for $this->email - * @param string $document Initialization value for $this->document - * @param string $type Initialization value for $this->type - * @param CreateAddressRequest $address Initialization value for $this->address - * @param array $metadata Initialization value for $this->metadata - * @param CreatePhonesRequest $phones Initialization value for $this->phones - * @param string $code Initialization value for $this->code - * @param string $gender Initialization value for $this->gender + * @param string $name Initialization value for $this->name + * @param string $email Initialization value for $this->email + * @param string $document Initialization value for $this->document + * @param string $type Initialization value for $this->type + * @param CreateAddressRequest $address Initialization value for $this->address + * @param array $metadata Initialization value for $this->metadata + * @param CreatePhonesRequest $phones Initialization value for $this->phones + * @param string $code Initialization value for $this->code + * @param string $gender Initialization value for $this->gender + * @param string $documentType Initialization value for $this->documentType */ public function __construct() { - if (9 == func_num_args()) { - $this->name = func_get_arg(0); - $this->email = func_get_arg(1); - $this->document = func_get_arg(2); - $this->type = func_get_arg(3); - $this->address = func_get_arg(4); - $this->metadata = func_get_arg(5); - $this->phones = func_get_arg(6); - $this->code = func_get_arg(7); - $this->gender = func_get_arg(8); + if (10 == func_num_args()) { + $this->name = func_get_arg(0); + $this->email = func_get_arg(1); + $this->document = func_get_arg(2); + $this->type = func_get_arg(3); + $this->address = func_get_arg(4); + $this->metadata = func_get_arg(5); + $this->phones = func_get_arg(6); + $this->code = func_get_arg(7); + $this->gender = func_get_arg(8); + $this->documentType = func_get_arg(9); } } @@ -102,15 +111,16 @@ public function __construct() public function jsonSerialize() { $json = array(); - $json['name'] = $this->name; - $json['email'] = $this->email; - $json['document'] = $this->document; - $json['type'] = $this->type; - $json['address'] = $this->address; - $json['metadata'] = $this->metadata; - $json['phones'] = $this->phones; - $json['code'] = $this->code; - $json['gender'] = $this->gender; + $json['name'] = $this->name; + $json['email'] = $this->email; + $json['document'] = $this->document; + $json['type'] = $this->type; + $json['address'] = $this->address; + $json['metadata'] = $this->metadata; + $json['phones'] = $this->phones; + $json['code'] = $this->code; + $json['gender'] = $this->gender; + $json['document_type'] = $this->documentType; return $json; }