From 8c7f3971b0ba341d6204a68d727db7466ba76f47 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Tue, 14 Mar 2023 17:42:24 +0530 Subject: [PATCH 1/3] Adding CreatedAt field in get and list brand/profile api --- .../com/plivo/api/models/brand/Brand.java | 8 +++++ .../plivo/api/models/brand/BrandResponse.java | 8 +++++ .../com/plivo/api/models/profile/Profile.java | 5 ++++ .../api/models/profile/ProfileResponse.java | 5 ++++ .../com/plivo/api/brandGetResponse.json | 3 +- .../com/plivo/api/brandListResponse.json | 30 ++++++++++++------- .../com/plivo/api/profileGetResponse.json | 3 +- .../com/plivo/api/profileListResponse.json | 30 ++++++++++++------- .../com/plivo/api/profileUpdateResponse.json | 3 +- 9 files changed, 72 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/plivo/api/models/brand/Brand.java b/src/main/java/com/plivo/api/models/brand/Brand.java index 89ef3c1e..7042cac8 100644 --- a/src/main/java/com/plivo/api/models/brand/Brand.java +++ b/src/main/java/com/plivo/api/models/brand/Brand.java @@ -17,6 +17,7 @@ public class Brand extends BaseResource { private Address address; private AuthorizedContact authorizedContact; private BrandResponse brand; + private String createdAt; public static BrandCreator creator(String brandAlias,String profileUUID,String brandType,Boolean secondaryVetting,String url,String method) { return new BrandCreator(brandAlias,profileUUID,brandType,secondaryVetting,url,method); @@ -111,6 +112,13 @@ public AuthorizedContact getAuthorizedContact() { return authorizedContact; } + /** + * @return String return the getCreatedAt + */ + public String getCreatedAt() { + return createdAt; + } + public BrandResponse getBrand() { return brand; } diff --git a/src/main/java/com/plivo/api/models/brand/BrandResponse.java b/src/main/java/com/plivo/api/models/brand/BrandResponse.java index c5057e4a..6c716ae9 100644 --- a/src/main/java/com/plivo/api/models/brand/BrandResponse.java +++ b/src/main/java/com/plivo/api/models/brand/BrandResponse.java @@ -15,6 +15,7 @@ public class BrandResponse extends BaseResource { private String registrationStatus; private String vertical; private Address address; + private String createdAt; private AuthorizedContact authorizedContact; /** @@ -76,6 +77,13 @@ public Address getAddress() { return address; } + /** + * @return String return the getCreatedAt + */ + public String getCreatedAt() { + return createdAt; + } + /** * @return String return the getAuthorizedContact */ diff --git a/src/main/java/com/plivo/api/models/profile/Profile.java b/src/main/java/com/plivo/api/models/profile/Profile.java index d5450481..44310f8c 100644 --- a/src/main/java/com/plivo/api/models/profile/Profile.java +++ b/src/main/java/com/plivo/api/models/profile/Profile.java @@ -24,6 +24,7 @@ public class Profile extends BaseResource { private String profileType; private String profileUUID; private String message; + private String createdAt; private ProfileResponse profile; @@ -119,6 +120,10 @@ public String getMessage(){ return message; } +public String getCreatedAt(){ + return createdAt; +} + public ProfileResponse getProfile() { return profile; } diff --git a/src/main/java/com/plivo/api/models/profile/ProfileResponse.java b/src/main/java/com/plivo/api/models/profile/ProfileResponse.java index 7cc95d5f..ea1c2ff3 100644 --- a/src/main/java/com/plivo/api/models/profile/ProfileResponse.java +++ b/src/main/java/com/plivo/api/models/profile/ProfileResponse.java @@ -22,6 +22,7 @@ public class ProfileResponse extends BaseResource{ private String primaryProfile; private String profileType; private String profileUUID; + private String createdAt; public String getProfileAlias(){ return profileAlias; @@ -91,6 +92,10 @@ public String getProfileUUID(){ return profileUUID; } + public String getCreatedAt(){ + return createdAt; + } + @Override public String getId() { return this.profileUUID; diff --git a/src/test/resources/com/plivo/api/brandGetResponse.json b/src/test/resources/com/plivo/api/brandGetResponse.json index 62a3ac38..216349b1 100644 --- a/src/test/resources/com/plivo/api/brandGetResponse.json +++ b/src/test/resources/com/plivo/api/brandGetResponse.json @@ -22,6 +22,7 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "6e9a16c7-27ae-44b4-8b1f-e6b9b007426b", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-03-07T11:25:28.262701Z" } } \ No newline at end of file diff --git a/src/test/resources/com/plivo/api/brandListResponse.json b/src/test/resources/com/plivo/api/brandListResponse.json index 46ce0e8e..31509807 100644 --- a/src/test/resources/com/plivo/api/brandListResponse.json +++ b/src/test/resources/com/plivo/api/brandListResponse.json @@ -14,7 +14,8 @@ "brand_id": "BPL3KN9", "brand_type": "STARTER", "ein_issuing_country": "US", - "registration_status": "COMPLETED" + "registration_status": "COMPLETED", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -39,7 +40,8 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "55515d72-2852-4016-9ed9-c64bd1c0c055", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -64,7 +66,8 @@ "entity_type": "INDIVIDUAL", "profile_uuid": "71a18795-77fa-4623-9735-44bbd08d86c4", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -81,7 +84,8 @@ "ein_issuing_country": "IN", "profile_uuid": "d3d85b2d-a4c2-4f7b-a66f-83002a5fd5e8", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -100,7 +104,8 @@ "ein_issuing_country": "US", "profile_uuid": "709a4b1c-bbde-40e6-be36-164b1dc8f718", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -127,7 +132,8 @@ "entity_type": "PRIVATE", "profile_uuid": "a28b5892-4d8b-4098-9fe7-6f786fb0be1f", "registration_status": "COMPLETED", - "vertical": "ENTERTAINMENT" + "vertical": "ENTERTAINMENT", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -152,7 +158,8 @@ "entity_type": "GOVERNMENT", "profile_uuid": "ca01734d-a86a-4ed4-aa5a-8723cbb595b3", "registration_status": "COMPLETED", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -178,7 +185,8 @@ "profile_uuid": "c1a1c66a-2bc4-4150-a3f3-033ec41efc5d", "registration_status": "COMPLETED", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -207,7 +215,8 @@ "registration_status": "COMPLETED", "vertical": "PROFESSIONAL", "vetting_score": 80, - "vetting_status": "ACTIVE" + "vetting_status": "ACTIVE", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -226,7 +235,8 @@ "ein_issuing_country": "nil", "profile_uuid": "f9ee4193-a8b7-49e6-aed1-2a286c7f5c4b", "registration_status": "COMPLETED", - "vertical": "nil" + "vertical": "nil", + "created_at": "2023-03-07T11:25:28.262701Z" } ], "meta": { diff --git a/src/test/resources/com/plivo/api/profileGetResponse.json b/src/test/resources/com/plivo/api/profileGetResponse.json index 66c84d02..f54aab29 100644 --- a/src/test/resources/com/plivo/api/profileGetResponse.json +++ b/src/test/resources/com/plivo/api/profileGetResponse.json @@ -14,6 +14,7 @@ "profile_type": "SECONDARY", "profile_uuid": "201faedc-7df9-4840-9ab1-3997ce3f7cf4", "stock_symbol": "ABC", - "vertical": "ENERGY" + "vertical": "ENERGY", + "created_at": "2023-03-07T11:25:28.262701Z" } } \ No newline at end of file diff --git a/src/test/resources/com/plivo/api/profileListResponse.json b/src/test/resources/com/plivo/api/profileListResponse.json index bcc98c7e..376f4257 100644 --- a/src/test/resources/com/plivo/api/profileListResponse.json +++ b/src/test/resources/com/plivo/api/profileListResponse.json @@ -36,7 +36,8 @@ "stock_exchange": "NYSE", "stock_symbol": "TESLA", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -67,7 +68,8 @@ "stock_exchange": "NYSE", "stock_symbol": "TESLA", "vertical": "ENTERTAINMENT", - "website": "hibye.com" + "website": "hibye.com", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -90,7 +92,8 @@ "profile_type": "SECONDARY", "profile_uuid": "21ac739e-57fa-4945-a465-0ace7d43d9f1", "vertical": "HEALTHCARE", - "website": "http://www.barkersleep.com/" + "website": "http://www.barkersleep.com/", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -120,7 +123,8 @@ "profile_uuid": "56711bac-af40-450a-b713-60cbd23ac28b", "stock_exchange": "NSE", "stock_symbol": "ABC", - "vertical": "PROFESSIONAL" + "vertical": "PROFESSIONAL", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -150,7 +154,8 @@ "profile_uuid": "287bc61b-10c2-452a-9137-4c1772292d6a", "stock_exchange": "NSE", "stock_symbol": "ABC", - "vertical": "PROFESSIONAL" + "vertical": "PROFESSIONAL", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -180,7 +185,8 @@ "stock_exchange": "NYSE", "stock_symbol": "NSE", "vertical": "TECHNOLOGY", - "website": "www.facebook.com" + "website": "www.facebook.com", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -210,7 +216,8 @@ "profile_uuid": "55cce8f9-2a0c-4b29-9ed5-a5f4c684e883", "stock_exchange": "NSE", "stock_symbol": "ABC", - "vertical": "PROFESSIONAL" + "vertical": "PROFESSIONAL", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -241,7 +248,8 @@ "stock_exchange": "NSE", "stock_symbol": "ABC", "vertical": "ENERGY", - "website": "www.google.com" + "website": "www.google.com", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -273,7 +281,8 @@ "stock_exchange": "NSE", "stock_symbol": "ABC", "vertical": "ENERGY", - "website": "www.google.com" + "website": "www.google.com", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "address": { @@ -305,7 +314,8 @@ "stock_exchange": "NSE", "stock_symbol": "ABC", "vertical": "ENERGY", - "website": "www.google.com" + "website": "www.google.com", + "created_at": "2023-03-07T11:25:28.262701Z" } ] } \ No newline at end of file diff --git a/src/test/resources/com/plivo/api/profileUpdateResponse.json b/src/test/resources/com/plivo/api/profileUpdateResponse.json index 0fff2ca4..c70cfcab 100644 --- a/src/test/resources/com/plivo/api/profileUpdateResponse.json +++ b/src/test/resources/com/plivo/api/profileUpdateResponse.json @@ -27,6 +27,7 @@ "profile_type": "SECONDARY", "profile_uuid": "09322f43-fe16-4525-b8e4-4229c867795d", "vertical": "ENERGY", - "website": "www.google.com" + "website": "www.google.com", + "created_at": "2023-03-07T11:25:28.262701Z" } } \ No newline at end of file From ed70c3254b0f0662048f6af8b803d06ba2cd8d64 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Thu, 16 Mar 2023 15:51:14 +0530 Subject: [PATCH 2/3] Adding created_at field in list and get campaign details api response --- .../plivo/api/models/campaign/Campaign.java | 5 ++++ .../api/models/campaign/CampaignResponse.java | 9 ++++++ .../com/plivo/api/campaignGetResponse.json | 3 +- .../com/plivo/api/campaignListResponse.json | 30 ++++++++++++------- .../com/plivo/api/campaignUpdateResponse.json | 3 +- 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/plivo/api/models/campaign/Campaign.java b/src/main/java/com/plivo/api/models/campaign/Campaign.java index f8403aa8..da8608e7 100644 --- a/src/main/java/com/plivo/api/models/campaign/Campaign.java +++ b/src/main/java/com/plivo/api/models/campaign/Campaign.java @@ -25,6 +25,7 @@ public class Campaign extends BaseResource { private String sample2; private String description; private CampaignAttributes campaignAttributes; + private String createdAt; public static CampaignCreator creator(String brandID,String campaignAlias,String vertical,String usecase,String[] subUsecases,String description,Boolean embeddedLink,Boolean embeddedPhone,Boolean ageGated,Boolean directLending,Boolean affiliateMarketing,Boolean subscriberOptin,Boolean subscriberOptout,Boolean subscriberHelp,String sample1,String sample2,String url, String method, String messageFlow, String helpMessage, String optoutMessage, String optinKeywords, String optinMessage, String optoutKeywords, String helpKeywords) { @@ -150,6 +151,10 @@ public String getDescription() { return description; } + public String getCreatedAt() { + return createdAt; + } + @Override public String getId() { return this.campaignID; diff --git a/src/main/java/com/plivo/api/models/campaign/CampaignResponse.java b/src/main/java/com/plivo/api/models/campaign/CampaignResponse.java index a27696f0..c835b40a 100644 --- a/src/main/java/com/plivo/api/models/campaign/CampaignResponse.java +++ b/src/main/java/com/plivo/api/models/campaign/CampaignResponse.java @@ -22,6 +22,7 @@ public class CampaignResponse extends BaseResource{ private String sample1; private String sample2; private String description; + private String createdAt; private CampaignAttributes campaignAttributes; @@ -128,6 +129,14 @@ public CampaignAttributes getCampaignAttributes() { public String getDescription() { return description; } + + /** + * @return createdAt return the CreatedAt + */ + public String getCreatedAt() { + return createdAt; + } + @Override diff --git a/src/test/resources/com/plivo/api/campaignGetResponse.json b/src/test/resources/com/plivo/api/campaignGetResponse.json index 8c826803..6dc1fc63 100644 --- a/src/test/resources/com/plivo/api/campaignGetResponse.json +++ b/src/test/resources/com/plivo/api/campaignGetResponse.json @@ -32,6 +32,7 @@ "subscriber_optin":false, "subscriber_optout":false, "subscriber_help":false - } + }, + "created_at": "2023-03-07T11:25:28.262701Z" } } \ No newline at end of file diff --git a/src/test/resources/com/plivo/api/campaignListResponse.json b/src/test/resources/com/plivo/api/campaignListResponse.json index f69ef46f..4f9012a1 100644 --- a/src/test/resources/com/plivo/api/campaignListResponse.json +++ b/src/test/resources/com/plivo/api/campaignListResponse.json @@ -21,7 +21,8 @@ "registration_status": "ACTIVE", "reseller_id": "RFWG6CB", "sub_usecase": "CUSTOMER_CARE", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BNOOLMO", @@ -43,7 +44,8 @@ "registration_status": "FAILED", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BWDWMAC", @@ -65,7 +67,8 @@ "registration_status": "ACTIVE", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BCKWPKX", @@ -87,7 +90,8 @@ "registration_status": "PROCESSING", "reseller_id": "", "sub_usecase": "2FA,MARKETING", - "usecase": "MIXED" + "usecase": "MIXED", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "B2IYFNC", @@ -109,7 +113,8 @@ "registration_status": "PROCESSING", "reseller_id": "", "sub_usecase": "2FA", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BK98MJL", @@ -129,7 +134,8 @@ } }, "registration_status": "ACTIVE", - "reseller_id": "" + "reseller_id": "", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "B3WKVGC", @@ -151,7 +157,8 @@ "registration_status": "PROCESSING", "reseller_id": "RFWG6CB", "sub_usecase": "CUSTOMER_CARE", - "usecase": "STARTER" + "usecase": "STARTER", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BBYQU0Z", @@ -172,7 +179,8 @@ }, "registration_status": "PROCESSING", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BBYQU0Z", @@ -193,7 +201,8 @@ }, "registration_status": "ACTIVE", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-03-07T11:25:28.262701Z" }, { "brand_id": "BBYQU0Z", @@ -214,7 +223,8 @@ }, "registration_status": "ACTIVE", "reseller_id": "", - "usecase": "2FA" + "usecase": "2FA", + "created_at": "2023-03-07T11:25:28.262701Z" } ], "meta": { diff --git a/src/test/resources/com/plivo/api/campaignUpdateResponse.json b/src/test/resources/com/plivo/api/campaignUpdateResponse.json index 8c826803..6dc1fc63 100644 --- a/src/test/resources/com/plivo/api/campaignUpdateResponse.json +++ b/src/test/resources/com/plivo/api/campaignUpdateResponse.json @@ -32,6 +32,7 @@ "subscriber_optin":false, "subscriber_optout":false, "subscriber_help":false - } + }, + "created_at": "2023-03-07T11:25:28.262701Z" } } \ No newline at end of file From a9ed26a3d3f1d2ee10f746e8ba0565d162969612 Mon Sep 17 00:00:00 2001 From: Sajal Singhal Date: Fri, 17 Mar 2023 13:07:50 +0530 Subject: [PATCH 3/3] version update --- CHANGELOG.md | 5 +++++ README.md | 2 +- pom.properties | 2 +- pom.xml | 2 +- src/main/resources/com/plivo/api/version.txt | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ef2e48..1bedaef4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log + +## [5.21.0](https://github.com/plivo/plivo-java/tree/v5.21.0) (2023-17-03) +- Added New Param `created_at` to the response for the [list all profiles API](https://www.plivo.com/docs/sms/api/10dlc/profile#retrieve-all-profiles) and the [get profile API](https://www.plivo.com/docs/sms/api/10dlc/profile#retrieve-a-specific-profile) and the [list all brands API](https://www.plivo.com/docs/sms/api/10dlc/brand#retrieve-all-brands) and the [get brand API](https://www.plivo.com/docs/sms/api/10dlc/brand#retrieve-a-specific-brand) +and the [list all campaigns API](https://www.plivo.com/docs/sms/api/10dlc/campaign#retrieve-all-campaigns) and the [get campaign API](https://www.plivo.com/docs/sms/api/10dlc/campaign#retrieve-a-specific-campaign) + ## [5.20.0](https://github.com/plivo/plivo-java/tree/v5.20.0) (2023-02-23) - Add `isDomestic` to the response for the [list all messages API](https://www.plivo.com/docs/sms/api/message/list-all-messages/) and the [get message details API](https://www.plivo.com/docs/sms/api/message#retrieve-a-message) diff --git a/README.md b/README.md index ba7f971f..abc14df2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you are using Maven, use the following XML to include the Plivo SDK as a depe com.plivo plivo-java - 5.20.0 + 5.21.0 ``` diff --git a/pom.properties b/pom.properties index dff0fce4..64f275fc 100644 --- a/pom.properties +++ b/pom.properties @@ -1,5 +1,5 @@ # Written manually. -version=5.20.0 +version=5.21.0 groupId=com.plivo artifactId=plivo-java diff --git a/pom.xml b/pom.xml index d30e8ce3..f98b4aca 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.plivo plivo-java - 5.20.0 + 5.21.0 plivo-java A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML diff --git a/src/main/resources/com/plivo/api/version.txt b/src/main/resources/com/plivo/api/version.txt index 0af471c5..b5e0460c 100644 --- a/src/main/resources/com/plivo/api/version.txt +++ b/src/main/resources/com/plivo/api/version.txt @@ -1 +1 @@ -5.20.0 +5.21.0