Skip to content

Commit

Permalink
Merge branch 'release/1.14.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
angelomelonas committed Aug 19, 2020
2 parents ce07d8e + f036e81 commit ae825b7
Show file tree
Hide file tree
Showing 26 changed files with 792 additions and 89 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

## [Unreleased](https://github.com/bunq/sdk_php/tree/HEAD)

[Full Changelog](https://github.com/bunq/sdk_php/compare/1.13.1...HEAD)
[Full Changelog](https://github.com/bunq/sdk_php/compare/1.14.0...HEAD)

**Fixed bugs:**

- AttachmentMonetaryAccount needs a monetaryAccountId parameter [\#185](https://github.com/bunq/sdk_php/issues/185)
- Incorrect name space for BunqException [\#166](https://github.com/bunq/sdk_php/issues/166)

## [1.14.0](https://github.com/bunq/sdk_php/tree/1.14.0) (2020-07-27)

[Full Changelog](https://github.com/bunq/sdk_php/compare/1.13.1...1.14.0)

**Closed issues:**

Expand Down Expand Up @@ -376,7 +385,6 @@
**Merged pull requests:**

- Fixes \#36 on php5.6 [\#37](https://github.com/bunq/sdk_php/pull/37) ([OGKevin](https://github.com/OGKevin))
- Added an .gitattributes file. [\#20](https://github.com/bunq/sdk_php/pull/20) ([cafferata](https://github.com/cafferata))

## [0.9.1](https://github.com/bunq/sdk_php/tree/0.9.1) (2017-08-07)

Expand Down Expand Up @@ -412,6 +420,7 @@
- \#28 remove phpstan as it does not support php 5.6 [\#29](https://github.com/bunq/sdk_php/pull/29) ([qurben](https://github.com/qurben))
- \#25 Update directory for composer scripts, also omit version. [\#26](https://github.com/bunq/sdk_php/pull/26) ([qurben](https://github.com/qurben))
- Updated composer.lock [\#23](https://github.com/bunq/sdk_php/pull/23) ([cafferata](https://github.com/cafferata))
- Added an .gitattributes file. [\#20](https://github.com/bunq/sdk_php/pull/20) ([cafferata](https://github.com/cafferata))
- Fixed signature newline handling \(Windows\) [\#9](https://github.com/bunq/sdk_php/pull/9) ([BabyDino](https://github.com/BabyDino))


Expand Down
2 changes: 1 addition & 1 deletion src/Http/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ApiClient
/**
* User agent constants.
*/
const HEADER_USER_AGENT_BUNQ_SDK_DEFAULT = 'bunq-sdk-php/1.14.0';
const HEADER_USER_AGENT_BUNQ_SDK_DEFAULT = 'bunq-sdk-php/1.14.1';

/**
* Binary request constants.
Expand Down
8 changes: 6 additions & 2 deletions src/Model/Generated/Endpoint/AttachmentMonetaryAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ class AttachmentMonetaryAccount extends BunqModel
* attachment using the X-Bunq-Attachment-Description header.
*
* @param string $requestBytes
* @param int|null $monetaryAccountId
* @param string[] $customHeaders
*
* @return BunqResponseInt
*/
public static function create(string $requestBytes, array $customHeaders = []): BunqResponseInt
{
public static function create(
string $requestBytes,
int $monetaryAccountId = null,
array $customHeaders = []
): BunqResponseInt {
$apiClient = new ApiClient(static::getApiContext());
$apiClient->enableBinary();
$responseRaw = $apiClient->post(
Expand Down
8 changes: 6 additions & 2 deletions src/Model/Generated/Endpoint/AttachmentTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,16 @@ class AttachmentTab extends BunqModel
* X-Bunq-Attachment-Description header.
*
* @param string $requestBytes
* @param int|null $monetaryAccountId
* @param string[] $customHeaders
*
* @return BunqResponseInt
*/
public static function create(string $requestBytes, array $customHeaders = []): BunqResponseInt
{
public static function create(
string $requestBytes,
int $monetaryAccountId = null,
array $customHeaders = []
): BunqResponseInt {
$apiClient = new ApiClient(static::getApiContext());
$apiClient->enableBinary();
$responseRaw = $apiClient->post(
Expand Down
32 changes: 32 additions & 0 deletions src/Model/Generated/Endpoint/BunqMeFundraiserProfileUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ class BunqMeFundraiserProfileUser extends BunqModel
*/
protected $monetaryAccountId;

/**
* Id of the user owning the profile.
*
* @var int
*/
protected $ownerUserId;

/**
* The color chosen for the bunq.me fundraiser profile in hexadecimal
* format.
Expand Down Expand Up @@ -258,6 +265,27 @@ public function setMonetaryAccountId($monetaryAccountId)
$this->monetaryAccountId = $monetaryAccountId;
}

/**
* Id of the user owning the profile.
*
* @return int
*/
public function getOwnerUserId()
{
return $this->ownerUserId;
}

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

/**
* The color chosen for the bunq.me fundraiser profile in hexadecimal
* format.
Expand Down Expand Up @@ -418,6 +446,10 @@ public function isAllFieldNull()
return false;
}

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

if (!is_null($this->color)) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Endpoint/Device.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Http\ApiClient;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Endpoint/MonetaryAccount.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Http\ApiClient;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
Expand Down
32 changes: 0 additions & 32 deletions src/Model/Generated/Endpoint/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,6 @@ class Payment extends BunqModel
*/
protected $balanceAfterMutation;

/**
* A reference to the PaymentAutoAllocateInstance if it exists.
*
* @var PaymentAutoAllocateInstance
*/
protected $paymentAutoAllocateInstance;

/**
* The Amount to transfer with the Payment. Must be bigger than 0 and
* smaller than the MonetaryAccount's balance.
Expand Down Expand Up @@ -944,27 +937,6 @@ public function setBalanceAfterMutation($balanceAfterMutation)
$this->balanceAfterMutation = $balanceAfterMutation;
}

/**
* A reference to the PaymentAutoAllocateInstance if it exists.
*
* @return PaymentAutoAllocateInstance
*/
public function getPaymentAutoAllocateInstance()
{
return $this->paymentAutoAllocateInstance;
}

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

/**
* @return bool
*/
Expand Down Expand Up @@ -1066,10 +1038,6 @@ public function isAllFieldNull()
return false;
}

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

return true;
}
}
2 changes: 1 addition & 1 deletion src/Model/Generated/Endpoint/PaymentAutoAllocateUser.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Http\ApiClient;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
Expand Down
32 changes: 0 additions & 32 deletions src/Model/Generated/Endpoint/RegistryEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ class RegistryEntry extends BunqModel
*/
protected $allocations;

/**
* The object that is connected to this RegistryEntry.
*
* @var BunqModel
*/
protected $object;

/**
* The attachments attached to the payment.
*
Expand Down Expand Up @@ -699,27 +692,6 @@ public function setAllocations($allocations)
$this->allocations = $allocations;
}

/**
* The object that is connected to this RegistryEntry.
*
* @return BunqModel
*/
public function getObject()
{
return $this->object;
}

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

/**
* The attachments attached to the payment.
*
Expand Down Expand Up @@ -802,10 +774,6 @@ public function isAllFieldNull()
return false;
}

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

if (!is_null($this->attachment)) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Endpoint/Tab.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Http\ApiClient;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
Expand Down
7 changes: 4 additions & 3 deletions src/Model/Generated/Endpoint/TreeProgress.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\LabelUser;

/**
* See how many trees this user has planted.
Expand Down Expand Up @@ -38,7 +39,7 @@ class TreeProgress extends BunqModel
/**
* The label of the user the progress belongs to.
*
* @var BunqModel
* @var LabelUser
*/
protected $labelUser;

Expand Down Expand Up @@ -113,15 +114,15 @@ public function setProgressTreeNext($progressTreeNext)
/**
* The label of the user the progress belongs to.
*
* @return BunqModel
* @return LabelUser
*/
public function getLabelUser()
{
return $this->labelUser;
}

/**
* @param BunqModel $labelUser
* @param LabelUser $labelUser
*
* @deprecated User should not be able to set values via setters, use
* constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Endpoint/User.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Http\ApiClient;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Object/DraftPaymentAnchorObject.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Object;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Endpoint\Payment;
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Object/EventObject.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Object;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Endpoint\BankSwitchServiceNetherlandsIncomingPayment;
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Object/NotificationAnchorObject.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Object;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Endpoint\BunqMeFundraiserResult;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Object;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Endpoint\DraftPayment;
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Generated/Object/ScheduleAnchorObject.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Object;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Endpoint\Payment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace bunq\Model\Generated\Object;

use bunq\exception\BunqException;
use bunq\Exception\BunqException;
use bunq\Model\Core\AnchorObjectInterface;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Endpoint\Payment;
Expand Down
Loading

0 comments on commit ae825b7

Please sign in to comment.