Skip to content

Commit

Permalink
Merge branch 'release/0.12.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
OGKevin committed Nov 15, 2017
2 parents 4dbb87c + e7c1123 commit bfd487b
Show file tree
Hide file tree
Showing 88 changed files with 4,516 additions and 728 deletions.
12 changes: 12 additions & 0 deletions src/Model/Core/BunqModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ protected static function fromJsonList(
return new BunqResponse($value, $responseRaw->getHeaders(), $pagination);
}

/**
* @param string $json
*
* @return BunqModel
*/
public static function createFromJsonString(string $json): BunqModel
{
$responseArray = ModelUtil::deserializeResponseArray($json);

return static::createFromResponseArray($responseArray);
}

/**
* @param mixed[] $responseArray
* @param string $wrapper
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Generated/Endpoint/AttachmentMonetaryAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
*/
class AttachmentMonetaryAccount extends BunqModel
{
/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment';

/**
* Binary constants.
*/
const FIELD_BODY = ApiClient::FIELD_BODY;
const FIELD_CONTENT_TYPE = ApiClient::FIELD_CONTENT_TYPE;
const FIELD_DESCRIPTION = ApiClient::FIELD_DESCRIPTION;

/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment';

/**
* Object type.
*/
Expand Down
12 changes: 6 additions & 6 deletions src/Model/Generated/Endpoint/AttachmentPublic.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
*/
class AttachmentPublic extends BunqModel
{
/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'attachment-public';
const ENDPOINT_URL_READ = 'attachment-public/%s';

/**
* Binary constants.
*/
const FIELD_BODY = ApiClient::FIELD_BODY;
const FIELD_CONTENT_TYPE = ApiClient::FIELD_CONTENT_TYPE;
const FIELD_DESCRIPTION = ApiClient::FIELD_DESCRIPTION;

/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'attachment-public';
const ENDPOINT_URL_READ = 'attachment-public/%s';

/**
* Object type.
*/
Expand Down
12 changes: 6 additions & 6 deletions src/Model/Generated/Endpoint/AttachmentTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
*/
class AttachmentTab extends BunqModel
{
/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment-tab';
const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/attachment-tab/%s';

/**
* Binary constants.
*/
const FIELD_BODY = ApiClient::FIELD_BODY;
const FIELD_CONTENT_TYPE = ApiClient::FIELD_CONTENT_TYPE;
const FIELD_DESCRIPTION = ApiClient::FIELD_DESCRIPTION;

/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'user/%s/monetary-account/%s/attachment-tab';
const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/attachment-tab/%s';

/**
* Object type.
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Generated/Endpoint/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
*/
class Avatar extends BunqModel
{
/**
* Field constants.
*/
const FIELD_ATTACHMENT_PUBLIC_UUID = 'attachment_public_uuid';

/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'avatar';
const ENDPOINT_URL_READ = 'avatar/%s';

/**
* Field constants.
*/
const FIELD_ATTACHMENT_PUBLIC_UUID = 'attachment_public_uuid';

/**
* Object type.
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Generated/Endpoint/BillingContractSubscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
*/
class BillingContractSubscription extends BunqModel
{
/**
* Field constants.
*/
const FIELD_SUBSCRIPTION_TYPE = 'subscription_type';

/**
* Endpoint constants.
*/
const ENDPOINT_URL_CREATE = 'user/%s/billing-contract-subscription';
const ENDPOINT_URL_LISTING = 'user/%s/billing-contract-subscription';

/**
* Field constants.
*/
const FIELD_SUBSCRIPTION_TYPE = 'subscription_type';

/**
* Object type.
*/
Expand Down
12 changes: 6 additions & 6 deletions src/Model/Generated/Endpoint/BunqMeTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
*/
class BunqMeTab extends BunqModel
{
/**
* Field constants.
*/
const FIELD_BUNQME_TAB_ENTRY = 'bunqme_tab_entry';
const FIELD_STATUS = 'status';

/**
* Endpoint constants.
*/
Expand All @@ -29,6 +23,12 @@ class BunqMeTab extends BunqModel
const ENDPOINT_URL_LISTING = 'user/%s/monetary-account/%s/bunqme-tab';
const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/bunqme-tab/%s';

/**
* Field constants.
*/
const FIELD_BUNQME_TAB_ENTRY = 'bunqme_tab_entry';
const FIELD_STATUS = 'status';

/**
* Object type.
*/
Expand Down
44 changes: 44 additions & 0 deletions src/Model/Generated/Endpoint/BunqMeTabResultResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\Model\Core\BunqModel;

/**
* Used to view bunq.me TabResultResponse objects belonging to a tab. A
* TabResultResponse is an object that holds details on a tab which has been
* paid from the provided monetary account.
*
* @generated
*/
class BunqMeTabResultResponse extends BunqModel
{
/**
* Object type.
*/
const OBJECT_TYPE = 'BunqMeTabResultResponse';

/**
* The payment made for the bunq.me tab.
*
* @var Payment
*/
protected $payment;

/**
* The payment made for the bunq.me tab.
*
* @return Payment
*/
public function getPayment()
{
return $this->payment;
}

/**
* @param Payment $payment
*/
public function setPayment($payment)
{
$this->payment = $payment;
}
}
17 changes: 17 additions & 0 deletions src/Model/Generated/Endpoint/BunqResponseMasterCardAction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\Http\BunqResponse;

/**
*/
class BunqResponseMasterCardAction extends BunqResponse
{
/**
* @return MasterCardAction
*/
public function getValue(): MasterCardAction
{
return parent::getValue();
}
}
17 changes: 17 additions & 0 deletions src/Model/Generated/Endpoint/BunqResponseMasterCardActionList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\Http\BunqResponse;

/**
*/
class BunqResponseMasterCardActionList extends BunqResponse
{
/**
* @return MasterCardAction[]
*/
public function getValue(): array
{
return parent::getValue();
}
}
17 changes: 17 additions & 0 deletions src/Model/Generated/Endpoint/BunqResponseSchedulePaymentBatch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
namespace bunq\Model\Generated\Endpoint;

use bunq\Http\BunqResponse;

/**
*/
class BunqResponseSchedulePaymentBatch extends BunqResponse
{
/**
* @return SchedulePaymentBatch
*/
public function getValue(): SchedulePaymentBatch
{
return parent::getValue();
}
}
66 changes: 59 additions & 7 deletions src/Model/Generated/Endpoint/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
*/
class Card extends BunqModel
{
/**
* Endpoint constants.
*/
const ENDPOINT_URL_UPDATE = 'user/%s/card/%s';
const ENDPOINT_URL_READ = 'user/%s/card/%s';
const ENDPOINT_URL_LISTING = 'user/%s/card';

/**
* Field constants.
*/
Expand All @@ -31,13 +38,6 @@ class Card extends BunqModel
const FIELD_PIN_CODE_ASSIGNMENT = 'pin_code_assignment';
const FIELD_MONETARY_ACCOUNT_ID_FALLBACK = 'monetary_account_id_fallback';

/**
* Endpoint constants.
*/
const ENDPOINT_URL_UPDATE = 'user/%s/card/%s';
const ENDPOINT_URL_READ = 'user/%s/card/%s';
const ENDPOINT_URL_LISTING = 'user/%s/card';

/**
* Object type.
*/
Expand Down Expand Up @@ -78,6 +78,13 @@ class Card extends BunqModel
*/
protected $type;

/**
* The sub-type of the card.
*
* @var string
*/
protected $subType;

/**
* The second line of text on the card
*
Expand Down Expand Up @@ -184,6 +191,14 @@ class Card extends BunqModel
*/
protected $monetaryAccountIdFallback;

/**
* The country that is domestic to the card. Defaults to country of
* residence of user.
*
* @var string
*/
protected $country;

/**
* Update the card details. Allow to change pin code, status, limits,
* country permissions and the monetary account connected to the card. When
Expand Down Expand Up @@ -363,6 +378,24 @@ public function setType($type)
$this->type = $type;
}

/**
* The sub-type of the card.
*
* @return string
*/
public function getSubType()
{
return $this->subType;
}

/**
* @param string $subType
*/
public function setSubType($subType)
{
$this->subType = $subType;
}

/**
* The second line of text on the card
*
Expand Down Expand Up @@ -622,4 +655,23 @@ public function setMonetaryAccountIdFallback($monetaryAccountIdFallback)
{
$this->monetaryAccountIdFallback = $monetaryAccountIdFallback;
}

/**
* The country that is domestic to the card. Defaults to country of
* residence of user.
*
* @return string
*/
public function getCountry()
{
return $this->country;
}

/**
* @param string $country
*/
public function setCountry($country)
{
$this->country = $country;
}
}
Loading

0 comments on commit bfd487b

Please sign in to comment.