Skip to content

Commit

Permalink
Merge tag '1.1.0' into develop
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
Konstantin Yakushev committed Oct 5, 2018
2 parents 0e853f0 + 049427d commit f369d3b
Show file tree
Hide file tree
Showing 9 changed files with 416 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/Http/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ApiClient
/**
* User agent constants.
*/
const HEADER_USER_AGENT_BUNQ_SDK_DEFAULT = 'bunq-sdk-php/1.0.0';
const HEADER_USER_AGENT_BUNQ_SDK_DEFAULT = 'bunq-sdk-php/1.1.0';

/**
* Binary request constants.
Expand Down
16 changes: 8 additions & 8 deletions src/Model/Generated/Endpoint/BunqMeTabEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class BunqMeTabEntry extends BunqModel
/**
* The Amount requested to be paid. Can be optional.
*
* @var Amount|null
* @var Amount
*/
protected $amountInquiredFieldForRequest;

Expand All @@ -96,14 +96,14 @@ class BunqMeTabEntry extends BunqModel
protected $redirectUrlFieldForRequest;

/**
* @param string $description The description for the bunq.me. Maximum 9000
* characters. Field is required but can be an empty string.
* @param Amount|null $amountInquired The Amount requested to be paid. Can
* be optional.
* @param string|null $redirectUrl The URL which the user is sent to after
* making a payment.
* @param Amount $amountInquired The Amount requested to be paid. Can be
* optional.
* @param string $description The description for the bunq.me. Maximum 9000
* characters. Field is required but can be an empty string.
* @param string|null $redirectUrl The URL which the user is sent to after
* making a payment.
*/
public function __construct(string $description, Amount $amountInquired = null, string $redirectUrl = null)
public function __construct(Amount $amountInquired, string $description, string $redirectUrl = null)
{
$this->amountInquiredFieldForRequest = $amountInquired;
$this->descriptionFieldForRequest = $description;
Expand Down
74 changes: 61 additions & 13 deletions src/Model/Generated/Endpoint/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use bunq\Http\ApiClient;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Object\Amount;
use bunq\Model\Generated\Object\CardCountryPermission;
use bunq\Model\Generated\Object\CardLimit;
use bunq\Model\Generated\Object\CardMagStripePermission;
Expand All @@ -29,6 +30,7 @@ class Card extends BunqModel
const FIELD_PIN_CODE = 'pin_code';
const FIELD_ACTIVATION_CODE = 'activation_code';
const FIELD_STATUS = 'status';
const FIELD_CARD_LIMIT = 'card_limit';
const FIELD_LIMIT = 'limit';
const FIELD_MAG_STRIPE_PERMISSION = 'mag_stripe_permission';
const FIELD_COUNTRY_PERMISSION = 'country_permission';
Expand Down Expand Up @@ -136,9 +138,16 @@ class Card extends BunqModel
protected $primaryAccountNumberFourDigit;

/**
* The limits to define for the card, among CARD_LIMIT_CONTACTLESS,
* CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR
* for CARD_LIMIT_CONTACTLESS)
* The spending limit for the cards
*
* @var Amount
*/
protected $cardLimit;

/**
* DEPRECATED: The limits to define for the card, among
* CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and
* CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS)
*
* @var CardLimit[]
*/
Expand Down Expand Up @@ -229,9 +238,17 @@ class Card extends BunqModel
protected $statusFieldForRequest;

/**
* The limits to define for the card, among CARD_LIMIT_CONTACTLESS,
* CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR
* for CARD_LIMIT_CONTACTLESS). All the limits must be provided on update.
* The spending limit for the card.
*
* @var Amount|null
*/
protected $cardLimitFieldForRequest;

/**
* DEPRECATED: The limits to define for the card, among
* CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and
* CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS). All the
* limits must be provided on update.
*
* @var CardLimit[]|null
*/
Expand Down Expand Up @@ -283,8 +300,9 @@ class Card extends BunqModel
* Mind that all the possible choices (apart from ACTIVE
* and DEACTIVATED) are permanent and cannot be changed
* after.
* @param CardLimit[]|null $limit The limits to define for the card, among
* CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM,
* @param Amount|null $cardLimit The spending limit for the card.
* @param CardLimit[]|null $limit DEPRECATED: The limits to define for the
* card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM,
* CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR
* for CARD_LIMIT_CONTACTLESS). All the limits must be
* provided on update.
Expand All @@ -302,6 +320,7 @@ public function __construct(
string $pinCode = null,
string $activationCode = null,
string $status = null,
Amount $cardLimit = null,
array $limit = null,
CardMagStripePermission $magStripePermission = null,
array $countryPermission = null,
Expand All @@ -311,6 +330,7 @@ public function __construct(
$this->pinCodeFieldForRequest = $pinCode;
$this->activationCodeFieldForRequest = $activationCode;
$this->statusFieldForRequest = $status;
$this->cardLimitFieldForRequest = $cardLimit;
$this->limitFieldForRequest = $limit;
$this->magStripePermissionFieldForRequest = $magStripePermission;
$this->countryPermissionFieldForRequest = $countryPermission;
Expand Down Expand Up @@ -341,8 +361,9 @@ public function __construct(
* Mind that all the possible choices (apart from ACTIVE
* and DEACTIVATED) are permanent and cannot be changed
* after.
* @param CardLimit[]|null $limit The limits to define for the card, among
* CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM,
* @param Amount|null $cardLimit The spending limit for the card.
* @param CardLimit[]|null $limit DEPRECATED: The limits to define for the
* card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM,
* CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR
* for CARD_LIMIT_CONTACTLESS). All the limits must be
* provided on update.
Expand All @@ -364,6 +385,7 @@ public static function update(
string $pinCode = null,
string $activationCode = null,
string $status = null,
Amount $cardLimit = null,
array $limit = null,
CardMagStripePermission $magStripePermission = null,
array $countryPermission = null,
Expand All @@ -382,6 +404,7 @@ public static function update(
self::FIELD_PIN_CODE => $pinCode,
self::FIELD_ACTIVATION_CODE => $activationCode,
self::FIELD_STATUS => $status,
self::FIELD_CARD_LIMIT => $cardLimit,
self::FIELD_LIMIT => $limit,
self::FIELD_MAG_STRIPE_PERMISSION => $magStripePermission,
self::FIELD_COUNTRY_PERMISSION => $countryPermission,
Expand Down Expand Up @@ -726,9 +749,30 @@ public function setPrimaryAccountNumberFourDigit($primaryAccountNumberFourDigit)
}

/**
* The limits to define for the card, among CARD_LIMIT_CONTACTLESS,
* CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR
* for CARD_LIMIT_CONTACTLESS)
* The spending limit for the cards
*
* @return Amount
*/
public function getCardLimit()
{
return $this->cardLimit;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param Amount $cardLimit
*/
public function setCardLimit($cardLimit)
{
$this->cardLimit = $cardLimit;
}

/**
* DEPRECATED: The limits to define for the card, among
* CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM, CARD_LIMIT_DIPPING and
* CARD_LIMIT_POS_ICC (e.g. 25 EUR for CARD_LIMIT_CONTACTLESS)
*
* @return CardLimit[]
*/
Expand Down Expand Up @@ -956,6 +1000,10 @@ public function isAllFieldNull()
return false;
}

if (!is_null($this->cardLimit)) {
return false;
}

if (!is_null($this->limit)) {
return false;
}
Expand Down
97 changes: 97 additions & 0 deletions src/Model/Generated/Endpoint/CustomerLimit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use bunq\Http\ApiClient;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Object\Amount;

/**
* Show the limits for the authenticated user.
Expand Down Expand Up @@ -56,6 +57,27 @@ class CustomerLimit extends BunqModel
*/
protected $limitCardDebitReplacement;

/**
* The number of "PREMIUM_LIMITED" invites the user has remaining.
*
* @var int
*/
protected $limitInviteUserPremiumLimited;

/**
* The maximum amount a user is allowed to spend in a month.
*
* @var Amount
*/
protected $limitAmountMonthly;

/**
* The amount the user has spent in the last month.
*
* @var Amount
*/
protected $spentAmountMonthly;

/**
* Get all limits for the authenticated user.
*
Expand Down Expand Up @@ -189,6 +211,69 @@ public function setLimitCardDebitReplacement($limitCardDebitReplacement)
$this->limitCardDebitReplacement = $limitCardDebitReplacement;
}

/**
* The number of "PREMIUM_LIMITED" invites the user has remaining.
*
* @return int
*/
public function getLimitInviteUserPremiumLimited()
{
return $this->limitInviteUserPremiumLimited;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param int $limitInviteUserPremiumLimited
*/
public function setLimitInviteUserPremiumLimited($limitInviteUserPremiumLimited)
{
$this->limitInviteUserPremiumLimited = $limitInviteUserPremiumLimited;
}

/**
* The maximum amount a user is allowed to spend in a month.
*
* @return Amount
*/
public function getLimitAmountMonthly()
{
return $this->limitAmountMonthly;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param Amount $limitAmountMonthly
*/
public function setLimitAmountMonthly($limitAmountMonthly)
{
$this->limitAmountMonthly = $limitAmountMonthly;
}

/**
* The amount the user has spent in the last month.
*
* @return Amount
*/
public function getSpentAmountMonthly()
{
return $this->spentAmountMonthly;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param Amount $spentAmountMonthly
*/
public function setSpentAmountMonthly($spentAmountMonthly)
{
$this->spentAmountMonthly = $spentAmountMonthly;
}

/**
* @return bool
*/
Expand All @@ -214,6 +299,18 @@ public function isAllFieldNull()
return false;
}

if (!is_null($this->limitInviteUserPremiumLimited)) {
return false;
}

if (!is_null($this->limitAmountMonthly)) {
return false;
}

if (!is_null($this->spentAmountMonthly)) {
return false;
}

return true;
}
}
32 changes: 32 additions & 0 deletions src/Model/Generated/Endpoint/MasterCardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ class MasterCardAction extends BunqModel
*/
protected $panEntryModeUser;

/**
* The setlement status in the authorisation process.
*
* @var string
*/
protected $settlementStatus;

/**
* The city where the message originates from as announced by the terminal.
*
Expand Down Expand Up @@ -626,6 +633,27 @@ public function setPanEntryModeUser($panEntryModeUser)
$this->panEntryModeUser = $panEntryModeUser;
}

/**
* The setlement status in the authorisation process.
*
* @return string
*/
public function getSettlementStatus()
{
return $this->settlementStatus;
}

/**
* @deprecated User should not be able to set values via setters, use
* constructor.
*
* @param string $settlementStatus
*/
public function setSettlementStatus($settlementStatus)
{
$this->settlementStatus = $settlementStatus;
}

/**
* The city where the message originates from as announced by the terminal.
*
Expand Down Expand Up @@ -952,6 +980,10 @@ public function isAllFieldNull()
return false;
}

if (!is_null($this->settlementStatus)) {
return false;
}

if (!is_null($this->city)) {
return false;
}
Expand Down
Loading

0 comments on commit f369d3b

Please sign in to comment.