public static function create(
        int $cashRegisterId,
        string $description,
        string $status,
        Amount $amountTotal,
        int $monetaryAccountId = null,
        string $merchantReference = null,
        bool $allowAmountHigher = null,
        bool $allowAmountLower = null,
        bool $wantTip = null,
        int $minimumAge = null,
        string $requireAddress = null,
        string $redirectUrl = null,
        TabVisibility $visibility = null,
        string $expiration = null,
        array $tabAttachment = null,
        array $customHeaders = []
    ): BunqResponseString {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $cashRegisterId]
            ),
            [
                self::FIELD_MERCHANT_REFERENCE => $merchantReference,
                self::FIELD_DESCRIPTION => $description,
                self::FIELD_STATUS => $status,
                self::FIELD_AMOUNT_TOTAL => $amountTotal,
                self::FIELD_ALLOW_AMOUNT_HIGHER => $allowAmountHigher,
                self::FIELD_ALLOW_AMOUNT_LOWER => $allowAmountLower,
                self::FIELD_WANT_TIP => $wantTip,
                self::FIELD_MINIMUM_AGE => $minimumAge,
                self::FIELD_REQUIRE_ADDRESS => $requireAddress,
                self::FIELD_REDIRECT_URL => $redirectUrl,
                self::FIELD_VISIBILITY => $visibility,
                self::FIELD_EXPIRATION => $expiration,
                self::FIELD_TAB_ATTACHMENT => $tabAttachment,
            ],
            $customHeaders
        );

        return BunqResponseString::castFromBunqResponse(
            static::processForUuid($responseRaw)
        );
    }
public static function create(
        int $cashRegisterId,
        string $description,
        string $status,
        Amount $amountTotal,
        int $monetaryAccountId = null,
        string $merchantReference = null,
        bool $allowAmountHigher = null,
        bool $allowAmountLower = null,
        bool $wantTip = null,
        int $minimumAge = null,
        string $requireAddress = null,
        string $redirectUrl = null,
        TabVisibility $visibility = null,
        string $expiration = null,
        array $tabAttachment = null,
        array $customHeaders = []
    ): BunqResponseString {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $cashRegisterId]
            ),
            [
                self::FIELD_MERCHANT_REFERENCE => $merchantReference,
                self::FIELD_DESCRIPTION => $description,
                self::FIELD_STATUS => $status,
                self::FIELD_AMOUNT_TOTAL => $amountTotal,
                self::FIELD_ALLOW_AMOUNT_HIGHER => $allowAmountHigher,
                self::FIELD_ALLOW_AMOUNT_LOWER => $allowAmountLower,
                self::FIELD_WANT_TIP => $wantTip,
                self::FIELD_MINIMUM_AGE => $minimumAge,
                self::FIELD_REQUIRE_ADDRESS => $requireAddress,
                self::FIELD_REDIRECT_URL => $redirectUrl,
                self::FIELD_VISIBILITY => $visibility,
                self::FIELD_EXPIRATION => $expiration,
                self::FIELD_TAB_ATTACHMENT => $tabAttachment,
            ],
            $customHeaders
        );

        return BunqResponseString::castFromBunqResponse(
            static::processForUuid($responseRaw)
        );
    }
public static function create ( int $ cashRegisterId , string $ description , string $ status , Amount $ amountTotal , int $ monetaryAccountId = null , string $ merchantReference = null , bool $ allowAmountHigher = null , bool $ allowAmountLower = null , bool $ wantTip = null , int $ minimumAge = null , string $ requireAddress = null , string $ redirectUrl = null , TabVisibility $ visibility = null , string $ expiration = null , array $ tabAttachment = null , array $ customHeaders = [ ] ) : BunqResponseString { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) , static :: determineMonetaryAccountId ( $ monetaryAccountId ) , $ cashRegisterId ] ) , [ self :: FIELD_MERCHANT_REFERENCE => $ merchantReference , self :: FIELD_DESCRIPTION => $ description , self :: FIELD_STATUS => $ status , self :: FIELD_AMOUNT_TOTAL => $ amountTotal , self :: FIELD_ALLOW_AMOUNT_HIGHER => $ allowAmountHigher , self :: FIELD_ALLOW_AMOUNT_LOWER => $ allowAmountLower , self :: FIELD_WANT_TIP => $ wantTip , self :: FIELD_MINIMUM_AGE => $ minimumAge , self :: FIELD_REQUIRE_ADDRESS => $ requireAddress , self :: FIELD_REDIRECT_URL => $ redirectUrl , self :: FIELD_VISIBILITY => $ visibility , self :: FIELD_EXPIRATION => $ expiration , self :: FIELD_TAB_ATTACHMENT => $ tabAttachment , ] , $ customHeaders ) ; return BunqResponseString :: castFromBunqResponse ( static :: processForUuid ( $ responseRaw ) ) ; }
Create a TabUsageSingle. The initial status must be OPEN

@param int $cashRegisterId
@param string $description            The description of the Tab. Maximum 9000
characters. Field is required but can be an empty string.
@param string $status                 The status of the Tab. On creation the status must
be set to OPEN. You can change the status from OPEN to
WAITING_FOR_PAYMENT.
@param Amount $amountTotal            The total amount of the Tab. Must be a
positive amount. As long as the tab has the status OPEN you can change
the total amount. This amount is not affected by the amounts of the
TabItems. However, if you've created any TabItems for a Tab the sum of
the amounts of these items must be equal to the total_amount of the Tab
when you change its status to WAITING_FOR_PAYMENT.
@param int|null $monetaryAccountId
@param string|null $merchantReference The reference of the Tab, as
defined by the owner. This reference will be set for any payment that is
generated by this tab. Must be unique among all the owner's tabs for the
used monetary account.
@param bool|null $allowAmountHigher   [DEPRECATED] Whether or not a higher
amount can be paid.
@param bool|null $allowAmountLower    [DEPRECATED] Whether or not a lower
amount can be paid.
@param bool|null $wantTip             [DEPRECATED] Whether or not the user paying the
Tab should be asked if he wants to give a tip. When want_tip is set to
true, allow_amount_higher must also be set to true and allow_amount_lower
must be false.
@param int|null $minimumAge           The minimum age of the user paying the Tab.
@param string|null $requireAddress    Whether a billing and shipping address
must be provided when paying the Tab. Possible values are: BILLING,
SHIPPING, BILLING_SHIPPING, NONE, OPTIONAL. Default is NONE.
@param string|null $redirectUrl       The URL which the user is sent to after
paying the Tab.
@param TabVisibility|null $visibility The visibility of a Tab. A Tab can
be visible trough NearPay, the QR code of the CashRegister and its own QR
code.
@param string|null $expiration        The moment when this Tab expires. Can be
at most 1 hour into the future.
@param BunqId[]|null $tabAttachment   An array of attachments that describe
the tab. Uploaded through the POST /user/{userid}/attachment-tab
endpoint.
@param string[] $customHeaders

@return BunqResponseString
Create a TabUsageSingle . The initial status must be OPEN