# coding: utf-8

"""
    Synctera API

    <h2>Let's build something great.</h2><p>Welcome to the official reference documentation for Synctera APIs. Our APIs are the best way to automate your company's banking needs and are designed to be easy to understand and implement.</p><p>We're continuously growing this library and what you see here is just the start, but if you need something specific or have a question, <a class='text-blue-600' href='https://synctera.com/contact' target='_blank' rel='noreferrer'>contact us</a>.</p>  # noqa: E501

    The version of the OpenAPI document: 1.41.3
    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 datetime import date
from typing import Optional
from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr

class CreditSummary(BaseModel):
    """
    A summary of the accrued interest for the credit account in the current period
    """
    amount_past_due: Optional[StrictInt] = Field(None, description="Amount past due refers to any outstanding amount unpaid by the cutoff time on the  due date for this account in ISO 4217 minor currency units (e.g. $1000.00 is 100000).  ")
    apr: Optional[StrictInt] = Field(None, description="Basis points(BPS) of annual percentage rate of the credit account")
    balance_for_interest: Optional[StrictInt] = Field(None, description="Balance on which interest is computed during the time interval covered by the statement")
    credit_limit: Optional[StrictInt] = Field(None, description="The credit limit of the credit account in ISO 4217 minor currency units, not applicable for charge accounts")
    current_balance: Optional[StrictInt] = Field(None, description="The credit account balance outstanding on the ending of the time interval covered by the statement. This field is deprecated, use `statement.closing_balance` instead.")
    disclosure: Optional[StrictStr] = Field(None, description="A suggested regulatory disclosure to display on the statement.")
    fees: Optional[StrictInt] = Field(None, description="The total fees charged on the credit account in ISO 4217 minor currency units during the time interval covered by the statement")
    fees_ytd: Optional[StrictInt] = Field(None, description="The total fees charged on the credit account in ISO 4217 minor currency units for the year to date")
    interest: Optional[StrictInt] = Field(None, description="The total interest charged on the credit account in ISO 4217 minor currency units during the time interval covered by the statement")
    interest_ytd: Optional[StrictInt] = Field(None, description="The total interest charged on the credit account in ISO 4217 minor currency units for the year to date")
    is_past_due: Optional[StrictBool] = Field(None, description="Whether or not the credit account is past due on payment.")
    last_payment_date: Optional[date] = Field(None, description="The date of the last payment received")
    minimum_payment_due: Optional[StrictInt] = Field(None, description="The minimum payment amount due by the payment due date in ISO 4217 minor currency units.")
    payment_due_date: Optional[date] = Field(None, description="The date the next payment is due")
    payments_received: Optional[StrictInt] = Field(None, description="The sum of all payments received in ISO 4217 minor currency units.")
    previous_balance: Optional[StrictInt] = Field(None, description="The previous balance of the credit account in ISO 4217 minor currency units. This field is deprecated, use `statement.opening_balance` instead.")
    __properties = ["amount_past_due", "apr", "balance_for_interest", "credit_limit", "current_balance", "disclosure", "fees", "fees_ytd", "interest", "interest_ytd", "is_past_due", "last_payment_date", "minimum_payment_due", "payment_due_date", "payments_received", "previous_balance"]

    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) -> CreditSummary:
        """Create an instance of CreditSummary 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) -> CreditSummary:
        """Create an instance of CreditSummary from a dict"""
        if obj is None:
            return None

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

        _obj = CreditSummary.parse_obj({
            "amount_past_due": obj.get("amount_past_due"),
            "apr": obj.get("apr"),
            "balance_for_interest": obj.get("balance_for_interest"),
            "credit_limit": obj.get("credit_limit"),
            "current_balance": obj.get("current_balance"),
            "disclosure": obj.get("disclosure"),
            "fees": obj.get("fees"),
            "fees_ytd": obj.get("fees_ytd"),
            "interest": obj.get("interest"),
            "interest_ytd": obj.get("interest_ytd"),
            "is_past_due": obj.get("is_past_due"),
            "last_payment_date": obj.get("last_payment_date"),
            "minimum_payment_due": obj.get("minimum_payment_due"),
            "payment_due_date": obj.get("payment_due_date"),
            "payments_received": obj.get("payments_received"),
            "previous_balance": obj.get("previous_balance")
        })
        return _obj

