def sign_in(username, password, api_key, platform)
      session.username = username
      session.password = password
      session.api_key = api_key
      session.platform = platform

      result = session.sign_in

      @client_account_summary = instantiate_models ClientAccountSummary, result
    end
def sign_in(username, password, api_key, platform)
      session.username = username
      session.password = password
      session.api_key = api_key
      session.platform = platform

      result = session.sign_in

      @client_account_summary = instantiate_models ClientAccountSummary, result
    end
Signs in to the IG Markets Dealing Platform, either the live platform or the demo platform.

 @param [String] username The IG Markets username.
 @param [String] password The IG Markets password.
 @param [String] api_key The IG Markets API key.
 @param [:live, :demo] platform The platform to use.

 @return [ClientAccountSummary] The client account summary returned by the sign in request. This result can also
                                be accessed later using {#client_account_summary}.