Skip to content

Commit

Permalink
2.1.1 Public Accepted Brands (#83)
Browse files Browse the repository at this point in the history
* 2.1.1 Include Accepeted Brands

* 2.1.1 Change in README

Co-authored-by: Thiago Barradas <tbarradas@mundipagg.com>
  • Loading branch information
magnomoreira and ThiagoBarradas authored Sep 10, 2021
1 parent d02bdca commit 59d2106
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 42 deletions.
78 changes: 39 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### DEPRECATED | CHECK NEW VERSION > https://github.com/pagarme/pagarme-core-api-php
### DEPRECATED | CHECK NEW VERSION > https://github.com/pagarme/pagarme-core-api-python

# Mundipagg agora é Pagar.me

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

```php
$customerId = 'customer_id';
$page = 74;
$size = 74;
$page = 63;
$size = 63;

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

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

```php
$customerId = 'customer_id';
$page = 74;
$size = 74;
$page = 63;
$size = 63;

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

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

```php
$customerId = 'customer_id';
$page = 74;
$size = 74;
$page = 63;
$size = 63;

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

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

```php
$page = 74;
$size = 74;
$page = 63;
$size = 63;
$code = 'code';
$status = 'status';
$paymentMethod = 'payment_method';
Expand Down Expand Up @@ -1288,8 +1288,8 @@ function getChargeTransactions(

```php
$chargeId = 'charge_id';
$page = 74;
$size = 74;
$page = 63;
$size = 63;

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

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

```php
$page = 74;
$size = 74;
$page = 227;
$size = 227;

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

Expand Down Expand Up @@ -1537,8 +1537,8 @@ function getAnticipations(

```php
$recipientId = 'recipient_id';
$page = 74;
$size = 74;
$page = 227;
$size = 227;
$status = 'status';
$timeframe = 'timeframe';
$paymentDateSince = date("D M d, Y G:i");
Expand Down Expand Up @@ -1709,8 +1709,8 @@ function getTransfers(

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

```php
$recipientId = 'recipient_id';
$page = 166;
$size = 166;
$page = 227;
$size = 227;
$status = 'status';
$createdSince = date("D M d, Y G:i");
$createdUntil = date("D M d, Y G:i");
Expand Down Expand Up @@ -2398,8 +2398,8 @@ function getUsagesDetails(
```php
$subscriptionId = 'subscription_id';
$cycleId = 'cycle_id';
$size = 166;
$page = 166;
$size = 227;
$page = 227;
$itemId = 'item_id';
$group = 'group';

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

```php
$subscriptionId = 'subscription_id';
$page = 166;
$size = 166;
$page = 227;
$size = 227;

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

Expand Down Expand Up @@ -2717,8 +2717,8 @@ function getUsages(
```php
$subscriptionId = 'subscription_id';
$itemId = 'item_id';
$page = 166;
$size = 166;
$page = 227;
$size = 227;
$code = 'code';
$group = 'group';
$usedSince = date("D M d, Y G:i");
Expand Down Expand Up @@ -3054,8 +3054,8 @@ function getDiscounts(

```php
$subscriptionId = 'subscription_id';
$page = 124;
$size = 124;
$page = 135;
$size = 135;

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

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

```php
$page = 124;
$size = 124;
$page = 135;
$size = 135;
$code = 'code';
$billingType = 'billing_type';
$customerId = 'customer_id';
Expand Down Expand Up @@ -3226,8 +3226,8 @@ function getSubscriptionItems(

```php
$subscriptionId = 'subscription_id';
$page = 124;
$size = 124;
$page = 135;
$size = 135;
$name = 'name';
$code = 'code';
$status = 'status';
Expand Down Expand Up @@ -3548,8 +3548,8 @@ function getInvoices(
#### Example Usage

```php
$page = 124;
$size = 124;
$page = 135;
$size = 135;
$code = 'code';
$customerId = 'customer_id';
$subscriptionId = 'subscription_id';
Expand Down Expand Up @@ -3709,8 +3709,8 @@ function getOrders(
#### Example Usage

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

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

```php
$page = 216;
$size = 216;
$page = 135;
$size = 135;
$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 2.1.0';
const USER_AGENT = 'MundiSDK - PHP 2.1.1';

/**
* HttpCallBack instance associated with this controller
Expand Down
14 changes: 13 additions & 1 deletion src/Models/CreateCheckoutPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ class CreateCheckoutPaymentRequest implements JsonSerializable
*/
public $bankTransfer;

/**
* Accepted Brands
* @required
* @maps accepted_brands
* @var array $acceptedBrands public property
*/
public $acceptedBrands;

/**
* Constructor to set initial or default values of member properties
* @param array $acceptedPaymentMethods Initialization value for $this-
Expand Down Expand Up @@ -148,10 +156,12 @@ class CreateCheckoutPaymentRequest implements JsonSerializable
* >billingAddress
* @param CreateCheckoutBankTransferRequest $bankTransfer Initialization value for $this-
* >bankTransfer
* @param array $acceptedBrands Initialization value for $this-
* >acceptedBrands
*/
public function __construct()
{
if (14 == func_num_args()) {
if (15 == func_num_args()) {
$this->acceptedPaymentMethods = func_get_arg(0);
$this->acceptedMultiPaymentMethods = func_get_arg(1);
$this->successUrl = func_get_arg(2);
Expand All @@ -166,6 +176,7 @@ public function __construct()
$this->billingAddressEditable = func_get_arg(11);
$this->billingAddress = func_get_arg(12);
$this->bankTransfer = func_get_arg(13);
$this->acceptedBrands = func_get_arg(14);
}
}

Expand All @@ -190,6 +201,7 @@ public function jsonSerialize()
$json['billing_address_editable'] = $this->billingAddressEditable;
$json['billing_address'] = $this->billingAddress;
$json['bank_transfer'] = $this->bankTransfer;
$json['accepted_brands'] = $this->acceptedBrands;

return $json;
}
Expand Down
14 changes: 13 additions & 1 deletion src/Models/GetCheckoutPaymentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ class GetCheckoutPaymentResponse implements JsonSerializable
*/
public $bankTransfer;

/**
* Accepted Brands
* @required
* @maps accepted_brands
* @var array $acceptedBrands public property
*/
public $acceptedBrands;

/**
* Constructor to set initial or default values of member properties
* @param string $id Initialization value for $this->id
Expand Down Expand Up @@ -252,10 +260,12 @@ class GetCheckoutPaymentResponse implements JsonSerializable
* >debitCard
* @param GetCheckoutBankTransferPaymentResponse $bankTransfer Initialization value for $this-
* >bankTransfer
* @param array $acceptedBrands Initialization value for $this-
* >acceptedBrands
*/
public function __construct()
{
if (25 == func_num_args()) {
if (26 == func_num_args()) {
$this->id = func_get_arg(0);
$this->amount = func_get_arg(1);
$this->defaultPaymentMethod = func_get_arg(2);
Expand All @@ -281,6 +291,7 @@ public function __construct()
$this->currency = func_get_arg(22);
$this->debitCard = func_get_arg(23);
$this->bankTransfer = func_get_arg(24);
$this->acceptedBrands = func_get_arg(25);
}
}

Expand Down Expand Up @@ -319,6 +330,7 @@ public function jsonSerialize()
$json['currency'] = $this->currency;
$json['debit_card'] = $this->debitCard;
$json['bank_transfer'] = $this->bankTransfer;
$json['accepted_brands'] = $this->acceptedBrands;

return $json;
}
Expand Down

0 comments on commit 59d2106

Please sign in to comment.