@@ -20,6 +20,10 @@ public SmsFactory(Client client, Proxy proxy) {
2020 super (client , proxy );
2121 }
2222
23+ /**
24+ * @deprecated use {@link #actionSend(String, String)} or {@link #actionSend(String[], String)} instead
25+ */
26+ @ Deprecated
2327 public SMSSend actionSend () {
2428 SMSSend action = new SMSSend ();
2529 action .client (client );
@@ -28,18 +32,23 @@ public SMSSend actionSend() {
2832 }
2933
3034 public SMSSend actionSend (String to , String text ) {
31- String [] tos = new String []{to };
32- return actionSend (tos , text );
35+ SMSSend action = new SMSSend (to , text );
36+ action .client (client );
37+ action .proxy (proxy );
38+ return action ;
3339 }
3440
3541 public SMSSend actionSend (String [] to , String text ) {
36- SMSSend action = actionSend ();
37- action .setTo (to );
38- action .setText (text );
39-
42+ SMSSend action = new SMSSend (to , text );
43+ action .client (client );
44+ action .proxy (proxy );
4045 return action ;
4146 }
4247
48+ /**
49+ * @deprecated use {@link #actionGet(String)} instead
50+ */
51+ @ Deprecated
4352 public SMSGet actionGet () {
4453 SMSGet action = new SMSGet ();
4554 action .client (client );
@@ -48,11 +57,16 @@ public SMSGet actionGet() {
4857 }
4958
5059 public SMSGet actionGet (String id ) {
51- SMSGet action = actionGet ();
52- action .id (id );
60+ SMSGet action = new SMSGet (id );
61+ action .client (client );
62+ action .proxy (proxy );
5363 return action ;
5464 }
5565
66+ /**
67+ * @deprecated use {@link #actionDelete(String)} instead
68+ */
69+ @ Deprecated
5670 public SMSDelete actionDelete () {
5771 SMSDelete action = new SMSDelete ();
5872 action .client (client );
@@ -61,8 +75,9 @@ public SMSDelete actionDelete() {
6175 }
6276
6377 public SMSDelete actionDelete (String id ) {
64- SMSDelete action = actionDelete ();
65- action .id (id );
78+ SMSDelete action = new SMSDelete (id );
79+ action .client (client );
80+ action .proxy (proxy );
6681 return action ;
6782 }
6883}
0 commit comments