-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding SMS, MMS and WhatsApp messages
- Loading branch information
1 parent
93829cc
commit 7befd35
Showing
60 changed files
with
1,213 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Vonage.Test.Unit/Data/MessagesTests/SendMmsAudioAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"audio": { | ||
"url": "https://test.com/me.mp3", | ||
"caption": "Sounds I make" | ||
}, | ||
"channel": "mms", | ||
"message_type": "audio", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendMmsAudioAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
10 changes: 10 additions & 0 deletions
10
Vonage.Test.Unit/Data/MessagesTests/SendMmsImageAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"image": { | ||
"url": "https://test.com/image.png" | ||
}, | ||
"channel": "mms", | ||
"message_type": "image", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendMmsImageAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
10 changes: 10 additions & 0 deletions
10
Vonage.Test.Unit/Data/MessagesTests/SendMmsVcardAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"vcard": { | ||
"url": "https://test.com/image.png" | ||
}, | ||
"channel": "mms", | ||
"message_type": "vcard", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendMmsVcardAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
11 changes: 11 additions & 0 deletions
11
Vonage.Test.Unit/Data/MessagesTests/SendMmsVideoAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"video": { | ||
"url": "https://test.com/image.mp4", | ||
"caption": "A video of me" | ||
}, | ||
"channel": "mms", | ||
"message_type": "video", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendMmsVideoAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
8 changes: 8 additions & 0 deletions
8
Vonage.Test.Unit/Data/MessagesTests/SendSmsAsyncReturnsInvalidCredentials-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"channel": "sms", | ||
"message_type": "text", | ||
"text": "This is a test", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
6 changes: 6 additions & 0 deletions
6
Vonage.Test.Unit/Data/MessagesTests/SendSmsAsyncReturnsInvalidCredentials-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"type": "https://developer.nexmo.com/api-errors/#unathorized", | ||
"title": "You did not provide correct credentials.", | ||
"detail": "Check that you're using the correct credentials, and that your account has this feature enabled", | ||
"instance": "bf0ca0bf927b3b52e3cb03217e1a1ddf" | ||
} |
8 changes: 8 additions & 0 deletions
8
Vonage.Test.Unit/Data/MessagesTests/SendSmsAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"channel": "sms", | ||
"message_type": "text", | ||
"text": "This is a test", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendSmsAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
10 changes: 10 additions & 0 deletions
10
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppAudioAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "audio", | ||
"audio": { | ||
"url": "https://test.com/voice.mp3" | ||
}, | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppAudioAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
14 changes: 14 additions & 0 deletions
14
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppCustomAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "custom", | ||
"custom": { | ||
"type": "template", | ||
"template": { | ||
"something": "whatsapp:hsm:technology:nexmo", | ||
"name": "parcel_location" | ||
} | ||
}, | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppCustomAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
11 changes: 11 additions & 0 deletions
11
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppFileAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "file", | ||
"file": { | ||
"url": "https://test.com/me.txt", | ||
"caption": "Me" | ||
}, | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppFileAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
11 changes: 11 additions & 0 deletions
11
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppImageAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "image", | ||
"image": { | ||
"url": "https://test.com/image.png", | ||
"caption": "Testing image caption" | ||
}, | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppImageAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
15 changes: 15 additions & 0 deletions
15
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppTemplateAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "template", | ||
"template": { | ||
"name": "Amazing template", | ||
"parameters": [ "Tim", "Bob" ] | ||
}, | ||
"whatsapp": { | ||
"policy": "deterministic", | ||
"locale": "en-GB" | ||
}, | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppTemplateAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
8 changes: 8 additions & 0 deletions
8
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppTextAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "text", | ||
"text": "Hello mum", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppTextAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
11 changes: 11 additions & 0 deletions
11
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppVideoAsyncReturnsOk-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "video", | ||
"video": { | ||
"url": "https://test.com/me.mp4", | ||
"caption": "Me at the zoo" | ||
}, | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg" | ||
} |
3 changes: 3 additions & 0 deletions
3
Vonage.Test.Unit/Data/MessagesTests/SendWhatsAppVideoAsyncReturnsOk-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"message_uuid": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab" | ||
} |
Oops, something went wrong.