Skip to content

Commit bfd487b

Browse files
committed
Merge branch 'release/0.12.3'
2 parents 4dbb87c + e7c1123 commit bfd487b

File tree

88 files changed

+4516
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+4516
-728
lines changed

src/Model/Core/BunqModel.php

+12
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ protected static function fromJsonList(
8484
return new BunqResponse($value, $responseRaw->getHeaders(), $pagination);
8585
}
8686

87+
/**
88+
* @param string $json
89+
*
90+
* @return BunqModel
91+
*/
92+
public static function createFromJsonString(string $json): BunqModel
93+
{
94+
$responseArray = ModelUtil::deserializeResponseArray($json);
95+
96+
return static::createFromResponseArray($responseArray);
97+
}
98+
8799
/**
88100
* @param mixed[] $responseArray
89101
* @param string $wrapper

src/Model/Generated/Endpoint/AttachmentMonetaryAccount.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
*/
1717
class AttachmentMonetaryAccount extends BunqModel
1818
{
19+
/**
20+
* Endpoint constants.
21+
*/
22+
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment';
23+
1924
/**
2025
* Binary constants.
2126
*/
2227
const FIELD_BODY = ApiClient::FIELD_BODY;
2328
const FIELD_CONTENT_TYPE = ApiClient::FIELD_CONTENT_TYPE;
2429
const FIELD_DESCRIPTION = ApiClient::FIELD_DESCRIPTION;
2530

26-
/**
27-
* Endpoint constants.
28-
*/
29-
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment';
30-
3131
/**
3232
* Object type.
3333
*/

src/Model/Generated/Endpoint/AttachmentPublic.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
*/
1717
class AttachmentPublic extends BunqModel
1818
{
19+
/**
20+
* Endpoint constants.
21+
*/
22+
const ENDPOINT_URL_CREATE = 'attachment-public';
23+
const ENDPOINT_URL_READ = 'attachment-public/%s';
24+
1925
/**
2026
* Binary constants.
2127
*/
2228
const FIELD_BODY = ApiClient::FIELD_BODY;
2329
const FIELD_CONTENT_TYPE = ApiClient::FIELD_CONTENT_TYPE;
2430
const FIELD_DESCRIPTION = ApiClient::FIELD_DESCRIPTION;
2531

26-
/**
27-
* Endpoint constants.
28-
*/
29-
const ENDPOINT_URL_CREATE = 'attachment-public';
30-
const ENDPOINT_URL_READ = 'attachment-public/%s';
31-
3232
/**
3333
* Object type.
3434
*/

src/Model/Generated/Endpoint/AttachmentTab.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
*/
1717
class AttachmentTab extends BunqModel
1818
{
19+
/**
20+
* Endpoint constants.
21+
*/
22+
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment-tab';
23+
const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/attachment-tab/%s';
24+
1925
/**
2026
* Binary constants.
2127
*/
2228
const FIELD_BODY = ApiClient::FIELD_BODY;
2329
const FIELD_CONTENT_TYPE = ApiClient::FIELD_CONTENT_TYPE;
2430
const FIELD_DESCRIPTION = ApiClient::FIELD_DESCRIPTION;
2531

26-
/**
27-
* Endpoint constants.
28-
*/
29-
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment-tab';
30-
const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/attachment-tab/%s';
31-
3232
/**
3333
* Object type.
3434
*/

src/Model/Generated/Endpoint/Avatar.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
*/
2121
class Avatar extends BunqModel
2222
{
23-
/**
24-
* Field constants.
25-
*/
26-
const FIELD_ATTACHMENT_PUBLIC_UUID = 'attachment_public_uuid';
27-
2823
/**
2924
* Endpoint constants.
3025
*/
3126
const ENDPOINT_URL_CREATE = 'avatar';
3227
const ENDPOINT_URL_READ = 'avatar/%s';
3328

29+
/**
30+
* Field constants.
31+
*/
32+
const FIELD_ATTACHMENT_PUBLIC_UUID = 'attachment_public_uuid';
33+
3434
/**
3535
* Object type.
3636
*/

src/Model/Generated/Endpoint/BillingContractSubscription.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
*/
1414
class BillingContractSubscription extends BunqModel
1515
{
16-
/**
17-
* Field constants.
18-
*/
19-
const FIELD_SUBSCRIPTION_TYPE = 'subscription_type';
20-
2116
/**
2217
* Endpoint constants.
2318
*/
2419
const ENDPOINT_URL_CREATE = 'user/%s/billing-contract-subscription';
2520
const ENDPOINT_URL_LISTING = 'user/%s/billing-contract-subscription';
2621

22+
/**
23+
* Field constants.
24+
*/
25+
const FIELD_SUBSCRIPTION_TYPE = 'subscription_type';
26+
2727
/**
2828
* Object type.
2929
*/

src/Model/Generated/Endpoint/BunqMeTab.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@
1515
*/
1616
class BunqMeTab extends BunqModel
1717
{
18-
/**
19-
* Field constants.
20-
*/
21-
const FIELD_BUNQME_TAB_ENTRY = 'bunqme_tab_entry';
22-
const FIELD_STATUS = 'status';
23-
2418
/**
2519
* Endpoint constants.
2620
*/
@@ -29,6 +23,12 @@ class BunqMeTab extends BunqModel
2923
const ENDPOINT_URL_LISTING = 'user/%s/monetary-account/%s/bunqme-tab';
3024
const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/bunqme-tab/%s';
3125

26+
/**
27+
* Field constants.
28+
*/
29+
const FIELD_BUNQME_TAB_ENTRY = 'bunqme_tab_entry';
30+
const FIELD_STATUS = 'status';
31+
3232
/**
3333
* Object type.
3434
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
namespace bunq\Model\Generated\Endpoint;
3+
4+
use bunq\Model\Core\BunqModel;
5+
6+
/**
7+
* Used to view bunq.me TabResultResponse objects belonging to a tab. A
8+
* TabResultResponse is an object that holds details on a tab which has been
9+
* paid from the provided monetary account.
10+
*
11+
* @generated
12+
*/
13+
class BunqMeTabResultResponse extends BunqModel
14+
{
15+
/**
16+
* Object type.
17+
*/
18+
const OBJECT_TYPE = 'BunqMeTabResultResponse';
19+
20+
/**
21+
* The payment made for the bunq.me tab.
22+
*
23+
* @var Payment
24+
*/
25+
protected $payment;
26+
27+
/**
28+
* The payment made for the bunq.me tab.
29+
*
30+
* @return Payment
31+
*/
32+
public function getPayment()
33+
{
34+
return $this->payment;
35+
}
36+
37+
/**
38+
* @param Payment $payment
39+
*/
40+
public function setPayment($payment)
41+
{
42+
$this->payment = $payment;
43+
}
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
namespace bunq\Model\Generated\Endpoint;
3+
4+
use bunq\Http\BunqResponse;
5+
6+
/**
7+
*/
8+
class BunqResponseMasterCardAction extends BunqResponse
9+
{
10+
/**
11+
* @return MasterCardAction
12+
*/
13+
public function getValue(): MasterCardAction
14+
{
15+
return parent::getValue();
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
namespace bunq\Model\Generated\Endpoint;
3+
4+
use bunq\Http\BunqResponse;
5+
6+
/**
7+
*/
8+
class BunqResponseMasterCardActionList extends BunqResponse
9+
{
10+
/**
11+
* @return MasterCardAction[]
12+
*/
13+
public function getValue(): array
14+
{
15+
return parent::getValue();
16+
}
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
namespace bunq\Model\Generated\Endpoint;
3+
4+
use bunq\Http\BunqResponse;
5+
6+
/**
7+
*/
8+
class BunqResponseSchedulePaymentBatch extends BunqResponse
9+
{
10+
/**
11+
* @return SchedulePaymentBatch
12+
*/
13+
public function getValue(): SchedulePaymentBatch
14+
{
15+
return parent::getValue();
16+
}
17+
}

src/Model/Generated/Endpoint/Card.php

+59-7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
*/
1919
class Card extends BunqModel
2020
{
21+
/**
22+
* Endpoint constants.
23+
*/
24+
const ENDPOINT_URL_UPDATE = 'user/%s/card/%s';
25+
const ENDPOINT_URL_READ = 'user/%s/card/%s';
26+
const ENDPOINT_URL_LISTING = 'user/%s/card';
27+
2128
/**
2229
* Field constants.
2330
*/
@@ -31,13 +38,6 @@ class Card extends BunqModel
3138
const FIELD_PIN_CODE_ASSIGNMENT = 'pin_code_assignment';
3239
const FIELD_MONETARY_ACCOUNT_ID_FALLBACK = 'monetary_account_id_fallback';
3340

34-
/**
35-
* Endpoint constants.
36-
*/
37-
const ENDPOINT_URL_UPDATE = 'user/%s/card/%s';
38-
const ENDPOINT_URL_READ = 'user/%s/card/%s';
39-
const ENDPOINT_URL_LISTING = 'user/%s/card';
40-
4141
/**
4242
* Object type.
4343
*/
@@ -78,6 +78,13 @@ class Card extends BunqModel
7878
*/
7979
protected $type;
8080

81+
/**
82+
* The sub-type of the card.
83+
*
84+
* @var string
85+
*/
86+
protected $subType;
87+
8188
/**
8289
* The second line of text on the card
8390
*
@@ -184,6 +191,14 @@ class Card extends BunqModel
184191
*/
185192
protected $monetaryAccountIdFallback;
186193

194+
/**
195+
* The country that is domestic to the card. Defaults to country of
196+
* residence of user.
197+
*
198+
* @var string
199+
*/
200+
protected $country;
201+
187202
/**
188203
* Update the card details. Allow to change pin code, status, limits,
189204
* country permissions and the monetary account connected to the card. When
@@ -363,6 +378,24 @@ public function setType($type)
363378
$this->type = $type;
364379
}
365380

381+
/**
382+
* The sub-type of the card.
383+
*
384+
* @return string
385+
*/
386+
public function getSubType()
387+
{
388+
return $this->subType;
389+
}
390+
391+
/**
392+
* @param string $subType
393+
*/
394+
public function setSubType($subType)
395+
{
396+
$this->subType = $subType;
397+
}
398+
366399
/**
367400
* The second line of text on the card
368401
*
@@ -622,4 +655,23 @@ public function setMonetaryAccountIdFallback($monetaryAccountIdFallback)
622655
{
623656
$this->monetaryAccountIdFallback = $monetaryAccountIdFallback;
624657
}
658+
659+
/**
660+
* The country that is domestic to the card. Defaults to country of
661+
* residence of user.
662+
*
663+
* @return string
664+
*/
665+
public function getCountry()
666+
{
667+
return $this->country;
668+
}
669+
670+
/**
671+
* @param string $country
672+
*/
673+
public function setCountry($country)
674+
{
675+
$this->country = $country;
676+
}
625677
}

0 commit comments

Comments
 (0)