Skip to content

Commit

Permalink
added code field
Browse files Browse the repository at this point in the history
  • Loading branch information
Itgel G committed Jun 15, 2021
1 parent 39fe9dd commit c6227ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mutation widgetsMessengerConnect($brandCode: String!, $email: String, $phone: String, $isUser:Boolean, $data: JSON, $companyData: JSON){
widgetsMessengerConnect (brandCode: $brandCode, email: $email, phone: $phone, isUser:$isUser, data: $data, companyData: $companyData){
mutation widgetsMessengerConnect($brandCode: String!, $email: String, $phone: String, $isUser:Boolean, $data: JSON, $companyData: JSON, $code: String){
widgetsMessengerConnect (brandCode: $brandCode, email: $email, phone: $phone, isUser:$isUser, data: $data, companyData: $companyData, code: $code){
integrationId
uiOptions
languageCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class Config {
public boolean isOnline;
public String brandDescription, brandName, serverTime = "";

public String email, phone, companyData, data;
public String email, phone, companyData, data, code;

private Config(Context context) {
this.context = context;
Expand All @@ -98,6 +98,7 @@ public static Config getInstance(Context context) {
config.phone = dataManager.getDataS(DataManager.PHONE);
config.companyData = dataManager.getDataS(DataManager.COMPANYDATA);
config.data = dataManager.getDataS(DataManager.DATA);
config.code = dataManager.getDataS(DataManager.CODE);
return config;
}

Expand Down Expand Up @@ -248,7 +249,7 @@ public boolean isValidEmail(CharSequence target) {
}
}

private void Init(String brandCode, String host3100, String host3300, String hostUpload, String email, String phone, String companyData, String data) {
private void Init(String brandCode, String host3100, String host3300, String hostUpload, String email, String phone, String companyData, String data, String code) {
this.host3100 = host3100;
this.host3300 = host3300;
this.hostUpload = hostUpload;
Expand All @@ -257,6 +258,7 @@ private void Init(String brandCode, String host3100, String host3300, String hos
this.phone = phone;
this.companyData = companyData;
this.data = data;
this.code = code;
dataManager.setData("host3100", this.host3100);
dataManager.setData("host3300", this.host3300);
dataManager.setData("hostUpload", this.hostUpload);
Expand All @@ -265,6 +267,7 @@ private void Init(String brandCode, String host3100, String host3300, String hos
dataManager.setData(DataManager.PHONE, this.phone);
dataManager.setData(DataManager.COMPANYDATA, this.companyData);
dataManager.setData(DataManager.DATA, this.data);
dataManager.setData(DataManager.CODE, this.code);
if (dataManager.getDataS("host3300") != null)
intent = new Intent(context, ListenerService.class);
LoadDefaultValues();
Expand Down Expand Up @@ -413,6 +416,7 @@ public static class Builder {
private String phone;
private String companyData;
private String data;
private String code;

public Builder(@NonNull String brand) {
this.brand = brand;
Expand Down Expand Up @@ -469,6 +473,11 @@ public Builder setData(String data) {
return this;
}

public Builder setCode(String code) {
this.code = code;
return this;
}

private void setGqlApiHost() {
this.graphqlApiHost = protocal + "://" + this.apiHost + "/graphql";
}
Expand All @@ -493,7 +502,8 @@ public Config build(Context context) {
this.email,
this.phone,
this.companyData,
this.data
this.data,
this.code
);
return config;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public void run(boolean isCheckRequired, boolean isUser) {
.brandCode(config.brandCode)
.email(config.email)
.phone(config.phone)
.code(config.code)
.isUser(isUser)
.companyData(new Json(customCompanyDataMap))
.data(new Json(customDataMap))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public final class DataManager {
public static final String LANGUAGE = "rxx_language";
public static final String COMPANYDATA = "rxx_companyData";
public static final String DATA = "rxx_data";
public static final String CODE = "rxx_code";


public static DataManager getInstance(Context context) {
Expand Down

0 comments on commit c6227ba

Please sign in to comment.