Skip to content

Commit

Permalink
Update modelVersion=3 in Activate
Browse files Browse the repository at this point in the history
  • Loading branch information
artemlos committed Oct 12, 2020
1 parent aeb1204 commit c4fec3f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/cryptolens/methods/Key.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static LicenseKey Activate (String token, String RSAPubKey, ActivateModel
extraParams.put("Sign", "true");
extraParams.put("SignMethod", "1");
extraParams.put("token", token);
//extraParams.put("ModelVersion", "3");
extraParams.put("ModelVersion", "3");

ActivateResult result = HelperMethods.SendRequestToWebAPI("key/activate", model, extraParams, ActivateResult.class, error);

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/io/cryptolens/models/ActivatedMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ public class ActivatedMachine {

/**
* The machine code.
* More info: https://app.cryptolens.io/docs/api/v3/model/ActivationData?modelVersion=3
*/
public String Mid;
public String IP;
public long Time;

public String FriendlyName;
public long FloatingExpires;
}
1 change: 1 addition & 0 deletions src/main/java/io/cryptolens/models/LicenseKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class LicenseKey {
public int MaxNoOfMachines;
// private int AllowedMachines;
public List<DataObject> DataObjects;
public Reseller Reseller;
public long SignDate;

/**
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/io/cryptolens/models/Reseller.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.cryptolens.models;

public class Reseller {

public int Id;
public int InviteId;
public int ResellerUserId;
public long Created;

public String Name;
public String Url;
public String Email;
public String Phone;
public String Description;

}
1 change: 1 addition & 0 deletions src/test/java/io/cryptolens/KeyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public void testApp() throws Exception {
}

//Key.Deactivate("", new DeactivateModel(3349, "ICVLD-VVSZR-ZTICT-YKGXL", Helpers.GetMachineCode()));
System.out.println(Helpers.GetMachineCode());

assertTrue( true );

Expand Down

0 comments on commit c4fec3f

Please sign in to comment.