def create(cls, entries, number_of_required_accepts,
               monetary_account_id=None, status=None,
               previous_updated_timestamp=None, custom_headers=None):
        """
        Create a new DraftPayment.

        :type user_id: int
        :type monetary_account_id: int
        :param entries: The list of entries in the DraftPayment. Each entry will
        result in a payment when the DraftPayment is accepted.
        :type entries: list[object_.DraftPaymentEntry]
        :param number_of_required_accepts: The number of accepts that are
        required for the draft payment to receive status ACCEPTED. Currently
        only 1 is valid.
        :type number_of_required_accepts: int
        :param status: The status of the DraftPayment.
        :type status: str
        :param previous_updated_timestamp: The last updated_timestamp that you
        received for this DraftPayment. This needs to be provided to prevent
        race conditions.
        :type previous_updated_timestamp: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseInt
        """

        if custom_headers is None:
            custom_headers = {}

        request_map = {
            cls.FIELD_STATUS: status,
            cls.FIELD_ENTRIES: entries,
            cls.FIELD_PREVIOUS_UPDATED_TIMESTAMP: previous_updated_timestamp,
            cls.FIELD_NUMBER_OF_REQUIRED_ACCEPTS: number_of_required_accepts
        }
        request_map_string = converter.class_to_json(request_map)
        request_map_string = cls._remove_field_for_request(request_map_string)

        api_client = client.ApiClient(cls._get_api_context())
        request_bytes = request_map_string.encode()
        endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(),
                                                       cls._determine_monetary_account_id(
                                                           monetary_account_id))
        response_raw = api_client.post(endpoint_url, request_bytes,
                                       custom_headers)

        return BunqResponseInt.cast_from_bunq_response(
            cls._process_for_id(response_raw)
        )
def create ( cls , entries , number_of_required_accepts , monetary_account_id = None , status = None , previous_updated_timestamp = None , custom_headers = None ) : if custom_headers is None : custom_headers = { } request_map = { cls . FIELD_STATUS : status , cls . FIELD_ENTRIES : entries , cls . FIELD_PREVIOUS_UPDATED_TIMESTAMP : previous_updated_timestamp , cls . FIELD_NUMBER_OF_REQUIRED_ACCEPTS : number_of_required_accepts } request_map_string = converter . class_to_json ( request_map ) request_map_string = cls . _remove_field_for_request ( request_map_string ) api_client = client . ApiClient ( cls . _get_api_context ( ) ) request_bytes = request_map_string . encode ( ) endpoint_url = cls . _ENDPOINT_URL_CREATE . format ( cls . _determine_user_id ( ) , cls . _determine_monetary_account_id ( monetary_account_id ) ) response_raw = api_client . post ( endpoint_url , request_bytes , custom_headers ) return BunqResponseInt . cast_from_bunq_response ( cls . _process_for_id ( response_raw ) )
Create a new DraftPayment.

        :type user_id: int
        :type monetary_account_id: int
        :param entries: The list of entries in the DraftPayment. Each entry will
        result in a payment when the DraftPayment is accepted.
        :type entries: list[object_.DraftPaymentEntry]
        :param number_of_required_accepts: The number of accepts that are
        required for the draft payment to receive status ACCEPTED. Currently
        only 1 is valid.
        :type number_of_required_accepts: int
        :param status: The status of the DraftPayment.
        :type status: str
        :param previous_updated_timestamp: The last updated_timestamp that you
        received for this DraftPayment. This needs to be provided to prevent
        race conditions.
        :type previous_updated_timestamp: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseInt