-
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.
feat: add Context on WhatsApp messages
- Loading branch information
Showing
35 changed files
with
739 additions
and
277 deletions.
There are no files selected for viewing
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppAudioAsyncReturnsOkWithContext-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,13 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "audio", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"audio": { | ||
"url": "https://test.com/voice.mp3" | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppCustomAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppCustomAsyncReturnsOkWithContext-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,17 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "custom", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"custom": { | ||
"type": "template", | ||
"template": { | ||
"something": "whatsapp:hsm:technology:nexmo", | ||
"name": "parcel_location" | ||
} | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppFileAsyncReturnsOkWithContext-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": "file", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"file": { | ||
"url": "https://test.com/me.txt", | ||
"caption": "Me" | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppImageAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppImageAsyncReturnsOkWithContext-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": "image", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"image": { | ||
"url": "https://test.com/image.png", | ||
"caption": "Testing image caption" | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppMultipleItemsAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
...st/Messages/WhatsApp/Data/SendWhatsAppMultipleItemsAsyncReturnsOkWithContext-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,50 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "custom", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"custom": { | ||
"type": "interactive", | ||
"interactive": { | ||
"type": "product_list", | ||
"header": { | ||
"type": "text", | ||
"text": "Our top products" | ||
}, | ||
"body": { | ||
"text": "Check out these great products" | ||
}, | ||
"footer": { | ||
"text": "Sale now on!" | ||
}, | ||
"action": { | ||
"catalog_id": "catalog_1", | ||
"sections": [ | ||
{ | ||
"title": "Cool products", | ||
"product_items": [ | ||
{ | ||
"product_retailer_id": "product_1" | ||
}, | ||
{ | ||
"product_retailer_id": "product_2" | ||
} | ||
] | ||
}, | ||
{ | ||
"title": "Awesome products", | ||
"product_items": [ | ||
{ | ||
"product_retailer_id": "product_3" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppSingleItemAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
....Test/Messages/WhatsApp/Data/SendWhatsAppSingleItemAsyncReturnsOkWithContext-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,26 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "custom", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"custom": { | ||
"type": "interactive", | ||
"interactive": { | ||
"type": "product", | ||
"body": { | ||
"text": "Check out this cool product" | ||
}, | ||
"footer": { | ||
"text": "Sale now on!" | ||
}, | ||
"action": { | ||
"catalog_id": "catalog_1", | ||
"product_retailer_id": "product_1" | ||
} | ||
} | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
....Test/Messages/WhatsApp/Data/SendWhatsAppStickerAsyncReturnsOkWithIdSticker-response.json
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...ages/WhatsApp/Data/SendWhatsAppStickerAsyncReturnsOkWithIdStickerWithContext-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,13 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "sticker", | ||
"to": "447700900000", | ||
"from": "447700900001", | ||
"client_ref": "string", | ||
"sticker": { | ||
"id": "aabb7a31-1d1f-4755-a574-2971d831cd5b" | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
...Test/Messages/WhatsApp/Data/SendWhatsAppStickerAsyncReturnsOkWithUrlSticker-response.json
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...ges/WhatsApp/Data/SendWhatsAppStickerAsyncReturnsOkWithUrlStickerWithContext-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,13 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "sticker", | ||
"to": "447700900000", | ||
"from": "447700900001", | ||
"client_ref": "string", | ||
"sticker": { | ||
"url": "https://example.com/image.webp" | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppTemplateAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...ge.Test/Messages/WhatsApp/Data/SendWhatsAppTemplateAsyncReturnsOkWithContext-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,28 @@ | ||
{ | ||
"channel": "whatsapp", | ||
"message_type": "template", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"whatsapp": { | ||
"policy": "deterministic", | ||
"locale": "en-GB" | ||
}, | ||
"template": { | ||
"name": "Amazing template", | ||
"parameters": [ | ||
{ | ||
"default": "Vonage Verification" | ||
}, | ||
{ | ||
"default": "64873" | ||
}, | ||
{ | ||
"default": "10" | ||
} | ||
] | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppTextAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppTextAsyncReturnsOkWithContext-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": "text", | ||
"text": "Hello mum", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppVideoAsyncReturnsOk-response.json
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Vonage.Test/Messages/WhatsApp/Data/SendWhatsAppVideoAsyncReturnsOkWithContext-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": "video", | ||
"to": "441234567890", | ||
"from": "015417543010", | ||
"client_ref": "abcdefg", | ||
"video": { | ||
"url": "https://test.com/me.mp4", | ||
"caption": "Me at the zoo" | ||
}, | ||
"context": { | ||
"message_uuid": "a1b2c3d4a1b2c3d4" | ||
} | ||
} |
Oops, something went wrong.