public static function update(
        int $draftPaymentId,
        int $monetaryAccountId = null,
        string $status = null,
        array $entries = null,
        string $previousUpdatedTimestamp = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->put(
            vsprintf(
                self::ENDPOINT_URL_UPDATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $draftPaymentId]
            ),
            [
                self::FIELD_STATUS => $status,
                self::FIELD_ENTRIES => $entries,
                self::FIELD_PREVIOUS_UPDATED_TIMESTAMP => $previousUpdatedTimestamp,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function update(
        int $draftPaymentId,
        int $monetaryAccountId = null,
        string $status = null,
        array $entries = null,
        string $previousUpdatedTimestamp = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->put(
            vsprintf(
                self::ENDPOINT_URL_UPDATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $draftPaymentId]
            ),
            [
                self::FIELD_STATUS => $status,
                self::FIELD_ENTRIES => $entries,
                self::FIELD_PREVIOUS_UPDATED_TIMESTAMP => $previousUpdatedTimestamp,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function update ( int $ draftPaymentId , int $ monetaryAccountId = null , string $ status = null , array $ entries = null , string $ previousUpdatedTimestamp = null , array $ customHeaders = [ ] ) : BunqResponseInt { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ responseRaw = $ apiClient -> put ( vsprintf ( self :: ENDPOINT_URL_UPDATE , [ static :: determineUserId ( ) , static :: determineMonetaryAccountId ( $ monetaryAccountId ) , $ draftPaymentId ] ) , [ self :: FIELD_STATUS => $ status , self :: FIELD_ENTRIES => $ entries , self :: FIELD_PREVIOUS_UPDATED_TIMESTAMP => $ previousUpdatedTimestamp , ] , $ customHeaders ) ; return BunqResponseInt :: castFromBunqResponse ( static :: processForId ( $ responseRaw ) ) ; }
Update a DraftPayment.

@param int $draftPaymentId
@param int|null $monetaryAccountId
@param string|null $status                   The status of the DraftPayment.
@param DraftPaymentEntry[]|null $entries     The list of entries in the
DraftPayment. Each entry will result in a payment when the
DraftPayment is accepted.
@param string|null $previousUpdatedTimestamp The last updated_timestamp
that you received for this DraftPayment. This needs to be provided
to prevent race conditions.
@param string[] $customHeaders

@return BunqResponseInt
Update a DraftPayment .