/// <summary> /// Sets the <see cref="StringValue"/> to a new value (in SKM Platform). /// </summary> /// <param name="token">The access token. Read more at https://serialkeymanager.com/docs/api/v3/Auth </param> /// <param name="value">The new int value</param> /// <param name="licenseKey">The license key we should associate with this data object.</param> /// <remarks>Note: for more details, please see /// <a href="https://serialkeymanager.com/docs/api/v3/SetStringValue">https://serialkeymanager.com/docs/api/v3/SetStringValue</a> <br/> /// </remarks> /// <returns>Returns true if successful or false otherwise.</returns> public bool SetStringValue(string token, string value, LicenseKey licenseKey) { var parameters = new ChangeStringValueToKeyModel { ProductId = licenseKey.ProductId, Key = licenseKey.Key, Id = Id, StringValue = value }; var result = Data.SetStringValue(token, parameters); if (result != null && result.Result == ResultType.Success) { StringValue = value; return(true); } return(false); }
/// <summary> /// This method will set the string value to a new one. /// </summary> /// <param name="token">The access token. Read more at https://app.cryptolens.io/docs/api/v3/Auth </param> /// <param name="parameters">The parameters that the method needs</param> /// <remarks>Note: for more details, please see /// <a href="https://app.cryptolens.io/docs/api/v3/SetStringValue">https://app.cryptolens.io/docs/api/v3/SetStringValue</a> <br/> /// </remarks> /// <returns>Returns <see cref="ListOfDataObjectsResult"/> or null.</returns> public static BasicResult SetStringValue(string token, ChangeStringValueToKeyModel parameters) { return(HelperMethods.SendRequestToWebAPI3 <BasicResult>(parameters, "/data/setstringvaluetokey/", token)); }