from typing import Optional

from httpmessageprocessorutil.automapped import auto_map


@auto_map({"system_api_key": {"name": "X-Api-Key", "location": "header", "type": str},
           "pos_id": {"name": "posId", "type": str},
           "payment_id": {"name": "paymentId", "type": int},
           "amount": {"name": "amount", "type": float},
           "is_register_payment": {"name": "isRegisterPayment", "type": Optional[bool]},
           "id_auth": {"name": "idAuth", "type": Optional[str]},
           "media": {"name": "media", "type": Optional[str]},
           "original_nfce_brand": {"name": "originalNfceBrand", "type": Optional[str]},
           "nfce_brand": {"name": "nfceBrand", "type": Optional[str]},
           "receipt_merchant": {"name": "receiptMerchant", "type": Optional[str]},
           "receipt_customer": {"name": "receiptCustomer", "type": Optional[str]},
           "transaction_processor": {"name": "transactionProcessor", "type": Optional[str]},
           "cnpj_auth": {"name": "cnpjAuth", "type": Optional[str]},
           "brand": {"name": "bandeira", "type": Optional[str]},
           "auth_Code": {"name": "authCode", "type": Optional[str]},
           "transaction_identifier": {"name": "transactionIdentifier", "type": Optional[str]},
           "card_number": {"name": "cardNumber", "type": Optional[str]},
           "accreditor_sat": {"name": "accreditorSat", "type": Optional[str]},
           "nsu_host": {"name": "nsuHost", "type": Optional[str]}})
class OrderInsertPaymentRequest(object):
    def __init__(
        self,
        system_api_key,                 # type: str
        pos_id,                         # type: str
        payment_id,                     # type: int
        amount,                         # type: float
        is_register_payment=False,      # type: Optional[bool]
        id_auth=None,                   # type: Optional[str]
        media=None,                     # type: Optional[str]
        original_nfce_brand=None,       # type: Optional[str]
        nfce_brand=None,                # type: Optional[str]
        receipt_merchant=None,          # type: Optional[str]
        receipt_customer=None,          # type: Optional[str]
        transaction_processor=None,     # type: Optional[str]
        cnpj_auth=None,                 # type: Optional[str]
        brand=None,                     # type: Optional[str]
        auth_code=None,                 # type: Optional[str]
        transaction_identifier=None,    # type: Optional[str]
        card_number=None,               # type: Optional[str]
        accreditor_sat=None,            # type: Optional[str]
        nsu_host=None,                  # type: Optional[str]
    ):
        # type: (...) -> None

        self.system_api_key = system_api_key
        self.pos_id = pos_id
        self.payment_id = payment_id
        self.electronic_type_id = payment_id
        self.amount = amount
        self.is_register_payment = is_register_payment
        self.id_auth = id_auth
        self.media = media
        self.original_nfce_brand =original_nfce_brand
        self.nfce_brand = nfce_brand
        self.receipt_merchant = receipt_merchant
        self.receipt_customer = receipt_customer
        self.transaction_processor = transaction_processor
        self.cnpj_auth = cnpj_auth
        self.brand = brand
        self.auth_code = auth_code
        self.transaction_identifier = transaction_identifier
        self.card_number = card_number
        self.accreditor_sat = accreditor_sat
        self.nsu_host = nsu_host
