public static function create(
        string $secondLine,
        string $nameOnCard,
        Pointer $alias = null,
        string $type = null,
        array $pinCodeAssignment = null,
        int $monetaryAccountIdFallback = null,
        array $customHeaders = []
    ): BunqResponseCardDebit {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId()]
            ),
            [
                self::FIELD_SECOND_LINE => $secondLine,
                self::FIELD_NAME_ON_CARD => $nameOnCard,
                self::FIELD_ALIAS => $alias,
                self::FIELD_TYPE => $type,
                self::FIELD_PIN_CODE_ASSIGNMENT => $pinCodeAssignment,
                self::FIELD_MONETARY_ACCOUNT_ID_FALLBACK => $monetaryAccountIdFallback,
            ],
            $customHeaders
        );

        return BunqResponseCardDebit::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_POST)
        );
    }
public static function create(
        string $secondLine,
        string $nameOnCard,
        Pointer $alias = null,
        string $type = null,
        array $pinCodeAssignment = null,
        int $monetaryAccountIdFallback = null,
        array $customHeaders = []
    ): BunqResponseCardDebit {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId()]
            ),
            [
                self::FIELD_SECOND_LINE => $secondLine,
                self::FIELD_NAME_ON_CARD => $nameOnCard,
                self::FIELD_ALIAS => $alias,
                self::FIELD_TYPE => $type,
                self::FIELD_PIN_CODE_ASSIGNMENT => $pinCodeAssignment,
                self::FIELD_MONETARY_ACCOUNT_ID_FALLBACK => $monetaryAccountIdFallback,
            ],
            $customHeaders
        );

        return BunqResponseCardDebit::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_POST)
        );
    }
public static function create ( string $ secondLine , string $ nameOnCard , Pointer $ alias = null , string $ type = null , array $ pinCodeAssignment = null , int $ monetaryAccountIdFallback = null , array $ customHeaders = [ ] ) : BunqResponseCardDebit { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ apiClient -> enableEncryption ( ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) ] ) , [ self :: FIELD_SECOND_LINE => $ secondLine , self :: FIELD_NAME_ON_CARD => $ nameOnCard , self :: FIELD_ALIAS => $ alias , self :: FIELD_TYPE => $ type , self :: FIELD_PIN_CODE_ASSIGNMENT => $ pinCodeAssignment , self :: FIELD_MONETARY_ACCOUNT_ID_FALLBACK => $ monetaryAccountIdFallback , ] , $ customHeaders ) ; return BunqResponseCardDebit :: castFromBunqResponse ( static :: fromJson ( $ responseRaw , self :: OBJECT_TYPE_POST ) ) ; }
Create a new debit card request.

@param string $secondLine                          The second line of text on the card, used as
name/description for it. It can contain at most 17 characters
and it can be empty.
@param string $nameOnCard                          The user's name as it will be on the card.
Check 'card-name' for the available card names for a user.
@param Pointer|null $alias                         The pointer to the monetary account that will
be connected at first with the card. Its IBAN code is also
the one that will be printed on the card itself. The pointer
must be of type IBAN.
@param string|null $type                           The type of card to order. Can be MAESTRO or
MASTERCARD.
@param CardPinAssignment[]|null $pinCodeAssignment Array of Types, PINs,
account IDs assigned to the card.
@param int|null $monetaryAccountIdFallback         ID of the MA to be used as
fallback for this card if insufficient balance. Fallback
account is removed if not supplied.
@param string[] $customHeaders

@return BunqResponseCardDebit
Create a new debit card request .