Vonage / vonage-java-sdk

Vonage Server SDK for Java. API support for SMS, Messages, Voice, Text-to-Speech, Numbers, Verify (2FA), Video and more.
https://developer.vonage.com/en/home
Apache License 2.0
97 stars 121 forks source link

feat: Add new properties to Messages API #504

Closed SMadani closed 9 months ago

SMadani commented 9 months ago

Various updates to reflect recent changes in the Messages v1 spec. Description of these is in each commit headline.

codecov-commenter commented 9 months ago

Codecov Report

Merging #504 (d8352de) into main (8cdb975) will decrease coverage by 0.13%. The diff coverage is 85.98%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #504 +/- ## ============================================ - Coverage 94.34% 94.22% -0.13% - Complexity 2755 2797 +42 ============================================ Files 399 405 +6 Lines 6651 6748 +97 Branches 436 444 +8 ============================================ + Hits 6275 6358 +83 Misses 203 203 - Partials 173 187 +14 ``` | [Files](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage) | Coverage Δ | | |---|---|---| | [...ava/com/vonage/client/messages/MessageRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9NZXNzYWdlUmVxdWVzdC5qYXZh) | `97.56% <100.00%> (+0.68%)` | :arrow_up: | | [...va/com/vonage/client/messages/MessagesVersion.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9NZXNzYWdlc1ZlcnNpb24uamF2YQ==) | `100.00% <100.00%> (ø)` | | | [...onage/client/messages/internal/MessagePayload.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9pbnRlcm5hbC9NZXNzYWdlUGF5bG9hZC5qYXZh) | `94.28% <100.00%> (+0.73%)` | :arrow_up: | | [...om/vonage/client/messages/mms/MmsAudioRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9tbXMvTW1zQXVkaW9SZXF1ZXN0LmphdmE=) | `100.00% <100.00%> (ø)` | | | [...om/vonage/client/messages/mms/MmsImageRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9tbXMvTW1zSW1hZ2VSZXF1ZXN0LmphdmE=) | `100.00% <100.00%> (ø)` | | | [...ava/com/vonage/client/messages/mms/MmsRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9tbXMvTW1zUmVxdWVzdC5qYXZh) | `100.00% <100.00%> (ø)` | | | [...om/vonage/client/messages/mms/MmsVcardRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9tbXMvTW1zVmNhcmRSZXF1ZXN0LmphdmE=) | `100.00% <100.00%> (ø)` | | | [...om/vonage/client/messages/mms/MmsVideoRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9tbXMvTW1zVmlkZW9SZXF1ZXN0LmphdmE=) | `100.00% <100.00%> (ø)` | | | [...com/vonage/client/messages/sms/SmsTextRequest.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy9zbXMvU21zVGV4dFJlcXVlc3QuamF2YQ==) | `100.00% <100.00%> (ø)` | | | [...a/com/vonage/client/messages/whatsapp/Context.java](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage#diff-c3JjL21haW4vamF2YS9jb20vdm9uYWdlL2NsaWVudC9tZXNzYWdlcy93aGF0c2FwcC9Db250ZXh0LmphdmE=) | `100.00% <ø> (ø)` | | | ... and [8 more](https://app.codecov.io/gh/Vonage/vonage-java-sdk/pull/504?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vonage) | |
SMadani commented 9 months ago

Looks good overall. Just wanted to check a couple of things because I couldn't see them in the changed files:

  • For WhatsApp Inbound (all message types) add context.message_uuid and context.message_from
  • For Viber Outbound (type video) add viber_service.duration and viber_service.file_size

Maybe you already updated these properties prior to this PR?

Yep, they've been in the spec for a while and hence the SDK :)