# -*- coding: utf-8 -*-

"""
shelldatareportingapis

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from shelldatareportingapis.api_helper import APIHelper


class PaymentsSinceLastSOA(object):

    """Implementation of the 'PaymentsSinceLastSOA' model.

    List of payments made by the customer after the latest Statement of
    Account.
    Note: All the payments made by the customer will be returned when there is
    no Statement of Account available for customer.

    Attributes:
        account_id (int): Account Identifier for which payment is made.  
            Example: 12345
        account_number (str): Account number for which payment is made.  
            Example: GB000000123
        account_short_name (str): Account Short Name Example: GB Earth
            Movers-SN
        summary_document_id (int): Summary billing document reference id.
            Example: 2
        summary_document_number (str): Summary billing document reference
            number.
        summary_document_date (str): Summary billing document date.   Format:
            YYYYMMDD
        summary_document_payment_due_date (str): Payment due date of the
            Summary billing document.   Format: YYYYMMDD
        summary_document_total_value (float): Total value in the Summary
            billing document.
        summary_document_total_vat (float): Total VAT in the Summary billing
            document.
        summary_document_dd_amount (float): Total DD amount in the Summary
            billing document.
        payment_date (str): Date of payment. Format: YYYYMMDD
        payment_reference (str): Reference text of the payment.
        payment_currency_code (str): ISO code of payment currency.   Example:
            EUR
        payment_currency_symbol (str): Symbol of payment currency.   Example: €
        amount_paid (float): Amount paid.
        balance (float): Balance amount to be settled for the Summary document.
        true_payment (str): True Payment.
        prepaid_balance (float): Balance in the pre-paid amount.
        local_currency_code (str): Currency ISO code of the local country. It
            is derived based on CountryCode from microservice configuration.
            This field is expected to have different value than the previously
            mentioned field CurrencyCode, only in the case of serviced OUs.
            Example: EUR
        local_currency_symbol (str): Currency Symbol of the local country. It
            is derived based on CountryCode from microservice configuration.
            This field is expected to have different value than the previously
            mentioned field CurrencySymbol, only in the case of serviced OUs.
            Example: €
        local_currency_exchange_rate (str): Exchange rate from Payment
            currency to local currency.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "account_id": 'AccountId',
        "account_number": 'AccountNumber',
        "account_short_name": 'AccountShortName',
        "summary_document_id": 'SummaryDocumentId',
        "summary_document_number": 'SummaryDocumentNumber',
        "summary_document_date": 'SummaryDocumentDate',
        "summary_document_payment_due_date": 'SummaryDocumentPaymentDueDate',
        "summary_document_total_value": 'SummaryDocumentTotalValue',
        "summary_document_total_vat": 'SummaryDocumentTotalVAT',
        "summary_document_dd_amount": 'SummaryDocumentDDAmount',
        "payment_date": 'PaymentDate',
        "payment_reference": 'PaymentReference',
        "payment_currency_code": 'PaymentCurrencyCode',
        "payment_currency_symbol": 'PaymentCurrencySymbol',
        "amount_paid": 'AmountPaid',
        "balance": 'Balance',
        "true_payment": 'TruePayment',
        "prepaid_balance": 'PrepaidBalance',
        "local_currency_code": 'LocalCurrencyCode',
        "local_currency_symbol": 'LocalCurrencySymbol',
        "local_currency_exchange_rate": 'LocalCurrencyExchangeRate'
    }

    _optionals = [
        'account_id',
        'account_number',
        'account_short_name',
        'summary_document_id',
        'summary_document_number',
        'summary_document_date',
        'summary_document_payment_due_date',
        'summary_document_total_value',
        'summary_document_total_vat',
        'summary_document_dd_amount',
        'payment_date',
        'payment_reference',
        'payment_currency_code',
        'payment_currency_symbol',
        'amount_paid',
        'balance',
        'true_payment',
        'prepaid_balance',
        'local_currency_code',
        'local_currency_symbol',
        'local_currency_exchange_rate',
    ]

    _nullables = [
        'account_id',
        'account_number',
        'account_short_name',
        'summary_document_id',
        'summary_document_number',
        'summary_document_date',
        'summary_document_payment_due_date',
        'summary_document_total_value',
        'summary_document_total_vat',
        'summary_document_dd_amount',
        'payment_date',
        'payment_reference',
        'payment_currency_code',
        'payment_currency_symbol',
        'amount_paid',
        'balance',
        'true_payment',
        'prepaid_balance',
        'local_currency_code',
        'local_currency_symbol',
        'local_currency_exchange_rate',
    ]

    def __init__(self,
                 account_id=APIHelper.SKIP,
                 account_number=APIHelper.SKIP,
                 account_short_name=APIHelper.SKIP,
                 summary_document_id=APIHelper.SKIP,
                 summary_document_number=APIHelper.SKIP,
                 summary_document_date=APIHelper.SKIP,
                 summary_document_payment_due_date=APIHelper.SKIP,
                 summary_document_total_value=APIHelper.SKIP,
                 summary_document_total_vat=APIHelper.SKIP,
                 summary_document_dd_amount=APIHelper.SKIP,
                 payment_date=APIHelper.SKIP,
                 payment_reference=APIHelper.SKIP,
                 payment_currency_code=APIHelper.SKIP,
                 payment_currency_symbol=APIHelper.SKIP,
                 amount_paid=APIHelper.SKIP,
                 balance=APIHelper.SKIP,
                 true_payment=APIHelper.SKIP,
                 prepaid_balance=APIHelper.SKIP,
                 local_currency_code=APIHelper.SKIP,
                 local_currency_symbol=APIHelper.SKIP,
                 local_currency_exchange_rate=APIHelper.SKIP):
        """Constructor for the PaymentsSinceLastSOA class"""

        # Initialize members of the class
        if account_id is not APIHelper.SKIP:
            self.account_id = account_id 
        if account_number is not APIHelper.SKIP:
            self.account_number = account_number 
        if account_short_name is not APIHelper.SKIP:
            self.account_short_name = account_short_name 
        if summary_document_id is not APIHelper.SKIP:
            self.summary_document_id = summary_document_id 
        if summary_document_number is not APIHelper.SKIP:
            self.summary_document_number = summary_document_number 
        if summary_document_date is not APIHelper.SKIP:
            self.summary_document_date = summary_document_date 
        if summary_document_payment_due_date is not APIHelper.SKIP:
            self.summary_document_payment_due_date = summary_document_payment_due_date 
        if summary_document_total_value is not APIHelper.SKIP:
            self.summary_document_total_value = summary_document_total_value 
        if summary_document_total_vat is not APIHelper.SKIP:
            self.summary_document_total_vat = summary_document_total_vat 
        if summary_document_dd_amount is not APIHelper.SKIP:
            self.summary_document_dd_amount = summary_document_dd_amount 
        if payment_date is not APIHelper.SKIP:
            self.payment_date = payment_date 
        if payment_reference is not APIHelper.SKIP:
            self.payment_reference = payment_reference 
        if payment_currency_code is not APIHelper.SKIP:
            self.payment_currency_code = payment_currency_code 
        if payment_currency_symbol is not APIHelper.SKIP:
            self.payment_currency_symbol = payment_currency_symbol 
        if amount_paid is not APIHelper.SKIP:
            self.amount_paid = amount_paid 
        if balance is not APIHelper.SKIP:
            self.balance = balance 
        if true_payment is not APIHelper.SKIP:
            self.true_payment = true_payment 
        if prepaid_balance is not APIHelper.SKIP:
            self.prepaid_balance = prepaid_balance 
        if local_currency_code is not APIHelper.SKIP:
            self.local_currency_code = local_currency_code 
        if local_currency_symbol is not APIHelper.SKIP:
            self.local_currency_symbol = local_currency_symbol 
        if local_currency_exchange_rate is not APIHelper.SKIP:
            self.local_currency_exchange_rate = local_currency_exchange_rate 

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """

        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        account_id = dictionary.get("AccountId") if "AccountId" in dictionary.keys() else APIHelper.SKIP
        account_number = dictionary.get("AccountNumber") if "AccountNumber" in dictionary.keys() else APIHelper.SKIP
        account_short_name = dictionary.get("AccountShortName") if "AccountShortName" in dictionary.keys() else APIHelper.SKIP
        summary_document_id = dictionary.get("SummaryDocumentId") if "SummaryDocumentId" in dictionary.keys() else APIHelper.SKIP
        summary_document_number = dictionary.get("SummaryDocumentNumber") if "SummaryDocumentNumber" in dictionary.keys() else APIHelper.SKIP
        summary_document_date = dictionary.get("SummaryDocumentDate") if "SummaryDocumentDate" in dictionary.keys() else APIHelper.SKIP
        summary_document_payment_due_date = dictionary.get("SummaryDocumentPaymentDueDate") if "SummaryDocumentPaymentDueDate" in dictionary.keys() else APIHelper.SKIP
        summary_document_total_value = dictionary.get("SummaryDocumentTotalValue") if "SummaryDocumentTotalValue" in dictionary.keys() else APIHelper.SKIP
        summary_document_total_vat = dictionary.get("SummaryDocumentTotalVAT") if "SummaryDocumentTotalVAT" in dictionary.keys() else APIHelper.SKIP
        summary_document_dd_amount = dictionary.get("SummaryDocumentDDAmount") if "SummaryDocumentDDAmount" in dictionary.keys() else APIHelper.SKIP
        payment_date = dictionary.get("PaymentDate") if "PaymentDate" in dictionary.keys() else APIHelper.SKIP
        payment_reference = dictionary.get("PaymentReference") if "PaymentReference" in dictionary.keys() else APIHelper.SKIP
        payment_currency_code = dictionary.get("PaymentCurrencyCode") if "PaymentCurrencyCode" in dictionary.keys() else APIHelper.SKIP
        payment_currency_symbol = dictionary.get("PaymentCurrencySymbol") if "PaymentCurrencySymbol" in dictionary.keys() else APIHelper.SKIP
        amount_paid = dictionary.get("AmountPaid") if "AmountPaid" in dictionary.keys() else APIHelper.SKIP
        balance = dictionary.get("Balance") if "Balance" in dictionary.keys() else APIHelper.SKIP
        true_payment = dictionary.get("TruePayment") if "TruePayment" in dictionary.keys() else APIHelper.SKIP
        prepaid_balance = dictionary.get("PrepaidBalance") if "PrepaidBalance" in dictionary.keys() else APIHelper.SKIP
        local_currency_code = dictionary.get("LocalCurrencyCode") if "LocalCurrencyCode" in dictionary.keys() else APIHelper.SKIP
        local_currency_symbol = dictionary.get("LocalCurrencySymbol") if "LocalCurrencySymbol" in dictionary.keys() else APIHelper.SKIP
        local_currency_exchange_rate = dictionary.get("LocalCurrencyExchangeRate") if "LocalCurrencyExchangeRate" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(account_id,
                   account_number,
                   account_short_name,
                   summary_document_id,
                   summary_document_number,
                   summary_document_date,
                   summary_document_payment_due_date,
                   summary_document_total_value,
                   summary_document_total_vat,
                   summary_document_dd_amount,
                   payment_date,
                   payment_reference,
                   payment_currency_code,
                   payment_currency_symbol,
                   amount_paid,
                   balance,
                   true_payment,
                   prepaid_balance,
                   local_currency_code,
                   local_currency_symbol,
                   local_currency_exchange_rate)
