Skip to content

Commit

Permalink
Merge pull request #28 from mundipagg/CodeGen-PHP
Browse files Browse the repository at this point in the history
Adds currency on CreateOrderRequest.
  • Loading branch information
Felipe Paixão da Silva authored Apr 27, 2018
2 parents b1ebc5a + bbfbe30 commit bcfc962
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 31 deletions.
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ function getCharges(
#### Example Usage

```php
$page = 50;
$size = 50;
$page = 173;
$size = 173;
$code = 'code';
$status = 'status';
$paymentMethod = 'payment_method';
Expand Down Expand Up @@ -999,8 +999,8 @@ function getAccessTokens(

```php
$customerId = 'customer_id';
$page = 141;
$size = 141;
$page = 131;
$size = 131;

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

Expand Down Expand Up @@ -1033,8 +1033,8 @@ function getAddresses(

```php
$customerId = 'customer_id';
$page = 141;
$size = 141;
$page = 131;
$size = 131;

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

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

```php
$customerId = 'customer_id';
$page = 141;
$size = 141;
$page = 131;
$size = 131;

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

Expand Down Expand Up @@ -1254,8 +1254,8 @@ function getInvoices(
#### Example Usage

```php
$page = 141;
$size = 141;
$page = 131;
$size = 131;
$code = 'code';
$customerId = 'customer_id';
$subscriptionId = 'subscription_id';
Expand Down Expand Up @@ -1647,8 +1647,8 @@ function getPlans(
#### Example Usage

```php
$page = 141;
$size = 141;
$page = 131;
$size = 131;
$name = 'name';
$status = 'status';
$billingType = 'billing_type';
Expand Down Expand Up @@ -2105,8 +2105,8 @@ function getUsages(
```php
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$page = 99;
$size = 99;
$page = 222;
$size = 222;

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

Expand Down Expand Up @@ -2187,8 +2187,8 @@ function getSubscriptions(
#### Example Usage

```php
$page = 99;
$size = 99;
$page = 222;
$size = 222;
$code = 'code';
$billingType = 'billing_type';
$customerId = 'customer_id';
Expand Down Expand Up @@ -2389,8 +2389,8 @@ function getDiscounts(

```php
$subscriptionId = 'subscription_id';
$page = 99;
$size = 99;
$page = 222;
$size = 222;

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

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

```php
$subscriptionId = 'subscription_id';
$page = 191;
$size = 191;
$page = 222;
$size = 222;

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

Expand Down Expand Up @@ -2654,8 +2654,8 @@ function getOrders(
#### Example Usage

```php
$page = 191;
$size = 191;
$page = 181;
$size = 181;
$code = 'code';
$status = 'status';
$createdSince = date("D M d, Y G:i");
Expand Down Expand Up @@ -3081,8 +3081,8 @@ function getRecipients(
#### Example Usage

```php
$page = 191;
$size = 191;
$page = 181;
$size = 181;

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

Expand Down Expand Up @@ -3210,8 +3210,8 @@ function getTransfers(

```php
$recipientId = 'recipient_id';
$page = 191;
$size = 191;
$page = 181;
$size = 181;
$status = 'status';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");
Expand Down Expand Up @@ -3355,8 +3355,8 @@ function getAnticipations(

```php
$recipientId = 'recipient_id';
$page = 27;
$size = 27;
$page = 181;
$size = 181;
$status = 'status';
$timeframe = 'timeframe';
$paymentDateSince = date("D M d, Y G:i");
Expand Down Expand Up @@ -3530,8 +3530,8 @@ function getSellers(
#### Example Usage

```php
$page = 27;
$size = 27;
$page = 17;
$size = 17;
$name = 'name';
$document = 'document';
$code = 'code';
Expand Down
11 changes: 10 additions & 1 deletion src/Models/CreateOrderRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ class CreateOrderRequest implements JsonSerializable
*/
public $device;

/**
* Currency
* @var string|null $currency public property
*/
public $currency;

/**
* Constructor to set initial or default values of member properties
* @param array $items Initialization value for $this->items
Expand All @@ -118,11 +124,12 @@ class CreateOrderRequest implements JsonSerializable
* @param string $sessionId Initialization value for $this->sessionId
* @param CreateLocationRequest $location Initialization value for $this->location
* @param CreateDeviceRequest $device Initialization value for $this->device
* @param string $currency Initialization value for $this->currency
*/
public function __construct()
{
switch (func_num_args()) {
case 13:
case 14:
$this->items = func_get_arg(0);
$this->customer = func_get_arg(1);
$this->payments = func_get_arg(2);
Expand All @@ -136,6 +143,7 @@ public function __construct()
$this->sessionId = func_get_arg(10);
$this->location = func_get_arg(11);
$this->device = func_get_arg(12);
$this->currency = func_get_arg(13);
break;

default:
Expand Down Expand Up @@ -164,6 +172,7 @@ public function jsonSerialize()
$json['session_id'] = $this->sessionId;
$json['location'] = $this->location;
$json['device'] = $this->device;
$json['currency'] = $this->currency;

return $json;
}
Expand Down

0 comments on commit bcfc962

Please sign in to comment.