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

"""
shelldatareportingapis

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


class BankAccount(object):

    """Implementation of the 'BankAccount' model.

    TODO: type model description here.

    Attributes:
        account_number (str): Account Number
        bank_name (str): Bank Name
        account_name (str): Account Name
        date_effective (str): Bank Account effective date for the payer
        date_terminated (str): Bank Account terminated date. Default is null
        iban (str): Bank Account IBAN for Payer
        currency_code (str): Bank Account currency ISO code.
        currency_symbol (str): Bank Account currency Symbol.
        country_iso_code (str): Bank Account Country ISO Code
        country (str): Bank Account Country Name 1-Austria 2-Belgium
            3-Bulgaria 4-Croatia 5-Czech Republic
        sort_code (str): Payer bank Sort Code
        swift_code (str): Payer Bank Swift Code
        bank_type (str): Bank Type Id and Description

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "account_number": 'AccountNumber',
        "bank_name": 'BankName',
        "account_name": 'AccountName',
        "date_effective": 'DateEffective',
        "date_terminated": 'DateTerminated',
        "iban": 'IBAN',
        "currency_code": 'CurrencyCode',
        "currency_symbol": 'CurrencySymbol',
        "country_iso_code": 'CountryISOCode',
        "country": 'Country',
        "sort_code": 'SortCode',
        "swift_code": 'SwiftCode',
        "bank_type": 'BankType'
    }

    _optionals = [
        'account_number',
        'bank_name',
        'account_name',
        'date_effective',
        'date_terminated',
        'iban',
        'currency_code',
        'currency_symbol',
        'country_iso_code',
        'country',
        'sort_code',
        'swift_code',
        'bank_type',
    ]

    _nullables = [
        'account_number',
        'bank_name',
        'account_name',
        'date_effective',
        'date_terminated',
        'iban',
        'currency_code',
        'currency_symbol',
        'country_iso_code',
        'country',
        'sort_code',
        'swift_code',
        'bank_type',
    ]

    def __init__(self,
                 account_number=APIHelper.SKIP,
                 bank_name=APIHelper.SKIP,
                 account_name=APIHelper.SKIP,
                 date_effective=APIHelper.SKIP,
                 date_terminated=APIHelper.SKIP,
                 iban=APIHelper.SKIP,
                 currency_code=APIHelper.SKIP,
                 currency_symbol=APIHelper.SKIP,
                 country_iso_code=APIHelper.SKIP,
                 country=APIHelper.SKIP,
                 sort_code=APIHelper.SKIP,
                 swift_code=APIHelper.SKIP,
                 bank_type=APIHelper.SKIP):
        """Constructor for the BankAccount class"""

        # Initialize members of the class
        if account_number is not APIHelper.SKIP:
            self.account_number = account_number 
        if bank_name is not APIHelper.SKIP:
            self.bank_name = bank_name 
        if account_name is not APIHelper.SKIP:
            self.account_name = account_name 
        if date_effective is not APIHelper.SKIP:
            self.date_effective = date_effective 
        if date_terminated is not APIHelper.SKIP:
            self.date_terminated = date_terminated 
        if iban is not APIHelper.SKIP:
            self.iban = iban 
        if currency_code is not APIHelper.SKIP:
            self.currency_code = currency_code 
        if currency_symbol is not APIHelper.SKIP:
            self.currency_symbol = currency_symbol 
        if country_iso_code is not APIHelper.SKIP:
            self.country_iso_code = country_iso_code 
        if country is not APIHelper.SKIP:
            self.country = country 
        if sort_code is not APIHelper.SKIP:
            self.sort_code = sort_code 
        if swift_code is not APIHelper.SKIP:
            self.swift_code = swift_code 
        if bank_type is not APIHelper.SKIP:
            self.bank_type = bank_type 

    @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_number = dictionary.get("AccountNumber") if "AccountNumber" in dictionary.keys() else APIHelper.SKIP
        bank_name = dictionary.get("BankName") if "BankName" in dictionary.keys() else APIHelper.SKIP
        account_name = dictionary.get("AccountName") if "AccountName" in dictionary.keys() else APIHelper.SKIP
        date_effective = dictionary.get("DateEffective") if "DateEffective" in dictionary.keys() else APIHelper.SKIP
        date_terminated = dictionary.get("DateTerminated") if "DateTerminated" in dictionary.keys() else APIHelper.SKIP
        iban = dictionary.get("IBAN") if "IBAN" in dictionary.keys() else APIHelper.SKIP
        currency_code = dictionary.get("CurrencyCode") if "CurrencyCode" in dictionary.keys() else APIHelper.SKIP
        currency_symbol = dictionary.get("CurrencySymbol") if "CurrencySymbol" in dictionary.keys() else APIHelper.SKIP
        country_iso_code = dictionary.get("CountryISOCode") if "CountryISOCode" in dictionary.keys() else APIHelper.SKIP
        country = dictionary.get("Country") if "Country" in dictionary.keys() else APIHelper.SKIP
        sort_code = dictionary.get("SortCode") if "SortCode" in dictionary.keys() else APIHelper.SKIP
        swift_code = dictionary.get("SwiftCode") if "SwiftCode" in dictionary.keys() else APIHelper.SKIP
        bank_type = dictionary.get("BankType") if "BankType" in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(account_number,
                   bank_name,
                   account_name,
                   date_effective,
                   date_terminated,
                   iban,
                   currency_code,
                   currency_symbol,
                   country_iso_code,
                   country,
                   sort_code,
                   swift_code,
                   bank_type)
