# coding: utf-8

"""
    Marqeta Core API

    Simplified management of your payment programs  # noqa: E501

    The version of the OpenAPI document: 3.0.0
    Contact: dev@swadesh.co
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


from __future__ import annotations
from inspect import getfullargspec
import pprint
import re  # noqa: F401
import json


from typing import Dict, Optional, Union
from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr

class InternalTransactionDataModel(BaseModel):
    """
    InternalTransactionDataModel
    """
    pcode: Optional[StrictStr] = None
    amount: Optional[Union[StrictFloat, StrictInt]] = None
    request_amount: Optional[Union[StrictFloat, StrictInt]] = None
    additional_amount: Optional[Union[StrictFloat, StrictInt]] = None
    acquirer_fee: Optional[Union[StrictFloat, StrictInt]] = None
    refid: Optional[StrictInt] = None
    ref_itc: Optional[StrictStr] = None
    account2_id: Optional[StrictInt] = None
    country: Optional[StrictStr] = None
    currency: Optional[StrictStr] = None
    settlement_currency: Optional[StrictStr] = None
    payment_channel: Optional[StrictStr] = None
    itc: Optional[StrictStr] = None
    processing_code: Optional[StrictStr] = None
    is_track_data_present: Optional[StrictBool] = None
    is_cvv2_present: Optional[StrictBool] = None
    is_cavv_data_present: Optional[StrictBool] = None
    cavv_result_code: Optional[StrictStr] = None
    is_icc_present: Optional[StrictBool] = None
    is_pin_present: Optional[StrictBool] = None
    pan_entry_mode: Optional[StrictStr] = None
    is_cardholder_present: Optional[StrictBool] = None
    is_card_present: Optional[StrictBool] = None
    mcc: Optional[StrictStr] = None
    mid: Optional[StrictStr] = None
    attributes: Optional[Dict[str, StrictStr]] = None
    __properties = ["pcode", "amount", "request_amount", "additional_amount", "acquirer_fee", "refid", "ref_itc", "account2_id", "country", "currency", "settlement_currency", "payment_channel", "itc", "processing_code", "is_track_data_present", "is_cvv2_present", "is_cavv_data_present", "cavv_result_code", "is_icc_present", "is_pin_present", "pan_entry_mode", "is_cardholder_present", "is_card_present", "mcc", "mid", "attributes"]

    class Config:
        allow_population_by_field_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> InternalTransactionDataModel:
        """Create an instance of InternalTransactionDataModel from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> InternalTransactionDataModel:
        """Create an instance of InternalTransactionDataModel from a dict"""
        if obj is None:
            return None

        if type(obj) is not dict:
            return InternalTransactionDataModel.parse_obj(obj)

        _obj = InternalTransactionDataModel.parse_obj({
            "pcode": obj.get("pcode"),
            "amount": obj.get("amount"),
            "request_amount": obj.get("request_amount"),
            "additional_amount": obj.get("additional_amount"),
            "acquirer_fee": obj.get("acquirer_fee"),
            "refid": obj.get("refid"),
            "ref_itc": obj.get("ref_itc"),
            "account2_id": obj.get("account2_id"),
            "country": obj.get("country"),
            "currency": obj.get("currency"),
            "settlement_currency": obj.get("settlement_currency"),
            "payment_channel": obj.get("payment_channel"),
            "itc": obj.get("itc"),
            "processing_code": obj.get("processing_code"),
            "is_track_data_present": obj.get("is_track_data_present"),
            "is_cvv2_present": obj.get("is_cvv2_present"),
            "is_cavv_data_present": obj.get("is_cavv_data_present"),
            "cavv_result_code": obj.get("cavv_result_code"),
            "is_icc_present": obj.get("is_icc_present"),
            "is_pin_present": obj.get("is_pin_present"),
            "pan_entry_mode": obj.get("pan_entry_mode"),
            "is_cardholder_present": obj.get("is_cardholder_present"),
            "is_card_present": obj.get("is_card_present"),
            "mcc": obj.get("mcc"),
            "mid": obj.get("mid"),
            "attributes": obj.get("attributes")
        })
        return _obj

