def __init__(
            self,
            api_token: str,
            update: bool=False,
            sandbox: bool=False
            ) -> None:
        """Call to initialise a StarlingAccount object."""
        self._api_token = api_token
        self._sandbox = sandbox
        self._auth_headers = {
            "Authorization": "Bearer {0}".format(self._api_token),
            "Content-Type": "application/json"
        }
        self._set_basic_account_data()

        # Account Data
        self.account_identifier = None
        self.bank_identifier = None
        self.iban = None
        self.bic = None

        # Balance Data
        self.cleared_balance = None
        self.effective_balance = None
        self.pending_transactions = None
        self.available_to_spend = None
        self.accepted_overdraft = None

        # Savings Goals Data
        self.savings_goals = {}  # type: Dict[str, SavingsGoal]

        if update:
            self.update_account_data()
            self.update_balance_data()
            self.update_savings_goal_data()
def __init__ ( self , api_token : str , update : bool = False , sandbox : bool = False ) -> None : self . _api_token = api_token self . _sandbox = sandbox self . _auth_headers = { "Authorization" : "Bearer {0}" . format ( self . _api_token ) , "Content-Type" : "application/json" } self . _set_basic_account_data ( ) self . account_identifier = None self . bank_identifier = None self . iban = None self . bic = None self . cleared_balance = None self . effective_balance = None self . pending_transactions = None self . available_to_spend = None self . accepted_overdraft = None self . savings_goals = { } if update : self . update_account_data ( ) self . update_balance_data ( ) self . update_savings_goal_data ( )
Call to initialise a StarlingAccount object.