Skip to content

Commit 11d1714

Browse files
authored
Merge pull request #55 from Manmohan-TechM/July_2015
July 2015
2 parents f0cd5b0 + 4666559 commit 11d1714

4 files changed

Lines changed: 278 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
## [0.6.0](http://central.maven.org/maven2/com/telesign/telesign/0.6.0/) - 2016-10-20
2+
- 2016-10-19
3+
- Added tts_message, sms_message, push_message to smartVerify Api. Also updated Test cases.
4+
- 2016-10-18
5+
- Added text to speech (TTS) feature of Voice Verify to the Java SDK.
6+
- Updated version to 0.6.0
7+
- 2016-06-30
8+
- Merge pull request #54 from Manmohan-TechM/July_2015
9+
- 2016-06-24
10+
- Merge pull request #53 from erikkai/patch-2
11+
Formatting, link fix
12+
- 2016-06-22
13+
- Renaming resource variable(Code cleanup)
14+
- TMR-141/142 : Changes done for handling changes in AuthMethod enumeration value, used when signing the Authentication header.
15+
16+
- 2016-06-21
17+
- Formatting, link fix
18+
One of the links broke, and it wasn't displaying correctly. This version corrects all of that. Also a problem with how it was showing a block of code.
19+
- 2016-06-17
20+
- Merge pull request #52 from erikkai/patch-1
21+
22+
- 2016-06-17
23+
- Broken link, style changes, added punctuation
24+
Changes were that simple - needed to correct summarized items listed in title.
25+
- 2016-06-14
26+
- Merge pull request #51 from erikkai/patch-1
27+
28+
- 2016-06-14
29+
- Update readme.rst
30+
31+
- 2016-01-17
32+
- Merge branch 'Manmohan-TechM-July_2015'
33+
34+
- 2016-01-15
35+
- Changes done for throwing underlying IOException for better visibility of underlying subclasses in all APIs.
36+
37+
## [0.5.0](http://central.maven.org/maven2/com/telesign/telesign/0.5.0/) - 2016-01-15
38+
- Merge pull request #32 from Manmohan-TechM/July_2015
39+
Updated version to 0.5.0
40+
- 2016-01-14
41+
- Updated version to 0.5.0 - Changes done to configure Https protocol via constructor parameters, performed code cleanup to remove redundant code.
42+
43+
- 2016-01-05
44+
- Merge pull request #26 from gibffe/base_url_refactor
45+
Removing string literals from method bodies
46+
- 2015-12-24
47+
- Capitalising constants.
48+
49+
- 2015-12-16
50+
- Renaming resource variables.
51+
52+
- 2015-12-16
53+
- Merge branch 'master' of https://github.com/TeleSign/java_telesign into base_url_refactor
54+
55+
- 2015-12-16
56+
- Capturing baseUrl and resources suffixes in static variables.
57+
58+
- 2015-12-16
59+
- Capturing baseUrl and resource suffixes in static variables.
60+
61+
## [0.4.0](http://central.maven.org/maven2/com/telesign/telesign/0.4.0/) - 2015-12-03
62+
- Merge pull request #24 from Manmohan-TechM/July_2015
63+
Comitting changes for Verify Push, Verify Softtoken, Verify Registration, TLS.
64+
- 2015-12-03
65+
- updated version to 0.4.0
66+
67+
- 2015-12-03
68+
- Updated for formatting issues.
69+
70+
- 2015-12-02
71+
- Added verify status overloaded method.
72+
73+
- 2015-12-01
74+
- For addressing TMR-90
75+
76+
- 2015-12-01
77+
- added overloaded method to make in sync with previous versions
78+
79+
- 2015-12-01
80+
- Added overloaded method for call.
81+
82+
- 2015-11-12
83+
- Updated exception messages
84+
85+
- 2015-11-12
86+
- Merge branch 'master' into July_2015
87+
Conflicts:
88+
src/com/telesign/verify/response/VerifyResponse.java
89+
90+
- 2015-11-12
91+
- changes done for: - SmartVerify, Verify push, Verify softtoken, Verify Registration - set default TLS version to 1.2
92+
93+
- 2015-11-04
94+
- Merge pull request #22 from gibffe/build_with_debug
95+
Adding debug info to the jar. Generating sources jar during build.
96+
- 2015-11-03
97+
- Adding debug info to the jar. Generating sources jar during build.
98+
99+
- 2015-11-02
100+
- Merge pull request #20 from gibffe/shared_gson_instance
101+
Shared Gson instance
102+
- 2015-11-02
103+
- Preventing gson instance from being serialized. Adding verbose junit error output.
104+
105+
- 2015-10-13
106+
- Merge branch 'shared_gson_instance' of https://github.com/gibffe/java_telesign into shared_gson_instance
107+
108+
- 2015-10-13
109+
- Gson instance is thread safe - removing reduntand instantiations.
110+
111+
- 2015-10-13
112+
- Gson instance is thread safe - removing reduntant instantiations.
113+
114+
- 2015-10-01
115+
- Committing changes for Verify registration, smart Verify API's
116+
117+
## [0.3.0](http://central.maven.org/maven2/com/telesign/telesign/0.3.0/) - 2015-08-20
118+
- Adding carrier info to PhoneID Live and Contact responses.
119+
120+
## [0.2.0](http://central.maven.org/maven2/com/telesign/telesign/0.2.0/) - 2015-08-19
121+
- Merge branch 'Manmohan-TechM-July_2015'
122+
123+
- 2015-08-19
124+
- Merge branch 'July_2015' of git://github.com/Manmohan-TechM/java_telesign into Manmohan-TechM-July_2015
125+
126+
- 2015-08-19
127+
- Updated comments to PhoneId
128+
129+
- 2015-08-19
130+
- Changes done as part of TMR-61 -PhoneID Score response - LZU-535-31903
131+
132+
- 2015-08-17
133+
- Merge pull request #16 from Manmohan-TechM/July_2015
134+
Removed special characters as it was giving errors while running Junit test
135+
- 2015-08-17
136+
- Removed special characters as it was giving errors while running Junit test.
137+
138+
- 2015-08-13
139+
- Merge pull request #15 from Manmohan-TechM/July_2015
140+
Adding pom.xml used while migrating to Maven central
141+
- 2015-08-13
142+
- Merge pull request #14 from daplay/master
143+
use Locale.US for date header
144+
- 2015-08-03
145+
- Added Originating_ip & Session_id to PhoneId & Verify calls. Changes done as part of PD-14562.
146+
147+
## [0.1.0](http://central.maven.org/maven2/com/telesign/telesign/0.1.0/) - 2015-07-30
148+
- Updated pom.xml
149+
150+
- 2015-07-17
151+
- fixes date header locale
152+
153+
- 2015-07-29
154+
- adding pom.xml used while migrating to Maven central
155+
156+
- 2015-07-20
157+
- Merge pull request #13 from Manmohan-TechM/July_2015
158+
Adding connect and read timeouts as configurable parameters.
159+
- 2015-07-16
160+
- Removed redundant 'url.openConnection() & additional timeouts'
161+
162+
- 2015-07-03
163+
- Added carrier information to PhoneId Standard response. Change done as part of PD-16299.
164+
165+
- 2015-07-01
166+
- Adding connect and read timeouts as configurable parameters.
167+
168+
- 2014-09-24
169+
- Merge pull request #12 from dominicpezzuto/master
170+
Specify UTF-8 encoding in ant build.xml file

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<groupId>com.telesign</groupId>
44
<artifactId>telesign</artifactId>
55
<packaging>pom</packaging>
6-
<version>0.5.0</version>
6+
<version>0.6.0</version>
77
<name>telesign</name>
88
<url>https://github.com/TeleSign/java_telesign</url>
99
<inceptionYear>2010</inceptionYear>

