diff --git a/src/Model/Generated/Endpoint/BunqResponseNoteAttachmentPaymentSuspended.php b/src/Model/Generated/Endpoint/BunqResponseNoteAttachmentPaymentSuspended.php new file mode 100644 index 00000000..8f4d7551 --- /dev/null +++ b/src/Model/Generated/Endpoint/BunqResponseNoteAttachmentPaymentSuspended.php @@ -0,0 +1,17 @@ +statusFieldForRequest = $status; $this->entriesFieldForRequest = $entries; $this->previousUpdatedTimestampFieldForRequest = $previousUpdatedTimestamp; $this->numberOfRequiredAcceptsFieldForRequest = $numberOfRequiredAccepts; $this->scheduleFieldForRequest = $schedule; + $this->paymentBatchExecutionTypeFieldForRequest = $paymentBatchExecutionType; } /** @@ -178,11 +196,13 @@ public function __construct(array $entries, int $numberOfRequiredAccepts, stri * @param string|null $previousUpdatedTimestamp The last updated_timestamp that you received for this DraftPayment. This * needs to be provided to prevent race conditions. * @param ScheduleApiObject|null $schedule The schedule details when creating or updating a scheduled payment. + * @param string|null $paymentBatchExecutionType The execution type that will be used when converting this draft payment to + * a payment batch. * @param string[] $customHeaders * * @return BunqResponseInt */ - public static function create(array $entries, int $numberOfRequiredAccepts, int $monetaryAccountId = null, string $status = null, string $previousUpdatedTimestamp = null, ScheduleApiObject $schedule = null, array $customHeaders = []): BunqResponseInt + public static function create(array $entries, int $numberOfRequiredAccepts, int $monetaryAccountId = null, string $status = null, string $previousUpdatedTimestamp = null, ScheduleApiObject $schedule = null, string $paymentBatchExecutionType = null, array $customHeaders = []): BunqResponseInt { $apiClient = new ApiClient(static::getApiContext()); $responseRaw = $apiClient->post( @@ -194,7 +214,8 @@ public static function create(array $entries, int $numberOfRequiredAccepts, in self::FIELD_ENTRIES => $entries, self::FIELD_PREVIOUS_UPDATED_TIMESTAMP => $previousUpdatedTimestamp, self::FIELD_NUMBER_OF_REQUIRED_ACCEPTS => $numberOfRequiredAccepts, -self::FIELD_SCHEDULE => $schedule], +self::FIELD_SCHEDULE => $schedule, +self::FIELD_PAYMENT_BATCH_EXECUTION_TYPE => $paymentBatchExecutionType], $customHeaders ); @@ -212,11 +233,13 @@ public static function create(array $entries, int $numberOfRequiredAccepts, in * @param string|null $previousUpdatedTimestamp The last updated_timestamp that you received for this DraftPayment. This * needs to be provided to prevent race conditions. * @param ScheduleApiObject|null $schedule The schedule details when creating or updating a scheduled payment. + * @param string|null $paymentBatchExecutionType The execution type that will be used when converting this draft payment to + * a payment batch. * @param string[] $customHeaders * * @return BunqResponseInt */ - public static function update(int $draftPaymentId, int $monetaryAccountId = null, string $status = null, string $previousUpdatedTimestamp = null, ScheduleApiObject $schedule = null, array $customHeaders = []): BunqResponseInt + public static function update(int $draftPaymentId, int $monetaryAccountId = null, string $status = null, string $previousUpdatedTimestamp = null, ScheduleApiObject $schedule = null, string $paymentBatchExecutionType = null, array $customHeaders = []): BunqResponseInt { $apiClient = new ApiClient(static::getApiContext()); $responseRaw = $apiClient->put( @@ -226,7 +249,8 @@ public static function update(int $draftPaymentId, int $monetaryAccountId = null ), [self::FIELD_STATUS => $status, self::FIELD_PREVIOUS_UPDATED_TIMESTAMP => $previousUpdatedTimestamp, -self::FIELD_SCHEDULE => $schedule], +self::FIELD_SCHEDULE => $schedule, +self::FIELD_PAYMENT_BATCH_EXECUTION_TYPE => $paymentBatchExecutionType], $customHeaders ); @@ -490,6 +514,26 @@ public function setSchedule($schedule) $this->schedule = $schedule; } + /** + * The execution type that will be used when converting this draft payment to a payment batch. + * + * @return string + */ + public function getPaymentBatchExecutionType() + { + return $this->paymentBatchExecutionType; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $paymentBatchExecutionType + */ + public function setPaymentBatchExecutionType($paymentBatchExecutionType) + { + $this->paymentBatchExecutionType = $paymentBatchExecutionType; + } + /** * @return bool */ @@ -535,6 +579,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->paymentBatchExecutionType)) { + return false; + } + return true; } } diff --git a/src/Model/Generated/Endpoint/InvoiceApiObject.php b/src/Model/Generated/Endpoint/InvoiceApiObject.php index 440aa1d0..8b71c3f3 100644 --- a/src/Model/Generated/Endpoint/InvoiceApiObject.php +++ b/src/Model/Generated/Endpoint/InvoiceApiObject.php @@ -21,8 +21,8 @@ class InvoiceApiObject extends BunqModel /** * Endpoint constants. */ - const ENDPOINT_URL_LISTING = 'user/%s/monetary-account/%s/invoice'; const ENDPOINT_URL_READ = 'user/%s/monetary-account/%s/invoice/%s'; + const ENDPOINT_URL_LISTING = 'user/%s/monetary-account/%s/invoice'; /** * Field constants. @@ -196,53 +196,53 @@ public function __construct(string $status, string $description, string $exte } /** - * 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 int $invoiceId * @param int|null $monetaryAccountId - * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponseInvoiceApiObjectList + * @return BunqResponseInvoice */ - public static function listing(int $monetaryAccountId = null, array $params = [], array $customHeaders = []): BunqResponseInvoiceApiObjectList + public static function get(int $invoiceId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseInvoice { $apiClient = new ApiClient(static::getApiContext()); $responseRaw = $apiClient->get( vsprintf( - self::ENDPOINT_URL_LISTING, - [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)] + self::ENDPOINT_URL_READ, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $invoiceId] ), - $params, + [], $customHeaders ); - return BunqResponseInvoiceApiObjectList::castFromBunqResponse( - static::fromJsonList($responseRaw, self::OBJECT_TYPE_GET) + return BunqResponseInvoice::castFromBunqResponse( + static::fromJson($responseRaw, self::OBJECT_TYPE_GET) ); } /** - * @param int $invoiceId + * 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 int|null $monetaryAccountId + * @param string[] $params * @param string[] $customHeaders * - * @return BunqResponseInvoice + * @return BunqResponseInvoiceApiObjectList */ - public static function get(int $invoiceId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseInvoice + public static function listing(int $monetaryAccountId = null, array $params = [], array $customHeaders = []): BunqResponseInvoiceApiObjectList { $apiClient = new ApiClient(static::getApiContext()); $responseRaw = $apiClient->get( vsprintf( - self::ENDPOINT_URL_READ, - [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $invoiceId] + self::ENDPOINT_URL_LISTING, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)] ), - [], + $params, $customHeaders ); - return BunqResponseInvoice::castFromBunqResponse( - static::fromJson($responseRaw, self::OBJECT_TYPE_GET) + return BunqResponseInvoiceApiObjectList::castFromBunqResponse( + static::fromJsonList($responseRaw, self::OBJECT_TYPE_GET) ); } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountApiObject.php index a7b2740e..6fd64d40 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountApiObject.php @@ -45,10 +45,17 @@ class MonetaryAccountApiObject extends BunqModel */ protected $balance; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -282,10 +289,30 @@ public function setBalance($balance) $this->balance = $balance; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -295,7 +322,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -738,6 +765,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->monetaryAccountProfile)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountBankApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountBankApiObject.php index bea5d232..8ea99664 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountBankApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountBankApiObject.php @@ -184,7 +184,7 @@ class MonetaryAccountBankApiObject extends BunqModel /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -216,6 +216,13 @@ class MonetaryAccountBankApiObject extends BunqModel */ protected $fulfillments; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The budgets of the MonetaryAccount. * @@ -902,7 +909,7 @@ public function setUserId($userId) /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -912,7 +919,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -999,6 +1006,26 @@ public function setFulfillments($fulfillments) $this->fulfillments = $fulfillments; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The budgets of the MonetaryAccount. * @@ -1216,6 +1243,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->budget)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountCardApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountCardApiObject.php index 67c89cff..46fb3052 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountCardApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountCardApiObject.php @@ -84,13 +84,6 @@ class MonetaryAccountCardApiObject extends BunqModel */ protected $balance; - /** - * The current real balance Amount of the MonetaryAccountCard. - * - * @var AmountObject - */ - protected $balanceReal; - /** * The aliases for the MonetaryAccount. * @@ -133,10 +126,17 @@ class MonetaryAccountCardApiObject extends BunqModel */ protected $relationUser; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -463,26 +463,6 @@ public function setBalance($balance) $this->balance = $balance; } - /** - * The current real balance Amount of the MonetaryAccountCard. - * - * @return AmountObject - */ - public function getBalanceReal() - { - return $this->balanceReal; - } - - /** - * @deprecated User should not be able to set values via setters, use constructor. - * - * @param AmountObject $balanceReal - */ - public function setBalanceReal($balanceReal) - { - $this->balanceReal = $balanceReal; - } - /** * The aliases for the MonetaryAccount. * @@ -603,10 +583,30 @@ public function setRelationUser($relationUser) $this->relationUser = $relationUser; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -616,7 +616,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -901,10 +901,6 @@ public function isAllFieldNull() return false; } - if (!is_null($this->balanceReal)) { - return false; - } - if (!is_null($this->alias)) { return false; } @@ -929,6 +925,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->monetaryAccountProfile)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountExternalApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountExternalApiObject.php index 485c32de..c28163f5 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountExternalApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountExternalApiObject.php @@ -180,7 +180,7 @@ class MonetaryAccountExternalApiObject extends BunqModel /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -226,6 +226,13 @@ class MonetaryAccountExternalApiObject extends BunqModel */ protected $openBankingAccount; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The budgets of the MonetaryAccount. * @@ -897,7 +904,7 @@ public function setUserId($userId) /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -907,7 +914,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -1034,6 +1041,26 @@ public function setOpenBankingAccount($openBankingAccount) $this->openBankingAccount = $openBankingAccount; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The budgets of the MonetaryAccount. * @@ -1239,6 +1266,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->budget)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountExternalSavingsApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountExternalSavingsApiObject.php index 1ada1d5a..7918ac58 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountExternalSavingsApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountExternalSavingsApiObject.php @@ -174,7 +174,7 @@ class MonetaryAccountExternalSavingsApiObject extends BunqModel /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -227,6 +227,13 @@ class MonetaryAccountExternalSavingsApiObject extends BunqModel */ protected $numberOfPaymentRemaining; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The budgets of the MonetaryAccount. * @@ -904,7 +911,7 @@ public function setUserId($userId) /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -914,7 +921,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -1061,6 +1068,26 @@ public function setNumberOfPaymentRemaining($numberOfPaymentRemaining) $this->numberOfPaymentRemaining = $numberOfPaymentRemaining; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The budgets of the MonetaryAccount. * @@ -1286,6 +1313,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->budget)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountInvestmentApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountInvestmentApiObject.php index 11b7ce1c..1a8aa276 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountInvestmentApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountInvestmentApiObject.php @@ -160,7 +160,7 @@ class MonetaryAccountInvestmentApiObject extends BunqModel /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -199,6 +199,13 @@ class MonetaryAccountInvestmentApiObject extends BunqModel */ protected $birdeeInvestmentPortfolio; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The budgets of the MonetaryAccount. * @@ -732,7 +739,7 @@ public function setUserId($userId) /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -742,7 +749,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -849,6 +856,26 @@ public function setBirdeeInvestmentPortfolio($birdeeInvestmentPortfolio) $this->birdeeInvestmentPortfolio = $birdeeInvestmentPortfolio; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The budgets of the MonetaryAccount. * @@ -1046,6 +1073,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->budget)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountJointApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountJointApiObject.php index 23b510f2..67a5b9cc 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountJointApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountJointApiObject.php @@ -188,7 +188,7 @@ class MonetaryAccountJointApiObject extends BunqModel /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -220,6 +220,13 @@ class MonetaryAccountJointApiObject extends BunqModel */ protected $coOwnerInvite; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The budgets of the MonetaryAccount. * @@ -917,7 +924,7 @@ public function setUserId($userId) /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -927,7 +934,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -1014,6 +1021,26 @@ public function setCoOwnerInvite($coOwnerInvite) $this->coOwnerInvite = $coOwnerInvite; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The budgets of the MonetaryAccount. * @@ -1195,6 +1222,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->budget)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountLightApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountLightApiObject.php index c0dc1ce0..7638d173 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountLightApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountLightApiObject.php @@ -217,10 +217,17 @@ class MonetaryAccountLightApiObject extends BunqModel */ protected $fulfillments; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -898,10 +905,30 @@ public function setFulfillments($fulfillments) $this->fulfillments = $fulfillments; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -911,7 +938,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -1167,6 +1194,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->monetaryAccountProfile)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountSavingsApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountSavingsApiObject.php index bad7e237..47367650 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountSavingsApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountSavingsApiObject.php @@ -180,7 +180,7 @@ class MonetaryAccountSavingsApiObject extends BunqModel /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -233,6 +233,13 @@ class MonetaryAccountSavingsApiObject extends BunqModel */ protected $coOwnerInvite; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The budgets of the MonetaryAccount. * @@ -905,7 +912,7 @@ public function setUserId($userId) /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -915,7 +922,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -1062,6 +1069,26 @@ public function setCoOwnerInvite($coOwnerInvite) $this->coOwnerInvite = $coOwnerInvite; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The budgets of the MonetaryAccount. * @@ -1251,6 +1278,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->budget)) { return false; } diff --git a/src/Model/Generated/Endpoint/MonetaryAccountSwitchServiceApiObject.php b/src/Model/Generated/Endpoint/MonetaryAccountSwitchServiceApiObject.php index ae11212e..648098b9 100644 --- a/src/Model/Generated/Endpoint/MonetaryAccountSwitchServiceApiObject.php +++ b/src/Model/Generated/Endpoint/MonetaryAccountSwitchServiceApiObject.php @@ -64,10 +64,17 @@ class MonetaryAccountSwitchServiceApiObject extends BunqModel */ protected $balance; + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @var AmountObject + */ + protected $balanceConverted; + /** * The profiles of the account. * - * @var MonetaryAccountProfileApiObject + * @var MonetaryAccountProfileApiObject[] */ protected $monetaryAccountProfile; @@ -303,10 +310,30 @@ public function setBalance($balance) $this->balance = $balance; } + /** + * The current available balance amount of the MonetaryAccount, converted to the user's default currency. + * + * @return AmountObject + */ + public function getBalanceConverted() + { + return $this->balanceConverted; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balanceConverted + */ + public function setBalanceConverted($balanceConverted) + { + $this->balanceConverted = $balanceConverted; + } + /** * The profiles of the account. * - * @return MonetaryAccountProfileApiObject + * @return MonetaryAccountProfileApiObject[] */ public function getMonetaryAccountProfile() { @@ -316,7 +343,7 @@ public function getMonetaryAccountProfile() /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param MonetaryAccountProfileApiObject $monetaryAccountProfile + * @param MonetaryAccountProfileApiObject[] $monetaryAccountProfile */ public function setMonetaryAccountProfile($monetaryAccountProfile) { @@ -617,6 +644,10 @@ public function isAllFieldNull() return false; } + if (!is_null($this->balanceConverted)) { + return false; + } + if (!is_null($this->monetaryAccountProfile)) { return false; } diff --git a/src/Model/Generated/Endpoint/NoteAttachmentPaymentSuspendedApiObject.php b/src/Model/Generated/Endpoint/NoteAttachmentPaymentSuspendedApiObject.php new file mode 100644 index 00000000..0fef30c6 --- /dev/null +++ b/src/Model/Generated/Endpoint/NoteAttachmentPaymentSuspendedApiObject.php @@ -0,0 +1,384 @@ +descriptionFieldForRequest = $description; + $this->attachmentIdFieldForRequest = $attachmentId; + } + + /** + * @param int $paymentSuspendedId + * @param int $attachmentId The reference to the uploaded file to attach to this note. + * @param int|null $monetaryAccountId + * @param string|null $description Optional description of the attachment. + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function create(int $paymentSuspendedId, int $attachmentId, int $monetaryAccountId = null, string $description = null, array $customHeaders = []): BunqResponseInt + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->post( + vsprintf( + self::ENDPOINT_URL_CREATE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId] + ), + [self::FIELD_DESCRIPTION => $description, +self::FIELD_ATTACHMENT_ID => $attachmentId], + $customHeaders + ); + + return BunqResponseInt::castFromBunqResponse( + static::processForId($responseRaw) + ); + } + + /** + * @param int $paymentSuspendedId + * @param int $noteAttachmentPaymentSuspendedId + * @param int|null $monetaryAccountId + * @param string|null $description Optional description of the attachment. + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function update(int $paymentSuspendedId, int $noteAttachmentPaymentSuspendedId, int $monetaryAccountId = null, string $description = null, array $customHeaders = []): BunqResponseInt + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->put( + vsprintf( + self::ENDPOINT_URL_UPDATE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId, $noteAttachmentPaymentSuspendedId] + ), + [self::FIELD_DESCRIPTION => $description], + $customHeaders + ); + + return BunqResponseInt::castFromBunqResponse( + static::processForId($responseRaw) + ); + } + + /** + * @param string[] $customHeaders + * @param int $paymentSuspendedId + * @param int $noteAttachmentPaymentSuspendedId + * + * @return BunqResponseNull + */ + public static function delete(int $paymentSuspendedId, int $noteAttachmentPaymentSuspendedId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseNull + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->delete( + vsprintf( + self::ENDPOINT_URL_DELETE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId, $noteAttachmentPaymentSuspendedId] + ), + $customHeaders + ); + + return BunqResponseNull::castFromBunqResponse( + new BunqResponse(null, $responseRaw->getHeaders()) + ); + } + + /** + * 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 int $paymentSuspendedId + * @param int|null $monetaryAccountId + * @param string[] $params + * @param string[] $customHeaders + * + * @return BunqResponseNoteAttachmentPaymentSuspendedApiObjectList + */ + public static function listing(int $paymentSuspendedId, int $monetaryAccountId = null, array $params = [], array $customHeaders = []): BunqResponseNoteAttachmentPaymentSuspendedApiObjectList + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId] + ), + $params, + $customHeaders + ); + + return BunqResponseNoteAttachmentPaymentSuspendedApiObjectList::castFromBunqResponse( + static::fromJsonList($responseRaw, self::OBJECT_TYPE_GET) + ); + } + + /** + * @param int $paymentSuspendedId + * @param int $noteAttachmentPaymentSuspendedId + * @param int|null $monetaryAccountId + * @param string[] $customHeaders + * + * @return BunqResponseNoteAttachmentPaymentSuspended + */ + public static function get(int $paymentSuspendedId, int $noteAttachmentPaymentSuspendedId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseNoteAttachmentPaymentSuspended + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId, $noteAttachmentPaymentSuspendedId] + ), + [], + $customHeaders + ); + + return BunqResponseNoteAttachmentPaymentSuspended::castFromBunqResponse( + static::fromJson($responseRaw, self::OBJECT_TYPE_GET) + ); + } + + /** + * The id of the note. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp of the note's creation. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp of the note's last update. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The label of the user who created this note. + * + * @return LabelUserObject + */ + public function getLabelUserCreator() + { + return $this->labelUserCreator; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelUserObject $labelUserCreator + */ + public function setLabelUserCreator($labelUserCreator) + { + $this->labelUserCreator = $labelUserCreator; + } + + /** + * Optional description of the attachment. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The attachment attached to the note. + * + * @return AttachmentMonetaryAccountPaymentObject[] + */ + public function getAttachment() + { + return $this->attachment; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AttachmentMonetaryAccountPaymentObject[] $attachment + */ + public function setAttachment($attachment) + { + $this->attachment = $attachment; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->id)) { + return false; + } + + if (!is_null($this->created)) { + return false; + } + + if (!is_null($this->updated)) { + return false; + } + + if (!is_null($this->labelUserCreator)) { + return false; + } + + if (!is_null($this->description)) { + return false; + } + + if (!is_null($this->attachment)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/NoteTextPaymentSuspendedApiObject.php b/src/Model/Generated/Endpoint/NoteTextPaymentSuspendedApiObject.php new file mode 100644 index 00000000..89c8b787 --- /dev/null +++ b/src/Model/Generated/Endpoint/NoteTextPaymentSuspendedApiObject.php @@ -0,0 +1,340 @@ +contentFieldForRequest = $content; + } + + /** + * @param int $paymentSuspendedId + * @param int|null $monetaryAccountId + * @param string|null $content The content of the note. + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function create(int $paymentSuspendedId, int $monetaryAccountId = null, string $content = null, array $customHeaders = []): BunqResponseInt + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->post( + vsprintf( + self::ENDPOINT_URL_CREATE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId] + ), + [self::FIELD_CONTENT => $content], + $customHeaders + ); + + return BunqResponseInt::castFromBunqResponse( + static::processForId($responseRaw) + ); + } + + /** + * @param int $paymentSuspendedId + * @param int $noteTextPaymentSuspendedId + * @param int|null $monetaryAccountId + * @param string|null $content The content of the note. + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function update(int $paymentSuspendedId, int $noteTextPaymentSuspendedId, int $monetaryAccountId = null, string $content = null, array $customHeaders = []): BunqResponseInt + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->put( + vsprintf( + self::ENDPOINT_URL_UPDATE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId, $noteTextPaymentSuspendedId] + ), + [self::FIELD_CONTENT => $content], + $customHeaders + ); + + return BunqResponseInt::castFromBunqResponse( + static::processForId($responseRaw) + ); + } + + /** + * @param string[] $customHeaders + * @param int $paymentSuspendedId + * @param int $noteTextPaymentSuspendedId + * + * @return BunqResponseNull + */ + public static function delete(int $paymentSuspendedId, int $noteTextPaymentSuspendedId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseNull + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->delete( + vsprintf( + self::ENDPOINT_URL_DELETE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId, $noteTextPaymentSuspendedId] + ), + $customHeaders + ); + + return BunqResponseNull::castFromBunqResponse( + new BunqResponse(null, $responseRaw->getHeaders()) + ); + } + + /** + * 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 int $paymentSuspendedId + * @param int|null $monetaryAccountId + * @param string[] $params + * @param string[] $customHeaders + * + * @return BunqResponseNoteTextPaymentSuspendedApiObjectList + */ + public static function listing(int $paymentSuspendedId, int $monetaryAccountId = null, array $params = [], array $customHeaders = []): BunqResponseNoteTextPaymentSuspendedApiObjectList + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId] + ), + $params, + $customHeaders + ); + + return BunqResponseNoteTextPaymentSuspendedApiObjectList::castFromBunqResponse( + static::fromJsonList($responseRaw, self::OBJECT_TYPE_GET) + ); + } + + /** + * @param int $paymentSuspendedId + * @param int $noteTextPaymentSuspendedId + * @param int|null $monetaryAccountId + * @param string[] $customHeaders + * + * @return BunqResponseNoteTextPaymentSuspended + */ + public static function get(int $paymentSuspendedId, int $noteTextPaymentSuspendedId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseNoteTextPaymentSuspended + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentSuspendedId, $noteTextPaymentSuspendedId] + ), + [], + $customHeaders + ); + + return BunqResponseNoteTextPaymentSuspended::castFromBunqResponse( + static::fromJson($responseRaw, self::OBJECT_TYPE_GET) + ); + } + + /** + * The id of the note. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The timestamp of the note's creation. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp of the note's last update. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The label of the user who created this note. + * + * @return LabelUserObject + */ + public function getLabelUserCreator() + { + return $this->labelUserCreator; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelUserObject $labelUserCreator + */ + public function setLabelUserCreator($labelUserCreator) + { + $this->labelUserCreator = $labelUserCreator; + } + + /** + * The content of the note. + * + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $content + */ + public function setContent($content) + { + $this->content = $content; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->id)) { + return false; + } + + if (!is_null($this->created)) { + return false; + } + + if (!is_null($this->updated)) { + return false; + } + + if (!is_null($this->labelUserCreator)) { + return false; + } + + if (!is_null($this->content)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/PaymentBatchApiObject.php b/src/Model/Generated/Endpoint/PaymentBatchApiObject.php index 7b3c9cf1..07a7db4e 100644 --- a/src/Model/Generated/Endpoint/PaymentBatchApiObject.php +++ b/src/Model/Generated/Endpoint/PaymentBatchApiObject.php @@ -5,6 +5,8 @@ use bunq\Http\ApiClient; use bunq\Http\BunqResponse; use bunq\Model\Core\BunqModel; +use bunq\Model\Generated\Object\AmountObject; +use bunq\Model\Generated\Object\LabelMonetaryAccountObject; /** * Create a payment batch, or show the payment batches of a monetary account. @@ -25,12 +27,63 @@ class PaymentBatchApiObject extends BunqModel * Field constants. */ const FIELD_PAYMENTS = 'payments'; + const FIELD_EXECUTION_TYPE = 'execution_type'; + const FIELD_STATUS = 'status'; /** * Object type. */ const OBJECT_TYPE_GET = 'PaymentBatch'; + /** + * The ID of the monetary account that this payment batch belongs to. + * + * @var int + */ + protected $monetaryAccountId; + + /** + * Whether the payment batch should be executed synchronously or asynchronously. + * + * @var string + */ + protected $executionType; + + /** + * The status of the payment batch. + * + * @var string + */ + protected $status; + + /** + * The label to display for the monetary account. + * + * @var LabelMonetaryAccountObject + */ + protected $label; + + /** + * The total amount of the payment batch. + * + * @var AmountObject + */ + protected $amountTotal; + + /** + * The total amount of the successful payments in the batch. + * + * @var AmountObject + */ + protected $amountSuccessful; + + /** + * The ID of the latest event for the payment batch. + * + * @var int + */ + protected $eventId; + /** * The list of mutations that were made. * @@ -38,6 +91,13 @@ class PaymentBatchApiObject extends BunqModel */ protected $payments; + /** + * The entries that are part of this batch. + * + * @var PaymentBatchEntryApiObject[] + */ + protected $entries; + /** * The list of payments we want to send in a single batch. * @@ -45,12 +105,30 @@ class PaymentBatchApiObject extends BunqModel */ protected $paymentsFieldForRequest; + /** + * Whether the payment batch should be executed synchronously or asynchronously. + * + * @var string|null + */ + protected $executionTypeFieldForRequest; + + /** + * The status of the payment batch, used to retry failed payments. + * + * @var string|null + */ + protected $statusFieldForRequest; + /** * @param PaymentApiObject[] $payments The list of payments we want to send in a single batch. + * @param string|null $executionType Whether the payment batch should be executed synchronously or asynchronously. + * @param string|null $status The status of the payment batch, used to retry failed payments. */ - public function __construct(array $payments) + public function __construct(array $payments, string $executionType = null, string $status = null) { $this->paymentsFieldForRequest = $payments; + $this->executionTypeFieldForRequest = $executionType; + $this->statusFieldForRequest = $status; } /** @@ -58,11 +136,13 @@ public function __construct(array $payments) * * @param PaymentApiObject[] $payments The list of payments we want to send in a single batch. * @param int|null $monetaryAccountId + * @param string|null $executionType Whether the payment batch should be executed synchronously or asynchronously. + * @param string|null $status The status of the payment batch, used to retry failed payments. * @param string[] $customHeaders * * @return BunqResponseInt */ - public static function create(array $payments, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseInt + public static function create(array $payments, int $monetaryAccountId = null, string $executionType = null, string $status = null, array $customHeaders = []): BunqResponseInt { $apiClient = new ApiClient(static::getApiContext()); $responseRaw = $apiClient->post( @@ -70,7 +150,9 @@ public static function create(array $payments, int $monetaryAccountId = null, a self::ENDPOINT_URL_CREATE, [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)] ), - [self::FIELD_PAYMENTS => $payments], + [self::FIELD_PAYMENTS => $payments, +self::FIELD_EXECUTION_TYPE => $executionType, +self::FIELD_STATUS => $status], $customHeaders ); @@ -84,11 +166,12 @@ public static function create(array $payments, int $monetaryAccountId = null, a * * @param int $paymentBatchId * @param int|null $monetaryAccountId + * @param string|null $status The status of the payment batch, used to retry failed payments. * @param string[] $customHeaders * * @return BunqResponseInt */ - public static function update(int $paymentBatchId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponseInt + public static function update(int $paymentBatchId, int $monetaryAccountId = null, string $status = null, array $customHeaders = []): BunqResponseInt { $apiClient = new ApiClient(static::getApiContext()); $responseRaw = $apiClient->put( @@ -96,7 +179,7 @@ public static function update(int $paymentBatchId, int $monetaryAccountId = null self::ENDPOINT_URL_UPDATE, [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentBatchId] ), - [], + [self::FIELD_STATUS => $status], $customHeaders ); @@ -160,6 +243,146 @@ public static function listing(int $monetaryAccountId = null, array $params = [] ); } + /** + * The ID of the monetary account that this payment batch belongs to. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * Whether the payment batch should be executed synchronously or asynchronously. + * + * @return string + */ + public function getExecutionType() + { + return $this->executionType; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $executionType + */ + public function setExecutionType($executionType) + { + $this->executionType = $executionType; + } + + /** + * The status of the payment batch. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The label to display for the monetary account. + * + * @return LabelMonetaryAccountObject + */ + public function getLabel() + { + return $this->label; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $label + */ + public function setLabel($label) + { + $this->label = $label; + } + + /** + * The total amount of the payment batch. + * + * @return AmountObject + */ + public function getAmountTotal() + { + return $this->amountTotal; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amountTotal + */ + public function setAmountTotal($amountTotal) + { + $this->amountTotal = $amountTotal; + } + + /** + * The total amount of the successful payments in the batch. + * + * @return AmountObject + */ + public function getAmountSuccessful() + { + return $this->amountSuccessful; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amountSuccessful + */ + public function setAmountSuccessful($amountSuccessful) + { + $this->amountSuccessful = $amountSuccessful; + } + + /** + * The ID of the latest event for the payment batch. + * + * @return int + */ + public function getEventId() + { + return $this->eventId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $eventId + */ + public function setEventId($eventId) + { + $this->eventId = $eventId; + } + /** * The list of mutations that were made. * @@ -180,15 +403,67 @@ public function setPayments($payments) $this->payments = $payments; } + /** + * The entries that are part of this batch. + * + * @return PaymentBatchEntryApiObject[] + */ + public function getEntries() + { + return $this->entries; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentBatchEntryApiObject[] $entries + */ + public function setEntries($entries) + { + $this->entries = $entries; + } + /** * @return bool */ public function isAllFieldNull() { + if (!is_null($this->monetaryAccountId)) { + return false; + } + + if (!is_null($this->executionType)) { + return false; + } + + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->label)) { + return false; + } + + if (!is_null($this->amountTotal)) { + return false; + } + + if (!is_null($this->amountSuccessful)) { + return false; + } + + if (!is_null($this->eventId)) { + return false; + } + if (!is_null($this->payments)) { return false; } + if (!is_null($this->entries)) { + return false; + } + return true; } } diff --git a/src/Model/Generated/Endpoint/PaymentBatchEntryApiObject.php b/src/Model/Generated/Endpoint/PaymentBatchEntryApiObject.php new file mode 100644 index 00000000..c9b4ab03 --- /dev/null +++ b/src/Model/Generated/Endpoint/PaymentBatchEntryApiObject.php @@ -0,0 +1,356 @@ +statusFieldForRequest = $status; + } + + /** + * @param int $paymentBatchId + * @param int $paymentBatchEntryId + * @param int|null $monetaryAccountId + * @param string[] $customHeaders + * + * @return BunqResponsePaymentBatchEntry + */ + public static function get(int $paymentBatchId, int $paymentBatchEntryId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponsePaymentBatchEntry + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentBatchId, $paymentBatchEntryId] + ), + [], + $customHeaders + ); + + return BunqResponsePaymentBatchEntry::castFromBunqResponse( + static::fromJson($responseRaw, self::OBJECT_TYPE_GET) + ); + } + + /** + * @param int $paymentBatchId + * @param int $paymentBatchEntryId + * @param int|null $monetaryAccountId + * @param string|null $status The status of the payment batch, used to retry. + * @param string[] $customHeaders + * + * @return BunqResponseInt + */ + public static function update(int $paymentBatchId, int $paymentBatchEntryId, int $monetaryAccountId = null, string $status = null, array $customHeaders = []): BunqResponseInt + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->put( + vsprintf( + self::ENDPOINT_URL_UPDATE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentBatchId, $paymentBatchEntryId] + ), + [self::FIELD_STATUS => $status], + $customHeaders + ); + + return BunqResponseInt::castFromBunqResponse( + static::processForId($responseRaw) + ); + } + + /** + * The ID of the monetary account from which the payment was made. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * The ID of the Payment Batch Entry. + * + * @return int + */ + public function getPaymentBatchId() + { + return $this->paymentBatchId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $paymentBatchId + */ + public function setPaymentBatchId($paymentBatchId) + { + $this->paymentBatchId = $paymentBatchId; + } + + /** + * The status of the Payment. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The amount. + * + * @return AmountObject + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amount + */ + public function setAmount($amount) + { + $this->amount = $amount; + } + + /** + * The pointer to the party where the payment should be made to. + * + * @return PointerObject + */ + public function getCounterPointer() + { + return $this->counterPointer; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PointerObject $counterPointer + */ + public function setCounterPointer($counterPointer) + { + $this->counterPointer = $counterPointer; + } + + /** + * The description for the Payment. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The payment, if it was made. + * + * @return PaymentApiObject + */ + public function getPayment() + { + return $this->payment; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentApiObject $payment + */ + public function setPayment($payment) + { + $this->payment = $payment; + } + + /** + * The errors encountered while executing the payment. + * + * @return ErrorObject[] + */ + public function getErrors() + { + return $this->errors; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param ErrorObject[] $errors + */ + public function setErrors($errors) + { + $this->errors = $errors; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->monetaryAccountId)) { + return false; + } + + if (!is_null($this->paymentBatchId)) { + return false; + } + + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->amount)) { + return false; + } + + if (!is_null($this->counterPointer)) { + return false; + } + + if (!is_null($this->description)) { + return false; + } + + if (!is_null($this->payment)) { + return false; + } + + if (!is_null($this->errors)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/PaymentDelayedApiObject.php b/src/Model/Generated/Endpoint/PaymentDelayedApiObject.php new file mode 100644 index 00000000..aaebefb9 --- /dev/null +++ b/src/Model/Generated/Endpoint/PaymentDelayedApiObject.php @@ -0,0 +1,188 @@ +put( + vsprintf( + self::ENDPOINT_URL_UPDATE, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentDelayedId] + ), + [], + $customHeaders + ); + + return BunqResponseInt::castFromBunqResponse( + static::processForId($responseRaw) + ); + } + + /** + * @param int $paymentDelayedId + * @param int|null $monetaryAccountId + * @param string[] $customHeaders + * + * @return BunqResponsePaymentDelayed + */ + public static function get(int $paymentDelayedId, int $monetaryAccountId = null, array $customHeaders = []): BunqResponsePaymentDelayed + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_READ, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentDelayedId] + ), + [], + $customHeaders + ); + + return BunqResponsePaymentDelayed::castFromBunqResponse( + static::fromJson($responseRaw) + ); + } + + /** + * 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 int|null $monetaryAccountId + * @param string[] $params + * @param string[] $customHeaders + * + * @return BunqResponsePaymentDelayedApiObjectList + */ + public static function listing(int $monetaryAccountId = null, array $params = [], array $customHeaders = []): BunqResponsePaymentDelayedApiObjectList + { + $apiClient = new ApiClient(static::getApiContext()); + $responseRaw = $apiClient->get( + vsprintf( + self::ENDPOINT_URL_LISTING, + [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)] + ), + $params, + $customHeaders + ); + + return BunqResponsePaymentDelayedApiObjectList::castFromBunqResponse( + static::fromJsonList($responseRaw) + ); + } + + /** + * @return PaymentDelayedIncomingApiObject + */ + public function getPaymentDelayedIncoming() + { + return $this->paymentDelayedIncoming; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentDelayedIncomingApiObject $paymentDelayedIncoming + */ + public function setPaymentDelayedIncoming($paymentDelayedIncoming) + { + $this->paymentDelayedIncoming = $paymentDelayedIncoming; + } + + /** + * @return PaymentDelayedOutgoingApiObject + */ + public function getPaymentDelayedOutgoing() + { + return $this->paymentDelayedOutgoing; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentDelayedOutgoingApiObject $paymentDelayedOutgoing + */ + public function setPaymentDelayedOutgoing($paymentDelayedOutgoing) + { + $this->paymentDelayedOutgoing = $paymentDelayedOutgoing; + } + + /** + * @return BunqModel + * @throws BunqException + */ + public function getReferencedObject() + { + if (!is_null($this->paymentDelayedIncoming)) { + return $this->paymentDelayedIncoming; + } + + if (!is_null($this->paymentDelayedOutgoing)) { + return $this->paymentDelayedOutgoing; + } + + throw new BunqException(self::ERROR_NULL_FIELDS); + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->paymentDelayedIncoming)) { + return false; + } + + if (!is_null($this->paymentDelayedOutgoing)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/PaymentDelayedIncomingApiObject.php b/src/Model/Generated/Endpoint/PaymentDelayedIncomingApiObject.php new file mode 100644 index 00000000..f7905d8e --- /dev/null +++ b/src/Model/Generated/Endpoint/PaymentDelayedIncomingApiObject.php @@ -0,0 +1,271 @@ +status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The id of the monetary account. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * The amount of the payment. + * + * @return AmountObject + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amount + */ + public function setAmount($amount) + { + $this->amount = $amount; + } + + /** + * The LabelMonetaryAccount containing the public information of 'this' (party) side of the payment. + * + * @return LabelMonetaryAccountObject + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $alias + */ + public function setAlias($alias) + { + $this->alias = $alias; + } + + /** + * The LabelMonetaryAccount containing the public information of the other (counterparty) side of the payment. + * + * @return LabelMonetaryAccountObject + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $counterpartyAlias + */ + public function setCounterpartyAlias($counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * The description of the payment. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * Information about the expected arrival of the payment. + * + * @return PaymentArrivalExpectedObject + */ + public function getPaymentArrivalExpected() + { + return $this->paymentArrivalExpected; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentArrivalExpectedObject $paymentArrivalExpected + */ + public function setPaymentArrivalExpected($paymentArrivalExpected) + { + $this->paymentArrivalExpected = $paymentArrivalExpected; + } + + /** + * The resulting payment, only when it’s successful. + * + * @return PaymentApiObject + */ + public function getPaymentResult() + { + return $this->paymentResult; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentApiObject $paymentResult + */ + public function setPaymentResult($paymentResult) + { + $this->paymentResult = $paymentResult; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->monetaryAccountId)) { + return false; + } + + if (!is_null($this->amount)) { + return false; + } + + if (!is_null($this->alias)) { + return false; + } + + if (!is_null($this->counterpartyAlias)) { + return false; + } + + if (!is_null($this->description)) { + return false; + } + + if (!is_null($this->paymentArrivalExpected)) { + return false; + } + + if (!is_null($this->paymentResult)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/PaymentDelayedOutgoingApiObject.php b/src/Model/Generated/Endpoint/PaymentDelayedOutgoingApiObject.php new file mode 100644 index 00000000..ba972862 --- /dev/null +++ b/src/Model/Generated/Endpoint/PaymentDelayedOutgoingApiObject.php @@ -0,0 +1,416 @@ +statusFieldForRequest = $status; + } + + /** + * The status of the delayed payment. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The id of the monetary account. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * The amount of the payment. + * + * @return AmountObject + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amount + */ + public function setAmount($amount) + { + $this->amount = $amount; + } + + /** + * The pointer to which the payment should be sent. + * + * @return LabelMonetaryAccountObject + */ + public function getCounterpartyPointer() + { + return $this->counterpartyPointer; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $counterpartyPointer + */ + public function setCounterpartyPointer($counterpartyPointer) + { + $this->counterpartyPointer = $counterpartyPointer; + } + + /** + * The LabelMonetaryAccount containing the public information of 'this' (party) side of the payment. + * + * @return LabelMonetaryAccountObject + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $alias + */ + public function setAlias($alias) + { + $this->alias = $alias; + } + + /** + * The LabelMonetaryAccount containing the public information of the other (counterparty) side of the payment. + * + * @return LabelMonetaryAccountObject + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $counterpartyAlias + */ + public function setCounterpartyAlias($counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * The description of the payment. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The reason for the payment being delayed. + * + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $reason + */ + public function setReason($reason) + { + $this->reason = $reason; + } + + /** + * The time this payment should be executed. + * + * @return string + */ + public function getTimeExecution() + { + return $this->timeExecution; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $timeExecution + */ + public function setTimeExecution($timeExecution) + { + $this->timeExecution = $timeExecution; + } + + /** + * Information about the expected arrival of the payment. + * + * @return PaymentArrivalExpectedObject + */ + public function getPaymentArrivalExpected() + { + return $this->paymentArrivalExpected; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentArrivalExpectedObject $paymentArrivalExpected + */ + public function setPaymentArrivalExpected($paymentArrivalExpected) + { + $this->paymentArrivalExpected = $paymentArrivalExpected; + } + + /** + * The reason why the payment failed. + * + * @return ErrorObject[] + */ + public function getErrorMessage() + { + return $this->errorMessage; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param ErrorObject[] $errorMessage + */ + public function setErrorMessage($errorMessage) + { + $this->errorMessage = $errorMessage; + } + + /** + * The resulting payment, only when it’s successful. + * + * @return PaymentApiObject + */ + public function getPaymentResult() + { + return $this->paymentResult; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param PaymentApiObject $paymentResult + */ + public function setPaymentResult($paymentResult) + { + $this->paymentResult = $paymentResult; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->monetaryAccountId)) { + return false; + } + + if (!is_null($this->amount)) { + return false; + } + + if (!is_null($this->counterpartyPointer)) { + return false; + } + + if (!is_null($this->alias)) { + return false; + } + + if (!is_null($this->counterpartyAlias)) { + return false; + } + + if (!is_null($this->description)) { + return false; + } + + if (!is_null($this->reason)) { + return false; + } + + if (!is_null($this->timeExecution)) { + return false; + } + + if (!is_null($this->paymentArrivalExpected)) { + return false; + } + + if (!is_null($this->errorMessage)) { + return false; + } + + if (!is_null($this->paymentResult)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RegistryApiObject.php b/src/Model/Generated/Endpoint/RegistryApiObject.php new file mode 100644 index 00000000..9e6d574b --- /dev/null +++ b/src/Model/Generated/Endpoint/RegistryApiObject.php @@ -0,0 +1,897 @@ +updatedFieldForRequest = $updated; + $this->uuidFieldForRequest = $uuid; + $this->publicIdentifierTokenFieldForRequest = $publicIdentifierToken; + $this->currencyFieldForRequest = $currency; + $this->titleFieldForRequest = $title; + $this->descriptionFieldForRequest = $description; + $this->categoryFieldForRequest = $category; + $this->statusFieldForRequest = $status; + $this->lastRegistryEntrySeenIdFieldForRequest = $lastRegistryEntrySeenId; + $this->previousUpdatedTimestampFieldForRequest = $previousUpdatedTimestamp; + $this->membershipUuidActiveFieldForRequest = $membershipUuidActive; + $this->membershipsFieldForRequest = $memberships; + $this->membershipsPreviousFieldForRequest = $membershipsPrevious; + $this->deletedMembershipIdsFieldForRequest = $deletedMembershipIds; + $this->autoAddCardTransactionFieldForRequest = $autoAddCardTransaction; + $this->membershipSettingFieldForRequest = $membershipSetting; + $this->avatarUuidFieldForRequest = $avatarUuid; + $this->settingFieldForRequest = $setting; + $this->allRegistryEntryFieldForRequest = $allRegistryEntry; + $this->aliasCreatorFieldForRequest = $aliasCreator; + $this->emojiFieldForRequest = $emoji; + } + + /** + * The id of the Registry. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The uuid of the Registry. If it was provided by the client on creation, then the client can use it to match the returned + * Registry to the row stored locally. + * + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $uuid + */ + public function setUuid($uuid) + { + $this->uuid = $uuid; + } + + /** + * Public identifier token provided by the client. Will remain null if not provided in the POST call. + * + * @return string + */ + public function getPublicIdentifierToken() + { + return $this->publicIdentifierToken; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $publicIdentifierToken + */ + public function setPublicIdentifierToken($publicIdentifierToken) + { + $this->publicIdentifierToken = $publicIdentifierToken; + } + + /** + * The timestamp of the Registry's creation. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp of the Registry's last update. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The currency for the Registry as an ISO 4217 formatted currency code. + * + * @return string + */ + public function getCurrency() + { + return $this->currency; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $currency + */ + public function setCurrency($currency) + { + $this->currency = $currency; + } + + /** + * The emoji of the registry. + * + * @return string + */ + public function getEmoji() + { + return $this->emoji; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $emoji + */ + public function setEmoji($emoji) + { + $this->emoji = $emoji; + } + + /** + * The title of the Registry. + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $title + */ + public function setTitle($title) + { + $this->title = $title; + } + + /** + * A description about the Registry. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The category of the Registry. Can be one of the following values: GENERAL, TRIP, SHARED_HOUSE, COUPLE, EVENT, PROJECT, + * OTHER + * + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $category + */ + public function setCategory($category) + { + $this->category = $category; + } + + /** + * The status of the Registry. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The total amount spent in this Registry since the last settlement. + * + * @return AmountObject + */ + public function getTotalAmountSpent() + { + return $this->totalAmountSpent; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $totalAmountSpent + */ + public function setTotalAmountSpent($totalAmountSpent) + { + $this->totalAmountSpent = $totalAmountSpent; + } + + /** + * Whether the Registry has previously been settled. + * + * @return bool + */ + public function getIsPreviouslySettled() + { + return $this->isPreviouslySettled; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param bool $isPreviouslySettled + */ + public function setIsPreviouslySettled($isPreviouslySettled) + { + $this->isPreviouslySettled = $isPreviouslySettled; + } + + /** + * The UUID of the membership which is currently linked to the logged in user. + * + * @return string + */ + public function getMembershipUuidActive() + { + return $this->membershipUuidActive; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $membershipUuidActive + */ + public function setMembershipUuidActive($membershipUuidActive) + { + $this->membershipUuidActive = $membershipUuidActive; + } + + /** + * List of memberships to replace the current one. + * + * @return RegistryMembershipApiObject[] + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryMembershipApiObject[] $memberships + */ + public function setMemberships($memberships) + { + $this->memberships = $memberships; + } + + /** + * The settings for this Registry. + * + * @return RegistrySettingApiObject + */ + public function getSetting() + { + return $this->setting; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistrySettingApiObject $setting + */ + public function setSetting($setting) + { + $this->setting = $setting; + } + + /** + * The registry's avatar. + * + * @return AvatarObject + */ + public function getAvatar() + { + return $this->avatar; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AvatarObject $avatar + */ + public function setAvatar($avatar) + { + $this->avatar = $avatar; + } + + /** + * The optional ID of the last settlement of this activity. + * + * @return int + */ + public function getLastSettlementId() + { + return $this->lastSettlementId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $lastSettlementId + */ + public function setLastSettlementId($lastSettlementId) + { + $this->lastSettlementId = $lastSettlementId; + } + + /** + * The timestamp of the latest activity seen for this registry. + * + * @return string + */ + public function getLastActivityTimestamp() + { + return $this->lastActivityTimestamp; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $lastActivityTimestamp + */ + public function setLastActivityTimestamp($lastActivityTimestamp) + { + $this->lastActivityTimestamp = $lastActivityTimestamp; + } + + /** + * @return RegistryEntryApiObject[] + */ + public function getAllRegistryEntry() + { + return $this->allRegistryEntry; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryEntryApiObject[] $allRegistryEntry + */ + public function setAllRegistryEntry($allRegistryEntry) + { + $this->allRegistryEntry = $allRegistryEntry; + } + + /** + * @return RegistryGalleryAttachmentApiObject[] + */ + public function getAllRegistryGalleryAttachment() + { + return $this->allRegistryGalleryAttachment; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryGalleryAttachmentApiObject[] $allRegistryGalleryAttachment + */ + public function setAllRegistryGalleryAttachment($allRegistryGalleryAttachment) + { + $this->allRegistryGalleryAttachment = $allRegistryGalleryAttachment; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->id)) { + return false; + } + + if (!is_null($this->uuid)) { + return false; + } + + if (!is_null($this->publicIdentifierToken)) { + return false; + } + + if (!is_null($this->created)) { + return false; + } + + if (!is_null($this->updated)) { + return false; + } + + if (!is_null($this->currency)) { + return false; + } + + if (!is_null($this->emoji)) { + return false; + } + + if (!is_null($this->title)) { + return false; + } + + if (!is_null($this->description)) { + return false; + } + + if (!is_null($this->category)) { + return false; + } + + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->totalAmountSpent)) { + return false; + } + + if (!is_null($this->isPreviouslySettled)) { + return false; + } + + if (!is_null($this->membershipUuidActive)) { + return false; + } + + if (!is_null($this->memberships)) { + return false; + } + + if (!is_null($this->setting)) { + return false; + } + + if (!is_null($this->avatar)) { + return false; + } + + if (!is_null($this->lastSettlementId)) { + return false; + } + + if (!is_null($this->lastActivityTimestamp)) { + return false; + } + + if (!is_null($this->allRegistryEntry)) { + return false; + } + + if (!is_null($this->allRegistryGalleryAttachment)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RegistryEntryApiObject.php b/src/Model/Generated/Endpoint/RegistryEntryApiObject.php new file mode 100644 index 00000000..e8ca92e3 --- /dev/null +++ b/src/Model/Generated/Endpoint/RegistryEntryApiObject.php @@ -0,0 +1,931 @@ +idFieldForRequest = $id; + $this->uuidFieldForRequest = $uuid; + $this->updatedFieldForRequest = $updated; + $this->statusFieldForRequest = $status; + $this->membershipUuidOwnerFieldForRequest = $membershipUuidOwner; + $this->membershipTricountIdOwnerFieldForRequest = $membershipTricountIdOwner; + $this->aliasOwnerFieldForRequest = $aliasOwner; + $this->amountFieldForRequest = $amount; + $this->amountLocalFieldForRequest = $amountLocal; + $this->exchangeRateFieldForRequest = $exchangeRate; + $this->objectReferenceFieldForRequest = $objectReference; + $this->descriptionFieldForRequest = $description; + $this->allocationsFieldForRequest = $allocations; + $this->attachmentFieldForRequest = $attachment; + $this->categoryFieldForRequest = $category; + $this->categoryCustomFieldForRequest = $categoryCustom; + $this->dateFieldForRequest = $date; + $this->typeTransactionFieldForRequest = $typeTransaction; + $this->tricountIdFieldForRequest = $tricountId; + } + + /** + * The id of the RegistryEntry. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The uuid of the RegistryEntry. If it was provided by the client on creation, then the client can use it to match the + * returned RegistryEntry to the row stored locally. + * + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $uuid + */ + public function setUuid($uuid) + { + $this->uuid = $uuid; + } + + /** + * The timestamp of the RegistryEntry's creation. + * + * @return string + */ + public function getCreated() + { + return $this->created; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * The timestamp of the RegistryEntry's last update. + * + * @return string + */ + public function getUpdated() + { + return $this->updated; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $updated + */ + public function setUpdated($updated) + { + $this->updated = $updated; + } + + /** + * The id of the Registry. + * + * @return int + */ + public function getRegistryId() + { + return $this->registryId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $registryId + */ + public function setRegistryId($registryId) + { + $this->registryId = $registryId; + } + + /** + * The status of the RegistryEntry. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The Amount of the RegistryEntry. + * + * @return AmountObject + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amount + */ + public function setAmount($amount) + { + $this->amount = $amount; + } + + /** + * The Amount of the RegistryEntry in a local currency. + * + * @return AmountObject + */ + public function getAmountLocal() + { + return $this->amountLocal; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amountLocal + */ + public function setAmountLocal($amountLocal) + { + $this->amountLocal = $amountLocal; + } + + /** + * The exchange rate used to convert between amount and amount_local. + * + * @return string + */ + public function getExchangeRate() + { + return $this->exchangeRate; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $exchangeRate + */ + public function setExchangeRate($exchangeRate) + { + $this->exchangeRate = $exchangeRate; + } + + /** + * A description about the RegistryEntry. + * + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The RegistryEntry type. AUTO if created by Auto Slice, MANUAL for manually added entries. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $type + */ + public function setType($type) + { + $this->type = $type; + } + + /** + * The RegistryEntry transaction type. NORMAL, INCOME, or BALANCE. + * + * @return string + */ + public function getTypeTransaction() + { + return $this->typeTransaction; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $typeTransaction + */ + public function setTypeTransaction($typeTransaction) + { + $this->typeTransaction = $typeTransaction; + } + + /** + * The LabelUser with the public information of the party of this RegistryEntry. + * + * @return LabelUserObject + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelUserObject $alias + */ + public function setAlias($alias) + { + $this->alias = $alias; + } + + /** + * The LabelUser with the public information of the counter party of this RegistryEntry. + * + * @return LabelUserObject + */ + public function getCounterpartyAlias() + { + return $this->counterpartyAlias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelUserObject $counterpartyAlias + */ + public function setCounterpartyAlias($counterpartyAlias) + { + $this->counterpartyAlias = $counterpartyAlias; + } + + /** + * The LabelUser with the public information of the User that created the RegistryEntry. + * + * @return LabelUserObject + */ + public function getUserAliasCreated() + { + return $this->userAliasCreated; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelUserObject $userAliasCreated + */ + public function setUserAliasCreated($userAliasCreated) + { + $this->userAliasCreated = $userAliasCreated; + } + + /** + * The membership of the creator. + * + * @return RegistryMembershipApiObject + */ + public function getMembershipCreated() + { + return $this->membershipCreated; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryMembershipApiObject $membershipCreated + */ + public function setMembershipCreated($membershipCreated) + { + $this->membershipCreated = $membershipCreated; + } + + /** + * The membership of the owner. + * + * @return RegistryMembershipApiObject + */ + public function getMembershipOwned() + { + return $this->membershipOwned; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryMembershipApiObject $membershipOwned + */ + public function setMembershipOwned($membershipOwned) + { + $this->membershipOwned = $membershipOwned; + } + + /** + * An array of AllocationItems. + * + * @return AllocationItemObject[] + */ + public function getAllocations() + { + return $this->allocations; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AllocationItemObject[] $allocations + */ + public function setAllocations($allocations) + { + $this->allocations = $allocations; + } + + /** + * The attachments attached to the payment. + * + * @return RegistryEntryAttachmentObject[] + */ + public function getAttachment() + { + return $this->attachment; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryEntryAttachmentObject[] $attachment + */ + public function setAttachment($attachment) + { + $this->attachment = $attachment; + } + + /** + * The category of this RegistryEntry. Supported values: UNCATEGORIZED, OTHER, ACCOMODATION, ENTERTAINMENT, GROCERIES, + * HEALTHCARE, INSURANCE, RENT, RESTAURANTS, SHOPPING, TRANSPORT + * + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $category + */ + public function setCategory($category) + { + $this->category = $category; + } + + /** + * A custom user-provided category description for this RegistryEntry. Only allowed if `category` is set to "OTHER". + * + * @return string + */ + public function getCategoryCustom() + { + return $this->categoryCustom; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $categoryCustom + */ + public function setCategoryCustom($categoryCustom) + { + $this->categoryCustom = $categoryCustom; + } + + /** + * A user provided date for this RegistryEntry. Returns a full timestamp to allow apps to also use this to sort + * transactions client-side. + * + * @return string + */ + public function getDate() + { + return $this->date; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $date + */ + public function setDate($date) + { + $this->date = $date; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->id)) { + return false; + } + + if (!is_null($this->uuid)) { + return false; + } + + if (!is_null($this->created)) { + return false; + } + + if (!is_null($this->updated)) { + return false; + } + + if (!is_null($this->registryId)) { + return false; + } + + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->amount)) { + return false; + } + + if (!is_null($this->amountLocal)) { + return false; + } + + if (!is_null($this->exchangeRate)) { + return false; + } + + if (!is_null($this->description)) { + return false; + } + + if (!is_null($this->type)) { + return false; + } + + if (!is_null($this->typeTransaction)) { + return false; + } + + if (!is_null($this->alias)) { + return false; + } + + if (!is_null($this->counterpartyAlias)) { + return false; + } + + if (!is_null($this->userAliasCreated)) { + return false; + } + + if (!is_null($this->membershipCreated)) { + return false; + } + + if (!is_null($this->membershipOwned)) { + return false; + } + + if (!is_null($this->allocations)) { + return false; + } + + if (!is_null($this->attachment)) { + return false; + } + + if (!is_null($this->category)) { + return false; + } + + if (!is_null($this->categoryCustom)) { + return false; + } + + if (!is_null($this->date)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RegistryGalleryAttachmentApiObject.php b/src/Model/Generated/Endpoint/RegistryGalleryAttachmentApiObject.php new file mode 100644 index 00000000..78d76498 --- /dev/null +++ b/src/Model/Generated/Endpoint/RegistryGalleryAttachmentApiObject.php @@ -0,0 +1,114 @@ +userId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $userId + */ + public function setUserId($userId) + { + $this->userId = $userId; + } + + /** + * The attachment. + * + * @return AttachmentObject + */ + public function getAttachment() + { + return $this->attachment; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AttachmentObject $attachment + */ + public function setAttachment($attachment) + { + $this->attachment = $attachment; + } + + /** + * The membership of the owner uuid. + * + * @return string + */ + public function getMembershipUuid() + { + return $this->membershipUuid; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $membershipUuid + */ + public function setMembershipUuid($membershipUuid) + { + $this->membershipUuid = $membershipUuid; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->userId)) { + return false; + } + + if (!is_null($this->attachment)) { + return false; + } + + if (!is_null($this->membershipUuid)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RegistryImportSplitwiseCsvApiObject.php b/src/Model/Generated/Endpoint/RegistryImportSplitwiseCsvApiObject.php new file mode 100644 index 00000000..cfb8414d --- /dev/null +++ b/src/Model/Generated/Endpoint/RegistryImportSplitwiseCsvApiObject.php @@ -0,0 +1,86 @@ +post( + vsprintf( + self::ENDPOINT_URL_CREATE, + [static::determineUserId()] + ), + [], + $customHeaders + ); + + return BunqResponseRegistryImportSplitwiseCsv::castFromBunqResponse( + static::fromJson($responseRaw, self::OBJECT_TYPE_POST) + ); + } + + /** + * The registry details. + * + * @return RegistryApiObject + */ + public function getRegistry() + { + return $this->registry; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryApiObject $registry + */ + public function setRegistry($registry) + { + $this->registry = $registry; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->registry)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RegistryMembershipApiObject.php b/src/Model/Generated/Endpoint/RegistryMembershipApiObject.php new file mode 100644 index 00000000..74639cc2 --- /dev/null +++ b/src/Model/Generated/Endpoint/RegistryMembershipApiObject.php @@ -0,0 +1,473 @@ +uuidFieldForRequest = $uuid; + $this->aliasFieldForRequest = $alias; + $this->statusFieldForRequest = $status; + $this->autoAddCardTransactionFieldForRequest = $autoAddCardTransaction; + $this->settingFieldForRequest = $setting; + $this->membershipTicountIdFieldForRequest = $membershipTicountId; + } + + /** + * The UUID of the membership. + * + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $uuid + */ + public function setUuid($uuid) + { + $this->uuid = $uuid; + } + + /** + * The LabelMonetaryAccount of the user who belongs to this RegistryMembership. + * + * @return LabelMonetaryAccountObject + */ + public function getAlias() + { + return $this->alias; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelMonetaryAccountObject $alias + */ + public function setAlias($alias) + { + $this->alias = $alias; + } + + /** + * The balance of this RegistryMembership. + * + * @return AmountObject + */ + public function getBalance() + { + return $this->balance; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $balance + */ + public function setBalance($balance) + { + $this->balance = $balance; + } + + /** + * The total amount spent of this RegistryMembership. + * + * @return AmountObject + */ + public function getTotalAmountSpent() + { + return $this->totalAmountSpent; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $totalAmountSpent + */ + public function setTotalAmountSpent($totalAmountSpent) + { + $this->totalAmountSpent = $totalAmountSpent; + } + + /** + * The status of the RegistryMembership. + * + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $status + */ + public function setStatus($status) + { + $this->status = $status; + } + + /** + * The status of the settlement of the Registry. Can be PENDING or SETTLED. + * + * @return string + */ + public function getStatusSettlement() + { + return $this->statusSettlement; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $statusSettlement + */ + public function setStatusSettlement($statusSettlement) + { + $this->statusSettlement = $statusSettlement; + } + + /** + * The setting for adding automatically card transactions to the registry. (deprecated) + * + * @return string + */ + public function getAutoAddCardTransaction() + { + return $this->autoAddCardTransaction; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $autoAddCardTransaction + */ + public function setAutoAddCardTransaction($autoAddCardTransaction) + { + $this->autoAddCardTransaction = $autoAddCardTransaction; + } + + /** + * Registry membership setting. + * + * @return RegistryMembershipSettingObject + */ + public function getSetting() + { + return $this->setting; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryMembershipSettingObject $setting + */ + public function setSetting($setting) + { + $this->setting = $setting; + } + + /** + * The registry id. + * + * @return int + */ + public function getRegistryId() + { + return $this->registryId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $registryId + */ + public function setRegistryId($registryId) + { + $this->registryId = $registryId; + } + + /** + * The registry title. + * + * @return string + */ + public function getRegistryTitle() + { + return $this->registryTitle; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $registryTitle + */ + public function setRegistryTitle($registryTitle) + { + $this->registryTitle = $registryTitle; + } + + /** + * For dinner and grocery expenses. + * + * @return string + */ + public function getRegistryDescription() + { + return $this->registryDescription; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $registryDescription + */ + public function setRegistryDescription($registryDescription) + { + $this->registryDescription = $registryDescription; + } + + /** + * The label of the user that sent the invite. + * + * @return LabelUserObject + */ + public function getInvitor() + { + return $this->invitor; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelUserObject $invitor + */ + public function setInvitor($invitor) + { + $this->invitor = $invitor; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->uuid)) { + return false; + } + + if (!is_null($this->alias)) { + return false; + } + + if (!is_null($this->balance)) { + return false; + } + + if (!is_null($this->totalAmountSpent)) { + return false; + } + + if (!is_null($this->status)) { + return false; + } + + if (!is_null($this->statusSettlement)) { + return false; + } + + if (!is_null($this->autoAddCardTransaction)) { + return false; + } + + if (!is_null($this->setting)) { + return false; + } + + if (!is_null($this->registryId)) { + return false; + } + + if (!is_null($this->registryTitle)) { + return false; + } + + if (!is_null($this->registryDescription)) { + return false; + } + + if (!is_null($this->invitor)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RegistrySettingApiObject.php b/src/Model/Generated/Endpoint/RegistrySettingApiObject.php new file mode 100644 index 00000000..1e01e17e --- /dev/null +++ b/src/Model/Generated/Endpoint/RegistrySettingApiObject.php @@ -0,0 +1,163 @@ +colorFieldForRequest = $color; + $this->iconFieldForRequest = $icon; + $this->defaultAvatarStatusFieldForRequest = $defaultAvatarStatus; + $this->sddExpirationActionFieldForRequest = $sddExpirationAction; + } + + /** + * The color chosen for the Registry. + * + * @return string + */ + public function getColor() + { + return $this->color; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $color + */ + public function setColor($color) + { + $this->color = $color; + } + + /** + * The icon chosen for the Registry. + * + * @return string + */ + public function getIcon() + { + return $this->icon; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $icon + */ + public function setIcon($icon) + { + $this->icon = $icon; + } + + /** + * The status of the avatar. Can be either AVATAR_DEFAULT, AVATAR_CUSTOM, AVATAR_ICON or AVATAR_UNDETERMINED. + * + * @return string + */ + public function getDefaultAvatarStatus() + { + return $this->defaultAvatarStatus; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $defaultAvatarStatus + */ + public function setDefaultAvatarStatus($defaultAvatarStatus) + { + $this->defaultAvatarStatus = $defaultAvatarStatus; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->color)) { + return false; + } + + if (!is_null($this->icon)) { + return false; + } + + if (!is_null($this->defaultAvatarStatus)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Endpoint/RelationUserApiObject.php b/src/Model/Generated/Endpoint/RelationUserApiObject.php index 220361c7..e44294b4 100644 --- a/src/Model/Generated/Endpoint/RelationUserApiObject.php +++ b/src/Model/Generated/Endpoint/RelationUserApiObject.php @@ -54,19 +54,47 @@ class RelationUserApiObject extends BunqModel protected $status; /** - * The account status of a user + * The account status of a user. * * @var string */ protected $userStatus; /** - * The account status of a user + * The account sub-status of the user. + * + * @var string + */ + protected $userSubStatus; + + /** + * The account verification status of the user. + * + * @var string + */ + protected $userVerificationStatus; + + /** + * The account sub-status of the counter user. * * @var string */ protected $counterUserStatus; + /** + * The account sub-status of the counter user. + * + * @var string + */ + protected $counterUserSubStatus; + + /** + * The account verification status of the counter user. + * + * @var string + */ + protected $counterUserVerificationStatus; + /** * Tap to Pay settings for the company employee. * @@ -202,7 +230,7 @@ public function setStatus($status) } /** - * The account status of a user + * The account status of a user. * * @return string */ @@ -222,7 +250,47 @@ public function setUserStatus($userStatus) } /** - * The account status of a user + * The account sub-status of the user. + * + * @return string + */ + public function getUserSubStatus() + { + return $this->userSubStatus; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $userSubStatus + */ + public function setUserSubStatus($userSubStatus) + { + $this->userSubStatus = $userSubStatus; + } + + /** + * The account verification status of the user. + * + * @return string + */ + public function getUserVerificationStatus() + { + return $this->userVerificationStatus; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $userVerificationStatus + */ + public function setUserVerificationStatus($userVerificationStatus) + { + $this->userVerificationStatus = $userVerificationStatus; + } + + /** + * The account sub-status of the counter user. * * @return string */ @@ -241,6 +309,46 @@ public function setCounterUserStatus($counterUserStatus) $this->counterUserStatus = $counterUserStatus; } + /** + * The account sub-status of the counter user. + * + * @return string + */ + public function getCounterUserSubStatus() + { + return $this->counterUserSubStatus; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $counterUserSubStatus + */ + public function setCounterUserSubStatus($counterUserSubStatus) + { + $this->counterUserSubStatus = $counterUserSubStatus; + } + + /** + * The account verification status of the counter user. + * + * @return string + */ + public function getCounterUserVerificationStatus() + { + return $this->counterUserVerificationStatus; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $counterUserVerificationStatus + */ + public function setCounterUserVerificationStatus($counterUserVerificationStatus) + { + $this->counterUserVerificationStatus = $counterUserVerificationStatus; + } + /** * Tap to Pay settings for the company employee. * @@ -314,10 +422,26 @@ public function isAllFieldNull() return false; } + if (!is_null($this->userSubStatus)) { + return false; + } + + if (!is_null($this->userVerificationStatus)) { + return false; + } + if (!is_null($this->counterUserStatus)) { return false; } + if (!is_null($this->counterUserSubStatus)) { + return false; + } + + if (!is_null($this->counterUserVerificationStatus)) { + return false; + } + if (!is_null($this->companyEmployeeSettingAdyenCardTransaction)) { return false; } diff --git a/src/Model/Generated/Endpoint/SandboxUserCompanyApiObject.php b/src/Model/Generated/Endpoint/SandboxUserCompanyApiObject.php index c9be77e5..79a1cd39 100644 --- a/src/Model/Generated/Endpoint/SandboxUserCompanyApiObject.php +++ b/src/Model/Generated/Endpoint/SandboxUserCompanyApiObject.php @@ -31,11 +31,18 @@ class SandboxUserCompanyApiObject extends BunqModel protected $apiKey; /** - * The user which was created. + * The user company which was created. * - * @var UserApiObject + * @var UserCompanyApiObject */ - protected $user; + protected $userCompany; + + /** + * The director of the company which was created. + * + * @var UserPersonApiObject + */ + protected $userPerson; /** * The login code which the developer can use to log into their sandbox user. @@ -87,23 +94,43 @@ public function setApiKey($apiKey) } /** - * The user which was created. + * The user company which was created. + * + * @return UserCompanyApiObject + */ + public function getUserCompany() + { + return $this->userCompany; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param UserCompanyApiObject $userCompany + */ + public function setUserCompany($userCompany) + { + $this->userCompany = $userCompany; + } + + /** + * The director of the company which was created. * - * @return UserApiObject + * @return UserPersonApiObject */ - public function getUser() + public function getUserPerson() { - return $this->user; + return $this->userPerson; } /** * @deprecated User should not be able to set values via setters, use constructor. * - * @param UserApiObject $user + * @param UserPersonApiObject $userPerson */ - public function setUser($user) + public function setUserPerson($userPerson) { - $this->user = $user; + $this->userPerson = $userPerson; } /** @@ -135,7 +162,11 @@ public function isAllFieldNull() return false; } - if (!is_null($this->user)) { + if (!is_null($this->userCompany)) { + return false; + } + + if (!is_null($this->userPerson)) { return false; } diff --git a/src/Model/Generated/Object/.NotificationFilterEmail.php.MygNyi b/src/Model/Generated/Object/.NotificationFilterEmail.php.MygNyi deleted file mode 100644 index e69de29b..00000000 diff --git a/src/Model/Generated/Object/AllocationItemObject.php b/src/Model/Generated/Object/AllocationItemObject.php new file mode 100644 index 00000000..a2e5ca99 --- /dev/null +++ b/src/Model/Generated/Object/AllocationItemObject.php @@ -0,0 +1,248 @@ +membershipUuidFieldForRequest = $membershipUuid; + $this->membershipTricountIdFieldForRequest = $membershipTricountId; + $this->aliasFieldForRequest = $alias; + $this->typeFieldForRequest = $type; + $this->amountFieldForRequest = $amount; + $this->amountLocalFieldForRequest = $amountLocal; + $this->shareRatioFieldForRequest = $shareRatio; + } + + /** + * The type of the AllocationItem. + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $type + */ + public function setType($type) + { + $this->type = $type; + } + + /** + * The membership. + * + * @return RegistryMembershipApiObject + */ + public function getMembership() + { + return $this->membership; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param RegistryMembershipApiObject $membership + */ + public function setMembership($membership) + { + $this->membership = $membership; + } + + /** + * The Amount of the AllocationItem. + * + * @return AmountObject + */ + public function getAmount() + { + return $this->amount; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amount + */ + public function setAmount($amount) + { + $this->amount = $amount; + } + + /** + * The Amount of the AllocationItem in the local currency. + * + * @return AmountObject + */ + public function getAmountLocal() + { + return $this->amountLocal; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param AmountObject $amountLocal + */ + public function setAmountLocal($amountLocal) + { + $this->amountLocal = $amountLocal; + } + + /** + * The share ratio of the AllocationItem. + * + * @return int + */ + public function getShareRatio() + { + return $this->shareRatio; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $shareRatio + */ + public function setShareRatio($shareRatio) + { + $this->shareRatio = $shareRatio; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->type)) { + return false; + } + + if (!is_null($this->membership)) { + return false; + } + + if (!is_null($this->amount)) { + return false; + } + + if (!is_null($this->amountLocal)) { + return false; + } + + if (!is_null($this->shareRatio)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Object/RegistryEntryAttachmentObject.php b/src/Model/Generated/Object/RegistryEntryAttachmentObject.php new file mode 100644 index 00000000..ffe9a545 --- /dev/null +++ b/src/Model/Generated/Object/RegistryEntryAttachmentObject.php @@ -0,0 +1,95 @@ +idFieldForRequest = $id; + } + + /** + * The id of the attachment. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $id + */ + public function setId($id) + { + $this->id = $id; + } + + /** + * The id of the monetary account to which the attachment belongs. + * + * @return int + */ + public function getMonetaryAccountId() + { + return $this->monetaryAccountId; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param int $monetaryAccountId + */ + public function setMonetaryAccountId($monetaryAccountId) + { + $this->monetaryAccountId = $monetaryAccountId; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->id)) { + return false; + } + + if (!is_null($this->monetaryAccountId)) { + return false; + } + + return true; + } +} diff --git a/src/Model/Generated/Object/RegistryEntryReferenceObject.php b/src/Model/Generated/Object/RegistryEntryReferenceObject.php new file mode 100644 index 00000000..4a459d8b --- /dev/null +++ b/src/Model/Generated/Object/RegistryEntryReferenceObject.php @@ -0,0 +1,42 @@ +typeFieldForRequest = $type; + $this->idFieldForRequest = $id; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + return true; + } +} diff --git a/src/Model/Generated/Object/RegistryMembershipSettingObject.php b/src/Model/Generated/Object/RegistryMembershipSettingObject.php new file mode 100644 index 00000000..3484fa58 --- /dev/null +++ b/src/Model/Generated/Object/RegistryMembershipSettingObject.php @@ -0,0 +1,215 @@ +autoAddCardTransactionFieldForRequest = $autoAddCardTransaction; + $this->timeAutoAddCardTransactionStartFieldForRequest = $timeAutoAddCardTransactionStart; + $this->timeAutoAddCardTransactionEndFieldForRequest = $timeAutoAddCardTransactionEnd; + $this->cardIdsFieldForRequest = $cardIds; + } + + /** + * The setting for for adding automatically card transactions to the registry. + * + * @return string + */ + public function getAutoAddCardTransaction() + { + return $this->autoAddCardTransaction; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $autoAddCardTransaction + */ + public function setAutoAddCardTransaction($autoAddCardTransaction) + { + $this->autoAddCardTransaction = $autoAddCardTransaction; + } + + /** + * The time when auto add card gets active + * + * @return string + */ + public function getTimeAutoAddCardTransactionStart() + { + return $this->timeAutoAddCardTransactionStart; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $timeAutoAddCardTransactionStart + */ + public function setTimeAutoAddCardTransactionStart($timeAutoAddCardTransactionStart) + { + $this->timeAutoAddCardTransactionStart = $timeAutoAddCardTransactionStart; + } + + /** + * The time when auto add card gets inactive + * + * @return string + */ + public function getTimeAutoAddCardTransactionEnd() + { + return $this->timeAutoAddCardTransactionEnd; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string $timeAutoAddCardTransactionEnd + */ + public function setTimeAutoAddCardTransactionEnd($timeAutoAddCardTransactionEnd) + { + $this->timeAutoAddCardTransactionEnd = $timeAutoAddCardTransactionEnd; + } + + /** + * The ids of the cards that have been added to registry membership setting. + * + * @return string[] + */ + public function getCardIds() + { + return $this->cardIds; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param string[] $cardIds + */ + public function setCardIds($cardIds) + { + $this->cardIds = $cardIds; + } + + /** + * The cards of which payments will be automatically added to this Registry. + * + * @return LabelCardObject[] + */ + public function getCardLabels() + { + return $this->cardLabels; + } + + /** + * @deprecated User should not be able to set values via setters, use constructor. + * + * @param LabelCardObject[] $cardLabels + */ + public function setCardLabels($cardLabels) + { + $this->cardLabels = $cardLabels; + } + + /** + * @return bool + */ + public function isAllFieldNull() + { + if (!is_null($this->autoAddCardTransaction)) { + return false; + } + + if (!is_null($this->timeAutoAddCardTransactionStart)) { + return false; + } + + if (!is_null($this->timeAutoAddCardTransactionEnd)) { + return false; + } + + if (!is_null($this->cardIds)) { + return false; + } + + if (!is_null($this->cardLabels)) { + return false; + } + + return true; + } +} diff --git a/tests/Model/Generated/Endpoint/BunqMeTabEntryTest.php b/tests/Model/Generated/Endpoint/BunqMeTabEntryTest.php index ad59eb46..72cb728f 100644 --- a/tests/Model/Generated/Endpoint/BunqMeTabEntryTest.php +++ b/tests/Model/Generated/Endpoint/BunqMeTabEntryTest.php @@ -24,8 +24,8 @@ public function testBunqMeTab() { $response = BunqMeTabApiObject::create( new BunqMeTabEntryApiObject( - new AmountObject(self::PAYMENT_AMOUNT_DEFAULT, self::MONETARY_ACCOUNT_CURRENCY), - self::ENTRY_DESCRIPTION + amountInquired: new AmountObject(self::PAYMENT_AMOUNT_DEFAULT, self::MONETARY_ACCOUNT_CURRENCY), + description: self::ENTRY_DESCRIPTION ) ); diff --git a/tests/Model/Generated/Endpoint/CardDebitTest.php b/tests/Model/Generated/Endpoint/CardDebitTest.php index ac045ff7..43d6f600 100644 --- a/tests/Model/Generated/Endpoint/CardDebitTest.php +++ b/tests/Model/Generated/Endpoint/CardDebitTest.php @@ -69,18 +69,18 @@ public static function setUpBeforeClass(): void public function testOrderingDebitCard() { $cardDebit = CardDebitApiObject::create( - $this->generateCardDescription(), - static::$nameOnCard[self::INDEX_FIRST], - self::CARD_TYPE_MASTERCARD, - self::PRODUCT_TYPE_MASTERCARD_DEBIT, - $this->getUserAlias()->getName(), - $this->getUserAlias(), - [ + secondLine: $this->generateCardDescription(), + nameOnCard: static::$nameOnCard[self::INDEX_FIRST], + type: self::CARD_TYPE_MASTERCARD, + productType: self::PRODUCT_TYPE_MASTERCARD_DEBIT, + preferredNameOnCard: $this->getUserAlias()->getName(), + alias: $this->getUserAlias(), + pincodeAssignment: [ new CardPinAssignmentObject( - self::CARD_PIN_CODE_ASSIGNMENT, - self::CARD_ROUTING_TYPE, - self::CARD_PIN_CODE, - BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getId() + type: self::CARD_PIN_CODE_ASSIGNMENT, + routingType: self::CARD_ROUTING_TYPE, + pinCode: self::CARD_PIN_CODE, + monetaryAccountId: BunqContext::getUserContext()->getPrimaryMonetaryAccount()->getId() ), ], )->getValue(); diff --git a/tests/Model/Generated/Endpoint/MonetaryAccountBankTest.php b/tests/Model/Generated/Endpoint/MonetaryAccountBankTest.php index 91ea6f87..042ae5c9 100644 --- a/tests/Model/Generated/Endpoint/MonetaryAccountBankTest.php +++ b/tests/Model/Generated/Endpoint/MonetaryAccountBankTest.php @@ -36,14 +36,11 @@ public static function tearDownAfterClass(): void { if (!is_null(static::$monetaryAccountBankToCloseId)) { MonetaryAccountBankApiObject::update( - static::$monetaryAccountBankToCloseId, - null, - null, - null, - self::STATUS, - self::SUB_STATUS, - self::REASON, - self::REASON_DESCRIPTION + monetaryAccountBankId: static::$monetaryAccountBankToCloseId, + status: self::STATUS, + subStatus: self::SUB_STATUS, + reason: self::REASON, + reasonDescription: self::REASON_DESCRIPTION ); } } @@ -56,8 +53,8 @@ public static function tearDownAfterClass(): void public function testCreateNewMonetaryAccount() { static::$monetaryAccountBankToCloseId = MonetaryAccountBankApiObject::create( - self::CURRENCY, - uniqid(self::PREFIX_MONETARY_ACCOUNT_DESCRIPTION) + currency: self::CURRENCY, + description: uniqid(self::PREFIX_MONETARY_ACCOUNT_DESCRIPTION) )->getValue(); static::assertTrue(is_integer(static::$monetaryAccountBankToCloseId)); diff --git a/tests/Model/Generated/Endpoint/PaymentBatchTest.php b/tests/Model/Generated/Endpoint/PaymentBatchTest.php index 48d5c282..0cf4d49f 100644 --- a/tests/Model/Generated/Endpoint/PaymentBatchTest.php +++ b/tests/Model/Generated/Endpoint/PaymentBatchTest.php @@ -45,9 +45,9 @@ private function createPaymentArray(): array while (count($allPayment) < self::MAXIMUM_PAYMENT_ENTRIES) { $payment = new PaymentApiObject( - new AmountObject(self::PAYMENT_AMOUNT_DEFAULT, self::PAYMENT_CURRENCY), - $this->getPointerUserBravo(), - self::PAYMENT_DESCRIPTION + amount: new AmountObject(self::PAYMENT_AMOUNT_DEFAULT, self::PAYMENT_CURRENCY), + counterpartyAlias: $this->getPointerUserBravo(), + description: self::PAYMENT_DESCRIPTION ); $allPayment[] = $payment; diff --git a/tests/Model/Generated/Endpoint/PaymentTest.php b/tests/Model/Generated/Endpoint/PaymentTest.php index 7cf0748b..38628413 100644 --- a/tests/Model/Generated/Endpoint/PaymentTest.php +++ b/tests/Model/Generated/Endpoint/PaymentTest.php @@ -42,9 +42,9 @@ public function testSendMoneyToOtherUser() $this->skipTestIfNeededDueToInsufficientBalance(); $response = PaymentApiObject::create( - new AmountObject(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), - $this->getPointerUserBravo(), - self::PAYMENT_DESCRIPTION + amount: new AmountObject(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), + counterpartyAlias: $this->getPointerUserBravo(), + description: self::PAYMENT_DESCRIPTION ); static::assertNotNull($response); @@ -58,9 +58,9 @@ public function testSendMoneyToOtherMonetaryAccount(): BunqResponseInt $this->skipTestIfNeededDueToInsufficientBalance(); $paymentId = PaymentApiObject::create( - new AmountObject(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), - $this->getSecondMonetaryAccountAlias(), - self::PAYMENT_DESCRIPTION + amount: new AmountObject(self::PAYMENT_AMOUNT_IN_EUR, self::PAYMENT_CURRENCY), + counterpartyAlias: $this->getSecondMonetaryAccountAlias(), + description: self::PAYMENT_DESCRIPTION ); static::assertNotNull($paymentId); diff --git a/tests/Model/Generated/Endpoint/RequestInquiryTest.php b/tests/Model/Generated/Endpoint/RequestInquiryTest.php index 68f40c9c..4c05c992 100644 --- a/tests/Model/Generated/Endpoint/RequestInquiryTest.php +++ b/tests/Model/Generated/Endpoint/RequestInquiryTest.php @@ -56,10 +56,10 @@ public function testSendingAndAcceptingRequest() private function sendRequest() { $response = RequestInquiryApiObject::create( - new AmountObject(self::REQUEST_AMOUNT_IN_EUR, self::REQUEST_CURRENCY), - $this->getSecondMonetaryAccountAlias(), - self::REQUEST_DESCRIPTION, - false + amountInquired: new AmountObject(self::REQUEST_AMOUNT_IN_EUR, self::REQUEST_CURRENCY), + counterpartyAlias: $this->getSecondMonetaryAccountAlias(), + description: self::REQUEST_DESCRIPTION, + allowBunqme: false ); static::assertNotNull($response); @@ -71,10 +71,9 @@ private function sendRequest() private function acceptRequest(int $requestResponseId) { $response = RequestResponseApiObject::update( - $requestResponseId, - $this->getSecondMonetaryAccountId(), - null, - self::REQUEST_STATUS_ACCEPTED + requestResponseId: $requestResponseId, + monetaryAccountId: $this->getSecondMonetaryAccountId(), + status: self::REQUEST_STATUS_ACCEPTED ); static::assertNotNull($response);