toJsonString method

String toJsonString()

Converts the current Oauth2Scopes to a jsonString

Implementation

String toJsonString() {
  switch (this) {
    case Oauth2Scopes.openid:
      return "openid";
    case Oauth2Scopes.email:
      return "email";
    case Oauth2Scopes.profile:
      return "profile";
    case Oauth2Scopes.address:
      return "address";
    case Oauth2Scopes.phone:
      return "phone";
    case Oauth2Scopes.accounting:
      return "com.intuit.quickbooks.accounting";
    case Oauth2Scopes.payment:
      return "com.intuit.quickbooks.payment";

    default:
      throw UnimplementedError(
          "The toScopeString() method is not defined for the value $this");
  }
}