File tree Expand file tree Collapse file tree
main/com/sailthru/client/params
test/com/sailthru/client/params Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public class User extends AbstractApiParams implements ApiParams {
2020 protected Map <String , Object > vars ;
2121 protected Map <String , Integer > lists ;
2222 protected String optout_email ;
23+ protected String optout_sms_status ;
2324 protected Map <String , Object > login ;
2425
2526 public User (String id ) {
@@ -64,7 +65,12 @@ public User setOptoutEmail(String optoutEmail) {
6465 this .optout_email = optoutEmail ;
6566 return this ;
6667 }
67-
68+
69+ public User setOptoutSmsStatus (String optoutSmsStatus ) {
70+ this .optout_sms_status = optoutSmsStatus ;
71+ return this ;
72+ }
73+
6874 public User setLogin (Map <String , Object > login ) {
6975 this .login = login ;
7076 return this ;
Original file line number Diff line number Diff line change @@ -110,6 +110,14 @@ public void testSetOptoutEmail() {
110110 assertEquals (expected , result );
111111 }
112112
113+ public void testSetOptoutSmsStatus () {
114+ user .setOptoutSmsStatus ("opt-in" );
115+
116+ String expected = "{\" optout_sms_status\" :\" opt-in\" }" ;
117+ String result = gson .toJson (user );
118+ assertEquals (expected , result );
119+ }
120+
113121 public void testSetLogin () {
114122 Map <String , Object > login = new HashMap <String , Object >();
115123 login .put ("ip" , "123.456.789.0" );
You can’t perform that action at this time.
0 commit comments