diff --git a/src/Model/BunqModel.php b/src/Model/BunqModel.php index 20688127..bab6fd68 100644 --- a/src/Model/BunqModel.php +++ b/src/Model/BunqModel.php @@ -26,6 +26,8 @@ abstract class BunqModel implements JsonSerializable */ const FIELD_RESPONSE = 'Response'; const FIELD_PAGINATION = 'Pagination'; + const FIELD_ID = 'Id'; + const FIELD_UUID = 'Uuid'; /** * Regex constants. @@ -36,9 +38,9 @@ abstract class BunqModel implements JsonSerializable const REGEX_MATCH_RESULT_IS_ARRAY = 2; /** - * Array count constants. + * Index of the very first item in an array. */ - const COUNT_ONE = 1; + const INDEX_FIRST = 0; /** * Type constants. @@ -223,43 +225,26 @@ protected static function classFromJson($class, BunqResponseRaw $responseRaw) protected static function processForId(BunqResponseRaw $responseRaw) { /** @var Id $id */ - $id = Id::fromJson($responseRaw)->getValue(); + $id = Id::fromJson($responseRaw, self::FIELD_ID)->getValue(); return new BunqResponse($id->getId(), $responseRaw->getHeaders()); } /** * @param BunqResponseRaw $responseRaw + * @param string|null $wrapper * * @return BunqResponse * @throws BunqException When the result is not expected. */ - protected static function fromJson(BunqResponseRaw $responseRaw) + protected static function fromJson(BunqResponseRaw $responseRaw, string $wrapper = null) { $json = $responseRaw->getBodyString(); - $response = ModelUtil::deserializeResponseArray($json)[self::FIELD_RESPONSE]; - $bunqModelList = []; - - foreach ($response as $modelPropertyArray) { - $value = self::determineJsonResponseValue($modelPropertyArray); - $bunqModelList[] = static::createFromResponseArray($value); - } - - if (count($bunqModelList) === self::COUNT_ONE) { - return new BunqResponse(current($bunqModelList), $responseRaw->getHeaders()); - } else { - throw new BunqException(self::ERROR_UNEXPECTED_RESULT, [count($bunqModelList)]); - } - } + $responseArray = ModelUtil::deserializeResponseArray($json); + $response = $responseArray[self::FIELD_RESPONSE]; + $value = static::createListFromResponseArray($response, $wrapper); - /** - * @param mixed[] $responseArray - * - * @return mixed[] - */ - private static function determineJsonResponseValue(array $responseArray) - { - return current($responseArray); + return new BunqResponse($value[self::INDEX_FIRST], $responseRaw->getHeaders()); } /** @@ -270,7 +255,7 @@ private static function determineJsonResponseValue(array $responseArray) protected static function processForUuid(BunqResponseRaw $responseRaw) { /** @var Uuid $uuid */ - $uuid = Uuid::fromJson($responseRaw)->getValue(); + $uuid = Uuid::fromJson($responseRaw, self::FIELD_UUID)->getValue(); return new BunqResponse($uuid->getUuid(), $responseRaw->getHeaders()); } diff --git a/src/Model/Generated/AttachmentConversationContent.php b/src/Model/Generated/AttachmentConversationContent.php index e15634ae..15be6caf 100644 --- a/src/Model/Generated/AttachmentConversationContent.php +++ b/src/Model/Generated/AttachmentConversationContent.php @@ -36,7 +36,7 @@ class AttachmentConversationContent extends BunqModel * @param int $attachmentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $chatConversationId, $attachmentId, array $customHeaders = []) { diff --git a/src/Model/Generated/AttachmentMonetaryAccount.php b/src/Model/Generated/AttachmentMonetaryAccount.php index 805f6ea8..aea05321 100644 --- a/src/Model/Generated/AttachmentMonetaryAccount.php +++ b/src/Model/Generated/AttachmentMonetaryAccount.php @@ -60,7 +60,7 @@ class AttachmentMonetaryAccount extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, $requestBytes, $userId, $monetaryAccountId, array $customHeaders = []) { diff --git a/src/Model/Generated/AttachmentPublic.php b/src/Model/Generated/AttachmentPublic.php index 8b7dfa99..89fe07cf 100644 --- a/src/Model/Generated/AttachmentPublic.php +++ b/src/Model/Generated/AttachmentPublic.php @@ -73,7 +73,7 @@ class AttachmentPublic extends BunqModel * @param string $requestBytes * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function create(ApiContext $apiContext, $requestBytes, array $customHeaders = []) { @@ -100,7 +100,7 @@ public static function create(ApiContext $apiContext, $requestBytes, array $cust * @param string $attachmentPublicUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseAttachmentPublic */ public static function get(ApiContext $apiContext, $attachmentPublicUuid, array $customHeaders = []) { @@ -114,7 +114,7 @@ public static function get(ApiContext $apiContext, $attachmentPublicUuid, array $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/AttachmentPublicContent.php b/src/Model/Generated/AttachmentPublicContent.php index dc3e77e9..db8a510e 100644 --- a/src/Model/Generated/AttachmentPublicContent.php +++ b/src/Model/Generated/AttachmentPublicContent.php @@ -35,7 +35,7 @@ class AttachmentPublicContent extends BunqModel * @param string $attachmentPublicUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $attachmentPublicUuid, array $customHeaders = []) { diff --git a/src/Model/Generated/AttachmentTab.php b/src/Model/Generated/AttachmentTab.php index 53076395..74de22b2 100644 --- a/src/Model/Generated/AttachmentTab.php +++ b/src/Model/Generated/AttachmentTab.php @@ -76,7 +76,7 @@ class AttachmentTab extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, $requestBytes, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -104,7 +104,7 @@ public static function create(ApiContext $apiContext, $requestBytes, $userId, $m * @param int $attachmentTabId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseAttachmentTab */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $attachmentTabId, array $customHeaders = []) { @@ -118,7 +118,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/AttachmentTabContent.php b/src/Model/Generated/AttachmentTabContent.php index f9f8cf96..a8b2d45c 100644 --- a/src/Model/Generated/AttachmentTabContent.php +++ b/src/Model/Generated/AttachmentTabContent.php @@ -36,7 +36,7 @@ class AttachmentTabContent extends BunqModel * @param int $attachmentTabId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $attachmentTabId, array $customHeaders = []) { diff --git a/src/Model/Generated/Avatar.php b/src/Model/Generated/Avatar.php index 6aed1c2d..457e691e 100644 --- a/src/Model/Generated/Avatar.php +++ b/src/Model/Generated/Avatar.php @@ -55,7 +55,7 @@ class Avatar extends BunqModel * @param mixed[] $requestMap * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function create(ApiContext $apiContext, array $requestMap, array $customHeaders = []) { @@ -77,7 +77,7 @@ public static function create(ApiContext $apiContext, array $requestMap, array $ * @param string $avatarUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseAvatar */ public static function get(ApiContext $apiContext, $avatarUuid, array $customHeaders = []) { @@ -91,7 +91,7 @@ public static function get(ApiContext $apiContext, $avatarUuid, array $customHea $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/BillingContractSubscription.php b/src/Model/Generated/BillingContractSubscription.php index adad5207..5d7fd941 100644 --- a/src/Model/Generated/BillingContractSubscription.php +++ b/src/Model/Generated/BillingContractSubscription.php @@ -86,7 +86,7 @@ class BillingContractSubscription extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseBillingContractSubscription */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -100,7 +100,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -114,7 +114,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseBillingContractSubscriptionList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/BunqMeTab.php b/src/Model/Generated/BunqMeTab.php new file mode 100644 index 00000000..a70ecaa3 --- /dev/null +++ b/src/Model/Generated/BunqMeTab.php @@ -0,0 +1,363 @@ +post( + vsprintf( + self::ENDPOINT_URL_CREATE, + [$userId, $monetaryAccountId] + ), + $requestMap, + $customHeaders + ); + + return static::processForId($responseRaw); + } + + /** + * @param ApiContext $apiContext + * @param mixed[] $requestMap + * @param int $userId + * @param int $monetaryAccountId + * @param int $bunqMeTabId + * @param string[] $customHeaders + * + * @return BunqResponseBunqMeTab + */ + public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $bunqMeTabId, array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->put( + vsprintf( + self::ENDPOINT_URL_UPDATE, + [$userId, $monetaryAccountId, $bunqMeTabId] + ), + $requestMap, + $customHeaders + ); + + return static::fromJson($responseRaw, self::OBJECT_TYPE); + } + + /** + * This method is called "listing" because "list" is a restricted PHP word + * and cannot be used as constants, class names, function or method names. + * + * @param ApiContext $apiContext + * @param int $userId + * @param int $monetaryAccountId + * @param string[] $params + * @param string[] $customHeaders + * + * @return BunqResponseBunqMeTabList + */ + public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [$userId, $monetaryAccountId] + ), + $params, + $customHeaders + ); + + return static::fromJsonList($responseRaw, self::OBJECT_TYPE); + } + + /** + * @param ApiContext $apiContext + * @param int $userId + * @param int $monetaryAccountId + * @param int $bunqMeTabId + * @param string[] $customHeaders + * + * @return BunqResponseBunqMeTab + */ + public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $bunqMeTabId, array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [$userId, $monetaryAccountId, $bunqMeTabId] + ), + [], + $customHeaders + ); + + return static::fromJson($responseRaw, self::OBJECT_TYPE); + } + + /** + * The id of the created bunq.me. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp when the bunq.me was created. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp when the bunq.me was last updated. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The timestamp of when the bunq.me expired or will expire. + * + * @return string + */ + public function getTimeExpiry() + { + return $this->timeExpiry; + } + + /** + * @param string $timeExpiry + */ + public function setTimeExpiry($timeExpiry) + { + $this->timeExpiry = $timeExpiry; + } + + /** + * The id of the MonetaryAccount the bunq.me was sent from. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or + * EXPIRED. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The url that points to the bunq.me page. + * + * @return string + */ + public function getBunqmeTabShareUrl() + { + return $this->bunqmeTabShareUrl; + } + + /** + * @param string $bunqmeTabShareUrl + */ + public function setBunqmeTabShareUrl($bunqmeTabShareUrl) + { + $this->bunqmeTabShareUrl = $bunqmeTabShareUrl; + } + + /** + * The bunq.me entry containing the payment information. + * + * @return BunqMeTabEntry + */ + public function getBunqmeTabEntry() + { + return $this->bunqmeTabEntry; + } + + /** + * @param BunqMeTabEntry $bunqmeTabEntry + */ + public function setBunqmeTabEntry(BunqMeTabEntry $bunqmeTabEntry) + { + $this->bunqmeTabEntry = $bunqmeTabEntry; + } + + /** + * The list of bunq.me result Inquiries successfully made and paid. + * + * @return BunqMeTabResultInquiry[] + */ + public function getResultInquiries() + { + return $this->resultInquiries; + } + + /** + * @param BunqMeTabResultInquiry[] $resultInquiries + */ + public function setResultInquiries(array$resultInquiries) + { + $this->resultInquiries = $resultInquiries; + } +} diff --git a/src/Model/Generated/BunqMeTabEntry.php b/src/Model/Generated/BunqMeTabEntry.php new file mode 100644 index 00000000..8f6222ae --- /dev/null +++ b/src/Model/Generated/BunqMeTabEntry.php @@ -0,0 +1,208 @@ +uuid; + } + + /** + * @param string $uuid + */ + public function setUuid($uuid) + { + $this->uuid = $uuid; + } + + /** + * The requested Amount. + * + * @return Amount + */ + public function getAmountInquired() + { + return $this->amountInquired; + } + + /** + * @param Amount $amountInquired + */ + public function setAmountInquired(Amount $amountInquired) + { + $this->amountInquired = $amountInquired; + } + + /** + * The LabelMonetaryAccount with the public information of the User and the + * MonetaryAccount that created the bunq.me link. + * + * @return LabelMonetaryAccount + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @param LabelMonetaryAccount $alias + */ + public function setAlias(LabelMonetaryAccount $alias) + { + $this->alias = $alias; + } + + /** + * The description for the bunq.me. Maximum 9000 characters. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The status of the bunq.me. Can be WAITING_FOR_PAYMENT, CANCELLED or + * EXPIRED. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The URL which the user is sent to when a payment is completed. + * + * @return string + */ + public function getRedirectUrl() + { + return $this->redirectUrl; + } + + /** + * @param string $redirectUrl + */ + public function setRedirectUrl($redirectUrl) + { + $this->redirectUrl = $redirectUrl; + } + + /** + * List of available merchants. + * + * @return BunqMeMerchantAvailable[] + */ + public function getMerchantAvailable() + { + return $this->merchantAvailable; + } + + /** + * @param BunqMeMerchantAvailable[] $merchantAvailable + */ + public function setMerchantAvailable(array$merchantAvailable) + { + $this->merchantAvailable = $merchantAvailable; + } +} diff --git a/src/Model/Generated/BunqMeTabResultInquiry.php b/src/Model/Generated/BunqMeTabResultInquiry.php new file mode 100644 index 00000000..4198f338 --- /dev/null +++ b/src/Model/Generated/BunqMeTabResultInquiry.php @@ -0,0 +1,44 @@ +payment; + } + + /** + * @param Payment $payment + */ + public function setPayment(Payment $payment) + { + $this->payment = $payment; + } +} diff --git a/src/Model/Generated/BunqResponseAttachmentPublic.php b/src/Model/Generated/BunqResponseAttachmentPublic.php new file mode 100644 index 00000000..077d8df0 --- /dev/null +++ b/src/Model/Generated/BunqResponseAttachmentPublic.php @@ -0,0 +1,17 @@ +> + * @return BunqResponseCard */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $cardId, array $customHeaders = []) { @@ -204,7 +204,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -215,7 +215,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $cardId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCard */ public static function get(ApiContext $apiContext, $userId, $cardId, array $customHeaders = []) { @@ -229,7 +229,7 @@ public static function get(ApiContext $apiContext, $userId, $cardId, array $cust $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -243,7 +243,7 @@ public static function get(ApiContext $apiContext, $userId, $cardId, array $cust * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCardList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/CardDebit.php b/src/Model/Generated/CardDebit.php index 1e40cdb2..1213e22b 100644 --- a/src/Model/Generated/CardDebit.php +++ b/src/Model/Generated/CardDebit.php @@ -174,7 +174,7 @@ class CardDebit extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseCardDebit */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -189,7 +189,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/CardName.php b/src/Model/Generated/CardName.php index c6277061..e01c3c0b 100644 --- a/src/Model/Generated/CardName.php +++ b/src/Model/Generated/CardName.php @@ -45,7 +45,7 @@ class CardName extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCardNameList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/CardPinChange.php b/src/Model/Generated/CardPinChange.php new file mode 100644 index 00000000..2d6a603c --- /dev/null +++ b/src/Model/Generated/CardPinChange.php @@ -0,0 +1,233 @@ +get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [$userId, $cardId] + ), + $params, + $customHeaders + ); + + return static::fromJsonList($responseRaw, self::OBJECT_TYPE); + } + + /** + * @param ApiContext $apiContext + * @param int $userId + * @param int $cardId + * @param int $cardPinChangeId + * @param string[] $customHeaders + * + * @return BunqResponseCardPinChange + */ + public static function get(ApiContext $apiContext, $userId, $cardId, $cardPinChangeId, array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [$userId, $cardId, $cardPinChangeId] + ), + [], + $customHeaders + ); + + return static::fromJson($responseRaw, self::OBJECT_TYPE); + } + + /** + * The id of the pin change. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The label of the card. + * + * @return LabelCard + */ + public function getLabelCard() + { + return $this->labelCard; + } + + /** + * @param LabelCard $labelCard + */ + public function setLabelCard(LabelCard $labelCard) + { + $this->labelCard = $labelCard; + } + + /** + * The monetary account this card was ordered on and the label user that + * owns the card. + * + * @return LabelMonetaryAccount + */ + public function getLabelMonetaryAccountCurrent() + { + return $this->labelMonetaryAccountCurrent; + } + + /** + * @param LabelMonetaryAccount $labelMonetaryAccountCurrent + */ + public function setLabelMonetaryAccountCurrent(LabelMonetaryAccount $labelMonetaryAccountCurrent) + { + $this->labelMonetaryAccountCurrent = $labelMonetaryAccountCurrent; + } + + /** + * The request date of the pin change. + * + * @return string + */ + public function getTimeRequest() + { + return $this->timeRequest; + } + + /** + * @param string $timeRequest + */ + public function setTimeRequest($timeRequest) + { + $this->timeRequest = $timeRequest; + } + + /** + * The acceptance date of the pin change. + * + * @return string + */ + public function getTimeAccept() + { + return $this->timeAccept; + } + + /** + * @param string $timeAccept + */ + public function setTimeAccept($timeAccept) + { + $this->timeAccept = $timeAccept; + } + + /** + * The status of the pin change request, PIN_UPDATE_REQUESTED or + * PIN_UPDATE_ACCEPTED + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } +} diff --git a/src/Model/Generated/CardReplace.php b/src/Model/Generated/CardReplace.php new file mode 100644 index 00000000..c76defdc --- /dev/null +++ b/src/Model/Generated/CardReplace.php @@ -0,0 +1,88 @@ +
You can order up to three free card replacements per year. + * Additional replacement requests will be billed.

The card + * replacement will have the same expiry date and the same pricing as the + * old card, but it will have a new card number. You can change the + * description and PIN through the card replacement endpoint. + * + * @generated + */ +class CardReplace extends BunqModel +{ + /** + * Field constants. + */ + const FIELD_PIN_CODE = 'pin_code'; + const FIELD_SECOND_LINE = 'second_line'; + + /** + * Endpoint constants. + */ + const ENDPOINT_URL_CREATE = 'user/%s/card/%s/replace'; + + /** + * Object type. + */ + const OBJECT_TYPE = 'CardReplace'; + + /** + * The id of the new card. + * + * @var int + */ + protected $id; + + /** + * Request a card replacement. + * + * @param ApiContext $apiContext + * @param mixed[] $requestMap + * @param int $userId + * @param int $cardId + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function create(ApiContext $apiContext, array $requestMap, $userId, $cardId, array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $apiClient->enableEncryption(); + $responseRaw = $apiClient->post( + vsprintf( + self::ENDPOINT_URL_CREATE, + [$userId, $cardId] + ), + $requestMap, + $customHeaders + ); + + return static::processForId($responseRaw); + } + + /** + * The id of the new card. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } +} diff --git a/src/Model/Generated/CardResult.php b/src/Model/Generated/CardResult.php new file mode 100644 index 00000000..63b0ac2a --- /dev/null +++ b/src/Model/Generated/CardResult.php @@ -0,0 +1,484 @@ +get( + vsprintf( + self::ENDPOINT_URL_READ, + [$userId, $monetaryAccountId, $cardResultId] + ), + [], + $customHeaders + ); + + return static::fromJson($responseRaw, self::OBJECT_TYPE); + } + + /** + * This method is called "listing" because "list" is a restricted PHP word + * and cannot be used as constants, class names, function or method names. + * + * @param ApiContext $apiContext + * @param int $userId + * @param int $monetaryAccountId + * @param string[] $params + * @param string[] $customHeaders + * + * @return BunqResponseCardResultList + */ + public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [$userId, $monetaryAccountId] + ), + $params, + $customHeaders + ); + + return static::fromJsonList($responseRaw, self::OBJECT_TYPE); + } + + /** + * The id of the monetary account this card result links to. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * The id of the card this card result links to. + * + * @return int + */ + public function getCardId() + { + return $this->cardId; + } + + /** + * @param int $cardId + */ + public function setCardId($cardId) + { + $this->cardId = $cardId; + } + + /** + * The original amount of the message. + * + * @return Amount + */ + public function getAmountOriginal() + { + return $this->amountOriginal; + } + + /** + * @param Amount $amountOriginal + */ + public function setAmountOriginal(Amount $amountOriginal) + { + $this->amountOriginal = $amountOriginal; + } + + /** + * The final amount of the message to be booked to the account. + * + * @return Amount + */ + public function getAmountFinal() + { + return $this->amountFinal; + } + + /** + * @param Amount $amountFinal + */ + public function setAmountFinal(Amount $amountFinal) + { + $this->amountFinal = $amountFinal; + } + + /** + * Why the transaction was denied, if it was denied, or just ALLOWED. + * + * @return string + */ + public function getDecision() + { + return $this->decision; + } + + /** + * @param string $decision + */ + public function setDecision($decision) + { + $this->decision = $decision; + } + + /** + * Empty if allowed, otherwise a textual explanation of why it was denied. + * + * @return string + */ + public function getDecisionDescription() + { + return $this->decisionDescription; + } + + /** + * @param string $decisionDescription + */ + public function setDecisionDescription($decisionDescription) + { + $this->decisionDescription = $decisionDescription; + } + + /** + * Empty if allowed, otherwise a textual explanation of why it was denied in + * user's language. + * + * @return string + */ + public function getDecisionDescriptionTranslated() + { + return $this->decisionDescriptionTranslated; + } + + /** + * @param string $decisionDescriptionTranslated + */ + public function setDecisionDescriptionTranslated($decisionDescriptionTranslated) + { + $this->decisionDescriptionTranslated = $decisionDescriptionTranslated; + } + + /** + * The description for this transaction to display. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The type of message that this card result is created for. + * + * @return string + */ + public function getMessageType() + { + return $this->messageType; + } + + /** + * @param string $messageType + */ + public function setMessageType($messageType) + { + $this->messageType = $messageType; + } + + /** + * The way the cardholder was authorised to the POS or ATM. + * + * @return string + */ + public function getAuthorisationType() + { + return $this->authorisationType; + } + + /** + * @param string $authorisationType + */ + public function setAuthorisationType($authorisationType) + { + $this->authorisationType = $authorisationType; + } + + /** + * The city where the message originates from. + * + * @return string + */ + public function getCity() + { + return $this->city; + } + + /** + * @param string $city + */ + public function setCity($city) + { + $this->city = $city; + } + + /** + * The monetary account label of the account that this result is created + * for. + * + * @return LabelMonetaryAccount + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @param LabelMonetaryAccount $alias + */ + public function setAlias(LabelMonetaryAccount $alias) + { + $this->alias = $alias; + } + + /** + * The monetary account label of the counterparty. + * + * @return LabelMonetaryAccount + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @param LabelMonetaryAccount $counterpartyAlias + */ + public function setCounterpartyAlias(LabelMonetaryAccount $counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * The label of the card. + * + * @return LabelCard + */ + public function getLabelCard() + { + return $this->labelCard; + } + + /** + * @param LabelCard $labelCard + */ + public function setLabelCard(LabelCard $labelCard) + { + $this->labelCard = $labelCard; + } + + /** + * The status of the reservation if the transaction is a reservation. + * + * @return string + */ + public function getReservationStatus() + { + return $this->reservationStatus; + } + + /** + * @param string $reservationStatus + */ + public function setReservationStatus($reservationStatus) + { + $this->reservationStatus = $reservationStatus; + } + + /** + * The moment the reservation will expire. + * + * @return string + */ + public function getReservationExpiryTime() + { + return $this->reservationExpiryTime; + } + + /** + * @param string $reservationExpiryTime + */ + public function setReservationExpiryTime($reservationExpiryTime) + { + $this->reservationExpiryTime = $reservationExpiryTime; + } +} diff --git a/src/Model/Generated/CashRegister.php b/src/Model/Generated/CashRegister.php index 15ee8e69..0ef5e190 100644 --- a/src/Model/Generated/CashRegister.php +++ b/src/Model/Generated/CashRegister.php @@ -120,7 +120,7 @@ class CashRegister extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -146,7 +146,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $cashRegisterId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCashRegister */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, array $customHeaders = []) { @@ -160,7 +160,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -175,7 +175,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param int $cashRegisterId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, array $customHeaders = []) { @@ -204,7 +204,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCashRegisterList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/CashRegisterQrCode.php b/src/Model/Generated/CashRegisterQrCode.php index 10efb90f..9586e5a3 100644 --- a/src/Model/Generated/CashRegisterQrCode.php +++ b/src/Model/Generated/CashRegisterQrCode.php @@ -90,7 +90,7 @@ class CashRegisterQrCode extends BunqModel * @param int $cashRegisterId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, array $customHeaders = []) { @@ -119,7 +119,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $cashRegisterQrCodeId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, $cashRegisterQrCodeId, array $customHeaders = []) { @@ -147,7 +147,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $cashRegisterQrCodeId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCashRegisterQrCode */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $cashRegisterQrCodeId, array $customHeaders = []) { @@ -161,7 +161,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -177,7 +177,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCashRegisterQrCodeList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/CashRegisterQrCodeContent.php b/src/Model/Generated/CashRegisterQrCodeContent.php index b3ac916d..ace5a873 100644 --- a/src/Model/Generated/CashRegisterQrCodeContent.php +++ b/src/Model/Generated/CashRegisterQrCodeContent.php @@ -37,7 +37,7 @@ class CashRegisterQrCodeContent extends BunqModel * @param int $qrCodeId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $qrCodeId, array $customHeaders = []) { diff --git a/src/Model/Generated/CertificatePinned.php b/src/Model/Generated/CertificatePinned.php index 3d270219..f817ddf0 100644 --- a/src/Model/Generated/CertificatePinned.php +++ b/src/Model/Generated/CertificatePinned.php @@ -56,7 +56,7 @@ class CertificatePinned extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -81,7 +81,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $userId * @param int $certificatePinnedId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $certificatePinnedId, array $customHeaders = []) { @@ -108,7 +108,7 @@ public static function delete(ApiContext $apiContext, $userId, $certificatePinne * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCertificatePinnedList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { @@ -133,7 +133,7 @@ public static function listing(ApiContext $apiContext, $userId, array $params = * @param int $certificatePinnedId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCertificatePinned */ public static function get(ApiContext $apiContext, $userId, $certificatePinnedId, array $customHeaders = []) { @@ -147,7 +147,7 @@ public static function get(ApiContext $apiContext, $userId, $certificatePinnedId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/ChatConversation.php b/src/Model/Generated/ChatConversation.php index ea1f9e47..34f14620 100644 --- a/src/Model/Generated/ChatConversation.php +++ b/src/Model/Generated/ChatConversation.php @@ -24,6 +24,16 @@ class ChatConversation extends BunqModel */ const OBJECT_TYPE = 'ChatConversation'; + /** + * @var ChatConversationSupportExternal + */ + protected $supportConversationExternal; + + /** + * @var ChatConversationReference + */ + protected $chatConversationReference; + /** * This method is called "listing" because "list" is a restricted PHP word * and cannot be used as constants, class names, function or method names. @@ -33,7 +43,7 @@ class ChatConversation extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseChatConversationList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { @@ -47,7 +57,7 @@ public static function listing(ApiContext $apiContext, $userId, array $params = $customHeaders ); - return static::fromJsonList($responseRaw, self::OBJECT_TYPE); + return static::fromJsonList($responseRaw); } /** @@ -56,7 +66,7 @@ public static function listing(ApiContext $apiContext, $userId, array $params = * @param int $chatConversationId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseChatConversation */ public static function get(ApiContext $apiContext, $userId, $chatConversationId, array $customHeaders = []) { @@ -72,4 +82,36 @@ public static function get(ApiContext $apiContext, $userId, $chatConversationId, return static::fromJson($responseRaw); } + + /** + * @return ChatConversationSupportExternal + */ + public function getSupportConversationExternal() + { + return $this->supportConversationExternal; + } + + /** + * @param ChatConversationSupportExternal $supportConversationExternal + */ + public function setSupportConversationExternal(ChatConversationSupportExternal $supportConversationExternal) + { + $this->supportConversationExternal = $supportConversationExternal; + } + + /** + * @return ChatConversationReference + */ + public function getChatConversationReference() + { + return $this->chatConversationReference; + } + + /** + * @param ChatConversationReference $chatConversationReference + */ + public function setChatConversationReference(ChatConversationReference $chatConversationReference) + { + $this->chatConversationReference = $chatConversationReference; + } } diff --git a/src/Model/Generated/ChatConversationReference.php b/src/Model/Generated/ChatConversationReference.php new file mode 100644 index 00000000..ec2fc2c5 --- /dev/null +++ b/src/Model/Generated/ChatConversationReference.php @@ -0,0 +1,92 @@ +id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp the conversation reference was created. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp the conversation reference was last updated. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } +} diff --git a/src/Model/Generated/ChatConversationSupportExternal.php b/src/Model/Generated/ChatConversationSupportExternal.php new file mode 100644 index 00000000..174ec0bd --- /dev/null +++ b/src/Model/Generated/ChatConversationSupportExternal.php @@ -0,0 +1,117 @@ +id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp of the support conversation's creation. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp of the support conversation's last update. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The last message posted to this conversation if any. + * + * @return ChatMessage + */ + public function getLastMessage() + { + return $this->lastMessage; + } + + /** + * @param ChatMessage $lastMessage + */ + public function setLastMessage(ChatMessage $lastMessage) + { + $this->lastMessage = $lastMessage; + } +} diff --git a/src/Model/Generated/ChatMessage.php b/src/Model/Generated/ChatMessage.php index 400e4d2a..7439473b 100644 --- a/src/Model/Generated/ChatMessage.php +++ b/src/Model/Generated/ChatMessage.php @@ -5,7 +5,6 @@ use bunq\Http\ApiClient; use bunq\Http\BunqResponse; use bunq\Model\BunqModel; -use bunq\Model\Generated\Object\LabelUser; /** * Endpoint for retrieving the messages that are part of a conversation. @@ -25,60 +24,19 @@ class ChatMessage extends BunqModel const OBJECT_TYPE = 'ChatMessage'; /** - * The id of the message. - * - * @var int - */ - protected $id; - - /** - * The timestamp when the message was created. - * - * @var string + * @var ChatMessageAnnouncement */ - protected $created; + protected $chatMessageAnnouncement; /** - * The timestamp when the message was last updated. - * - * @var string + * @var ChatMessageStatus */ - protected $updated; + protected $chatMessageStatus; /** - * The id of the conversation this message belongs to. - * - * @var int - */ - protected $conversationId; - - /** - * The id of the ticket this message is linked with, if any. - * - * @var int + * @var ChatMessageUser */ - protected $ticketId; - - /** - * The user who initiated the action that caused this message to appear. - * - * @var LabelUser - */ - protected $creator; - - /** - * The user displayed as the sender of this message. - * - * @var LabelUser - */ - protected $displayedSender; - - /** - * The content of this message. - * - * @var BunqModel - */ - protected $content; + protected $chatMessageUser; /** * Get all the messages that are part of a specific conversation. @@ -92,7 +50,7 @@ class ChatMessage extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseChatMessageList */ public static function listing(ApiContext $apiContext, $userId, $chatConversationId, array $params = [], array $customHeaders = []) { @@ -106,150 +64,54 @@ public static function listing(ApiContext $apiContext, $userId, $chatConversatio $customHeaders ); - return static::fromJsonList($responseRaw, self::OBJECT_TYPE); - } - - /** - * The id of the message. - * - * @return int - */ - public function getId() - { - return $this->id; - } - - /** - * @param int $id - */ - public function setId($id) - { - $this->id = $id; + return static::fromJsonList($responseRaw); } /** - * The timestamp when the message was created. - * - * @return string + * @return ChatMessageAnnouncement */ - public function getCreated() + public function getChatMessageAnnouncement() { - return $this->created; + return $this->chatMessageAnnouncement; } /** - * @param string $created + * @param ChatMessageAnnouncement $chatMessageAnnouncement */ - public function setCreated($created) + public function setChatMessageAnnouncement(ChatMessageAnnouncement $chatMessageAnnouncement) { - $this->created = $created; + $this->chatMessageAnnouncement = $chatMessageAnnouncement; } /** - * The timestamp when the message was last updated. - * - * @return string + * @return ChatMessageStatus */ - public function getUpdated() + public function getChatMessageStatus() { - return $this->updated; + return $this->chatMessageStatus; } /** - * @param string $updated + * @param ChatMessageStatus $chatMessageStatus */ - public function setUpdated($updated) + public function setChatMessageStatus(ChatMessageStatus $chatMessageStatus) { - $this->updated = $updated; + $this->chatMessageStatus = $chatMessageStatus; } /** - * The id of the conversation this message belongs to. - * - * @return int - */ - public function getConversationId() - { - return $this->conversationId; - } - - /** - * @param int $conversationId - */ - public function setConversationId($conversationId) - { - $this->conversationId = $conversationId; - } - - /** - * The id of the ticket this message is linked with, if any. - * - * @return int - */ - public function getTicketId() - { - return $this->ticketId; - } - - /** - * @param int $ticketId - */ - public function setTicketId($ticketId) - { - $this->ticketId = $ticketId; - } - - /** - * The user who initiated the action that caused this message to appear. - * - * @return LabelUser - */ - public function getCreator() - { - return $this->creator; - } - - /** - * @param LabelUser $creator - */ - public function setCreator(LabelUser $creator) - { - $this->creator = $creator; - } - - /** - * The user displayed as the sender of this message. - * - * @return LabelUser - */ - public function getDisplayedSender() - { - return $this->displayedSender; - } - - /** - * @param LabelUser $displayedSender - */ - public function setDisplayedSender(LabelUser $displayedSender) - { - $this->displayedSender = $displayedSender; - } - - /** - * The content of this message. - * - * @return BunqModel + * @return ChatMessageUser */ - public function getContent() + public function getChatMessageUser() { - return $this->content; + return $this->chatMessageUser; } /** - * @param BunqModel $content + * @param ChatMessageUser $chatMessageUser */ - public function setContent(BunqModel $content) + public function setChatMessageUser(ChatMessageUser $chatMessageUser) { - $this->content = $content; + $this->chatMessageUser = $chatMessageUser; } } diff --git a/src/Model/Generated/ChatMessageAnnouncement.php b/src/Model/Generated/ChatMessageAnnouncement.php new file mode 100644 index 00000000..1d8048d3 --- /dev/null +++ b/src/Model/Generated/ChatMessageAnnouncement.php @@ -0,0 +1,169 @@ +id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp when the message was created. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp when the message was last updated. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The id of the conversation this message belongs to. + * + * @return int + */ + public function getConversationId() + { + return $this->conversationId; + } + + /** + * @param int $conversationId + */ + public function setConversationId($conversationId) + { + $this->conversationId = $conversationId; + } + + /** + * The user who initiated the action that caused this message to appear. + * + * @return LabelUser + */ + public function getCreator() + { + return $this->creator; + } + + /** + * @param LabelUser $creator + */ + public function setCreator(LabelUser $creator) + { + $this->creator = $creator; + } + + /** + * The content of this message. + * + * @return ChatMessageContent + */ + public function getContent() + { + return $this->content; + } + + /** + * @param ChatMessageContent $content + */ + public function setContent(ChatMessageContent $content) + { + $this->content = $content; + } +} diff --git a/src/Model/Generated/ChatMessageAttachment.php b/src/Model/Generated/ChatMessageAttachment.php index e5a513e7..891b4481 100644 --- a/src/Model/Generated/ChatMessageAttachment.php +++ b/src/Model/Generated/ChatMessageAttachment.php @@ -46,7 +46,7 @@ class ChatMessageAttachment extends BunqModel * @param int $chatConversationId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $chatConversationId, array $customHeaders = []) { diff --git a/src/Model/Generated/ChatMessageStatus.php b/src/Model/Generated/ChatMessageStatus.php new file mode 100644 index 00000000..6d237c85 --- /dev/null +++ b/src/Model/Generated/ChatMessageStatus.php @@ -0,0 +1,169 @@ +id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp when the message was created. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp when the message was last updated. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The id of the conversation this message belongs to. + * + * @return int + */ + public function getConversationId() + { + return $this->conversationId; + } + + /** + * @param int $conversationId + */ + public function setConversationId($conversationId) + { + $this->conversationId = $conversationId; + } + + /** + * The user who initiated the action that caused this message to appear. + * + * @return LabelUser + */ + public function getCreator() + { + return $this->creator; + } + + /** + * @param LabelUser $creator + */ + public function setCreator(LabelUser $creator) + { + $this->creator = $creator; + } + + /** + * The content of this message. + * + * @return ChatMessageContent + */ + public function getContent() + { + return $this->content; + } + + /** + * @param ChatMessageContent $content + */ + public function setContent(ChatMessageContent $content) + { + $this->content = $content; + } +} diff --git a/src/Model/Generated/ChatMessageText.php b/src/Model/Generated/ChatMessageText.php index 5046d5b6..85716053 100644 --- a/src/Model/Generated/ChatMessageText.php +++ b/src/Model/Generated/ChatMessageText.php @@ -45,7 +45,7 @@ class ChatMessageText extends BunqModel * @param int $chatConversationId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $chatConversationId, array $customHeaders = []) { diff --git a/src/Model/Generated/ChatMessageUser.php b/src/Model/Generated/ChatMessageUser.php new file mode 100644 index 00000000..ac51c47f --- /dev/null +++ b/src/Model/Generated/ChatMessageUser.php @@ -0,0 +1,194 @@ +id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp when the message was created. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp when the message was last updated. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The id of the conversation this message belongs to. + * + * @return int + */ + public function getConversationId() + { + return $this->conversationId; + } + + /** + * @param int $conversationId + */ + public function setConversationId($conversationId) + { + $this->conversationId = $conversationId; + } + + /** + * The user who initiated the action that caused this message to appear. + * + * @return LabelUser + */ + public function getCreator() + { + return $this->creator; + } + + /** + * @param LabelUser $creator + */ + public function setCreator(LabelUser $creator) + { + $this->creator = $creator; + } + + /** + * The user displayed as the sender of this message. + * + * @return LabelUser + */ + public function getDisplayedSender() + { + return $this->displayedSender; + } + + /** + * @param LabelUser $displayedSender + */ + public function setDisplayedSender(LabelUser $displayedSender) + { + $this->displayedSender = $displayedSender; + } + + /** + * The content of this message. + * + * @return ChatMessageContent + */ + public function getContent() + { + return $this->content; + } + + /** + * @param ChatMessageContent $content + */ + public function setContent(ChatMessageContent $content) + { + $this->content = $content; + } +} diff --git a/src/Model/Generated/Customer.php b/src/Model/Generated/Customer.php index 4b0e42e7..73c008cb 100644 --- a/src/Model/Generated/Customer.php +++ b/src/Model/Generated/Customer.php @@ -67,7 +67,7 @@ class Customer extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCustomerList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { @@ -90,7 +90,7 @@ public static function listing(ApiContext $apiContext, $userId, array $params = * @param int $customerId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCustomer */ public static function get(ApiContext $apiContext, $userId, $customerId, array $customHeaders = []) { @@ -104,7 +104,7 @@ public static function get(ApiContext $apiContext, $userId, $customerId, array $ $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -114,7 +114,7 @@ public static function get(ApiContext $apiContext, $userId, $customerId, array $ * @param int $customerId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $customerId, array $customHeaders = []) { diff --git a/src/Model/Generated/CustomerLimit.php b/src/Model/Generated/CustomerLimit.php index aecf159d..4404610f 100644 --- a/src/Model/Generated/CustomerLimit.php +++ b/src/Model/Generated/CustomerLimit.php @@ -62,7 +62,7 @@ class CustomerLimit extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCustomerLimitList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/CustomerStatementExport.php b/src/Model/Generated/CustomerStatementExport.php index f95367d8..004f11f8 100644 --- a/src/Model/Generated/CustomerStatementExport.php +++ b/src/Model/Generated/CustomerStatementExport.php @@ -113,7 +113,7 @@ class CustomerStatementExport extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -137,7 +137,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $customerStatementExportId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCustomerStatementExport */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customerStatementExportId, array $customHeaders = []) { @@ -151,7 +151,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -164,7 +164,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseCustomerStatementExportList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { @@ -188,7 +188,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $monetaryAccountId * @param int $customerStatementExportId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $customerStatementExportId, array $customHeaders = []) { diff --git a/src/Model/Generated/CustomerStatementExportContent.php b/src/Model/Generated/CustomerStatementExportContent.php index ae85f3bd..e74c1312 100644 --- a/src/Model/Generated/CustomerStatementExportContent.php +++ b/src/Model/Generated/CustomerStatementExportContent.php @@ -36,7 +36,7 @@ class CustomerStatementExportContent extends BunqModel * @param int $customerStatementId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $customerStatementId, array $customHeaders = []) { diff --git a/src/Model/Generated/Device.php b/src/Model/Generated/Device.php index 2aa4f35f..6bd8f2df 100644 --- a/src/Model/Generated/Device.php +++ b/src/Model/Generated/Device.php @@ -42,7 +42,7 @@ class Device extends BunqModel * @param int $deviceId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDevice */ public static function get(ApiContext $apiContext, $deviceId, array $customHeaders = []) { @@ -70,7 +70,7 @@ public static function get(ApiContext $apiContext, $deviceId, array $customHeade * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDeviceList */ public static function listing(ApiContext $apiContext, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/DeviceServer.php b/src/Model/Generated/DeviceServer.php index 01e5eacd..9848e283 100644 --- a/src/Model/Generated/DeviceServer.php +++ b/src/Model/Generated/DeviceServer.php @@ -90,7 +90,7 @@ class DeviceServer extends BunqModel * @param mixed[] $requestMap * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, array $customHeaders = []) { @@ -114,7 +114,7 @@ public static function create(ApiContext $apiContext, array $requestMap, array $ * @param int $deviceServerId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDeviceServer */ public static function get(ApiContext $apiContext, $deviceServerId, array $customHeaders = []) { @@ -128,7 +128,7 @@ public static function get(ApiContext $apiContext, $deviceServerId, array $custo $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -141,7 +141,7 @@ public static function get(ApiContext $apiContext, $deviceServerId, array $custo * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDeviceServerList */ public static function listing(ApiContext $apiContext, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/DraftPayment.php b/src/Model/Generated/DraftPayment.php index ab63ffa3..16743359 100644 --- a/src/Model/Generated/DraftPayment.php +++ b/src/Model/Generated/DraftPayment.php @@ -104,7 +104,7 @@ class DraftPayment extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -131,7 +131,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $draftPaymentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $draftPaymentId, array $customHeaders = []) { @@ -160,7 +160,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDraftPaymentList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { @@ -186,7 +186,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $draftPaymentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDraftPayment */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $draftPaymentId, array $customHeaders = []) { @@ -200,7 +200,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/DraftShareInviteBank.php b/src/Model/Generated/DraftShareInviteBank.php index ff95ea72..f82f41c8 100644 --- a/src/Model/Generated/DraftShareInviteBank.php +++ b/src/Model/Generated/DraftShareInviteBank.php @@ -94,7 +94,7 @@ class DraftShareInviteBank extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -119,7 +119,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $draftShareInviteBankId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDraftShareInviteBank */ public static function get(ApiContext $apiContext, $userId, $draftShareInviteBankId, array $customHeaders = []) { @@ -133,7 +133,7 @@ public static function get(ApiContext $apiContext, $userId, $draftShareInviteBan $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -146,7 +146,7 @@ public static function get(ApiContext $apiContext, $userId, $draftShareInviteBan * @param int $draftShareInviteBankId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseDraftShareInviteBank */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $draftShareInviteBankId, array $customHeaders = []) { @@ -160,7 +160,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -172,7 +172,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseDraftShareInviteBankList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/DraftShareInviteBankQrCodeContent.php b/src/Model/Generated/DraftShareInviteBankQrCodeContent.php index ad93f785..b3f8fcaf 100644 --- a/src/Model/Generated/DraftShareInviteBankQrCodeContent.php +++ b/src/Model/Generated/DraftShareInviteBankQrCodeContent.php @@ -38,7 +38,7 @@ class DraftShareInviteBankQrCodeContent extends BunqModel * @param int $draftShareInviteBankId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $draftShareInviteBankId, array $customHeaders = []) { diff --git a/src/Model/Generated/ExportAnnualOverview.php b/src/Model/Generated/ExportAnnualOverview.php index cd902cca..9e90b6fe 100644 --- a/src/Model/Generated/ExportAnnualOverview.php +++ b/src/Model/Generated/ExportAnnualOverview.php @@ -77,7 +77,7 @@ class ExportAnnualOverview extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -102,7 +102,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $exportAnnualOverviewId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseExportAnnualOverview */ public static function get(ApiContext $apiContext, $userId, $exportAnnualOverviewId, array $customHeaders = []) { @@ -116,7 +116,7 @@ public static function get(ApiContext $apiContext, $userId, $exportAnnualOvervie $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -130,7 +130,7 @@ public static function get(ApiContext $apiContext, $userId, $exportAnnualOvervie * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseExportAnnualOverviewList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/ExportAnnualOverviewContent.php b/src/Model/Generated/ExportAnnualOverviewContent.php index 994cc4fe..4213d182 100644 --- a/src/Model/Generated/ExportAnnualOverviewContent.php +++ b/src/Model/Generated/ExportAnnualOverviewContent.php @@ -36,7 +36,7 @@ class ExportAnnualOverviewContent extends BunqModel * @param int $exportAnnualOverviewId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $exportAnnualOverviewId, array $customHeaders = []) { diff --git a/src/Model/Generated/IdealMerchantTransaction.php b/src/Model/Generated/IdealMerchantTransaction.php new file mode 100644 index 00000000..2279c700 --- /dev/null +++ b/src/Model/Generated/IdealMerchantTransaction.php @@ -0,0 +1,462 @@ +post( + vsprintf( + self::ENDPOINT_URL_CREATE, + [$userId, $monetaryAccountId] + ), + $requestMap, + $customHeaders + ); + + return static::processForId($responseRaw); + } + + /** + * @param ApiContext $apiContext + * @param int $userId + * @param int $monetaryAccountId + * @param int $idealMerchantTransactionId + * @param string[] $customHeaders + * + * @return BunqResponseIdealMerchantTransaction + */ + public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $idealMerchantTransactionId, array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [$userId, $monetaryAccountId, $idealMerchantTransactionId] + ), + [], + $customHeaders + ); + + return static::fromJson($responseRaw, self::OBJECT_TYPE); + } + + /** + * This method is called "listing" because "list" is a restricted PHP word + * and cannot be used as constants, class names, function or method names. + * + * @param ApiContext $apiContext + * @param int $userId + * @param int $monetaryAccountId + * @param string[] $params + * @param string[] $customHeaders + * + * @return BunqResponseIdealMerchantTransactionList + */ + public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [$userId, $monetaryAccountId] + ), + $params, + $customHeaders + ); + + return static::fromJsonList($responseRaw, self::OBJECT_TYPE); + } + + /** + * The id of the monetary account this ideal merchant transaction links to. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * The alias of the monetary account to add money to. + * + * @return LabelMonetaryAccount + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @param LabelMonetaryAccount $alias + */ + public function setAlias(LabelMonetaryAccount $alias) + { + $this->alias = $alias; + } + + /** + * The alias of the monetary account the money comes from. + * + * @return LabelMonetaryAccount + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @param LabelMonetaryAccount $counterpartyAlias + */ + public function setCounterpartyAlias(LabelMonetaryAccount $counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * In case of a successful transaction, the amount of money that will be + * transferred. + * + * @return Amount + */ + public function getAmountGuaranteed() + { + return $this->amountGuaranteed; + } + + /** + * @param Amount $amountGuaranteed + */ + public function setAmountGuaranteed(Amount $amountGuaranteed) + { + $this->amountGuaranteed = $amountGuaranteed; + } + + /** + * The requested amount of money to add. + * + * @return Amount + */ + public function getAmountRequested() + { + return $this->amountRequested; + } + + /** + * @param Amount $amountRequested + */ + public function setAmountRequested(Amount $amountRequested) + { + $this->amountRequested = $amountRequested; + } + + /** + * When the transaction will expire. + * + * @return string + */ + public function getExpiration() + { + return $this->expiration; + } + + /** + * @param string $expiration + */ + public function setExpiration($expiration) + { + $this->expiration = $expiration; + } + + /** + * The BIC of the issuer. + * + * @return string + */ + public function getIssuer() + { + return $this->issuer; + } + + /** + * @param string $issuer + */ + public function setIssuer($issuer) + { + $this->issuer = $issuer; + } + + /** + * The Name of the issuer. + * + * @return string + */ + public function getIssuerName() + { + return $this->issuerName; + } + + /** + * @param string $issuerName + */ + public function setIssuerName($issuerName) + { + $this->issuerName = $issuerName; + } + + /** + * The URL to visit to + * + * @return string + */ + public function getIssuerAuthenticationUrl() + { + return $this->issuerAuthenticationUrl; + } + + /** + * @param string $issuerAuthenticationUrl + */ + public function setIssuerAuthenticationUrl($issuerAuthenticationUrl) + { + $this->issuerAuthenticationUrl = $issuerAuthenticationUrl; + } + + /** + * The 'purchase ID' of the iDEAL transaction. + * + * @return string + */ + public function getPurchaseIdentifier() + { + return $this->purchaseIdentifier; + } + + /** + * @param string $purchaseIdentifier + */ + public function setPurchaseIdentifier($purchaseIdentifier) + { + $this->purchaseIdentifier = $purchaseIdentifier; + } + + /** + * The status of the transaction. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * When the status was last updated. + * + * @return string + */ + public function getStatusTimestamp() + { + return $this->statusTimestamp; + } + + /** + * @param string $statusTimestamp + */ + public function setStatusTimestamp($statusTimestamp) + { + $this->statusTimestamp = $statusTimestamp; + } + + /** + * The 'transaction ID' of the iDEAL transaction. + * + * @return string + */ + public function getTransactionIdentifier() + { + return $this->transactionIdentifier; + } + + /** + * @param string $transactionIdentifier + */ + public function setTransactionIdentifier($transactionIdentifier) + { + $this->transactionIdentifier = $transactionIdentifier; + } + + /** + * Whether or not chat messages are allowed. + * + * @return bool + */ + public function getAllowChat() + { + return $this->allowChat; + } + + /** + * @param bool $allowChat + */ + public function setAllowChat($allowChat) + { + $this->allowChat = $allowChat; + } +} diff --git a/src/Model/Generated/InstallationServerPublicKey.php b/src/Model/Generated/InstallationServerPublicKey.php index 7d69bc5a..c6bfbcd9 100644 --- a/src/Model/Generated/InstallationServerPublicKey.php +++ b/src/Model/Generated/InstallationServerPublicKey.php @@ -43,7 +43,7 @@ class InstallationServerPublicKey extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInstallationServerPublicKeyList */ public static function listing(ApiContext $apiContext, $installationId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/Invoice.php b/src/Model/Generated/Invoice.php index 0e469128..7ebe2ee0 100644 --- a/src/Model/Generated/Invoice.php +++ b/src/Model/Generated/Invoice.php @@ -158,7 +158,7 @@ class Invoice extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInvoiceList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { @@ -182,7 +182,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $invoiceId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInvoice */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $invoiceId, array $customHeaders = []) { @@ -196,7 +196,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/InvoiceByUser.php b/src/Model/Generated/InvoiceByUser.php index 56c15c42..d4e231ff 100644 --- a/src/Model/Generated/InvoiceByUser.php +++ b/src/Model/Generated/InvoiceByUser.php @@ -150,7 +150,7 @@ class InvoiceByUser extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInvoiceByUserList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { @@ -173,7 +173,7 @@ public static function listing(ApiContext $apiContext, $userId, array $params = * @param int $invoiceByUserId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInvoiceByUser */ public static function get(ApiContext $apiContext, $userId, $invoiceByUserId, array $customHeaders = []) { @@ -187,7 +187,7 @@ public static function get(ApiContext $apiContext, $userId, $invoiceByUserId, ar $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/MonetaryAccount.php b/src/Model/Generated/MonetaryAccount.php index 887dc6ab..3c33fd4a 100644 --- a/src/Model/Generated/MonetaryAccount.php +++ b/src/Model/Generated/MonetaryAccount.php @@ -41,7 +41,7 @@ class MonetaryAccount extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseMonetaryAccount */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -69,7 +69,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseMonetaryAccountList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/MonetaryAccountBank.php b/src/Model/Generated/MonetaryAccountBank.php index 373a6c3e..e92d7988 100644 --- a/src/Model/Generated/MonetaryAccountBank.php +++ b/src/Model/Generated/MonetaryAccountBank.php @@ -212,7 +212,7 @@ class MonetaryAccountBank extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -237,7 +237,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $monetaryAccountBankId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseMonetaryAccountBank */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountBankId, array $customHeaders = []) { @@ -251,7 +251,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountBank $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -263,7 +263,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountBank * @param int $monetaryAccountBankId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountBankId, array $customHeaders = []) { @@ -291,7 +291,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseMonetaryAccountBankList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/Object/AnchoredObject.php b/src/Model/Generated/Object/AnchoredObject.php new file mode 100644 index 00000000..c02649aa --- /dev/null +++ b/src/Model/Generated/Object/AnchoredObject.php @@ -0,0 +1,430 @@ +cardDebit; + } + + /** + * @param CardDebit $cardDebit + */ + public function setCardDebit(CardDebit $cardDebit) + { + $this->cardDebit = $cardDebit; + } + + /** + * @return CardPinChange + */ + public function getCardPinChange() + { + return $this->cardPinChange; + } + + /** + * @param CardPinChange $cardPinChange + */ + public function setCardPinChange(CardPinChange $cardPinChange) + { + $this->cardPinChange = $cardPinChange; + } + + /** + * @return CardResult + */ + public function getCardResult() + { + return $this->cardResult; + } + + /** + * @param CardResult $cardResult + */ + public function setCardResult(CardResult $cardResult) + { + $this->cardResult = $cardResult; + } + + /** + * @return DraftPayment + */ + public function getDraftPayment() + { + return $this->draftPayment; + } + + /** + * @param DraftPayment $draftPayment + */ + public function setDraftPayment(DraftPayment $draftPayment) + { + $this->draftPayment = $draftPayment; + } + + /** + * @return IdealMerchantTransaction + */ + public function getIdealMerchantTransaction() + { + return $this->idealMerchantTransaction; + } + + /** + * @param IdealMerchantTransaction $idealMerchantTransaction + */ + public function setIdealMerchantTransaction(IdealMerchantTransaction $idealMerchantTransaction) + { + $this->idealMerchantTransaction = $idealMerchantTransaction; + } + + /** + * @return Invoice + */ + public function getInvoice() + { + return $this->invoice; + } + + /** + * @param Invoice $invoice + */ + public function setInvoice(Invoice $invoice) + { + $this->invoice = $invoice; + } + + /** + * @return Payment + */ + public function getPayment() + { + return $this->payment; + } + + /** + * @param Payment $payment + */ + public function setPayment(Payment $payment) + { + $this->payment = $payment; + } + + /** + * @return PaymentBatch + */ + public function getPaymentBatch() + { + return $this->paymentBatch; + } + + /** + * @param PaymentBatch $paymentBatch + */ + public function setPaymentBatch(PaymentBatch $paymentBatch) + { + $this->paymentBatch = $paymentBatch; + } + + /** + * @return PromotionDisplay + */ + public function getPromotionDisplay() + { + return $this->promotionDisplay; + } + + /** + * @param PromotionDisplay $promotionDisplay + */ + public function setPromotionDisplay(PromotionDisplay $promotionDisplay) + { + $this->promotionDisplay = $promotionDisplay; + } + + /** + * @return RequestInquiryBatch + */ + public function getRequestInquiryBatch() + { + return $this->requestInquiryBatch; + } + + /** + * @param RequestInquiryBatch $requestInquiryBatch + */ + public function setRequestInquiryBatch(RequestInquiryBatch $requestInquiryBatch) + { + $this->requestInquiryBatch = $requestInquiryBatch; + } + + /** + * @return RequestInquiry + */ + public function getRequestInquiry() + { + return $this->requestInquiry; + } + + /** + * @param RequestInquiry $requestInquiry + */ + public function setRequestInquiry(RequestInquiry $requestInquiry) + { + $this->requestInquiry = $requestInquiry; + } + + /** + * @return RequestResponse + */ + public function getRequestResponse() + { + return $this->requestResponse; + } + + /** + * @param RequestResponse $requestResponse + */ + public function setRequestResponse(RequestResponse $requestResponse) + { + $this->requestResponse = $requestResponse; + } + + /** + * @return SchedulePaymentBatch + */ + public function getScheduledPaymentBatch() + { + return $this->scheduledPaymentBatch; + } + + /** + * @param SchedulePaymentBatch $scheduledPaymentBatch + */ + public function setScheduledPaymentBatch(SchedulePaymentBatch $scheduledPaymentBatch) + { + $this->scheduledPaymentBatch = $scheduledPaymentBatch; + } + + /** + * @return SchedulePayment + */ + public function getScheduledPayment() + { + return $this->scheduledPayment; + } + + /** + * @param SchedulePayment $scheduledPayment + */ + public function setScheduledPayment(SchedulePayment $scheduledPayment) + { + $this->scheduledPayment = $scheduledPayment; + } + + /** + * @return ScheduleRequestInquiryBatch + */ + public function getScheduledRequestInquiryBatch() + { + return $this->scheduledRequestInquiryBatch; + } + + /** + * @param ScheduleRequestInquiryBatch $scheduledRequestInquiryBatch + */ + public function setScheduledRequestInquiryBatch(ScheduleRequestInquiryBatch $scheduledRequestInquiryBatch) + { + $this->scheduledRequestInquiryBatch = $scheduledRequestInquiryBatch; + } + + /** + * @return ScheduleRequestInquiry + */ + public function getScheduledRequestInquiry() + { + return $this->scheduledRequestInquiry; + } + + /** + * @param ScheduleRequestInquiry $scheduledRequestInquiry + */ + public function setScheduledRequestInquiry(ScheduleRequestInquiry $scheduledRequestInquiry) + { + $this->scheduledRequestInquiry = $scheduledRequestInquiry; + } + + /** + * @return ScheduleInstance + */ + public function getScheduledInstance() + { + return $this->scheduledInstance; + } + + /** + * @param ScheduleInstance $scheduledInstance + */ + public function setScheduledInstance(ScheduleInstance $scheduledInstance) + { + $this->scheduledInstance = $scheduledInstance; + } + + /** + * @return ShareInviteBankInquiry + */ + public function getShareInviteBankInquiry() + { + return $this->shareInviteBankInquiry; + } + + /** + * @param ShareInviteBankInquiry $shareInviteBankInquiry + */ + public function setShareInviteBankInquiry(ShareInviteBankInquiry $shareInviteBankInquiry) + { + $this->shareInviteBankInquiry = $shareInviteBankInquiry; + } + + /** + * @return ShareInviteBankResponse + */ + public function getShareInviteBankResponse() + { + return $this->shareInviteBankResponse; + } + + /** + * @param ShareInviteBankResponse $shareInviteBankResponse + */ + public function setShareInviteBankResponse(ShareInviteBankResponse $shareInviteBankResponse) + { + $this->shareInviteBankResponse = $shareInviteBankResponse; + } + + /** + * @return UserCredentialPasswordIp + */ + public function getUserCredentialPasswordIp() + { + return $this->userCredentialPasswordIp; + } + + /** + * @param UserCredentialPasswordIp $userCredentialPasswordIp + */ + public function setUserCredentialPasswordIp(UserCredentialPasswordIp $userCredentialPasswordIp) + { + $this->userCredentialPasswordIp = $userCredentialPasswordIp; + } +} diff --git a/src/Model/Generated/Object/AttachmentScheduleRequestInquiryEntry.php b/src/Model/Generated/Object/AttachmentScheduleRequestInquiryEntry.php new file mode 100644 index 00000000..9b06896e --- /dev/null +++ b/src/Model/Generated/Object/AttachmentScheduleRequestInquiryEntry.php @@ -0,0 +1,43 @@ +id = $id; + } + + /** + * The id of the attached Attachment. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } +} diff --git a/src/Model/Generated/Object/BunqMeMerchantAvailable.php b/src/Model/Generated/Object/BunqMeMerchantAvailable.php new file mode 100644 index 00000000..8b37f17b --- /dev/null +++ b/src/Model/Generated/Object/BunqMeMerchantAvailable.php @@ -0,0 +1,60 @@ +merchantType; + } + + /** + * @param string $merchantType + */ + public function setMerchantType($merchantType) + { + $this->merchantType = $merchantType; + } + + /** + * Whether or not the merchant is available for the user. + * + * @return bool + */ + public function getAvailable() + { + return $this->available; + } + + /** + * @param bool $available + */ + public function setAvailable($available) + { + $this->available = $available; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContent.php b/src/Model/Generated/Object/ChatMessageContent.php new file mode 100644 index 00000000..21127047 --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContent.php @@ -0,0 +1,160 @@ +chatMessageContentAnchorEvent; + } + + /** + * @param ChatMessageContentAnchorEvent $chatMessageContentAnchorEvent + */ + public function setChatMessageContentAnchorEvent(ChatMessageContentAnchorEvent $chatMessageContentAnchorEvent) + { + $this->chatMessageContentAnchorEvent = $chatMessageContentAnchorEvent; + } + + /** + * @return ChatMessageContentAttachment + */ + public function getChatMessageContentAttachment() + { + return $this->chatMessageContentAttachment; + } + + /** + * @param ChatMessageContentAttachment $chatMessageContentAttachment + */ + public function setChatMessageContentAttachment(ChatMessageContentAttachment $chatMessageContentAttachment) + { + $this->chatMessageContentAttachment = $chatMessageContentAttachment; + } + + /** + * @return ChatMessageContentGeolocation + */ + public function getChatMessageContentGeolocation() + { + return $this->chatMessageContentGeolocation; + } + + /** + * @param ChatMessageContentGeolocation $chatMessageContentGeolocation + */ + public function setChatMessageContentGeolocation(ChatMessageContentGeolocation $chatMessageContentGeolocation) + { + $this->chatMessageContentGeolocation = $chatMessageContentGeolocation; + } + + /** + * @return ChatMessageContentStatusConversationTitle + */ + public function getChatMessageContentStatusConversationTitle() + { + return $this->chatMessageContentStatusConversationTitle; + } + + /** + * @param ChatMessageContentStatusConversationTitle + * $chatMessageContentStatusConversationTitle + */ + public function setChatMessageContentStatusConversationTitle(ChatMessageContentStatusConversationTitle $chatMessageContentStatusConversationTitle) + { + $this->chatMessageContentStatusConversationTitle = $chatMessageContentStatusConversationTitle; + } + + /** + * @return ChatMessageContentStatusConversation + */ + public function getChatMessageContentStatusConversation() + { + return $this->chatMessageContentStatusConversation; + } + + /** + * @param ChatMessageContentStatusConversation + * $chatMessageContentStatusConversation + */ + public function setChatMessageContentStatusConversation(ChatMessageContentStatusConversation $chatMessageContentStatusConversation) + { + $this->chatMessageContentStatusConversation = $chatMessageContentStatusConversation; + } + + /** + * @return ChatMessageContentStatusMembership + */ + public function getChatMessageContentStatusMembership() + { + return $this->chatMessageContentStatusMembership; + } + + /** + * @param ChatMessageContentStatusMembership + * $chatMessageContentStatusMembership + */ + public function setChatMessageContentStatusMembership(ChatMessageContentStatusMembership $chatMessageContentStatusMembership) + { + $this->chatMessageContentStatusMembership = $chatMessageContentStatusMembership; + } + + /** + * @return ChatMessageContentText + */ + public function getChatMessageContentText() + { + return $this->chatMessageContentText; + } + + /** + * @param ChatMessageContentText $chatMessageContentText + */ + public function setChatMessageContentText(ChatMessageContentText $chatMessageContentText) + { + $this->chatMessageContentText = $chatMessageContentText; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentAnchorEvent.php b/src/Model/Generated/Object/ChatMessageContentAnchorEvent.php new file mode 100644 index 00000000..d5582269 --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentAnchorEvent.php @@ -0,0 +1,45 @@ +anchoredObject; + } + + /** + * @param AnchoredObject $anchoredObject + */ + public function setAnchoredObject(AnchoredObject $anchoredObject) + { + $this->anchoredObject = $anchoredObject; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentAttachment.php b/src/Model/Generated/Object/ChatMessageContentAttachment.php new file mode 100644 index 00000000..55ddb548 --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentAttachment.php @@ -0,0 +1,35 @@ +attachment; + } + + /** + * @param Attachment $attachment + */ + public function setAttachment(Attachment $attachment) + { + $this->attachment = $attachment; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentGeolocation.php b/src/Model/Generated/Object/ChatMessageContentGeolocation.php new file mode 100644 index 00000000..234239fc --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentGeolocation.php @@ -0,0 +1,35 @@ +geolocation; + } + + /** + * @param Geolocation $geolocation + */ + public function setGeolocation(Geolocation $geolocation) + { + $this->geolocation = $geolocation; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentStatusConversation.php b/src/Model/Generated/Object/ChatMessageContentStatusConversation.php new file mode 100644 index 00000000..e6411d7d --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentStatusConversation.php @@ -0,0 +1,35 @@ +action; + } + + /** + * @param string $action + */ + public function setAction($action) + { + $this->action = $action; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentStatusConversationTitle.php b/src/Model/Generated/Object/ChatMessageContentStatusConversationTitle.php new file mode 100644 index 00000000..7a5d3857 --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentStatusConversationTitle.php @@ -0,0 +1,35 @@ +title; + } + + /** + * @param string $title + */ + public function setTitle($title) + { + $this->title = $title; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentStatusMembership.php b/src/Model/Generated/Object/ChatMessageContentStatusMembership.php new file mode 100644 index 00000000..b50c4260 --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentStatusMembership.php @@ -0,0 +1,62 @@ +action; + } + + /** + * @param string $action + */ + public function setAction($action) + { + $this->action = $action; + } + + /** + * The member over which the action has occurred. + * + * @return LabelUser + */ + public function getMember() + { + return $this->member; + } + + /** + * @param LabelUser $member + */ + public function setMember(LabelUser $member) + { + $this->member = $member; + } +} diff --git a/src/Model/Generated/Object/ChatMessageContentText.php b/src/Model/Generated/Object/ChatMessageContentText.php new file mode 100644 index 00000000..5688049e --- /dev/null +++ b/src/Model/Generated/Object/ChatMessageContentText.php @@ -0,0 +1,35 @@ +text; + } + + /** + * @param string $text + */ + public function setText($text) + { + $this->text = $text; + } +} diff --git a/src/Model/Generated/Object/LabelCard.php b/src/Model/Generated/Object/LabelCard.php new file mode 100644 index 00000000..f3fef41e --- /dev/null +++ b/src/Model/Generated/Object/LabelCard.php @@ -0,0 +1,160 @@ +uuid; + } + + /** + * @param string $uuid + */ + public function setUuid($uuid) + { + $this->uuid = $uuid; + } + + /** + * The type of the card. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * @param string $type + */ + public function setType($type) + { + $this->type = $type; + } + + /** + * The second line on the card. + * + * @return string + */ + public function getSecondLine() + { + return $this->secondLine; + } + + /** + * @param string $secondLine + */ + public function setSecondLine($secondLine) + { + $this->secondLine = $secondLine; + } + + /** + * The date this card will expire. + * + * @return string + */ + public function getExpiryDate() + { + return $this->expiryDate; + } + + /** + * @param string $expiryDate + */ + public function setExpiryDate($expiryDate) + { + $this->expiryDate = $expiryDate; + } + + /** + * The status of the card. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The owner of this card. + * + * @return LabelUser + */ + public function getLabelUser() + { + return $this->labelUser; + } + + /** + * @param LabelUser $labelUser + */ + public function setLabelUser(LabelUser $labelUser) + { + $this->labelUser = $labelUser; + } +} diff --git a/src/Model/Generated/Object/LabelMonetaryAccount.php b/src/Model/Generated/Object/LabelMonetaryAccount.php index aa991f88..de9aff6c 100644 --- a/src/Model/Generated/Object/LabelMonetaryAccount.php +++ b/src/Model/Generated/Object/LabelMonetaryAccount.php @@ -57,6 +57,20 @@ class LabelMonetaryAccount extends BunqModel */ protected $isLight; + /** + * The BIC used for a SWIFT payment. + * + * @var string + */ + protected $swiftBic; + + /** + * The account number used for a SWIFT payment. May or may not be an IBAN. + * + * @var string + */ + protected $swiftAccountNumber; + /** * The IBAN of the monetary account. * @@ -182,4 +196,40 @@ public function setIsLight($isLight) { $this->isLight = $isLight; } + + /** + * The BIC used for a SWIFT payment. + * + * @return string + */ + public function getSwiftBic() + { + return $this->swiftBic; + } + + /** + * @param string $swiftBic + */ + public function setSwiftBic($swiftBic) + { + $this->swiftBic = $swiftBic; + } + + /** + * The account number used for a SWIFT payment. May or may not be an IBAN. + * + * @return string + */ + public function getSwiftAccountNumber() + { + return $this->swiftAccountNumber; + } + + /** + * @param string $swiftAccountNumber + */ + public function setSwiftAccountNumber($swiftAccountNumber) + { + $this->swiftAccountNumber = $swiftAccountNumber; + } } diff --git a/src/Model/Generated/Object/ScheduleRequestInquiryEntry.php b/src/Model/Generated/Object/ScheduleRequestInquiryEntry.php new file mode 100644 index 00000000..ebc78624 --- /dev/null +++ b/src/Model/Generated/Object/ScheduleRequestInquiryEntry.php @@ -0,0 +1,331 @@ +amountInquired = $amountInquired; + $this->counterpartyAlias = $counterpartyAlias; + $this->description = $description; + $this->allowBunqme = $allowBunqme; + } + + /** + * The requested amount. + * + * @return Amount + */ + public function getAmountInquired() + { + return $this->amountInquired; + } + + /** + * @param Amount $amountInquired + */ + public function setAmountInquired(Amount $amountInquired) + { + $this->amountInquired = $amountInquired; + } + + /** + * The label that's displayed to the counterparty with the mutation. + * Includes user. + * + * @return LabelUser + */ + public function getUserAliasCreated() + { + return $this->userAliasCreated; + } + + /** + * @param LabelUser $userAliasCreated + */ + public function setUserAliasCreated(LabelUser $userAliasCreated) + { + $this->userAliasCreated = $userAliasCreated; + } + + /** + * The label that's displayed to the counterparty with the mutation. + * Includes user. + * + * @return LabelUser + */ + public function getUserAliasRevoked() + { + return $this->userAliasRevoked; + } + + /** + * @param LabelUser $userAliasRevoked + */ + public function setUserAliasRevoked(LabelUser $userAliasRevoked) + { + $this->userAliasRevoked = $userAliasRevoked; + } + + /** + * The LabelMonetaryAccount with the public information of the + * MonetaryAccount the money was requested from. + * + * @return LabelMonetaryAccount + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @param LabelMonetaryAccount $counterpartyAlias + */ + public function setCounterpartyAlias(LabelMonetaryAccount $counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * The description of the inquiry. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The client's custom reference that was attached to the request and the + * mutation. + * + * @return string + */ + public function getMerchantReference() + { + return $this->merchantReference; + } + + /** + * @param string $merchantReference + */ + public function setMerchantReference($merchantReference) + { + $this->merchantReference = $merchantReference; + } + + /** + * The attachments attached to the payment. + * + * @return AttachmentScheduleRequestInquiryEntry + */ + public function getAttachment() + { + return $this->attachment; + } + + /** + * @param AttachmentScheduleRequestInquiryEntry $attachment + */ + public function setAttachment(AttachmentScheduleRequestInquiryEntry $attachment) + { + $this->attachment = $attachment; + } + + /** + * The minimum age the user accepting the RequestInquiry must have. + * + * @return int + */ + public function getMinimumAge() + { + return $this->minimumAge; + } + + /** + * @param int $minimumAge + */ + public function setMinimumAge($minimumAge) + { + $this->minimumAge = $minimumAge; + } + + /** + * Whether or not an address must be provided on accept. + * + * @return string + */ + public function getRequireAddress() + { + return $this->requireAddress; + } + + /** + * @param string $requireAddress + */ + public function setRequireAddress($requireAddress) + { + $this->requireAddress = $requireAddress; + } + + /** + * Whether or not sending a bunq.me request is allowed. + * + * @return bool + */ + public function getAllowBunqme() + { + return $this->allowBunqme; + } + + /** + * @param bool $allowBunqme + */ + public function setAllowBunqme($allowBunqme) + { + $this->allowBunqme = $allowBunqme; + } + + /** + * The URL which the user is sent to after accepting or rejecting the + * Request. + * + * @return string + */ + public function getRedirectUrl() + { + return $this->redirectUrl; + } + + /** + * @param string $redirectUrl + */ + public function setRedirectUrl($redirectUrl) + { + $this->redirectUrl = $redirectUrl; + } +} diff --git a/src/Model/Generated/Payment.php b/src/Model/Generated/Payment.php index 7743548a..d880fbb0 100644 --- a/src/Model/Generated/Payment.php +++ b/src/Model/Generated/Payment.php @@ -226,7 +226,7 @@ class Payment extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -252,7 +252,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $paymentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePayment */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $paymentId, array $customHeaders = []) { @@ -266,7 +266,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -282,7 +282,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePaymentList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/PaymentBatch.php b/src/Model/Generated/PaymentBatch.php index b74f1b48..0491fac0 100644 --- a/src/Model/Generated/PaymentBatch.php +++ b/src/Model/Generated/PaymentBatch.php @@ -50,7 +50,7 @@ class PaymentBatch extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -78,7 +78,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $paymentBatchId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $paymentBatchId, array $customHeaders = []) { @@ -104,7 +104,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $paymentBatchId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePaymentBatch */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $paymentBatchId, array $customHeaders = []) { @@ -118,7 +118,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -133,7 +133,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePaymentBatchList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/PaymentChat.php b/src/Model/Generated/PaymentChat.php index af25eb1d..21db8a19 100644 --- a/src/Model/Generated/PaymentChat.php +++ b/src/Model/Generated/PaymentChat.php @@ -68,7 +68,7 @@ class PaymentChat extends BunqModel * @param int $paymentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $paymentId, array $customHeaders = []) { @@ -96,7 +96,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $paymentChatId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponsePaymentChat */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $paymentId, $paymentChatId, array $customHeaders = []) { @@ -110,7 +110,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -126,7 +126,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePaymentChatList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $paymentId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/PermittedIp.php b/src/Model/Generated/PermittedIp.php index a9828275..80a78d6e 100644 --- a/src/Model/Generated/PermittedIp.php +++ b/src/Model/Generated/PermittedIp.php @@ -56,7 +56,7 @@ class PermittedIp extends BunqModel * @param int $permittedIpId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePermittedIp */ public static function get(ApiContext $apiContext, $userId, $credentialPasswordIpId, $permittedIpId, array $customHeaders = []) { @@ -70,7 +70,7 @@ public static function get(ApiContext $apiContext, $userId, $credentialPasswordI $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -80,7 +80,7 @@ public static function get(ApiContext $apiContext, $userId, $credentialPasswordI * @param int $credentialPasswordIpId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $credentialPasswordIpId, array $customHeaders = []) { @@ -107,7 +107,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponsePermittedIpList */ public static function listing(ApiContext $apiContext, $userId, $credentialPasswordIpId, array $params = [], array $customHeaders = []) { @@ -132,7 +132,7 @@ public static function listing(ApiContext $apiContext, $userId, $credentialPassw * @param int $permittedIpId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $credentialPasswordIpId, $permittedIpId, array $customHeaders = []) { diff --git a/src/Model/Generated/PromotionDisplay.php b/src/Model/Generated/PromotionDisplay.php new file mode 100644 index 00000000..04002973 --- /dev/null +++ b/src/Model/Generated/PromotionDisplay.php @@ -0,0 +1,180 @@ +get( + vsprintf( + self::ENDPOINT_URL_READ, + [$userId, $promotionDisplayId] + ), + [], + $customHeaders + ); + + return static::fromJson($responseRaw, self::OBJECT_TYPE); + } + + /** + * @param ApiContext $apiContext + * @param mixed[] $requestMap + * @param int $userId + * @param int $promotionDisplayId + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function update(ApiContext $apiContext, array $requestMap, $userId, $promotionDisplayId, array $customHeaders = []) + { + $apiClient = new ApiClient($apiContext); + $responseRaw = $apiClient->put( + vsprintf( + self::ENDPOINT_URL_UPDATE, + [$userId, $promotionDisplayId] + ), + $requestMap, + $customHeaders + ); + + return static::processForId($responseRaw); + } + + /** + * The id of the promotion. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The alias of the user you received the promotion from. + * + * @return LabelMonetaryAccount + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @param LabelMonetaryAccount $counterpartyAlias + */ + public function setCounterpartyAlias(LabelMonetaryAccount $counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * The event description of the promotion appearing on time line. + * + * @return string + */ + public function getEventDescription() + { + return $this->eventDescription; + } + + /** + * @param string $eventDescription + */ + public function setEventDescription($eventDescription) + { + $this->eventDescription = $eventDescription; + } + + /** + * The status of the promotion. (CREATED, CLAIMED, EXPIRED, DISCARDED) + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } +} diff --git a/src/Model/Generated/RequestInquiry.php b/src/Model/Generated/RequestInquiry.php index f022870a..ef284e5a 100644 --- a/src/Model/Generated/RequestInquiry.php +++ b/src/Model/Generated/RequestInquiry.php @@ -245,7 +245,7 @@ class RequestInquiry extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -272,7 +272,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $requestInquiryId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseRequestInquiry */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestInquiryId, array $customHeaders = []) { @@ -286,7 +286,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -301,7 +301,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestInquiryList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { @@ -327,7 +327,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $requestInquiryId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestInquiry */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $requestInquiryId, array $customHeaders = []) { @@ -341,7 +341,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/RequestInquiryBatch.php b/src/Model/Generated/RequestInquiryBatch.php index 911aafee..eb6433b4 100644 --- a/src/Model/Generated/RequestInquiryBatch.php +++ b/src/Model/Generated/RequestInquiryBatch.php @@ -59,7 +59,7 @@ class RequestInquiryBatch extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -87,7 +87,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $requestInquiryBatchId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestInquiryBatchId, array $customHeaders = []) { @@ -113,7 +113,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $requestInquiryBatchId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestInquiryBatch */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $requestInquiryBatchId, array $customHeaders = []) { @@ -127,7 +127,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -142,7 +142,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestInquiryBatchList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/RequestInquiryChat.php b/src/Model/Generated/RequestInquiryChat.php index 0e4d9c94..882d5334 100644 --- a/src/Model/Generated/RequestInquiryChat.php +++ b/src/Model/Generated/RequestInquiryChat.php @@ -72,7 +72,7 @@ class RequestInquiryChat extends BunqModel * @param int $requestInquiryId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestInquiryId, array $customHeaders = []) { @@ -100,7 +100,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $requestInquiryChatId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseRequestInquiryChat */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestInquiryId, $requestInquiryChatId, array $customHeaders = []) { @@ -114,7 +114,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -130,7 +130,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestInquiryChatList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $requestInquiryId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/RequestResponse.php b/src/Model/Generated/RequestResponse.php index b1aa7d37..d5ad8be5 100644 --- a/src/Model/Generated/RequestResponse.php +++ b/src/Model/Generated/RequestResponse.php @@ -238,7 +238,7 @@ class RequestResponse extends BunqModel * @param int $requestResponseId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseRequestResponse */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestResponseId, array $customHeaders = []) { @@ -252,7 +252,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -267,7 +267,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestResponseList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { @@ -293,7 +293,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $requestResponseId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestResponse */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $requestResponseId, array $customHeaders = []) { @@ -307,7 +307,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/RequestResponseChat.php b/src/Model/Generated/RequestResponseChat.php index 1c90e608..e1232029 100644 --- a/src/Model/Generated/RequestResponseChat.php +++ b/src/Model/Generated/RequestResponseChat.php @@ -72,7 +72,7 @@ class RequestResponseChat extends BunqModel * @param int $requestResponseId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestResponseId, array $customHeaders = []) { @@ -100,7 +100,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $requestResponseChatId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseRequestResponseChat */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $requestResponseId, $requestResponseChatId, array $customHeaders = []) { @@ -114,7 +114,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -130,7 +130,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseRequestResponseChatList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $requestResponseId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/Schedule.php b/src/Model/Generated/Schedule.php index 71001d0c..f05ad86a 100644 --- a/src/Model/Generated/Schedule.php +++ b/src/Model/Generated/Schedule.php @@ -33,7 +33,7 @@ class Schedule extends BunqModel * @param int $scheduleId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseSchedule */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $scheduleId, array $customHeaders = []) { @@ -47,7 +47,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -66,7 +66,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseScheduleList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/ScheduleInstance.php b/src/Model/Generated/ScheduleInstance.php index e828ad8e..cb7bbf17 100644 --- a/src/Model/Generated/ScheduleInstance.php +++ b/src/Model/Generated/ScheduleInstance.php @@ -83,7 +83,7 @@ class ScheduleInstance extends BunqModel * @param int $scheduleInstanceId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseScheduleInstance */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $scheduleId, $scheduleInstanceId, array $customHeaders = []) { @@ -97,7 +97,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -109,7 +109,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param int $scheduleInstanceId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $scheduleId, $scheduleInstanceId, array $customHeaders = []) { @@ -137,7 +137,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseScheduleInstanceList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $scheduleId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/SchedulePayment.php b/src/Model/Generated/SchedulePayment.php index 091e7472..5b6b18de 100644 --- a/src/Model/Generated/SchedulePayment.php +++ b/src/Model/Generated/SchedulePayment.php @@ -56,7 +56,7 @@ class SchedulePayment extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -80,7 +80,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $monetaryAccountId * @param int $schedulePaymentId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $schedulePaymentId, array $customHeaders = []) { @@ -103,7 +103,7 @@ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountI * @param int $schedulePaymentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseSchedulePayment */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $schedulePaymentId, array $customHeaders = []) { @@ -117,7 +117,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -130,7 +130,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseSchedulePaymentList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { @@ -155,7 +155,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $schedulePaymentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $schedulePaymentId, array $customHeaders = []) { diff --git a/src/Model/Generated/SchedulePaymentBatch.php b/src/Model/Generated/SchedulePaymentBatch.php index e3fd3186..2897892c 100644 --- a/src/Model/Generated/SchedulePaymentBatch.php +++ b/src/Model/Generated/SchedulePaymentBatch.php @@ -54,7 +54,7 @@ class SchedulePaymentBatch extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -79,7 +79,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $schedulePaymentBatchId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $schedulePaymentBatchId, array $customHeaders = []) { @@ -103,7 +103,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $monetaryAccountId * @param int $schedulePaymentBatchId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $schedulePaymentBatchId, array $customHeaders = []) { diff --git a/src/Model/Generated/ScheduleRequestInquiry.php b/src/Model/Generated/ScheduleRequestInquiry.php new file mode 100644 index 00000000..ed3b2d0a --- /dev/null +++ b/src/Model/Generated/ScheduleRequestInquiry.php @@ -0,0 +1,75 @@ +requestInquiry; + } + + /** + * @param ScheduleRequestInquiryEntry $requestInquiry + */ + public function setRequestInquiry(ScheduleRequestInquiryEntry $requestInquiry) + { + $this->requestInquiry = $requestInquiry; + } + + /** + * The schedule details. + * + * @return Schedule + */ + public function getSchedule() + { + return $this->schedule; + } + + /** + * @param Schedule $schedule + */ + public function setSchedule(Schedule $schedule) + { + $this->schedule = $schedule; + } +} diff --git a/src/Model/Generated/ScheduleRequestInquiryBatch.php b/src/Model/Generated/ScheduleRequestInquiryBatch.php new file mode 100644 index 00000000..e8cdc75c --- /dev/null +++ b/src/Model/Generated/ScheduleRequestInquiryBatch.php @@ -0,0 +1,102 @@ +requestInquiries; + } + + /** + * @param ScheduleRequestInquiryEntry[] $requestInquiries + */ + public function setRequestInquiries(array$requestInquiries) + { + $this->requestInquiries = $requestInquiries; + } + + /** + * The schedule details. + * + * @return Schedule + */ + public function getSchedule() + { + return $this->schedule; + } + + /** + * @param Schedule $schedule + */ + public function setSchedule(Schedule $schedule) + { + $this->schedule = $schedule; + } + + /** + * The total amount originally inquired for this batch. + * + * @return Amount + */ + public function getTotalAmountInquired() + { + return $this->totalAmountInquired; + } + + /** + * @param Amount $totalAmountInquired + */ + public function setTotalAmountInquired(Amount $totalAmountInquired) + { + $this->totalAmountInquired = $totalAmountInquired; + } +} diff --git a/src/Model/Generated/ScheduleUser.php b/src/Model/Generated/ScheduleUser.php index 5997ed1a..0fdc9620 100644 --- a/src/Model/Generated/ScheduleUser.php +++ b/src/Model/Generated/ScheduleUser.php @@ -39,7 +39,7 @@ class ScheduleUser extends BunqModel * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseScheduleUserList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/Session.php b/src/Model/Generated/Session.php index d3cc120a..a5566bc3 100644 --- a/src/Model/Generated/Session.php +++ b/src/Model/Generated/Session.php @@ -30,7 +30,7 @@ class Session extends BunqModel * @param string[] $customHeaders * @param int $sessionId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $sessionId, array $customHeaders = []) { diff --git a/src/Model/Generated/ShareInviteBankAmountUsed.php b/src/Model/Generated/ShareInviteBankAmountUsed.php index f19ad136..eecc8591 100644 --- a/src/Model/Generated/ShareInviteBankAmountUsed.php +++ b/src/Model/Generated/ShareInviteBankAmountUsed.php @@ -38,7 +38,7 @@ class ShareInviteBankAmountUsed extends BunqModel * @param int $shareInviteBankInquiryId * @param int $shareInviteBankAmountUsedId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $shareInviteBankInquiryId, $shareInviteBankAmountUsedId, array $customHeaders = []) { diff --git a/src/Model/Generated/ShareInviteBankInquiry.php b/src/Model/Generated/ShareInviteBankInquiry.php index 287fd400..d84cfc93 100644 --- a/src/Model/Generated/ShareInviteBankInquiry.php +++ b/src/Model/Generated/ShareInviteBankInquiry.php @@ -131,7 +131,7 @@ class ShareInviteBankInquiry extends BunqModel * @param int $monetaryAccountId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, array $customHeaders = []) { @@ -157,7 +157,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $shareInviteBankInquiryId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseShareInviteBankInquiry */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $shareInviteBankInquiryId, array $customHeaders = []) { @@ -171,7 +171,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -185,7 +185,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param int $shareInviteBankInquiryId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseShareInviteBankInquiry */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $shareInviteBankInquiryId, array $customHeaders = []) { @@ -199,7 +199,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -216,7 +216,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseShareInviteBankInquiryList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/ShareInviteBankResponse.php b/src/Model/Generated/ShareInviteBankResponse.php index b5b90014..1d45b2fc 100644 --- a/src/Model/Generated/ShareInviteBankResponse.php +++ b/src/Model/Generated/ShareInviteBankResponse.php @@ -114,7 +114,7 @@ class ShareInviteBankResponse extends BunqModel * @param int $shareInviteBankResponseId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseShareInviteBankResponse */ public static function get(ApiContext $apiContext, $userId, $shareInviteBankResponseId, array $customHeaders = []) { @@ -128,7 +128,7 @@ public static function get(ApiContext $apiContext, $userId, $shareInviteBankResp $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -140,7 +140,7 @@ public static function get(ApiContext $apiContext, $userId, $shareInviteBankResp * @param int $shareInviteBankResponseId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseShareInviteBankResponse */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $shareInviteBankResponseId, array $customHeaders = []) { @@ -154,7 +154,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -168,7 +168,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseShareInviteBankResponseList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/Tab.php b/src/Model/Generated/Tab.php index bfed8f8e..fb8c41dd 100644 --- a/src/Model/Generated/Tab.php +++ b/src/Model/Generated/Tab.php @@ -50,7 +50,7 @@ class Tab extends BunqModel * @param string $tabUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTab */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, array $customHeaders = []) { @@ -80,7 +80,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/TabAttachmentTab.php b/src/Model/Generated/TabAttachmentTab.php index 43cdd4c9..431f0207 100644 --- a/src/Model/Generated/TabAttachmentTab.php +++ b/src/Model/Generated/TabAttachmentTab.php @@ -61,7 +61,7 @@ class TabAttachmentTab extends BunqModel * @param int $tabAttachmentTabId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabAttachmentTab */ public static function get(ApiContext $apiContext, $tabUuid, $tabAttachmentTabId, array $customHeaders = []) { @@ -75,7 +75,7 @@ public static function get(ApiContext $apiContext, $tabUuid, $tabAttachmentTabId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/TabAttachmentTabContent.php b/src/Model/Generated/TabAttachmentTabContent.php index 0e82571b..a1c382c7 100644 --- a/src/Model/Generated/TabAttachmentTabContent.php +++ b/src/Model/Generated/TabAttachmentTabContent.php @@ -35,7 +35,7 @@ class TabAttachmentTabContent extends BunqModel * @param int $attachmentId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $tabUuid, $attachmentId, array $customHeaders = []) { diff --git a/src/Model/Generated/TabItemShop.php b/src/Model/Generated/TabItemShop.php index b497e0e8..77169b69 100644 --- a/src/Model/Generated/TabItemShop.php +++ b/src/Model/Generated/TabItemShop.php @@ -107,7 +107,7 @@ class TabItemShop extends BunqModel * @param string $tabUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, array $customHeaders = []) { @@ -136,7 +136,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param int $tabItemShopId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, $tabItemShopId, array $customHeaders = []) { @@ -165,7 +165,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param string $tabUuid * @param int $tabItemShopId * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, $tabItemShopId, array $customHeaders = []) { @@ -195,7 +195,7 @@ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountI * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabItemShopList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, array $params = [], array $customHeaders = []) { @@ -223,7 +223,7 @@ public static function listing(ApiContext $apiContext, $userId, $monetaryAccount * @param int $tabItemShopId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabItemShop */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, $tabItemShopId, array $customHeaders = []) { @@ -237,7 +237,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/TabItemShopBatch.php b/src/Model/Generated/TabItemShopBatch.php index 2e17b18e..0b90781c 100644 --- a/src/Model/Generated/TabItemShopBatch.php +++ b/src/Model/Generated/TabItemShopBatch.php @@ -46,7 +46,7 @@ class TabItemShopBatch extends BunqModel * @param string $tabUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, array $customHeaders = []) { diff --git a/src/Model/Generated/TabQrCodeContent.php b/src/Model/Generated/TabQrCodeContent.php index 26054ba7..b7d4ba9c 100644 --- a/src/Model/Generated/TabQrCodeContent.php +++ b/src/Model/Generated/TabQrCodeContent.php @@ -40,7 +40,7 @@ class TabQrCodeContent extends BunqModel * @param string $tabUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, array $customHeaders = []) { diff --git a/src/Model/Generated/TabResultInquiry.php b/src/Model/Generated/TabResultInquiry.php index 0f3c1c2c..7d52297a 100644 --- a/src/Model/Generated/TabResultInquiry.php +++ b/src/Model/Generated/TabResultInquiry.php @@ -51,7 +51,7 @@ class TabResultInquiry extends BunqModel * @param int $tabResultInquiryId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabResultInquiry */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, $tabResultInquiryId, array $customHeaders = []) { @@ -65,7 +65,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -82,7 +82,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabResultInquiryList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUuid, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/TabResultResponse.php b/src/Model/Generated/TabResultResponse.php index c64fbdc2..2707c98b 100644 --- a/src/Model/Generated/TabResultResponse.php +++ b/src/Model/Generated/TabResultResponse.php @@ -49,7 +49,7 @@ class TabResultResponse extends BunqModel * @param int $tabResultResponseId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabResultResponse */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $tabResultResponseId, array $customHeaders = []) { @@ -63,7 +63,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -78,7 +78,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabResultResponseList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/TabUsageMultiple.php b/src/Model/Generated/TabUsageMultiple.php index 1724b572..efe27a74 100644 --- a/src/Model/Generated/TabUsageMultiple.php +++ b/src/Model/Generated/TabUsageMultiple.php @@ -190,7 +190,7 @@ class TabUsageMultiple extends BunqModel * @param int $cashRegisterId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, array $customHeaders = []) { @@ -223,7 +223,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param string $tabUsageMultipleUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, $tabUsageMultipleUuid, array $customHeaders = []) { @@ -251,7 +251,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $cashRegisterId * @param string $tabUsageMultipleUuid * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUsageMultipleUuid, array $customHeaders = []) { @@ -277,7 +277,7 @@ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountI * @param string $tabUsageMultipleUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabUsageMultiple */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUsageMultipleUuid, array $customHeaders = []) { @@ -291,7 +291,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -307,7 +307,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabUsageMultipleList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/TabUsageSingle.php b/src/Model/Generated/TabUsageSingle.php index 257f2086..7bd414ce 100644 --- a/src/Model/Generated/TabUsageSingle.php +++ b/src/Model/Generated/TabUsageSingle.php @@ -206,7 +206,7 @@ class TabUsageSingle extends BunqModel * @param int $cashRegisterId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function create(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, array $customHeaders = []) { @@ -237,7 +237,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId * @param string $tabUsageSingleUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseString */ public static function update(ApiContext $apiContext, array $requestMap, $userId, $monetaryAccountId, $cashRegisterId, $tabUsageSingleUuid, array $customHeaders = []) { @@ -264,7 +264,7 @@ public static function update(ApiContext $apiContext, array $requestMap, $userId * @param int $cashRegisterId * @param string $tabUsageSingleUuid * - * @return BunqResponse + * @return BunqResponseNull */ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUsageSingleUuid, array $customHeaders = []) { @@ -290,7 +290,7 @@ public static function delete(ApiContext $apiContext, $userId, $monetaryAccountI * @param string $tabUsageSingleUuid * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabUsageSingle */ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, $tabUsageSingleUuid, array $customHeaders = []) { @@ -304,7 +304,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -320,7 +320,7 @@ public static function get(ApiContext $apiContext, $userId, $monetaryAccountId, * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseTabUsageSingleList */ public static function listing(ApiContext $apiContext, $userId, $monetaryAccountId, $cashRegisterId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/TokenQrRequestIdeal.php b/src/Model/Generated/TokenQrRequestIdeal.php index c64dabaa..c80f5b4d 100644 --- a/src/Model/Generated/TokenQrRequestIdeal.php +++ b/src/Model/Generated/TokenQrRequestIdeal.php @@ -192,7 +192,7 @@ class TokenQrRequestIdeal extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse> + * @return BunqResponseTokenQrRequestIdeal */ public static function create(ApiContext $apiContext, array $requestMap, $userId, array $customHeaders = []) { @@ -206,7 +206,7 @@ public static function create(ApiContext $apiContext, array $requestMap, $userId $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/User.php b/src/Model/Generated/User.php index 23acc277..98e2afbd 100644 --- a/src/Model/Generated/User.php +++ b/src/Model/Generated/User.php @@ -47,7 +47,7 @@ class User extends BunqModel * @param int $userId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUser */ public static function get(ApiContext $apiContext, $userId, array $customHeaders = []) { @@ -74,7 +74,7 @@ public static function get(ApiContext $apiContext, $userId, array $customHeaders * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUserList */ public static function listing(ApiContext $apiContext, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/UserCompany.php b/src/Model/Generated/UserCompany.php index d8cf33c1..87e3e4eb 100644 --- a/src/Model/Generated/UserCompany.php +++ b/src/Model/Generated/UserCompany.php @@ -268,7 +268,7 @@ class UserCompany extends BunqModel * @param int $userCompanyId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUserCompany */ public static function get(ApiContext $apiContext, $userCompanyId, array $customHeaders = []) { @@ -282,7 +282,7 @@ public static function get(ApiContext $apiContext, $userCompanyId, array $custom $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -293,7 +293,7 @@ public static function get(ApiContext $apiContext, $userCompanyId, array $custom * @param int $userCompanyId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userCompanyId, array $customHeaders = []) { diff --git a/src/Model/Generated/UserCredentialPasswordIp.php b/src/Model/Generated/UserCredentialPasswordIp.php index 5f3bca65..a2e23108 100644 --- a/src/Model/Generated/UserCredentialPasswordIp.php +++ b/src/Model/Generated/UserCredentialPasswordIp.php @@ -82,7 +82,7 @@ class UserCredentialPasswordIp extends BunqModel * @param int $userCredentialPasswordIpId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUserCredentialPasswordIp */ public static function get(ApiContext $apiContext, $userId, $userCredentialPasswordIpId, array $customHeaders = []) { @@ -96,7 +96,7 @@ public static function get(ApiContext $apiContext, $userId, $userCredentialPassw $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -108,7 +108,7 @@ public static function get(ApiContext $apiContext, $userId, $userCredentialPassw * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUserCredentialPasswordIpList */ public static function listing(ApiContext $apiContext, $userId, array $params = [], array $customHeaders = []) { diff --git a/src/Model/Generated/UserLight.php b/src/Model/Generated/UserLight.php index 9821257b..00aeb83c 100644 --- a/src/Model/Generated/UserLight.php +++ b/src/Model/Generated/UserLight.php @@ -300,7 +300,7 @@ class UserLight extends BunqModel * @param int $userLightId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUserLight */ public static function get(ApiContext $apiContext, $userLightId, array $customHeaders = []) { @@ -314,7 +314,7 @@ public static function get(ApiContext $apiContext, $userLightId, array $customHe $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** diff --git a/src/Model/Generated/UserPerson.php b/src/Model/Generated/UserPerson.php index 8d31f5ee..0b8a1544 100644 --- a/src/Model/Generated/UserPerson.php +++ b/src/Model/Generated/UserPerson.php @@ -294,7 +294,7 @@ class UserPerson extends BunqModel * @param int $userPersonId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseUserPerson */ public static function get(ApiContext $apiContext, $userPersonId, array $customHeaders = []) { @@ -308,7 +308,7 @@ public static function get(ApiContext $apiContext, $userPersonId, array $customH $customHeaders ); - return static::fromJson($responseRaw); + return static::fromJson($responseRaw, self::OBJECT_TYPE); } /** @@ -319,7 +319,7 @@ public static function get(ApiContext $apiContext, $userPersonId, array $customH * @param int $userPersonId * @param string[] $customHeaders * - * @return BunqResponse + * @return BunqResponseInt */ public static function update(ApiContext $apiContext, array $requestMap, $userPersonId, array $customHeaders = []) { diff --git a/tests/JsonParserTest.php b/tests/JsonParserTest.php index 2d49aa72..8f013ce6 100644 --- a/tests/JsonParserTest.php +++ b/tests/JsonParserTest.php @@ -103,7 +103,7 @@ public function testCreateFromJson() $bunqResponseUserCompany = $this->callPrivateStaticMethod( UserCompany::class, self::FUNCTION_FROM_JSON, - [new BunqResponseRaw($userCompanyJson, [])] + [new BunqResponseRaw($userCompanyJson, []), UserCompany::OBJECT_TYPE] ); /** @var UserCompany $userCompany */ $userCompany = $bunqResponseUserCompany->getValue();