src/com/telesign/verify/Verify.java

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,19 +222,29 @@ public VerifyResponse sms(String phone_number, String language, String verify_co
222222
*/
223223
public VerifyResponse call(String phone_number) {
224224

225-
return call(phone_number, null, null, null, 0, null, true, null, null, null);
225+
return call(phone_number, null);
226226
}
227227

228228
/**
229229
* Delivers a verification code to the end user with a phone call. When the user answers their phone, the TeleSign server plays an automated voice message that contains the code.
230230
* Use this overload when the user's native spoken language is not the default language (English). You specify the user's language in the <em>language</em> parameter.
231-
* @param phone_number [Required] A string containing the users phone number.
231+
* @param phone_number [Required] A string containing the user's phone number.
232232
* @param language [Optional] A string containing the IETF language tag. For example, "fr-CA". Set this value to "null" to use English (the default).
233233
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
234234
*/
235235
public VerifyResponse call(String phone_number, String language) {
236236

237-
return call(phone_number, language, null, null, 0, null, true, null, null, null);
237+
return call(phone_number, language, null, null, 0, null, true, null, null, null, null);
238+
}
239+
/**
240+
* @param phone_number [Required] A string containing the user's phone number.
241+
* @param language [Optional] A string containing the IETF language tag. For example, "fr-CA". Set this value to "null" to use English (the default).
242+
* @param ttsMessage [Optional] Allows you to pass a text-to-speech (TTS) message with language. Ex String: Hello, your secret code is $$CODE$$. Thank you.
243+
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
244+
*/
245+
public VerifyResponse call(String phone_number, String language, String ttsMessage) {
246+
247+
return call(phone_number, language, null, null, 0, null, true, null, null, null, ttsMessage);
238248
}
239249

240250
/**
@@ -250,7 +260,7 @@ public VerifyResponse call(String phone_number, String language) {
250260
*/
251261
public VerifyResponse call(String phone_number, String language, String originating_ip, String session_id) {
252262

253-
return call(phone_number, language, null, null, 0, null, true, originating_ip, session_id, null);
263+
return call(phone_number, language, originating_ip, session_id, null);
254264
}
255265

256266
/**
@@ -267,9 +277,26 @@ public VerifyResponse call(String phone_number, String language, String originat
267277
*/
268278
public VerifyResponse call(String phone_number, String language, String originating_ip, String session_id, String call_forward_action) {
269279

270-
return call(phone_number, language, null, null, 0, null, true, originating_ip, session_id, call_forward_action);
280+
return call(phone_number, language, null, null, 0, null, true, originating_ip, session_id, call_forward_action, null);
271281
}
272282

283+
/**
284+
* Delivers a verification code to the end user with a phone call. When the user answers their phone, the TeleSign server plays an automated voice message that contains the code.
285+
* Use this overload when the user's native spoken language is not the default language (English). You specify the user's language in the <em>language</em> parameter.
286+
* @param phone_number [Required] A string containing the user�s phone number.
287+
* @param language [Optional] A string containing the IETF language tag. For example, "fr-CA". Set this value to "null" to use English (the default).
288+
* @param originating_ip [Optional] Your end users IP Address. This value must be in the format defined by IETF in the
289+
* Internet-Draft document titled Textual Representation of IPv4 and IPv6 Addresses. Ex: originating_ip=192.168.123.456.
290+
* Set it to null if not sending originating ip.
291+
* @param session_id [Optional] Your end users session id. Set it to "null" if not sending session id.
292+
* @param call_forward_action [Optional] A string containing call forward action
293+
* @param ttsMessage [Optional] Allows you to pass a text-to-speech (TTS) message with language. Ex String: Hello, your secret code is $$CODE$$. Thank you.
294+
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
295+
*/
296+
public VerifyResponse call(String phone_number, String language, String originating_ip, String session_id, String call_forward_action, String ttsMessage) {
297+
298+
return call(phone_number, language, null, null, 0, null, true, originating_ip, session_id, call_forward_action, ttsMessage);
299+
}
273300
/**
274301
* Delivers a verification code to the end user - with a phone call. When the user answers their phone, the TeleSign server plays an automated voice message that contains the code.
275302
* Use this overload when:
@@ -315,7 +342,7 @@ public VerifyResponse call(String phone_number, String language, String verify_c
315342
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
316343
*/
317344
public VerifyResponse call(String phone_number , String language, String verify_code, String verify_method, int extension_type, String extension_template, boolean redial, String originating_ip, String session_id) {
318-
return call(phone_number , language, verify_code, verify_method, extension_type, extension_template, redial, originating_ip, session_id, null);
345+
return call(phone_number , language, verify_code, verify_method, extension_type, extension_template, redial, originating_ip, session_id, null, null);
319346
}
320347

321348
/**
@@ -339,10 +366,11 @@ public VerifyResponse call(String phone_number , String language, String verify_
339366
* Set it to null if not sending originating ip.
340367
* @param session_id [Optional] Your end users session id. Set it to "null" if not sending session id.
341368
* @param call_forward_action [Optional] A string containing call forward action
369+
* @param ttsMessage [Optional] text to speech feature of Telesign gets used, <a href="https://developer.telesign.com/v2.0/docs/rest_api-verify-call#text-to-speech-tts-hints">TTS hints</a>
342370
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
343371
*/
344372
public VerifyResponse call(String phone_number , String language, String verify_code, String verify_method, int extension_type, String extension_template, boolean redial,
345-
String originating_ip, String session_id, String call_forward_action) {
373+
String originating_ip, String session_id, String call_forward_action, String ttsMessage) {
346374

347375
String result = null;
348376

@@ -399,6 +427,9 @@ public VerifyResponse call(String phone_number , String language, String verify_
399427
}
400428
}
401429

430+
if(null != ttsMessage && !ttsMessage.isEmpty())
431+
body += "&tts_message=" + URLEncoder.encode(ttsMessage, "UTF-8");
432+
402433
tr.setPostBody(body);
403434
result = tr.executeRequest();
404435
}
@@ -554,10 +585,30 @@ public VerifyResponse registration(String phone_number, String bundle_id, String
554585
/**
555586
* @param phone_number [Required] Your end user's phone number, including the country code.
556587
* @param ucid [Required] A string the specifies one of the <a href="http://docs.telesign.com/rest/content/xt/xt-use-case-codes.html#xref-use-case-codes">Use Case Codes</a>.
588+
* @param language [Optional] Determines the message for Verify SMS and Verify Push. IETF language tag is used in mapping languages codes to predefined templates.
589+
* @param verify_code [Optional] The verification code used for the code challenge. By default, TeleSign automatically generates a six-digit value for you.
590+
* @param preference [Optional] Allows customers to override the Smart Verify method selection. Customers can specify either "call", "sms" or "push" to be the recommended method to attempt.
591+
* @param ignore_risk [Optional] If set to "true", allows customers to bypass blocking the request if the score is above the threshold value configured in the customer account.
592+
* @param ttsMessage [Optional] Allows you to pass a text-to-speech (TTS) message with language. Language parameter must be used with this.
593+
* @param pushMessage [Optional] Allows you to pass message that you want to Push. Ex String: Hello, your secret code is $$CODE$$. Thank you.
594+
* @param smsMessage [Optional] Allows you to pass a message sent via sms . Ex String: Hello, your secret code is $$CODE$$. Thank you.
595+
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
596+
*/
597+
public VerifyResponse smartVerify(String phone_number, String ucid, String caller_id, String language, String verify_code, String preference, String ignore_risk, String ttsMessage, String pushMessage, String smsMessage){
598+
return smartVerify(phone_number, ucid, caller_id, language, verify_code, preference, ignore_risk, null, null, ttsMessage, pushMessage, smsMessage);
599+
}
600+
601+
/**
602+
* @param phone_number [Required] Your end user's phone number, including the country code.
603+
* @param ucid [Required] A string the specifies one of the <a href="http://docs.telesign.com/rest/content/xt/xt-use-case-codes.html#xref-use-case-codes">Use Case Codes</a>.
604+
* @param language [Optional] Determines the message for Verify SMS and Verify Push. IETF language tag is used in mapping languages codes to predefined templates.
605+
* @param verify_code [Optional] The verification code used for the code challenge. By default, TeleSign automatically generates a six-digit value for you.
606+
* @param preference [Optional] Allows customers to override the Smart Verify method selection. Customers can specify either "call", "sms" or "push" to be the recommended method to attempt.
607+
* @param ignore_risk [Optional] If set to "true", allows customers to bypass blocking the request if the score is above the threshold value configured in the customer account.
557608
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
558609
*/
559610
public VerifyResponse smartVerify(String phone_number, String ucid, String caller_id, String language, String verify_code, String preference, String ignore_risk){
560-
return smartVerify(phone_number, ucid, caller_id, language, verify_code, preference, ignore_risk, null, null);
611+
return smartVerify(phone_number, ucid, caller_id, language, verify_code, preference, ignore_risk, null, null, null, null, null);
561612
}
562613

563614
/**
@@ -575,9 +626,12 @@ public VerifyResponse smartVerify(String phone_number, String ucid, String calle
575626
* @param originating_ip [Optional] Your end users IP Address. This value must be in the format defined by IETF in the Internet-Draft document titled Textual Representation of IPv4 and IPv6 Addresses.
576627
* </br>Ex: originating_ip=192.168.123.456. </br>Set it to null if not sending originating ip.
577628
* @param session_id [Optional] Your end users session id. Set it to "null" if not sending session id.
629+
* @param ttsMessage [Optional] Allows you to pass a text-to-speech (TTS) message with language. Language parameter must be used with this.
630+
* @param pushMessage [Optional] Allows you to pass message that you want to Push. Ex String: Hello, your secret code is $$CODE$$. Thank you.
631+
* @param smsMessage [Optional] Allows you to pass a message sent via sms . Ex String: Hello, your secret code is $$CODE$$. Thank you.
578632
* @return A {@link com.telesign.verify.response.VerifyResponse} object, which contains the JSON-formatted response body from the TeleSign server.
579633
*/
580-
public VerifyResponse smartVerify(String phone_number, String ucid, String caller_id, String language, String verify_code, String preference, String ignore_risk, String originating_ip, String session_id){
634+
public VerifyResponse smartVerify(String phone_number, String ucid, String caller_id, String language, String verify_code, String preference, String ignore_risk, String originating_ip, String session_id, String ttsMessage, String pushMessage, String smsMessage){
581635
String result = null;
582636

583637
try {
@@ -614,7 +668,16 @@ public VerifyResponse smartVerify(String phone_number, String ucid, String calle
614668

615669
body += "&ignore_risk=" + URLEncoder.encode(ignore_risk, "UTF-8");
616670
}
617-
671+
672+
if(null != ttsMessage && !ttsMessage.isEmpty())
673+
body += "&tts_message=" + URLEncoder.encode(ttsMessage, "UTF-8");
674+
675+
if(null != pushMessage && !pushMessage.isEmpty())
676+
body += "&push_message=" + URLEncoder.encode(pushMessage, "UTF-8");
677+
678+
if(null != smsMessage && !smsMessage.isEmpty())
679+
body += "&sms_message=" + URLEncoder.encode(smsMessage, "UTF-8");
680+
618681
if(null != originating_ip && !originating_ip.isEmpty() && IpValidator.isValidIpAddress(originating_ip)) {
619682

620683
body += "&originating_ip=" + URLEncoder.encode(originating_ip, "UTF-8");

0 commit comments

Comments
 (0)