Skip to content

Commit

Permalink
Merge pull request #77 from mundipagg/CodeGen-PHP
Browse files Browse the repository at this point in the history
🎨 Add document_type field
  • Loading branch information
bruno-sales authored Jan 21, 2021
2 parents 1c6767b + 91d09cf commit 1b3be34
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 96 deletions.
76 changes: 38 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ function getAddresses(

```php
$customerId = 'customer_id';
$page = 147;
$size = 147;
$page = 122;
$size = 122;

$result = $customers->getAddresses($customerId, $page, $size);

Expand Down Expand Up @@ -534,8 +534,8 @@ function getAccessTokens(

```php
$customerId = 'customer_id';
$page = 105;
$size = 105;
$page = 122;
$size = 122;

$result = $customers->getAccessTokens($customerId, $page, $size);

Expand Down Expand Up @@ -673,8 +673,8 @@ function getCards(

```php
$customerId = 'customer_id';
$page = 105;
$size = 105;
$page = 122;
$size = 122;

$result = $customers->getCards($customerId, $page, $size);

Expand Down Expand Up @@ -1001,8 +1001,8 @@ function getCharges(
#### Example Usage

```php
$page = 105;
$size = 105;
$page = 122;
$size = 122;
$code = 'code';
$status = 'status';
$paymentMethod = 'payment_method';
Expand Down Expand Up @@ -1274,8 +1274,8 @@ function getChargeTransactions(

```php
$chargeId = 'charge_id';
$page = 105;
$size = 105;
$page = 80;
$size = 80;

$result = $charges->getChargeTransactions($chargeId, $page, $size);

Expand Down Expand Up @@ -1450,8 +1450,8 @@ function getRecipients(
#### Example Usage

```php
$page = 105;
$size = 105;
$page = 80;
$size = 80;

$result = $recipients->getRecipients($page, $size);

Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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';

Expand Down Expand Up @@ -2560,8 +2560,8 @@ function getIncrements(

```php
$subscriptionId = 'subscription_id';
$page = 197;
$size = 197;
$page = 80;
$size = 80;

$result = $subscriptions->getIncrements($subscriptionId, $page, $size);

Expand Down Expand Up @@ -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';

Expand Down Expand Up @@ -3007,8 +3007,8 @@ function getDiscounts(

```php
$subscriptionId = 'subscription_id';
$page = 197;
$size = 197;
$page = 172;
$size = 172;

$result = $subscriptions->getDiscounts($subscriptionId, $page, $size);

Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -3179,8 +3179,8 @@ function getSubscriptionItems(

```php
$subscriptionId = 'subscription_id';
$page = 197;
$size = 197;
$page = 172;
$size = 172;
$name = 'name';
$code = 'code';
$status = 'status';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -3980,8 +3980,8 @@ function getSellers(
#### Example Usage

```php
$page = 33;
$size = 33;
$page = 172;
$size = 172;
$name = 'name';
$document = 'document';
$code = 'code';
Expand Down Expand Up @@ -4284,8 +4284,8 @@ function getPlans(
#### Example Usage

```php
$page = 33;
$size = 33;
$page = 130;
$size = 130;
$name = 'name';
$status = 'status';
$billingType = 'billing_type';
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
66 changes: 38 additions & 28 deletions src/Models/CreateCustomerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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;
}
Expand Down
13 changes: 12 additions & 1 deletion src/Models/GetCustomerResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand All @@ -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);
}
}

Expand All @@ -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;
}
Expand Down
Loading

0 comments on commit 1b3be34

Please sign in to comment.