public static function create(
        Pointer $counterUserAlias,
        ShareDetail $shareDetail,
        string $status,
        int $monetaryAccountId = null,
        int $draftShareInviteBankId = null,
        string $shareType = null,
        string $startDate = null,
        string $endDate = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)]
            ),
            [
                self::FIELD_COUNTER_USER_ALIAS => $counterUserAlias,
                self::FIELD_DRAFT_SHARE_INVITE_BANK_ID => $draftShareInviteBankId,
                self::FIELD_SHARE_DETAIL => $shareDetail,
                self::FIELD_STATUS => $status,
                self::FIELD_SHARE_TYPE => $shareType,
                self::FIELD_START_DATE => $startDate,
                self::FIELD_END_DATE => $endDate,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create(
        Pointer $counterUserAlias,
        ShareDetail $shareDetail,
        string $status,
        int $monetaryAccountId = null,
        int $draftShareInviteBankId = null,
        string $shareType = null,
        string $startDate = null,
        string $endDate = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId)]
            ),
            [
                self::FIELD_COUNTER_USER_ALIAS => $counterUserAlias,
                self::FIELD_DRAFT_SHARE_INVITE_BANK_ID => $draftShareInviteBankId,
                self::FIELD_SHARE_DETAIL => $shareDetail,
                self::FIELD_STATUS => $status,
                self::FIELD_SHARE_TYPE => $shareType,
                self::FIELD_START_DATE => $startDate,
                self::FIELD_END_DATE => $endDate,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create ( Pointer $ counterUserAlias , ShareDetail $ shareDetail , string $ status , int $ monetaryAccountId = null , int $ draftShareInviteBankId = null , string $ shareType = null , string $ startDate = null , string $ endDate = null , array $ customHeaders = [ ] ) : BunqResponseInt { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) , static :: determineMonetaryAccountId ( $ monetaryAccountId ) ] ) , [ self :: FIELD_COUNTER_USER_ALIAS => $ counterUserAlias , self :: FIELD_DRAFT_SHARE_INVITE_BANK_ID => $ draftShareInviteBankId , self :: FIELD_SHARE_DETAIL => $ shareDetail , self :: FIELD_STATUS => $ status , self :: FIELD_SHARE_TYPE => $ shareType , self :: FIELD_START_DATE => $ startDate , self :: FIELD_END_DATE => $ endDate , ] , $ customHeaders ) ; return BunqResponseInt :: castFromBunqResponse ( static :: processForId ( $ responseRaw ) ) ; }
Create a new share inquiry for a monetary account, specifying the
permission the other bunq user will have on it.

@param Pointer $counterUserAlias        The pointer of the user to share with.
@param ShareDetail $shareDetail         The share details. Only one of these
objects may be passed.
@param string $status                   The status of the share. Can be PENDING, REVOKED
(the user deletes the share inquiry before it's accepted), ACCEPTED,
CANCELLED (the user deletes an active share) or CANCELLATION_PENDING,
CANCELLATION_ACCEPTED, CANCELLATION_REJECTED (for canceling mutual
connects).
@param int|null $monetaryAccountId
@param int|null $draftShareInviteBankId The id of the draft share invite
bank.
@param string|null $shareType           The share type, either STANDARD or MUTUAL.
@param string|null $startDate           The start date of this share.
@param string|null $endDate             The expiration date of this share.
@param string[] $customHeaders

@return BunqResponseInt
Create a new share inquiry for a monetary account specifying the permission the other bunq user will have on it .