-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetTokenZoozCommand.cls
38 lines (34 loc) · 1.19 KB
/
GetTokenZoozCommand.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
public class GetTokenZoozCommand implements IZoozCommand{
public GetTokenCommandWrapper TokenInfo{get; private set;}
public GetTokenZoozCommand() {
TokenInfo = new GetTokenCommandWrapper();
}
public String buildCommandBody(){
return JSON.serializePretty(TokenInfo);
}
public GetTokenZoozCommand setCustomerLoginID(String customerLoginID){
this.TokenInfo.customerDetails.customerLoginID = customerLoginID;
return this;
}
public GetTokenZoozCommand setCustomerLoginName(String customerLoginName){
this.TokenInfo.customerDetails.customerLoginName = customerLoginName;
return this;
}
public GetTokenZoozCommand setCustomerDetailsConfig(GetTokenCommandWrapper config){
if(config != null )
this.TokenInfo = config;
return this;
}
public class GetTokenCommandWrapper{
public String command {get; private set;}
public String tokenType{get; private set;}
public ZoozRegisterDetailsWrapper registerDetails{get;set;}
public ZoozCustomerDetailsWrapper customerDetails{get;set;}
public GetTokenCommandWrapper(){
command = 'getToken';
tokenType = 'customerToken';
registerDetails = new ZoozRegisterDetailsWrapper();
customerDetails = new ZoozCustomerDetailsWrapper();
}
}
}