Skip to content

Commit

Permalink
Merge pull request #239 from plivo/SMS-5098-10DLC-management-experien…
Browse files Browse the repository at this point in the history
…ce-upgrade-for-Profile-and-brands-screen-on-Ryuk

Adding CreatedAt field in get and list brand/profile api
  • Loading branch information
narayana-plivo authored Mar 17, 2023
2 parents 9888978 + a9ed26a commit 0fa57b3
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 39 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you are using Maven, use the following XML to include the Plivo SDK as a depe
<dependency>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.20.0</version>
<version>5.21.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Written manually.

version=5.20.0
version=5.21.0
groupId=com.plivo
artifactId=plivo-java
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.20.0</version>
<version>5.21.0</version>
<name>plivo-java</name>
<description>A Java SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML</description>
<licenses>
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/plivo/api/models/brand/Brand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -111,6 +112,13 @@ public AuthorizedContact getAuthorizedContact() {
return authorizedContact;
}

/**
* @return String return the getCreatedAt
*/
public String getCreatedAt() {
return createdAt;
}

public BrandResponse getBrand() {
return brand;
}
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/plivo/api/models/brand/BrandResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class BrandResponse extends BaseResource {
private String registrationStatus;
private String vertical;
private Address address;
private String createdAt;
private AuthorizedContact authorizedContact;

/**
Expand Down Expand Up @@ -76,6 +77,13 @@ public Address getAddress() {
return address;
}

/**
* @return String return the getCreatedAt
*/
public String getCreatedAt() {
return createdAt;
}

/**
* @return String return the getAuthorizedContact
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/plivo/api/models/campaign/Campaign.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -150,6 +151,10 @@ public String getDescription() {
return description;
}

public String getCreatedAt() {
return createdAt;
}

@Override
public String getId() {
return this.campaignID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class CampaignResponse extends BaseResource{
private String sample1;
private String sample2;
private String description;
private String createdAt;
private CampaignAttributes campaignAttributes;


Expand Down Expand Up @@ -128,6 +129,14 @@ public CampaignAttributes getCampaignAttributes() {
public String getDescription() {
return description;
}

/**
* @return createdAt return the CreatedAt
*/
public String getCreatedAt() {
return createdAt;
}



@Override
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/plivo/api/models/profile/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Profile extends BaseResource {
private String profileType;
private String profileUUID;
private String message;
private String createdAt;
private ProfileResponse profile;


Expand Down Expand Up @@ -119,6 +120,10 @@ public String getMessage(){
return message;
}

public String getCreatedAt(){
return createdAt;
}

public ProfileResponse getProfile() {
return profile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -91,6 +92,10 @@ public String getProfileUUID(){
return profileUUID;
}

public String getCreatedAt(){
return createdAt;
}

@Override
public String getId() {
return this.profileUUID;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/com/plivo/api/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.20.0
5.21.0
3 changes: 2 additions & 1 deletion src/test/resources/com/plivo/api/brandGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
30 changes: 20 additions & 10 deletions src/test/resources/com/plivo/api/brandListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/com/plivo/api/campaignGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"subscriber_optin":false,
"subscriber_optout":false,
"subscriber_help":false
}
},
"created_at": "2023-03-07T11:25:28.262701Z"
}
}
30 changes: 20 additions & 10 deletions src/test/resources/com/plivo/api/campaignListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -129,7 +134,8 @@
}
},
"registration_status": "ACTIVE",
"reseller_id": ""
"reseller_id": "",
"created_at": "2023-03-07T11:25:28.262701Z"
},
{
"brand_id": "B3WKVGC",
Expand All @@ -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",
Expand All @@ -172,7 +179,8 @@
},
"registration_status": "PROCESSING",
"reseller_id": "",
"usecase": "2FA"
"usecase": "2FA",
"created_at": "2023-03-07T11:25:28.262701Z"
},
{
"brand_id": "BBYQU0Z",
Expand All @@ -193,7 +201,8 @@
},
"registration_status": "ACTIVE",
"reseller_id": "",
"usecase": "2FA"
"usecase": "2FA",
"created_at": "2023-03-07T11:25:28.262701Z"
},
{
"brand_id": "BBYQU0Z",
Expand All @@ -214,7 +223,8 @@
},
"registration_status": "ACTIVE",
"reseller_id": "",
"usecase": "2FA"
"usecase": "2FA",
"created_at": "2023-03-07T11:25:28.262701Z"
}
],
"meta": {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/com/plivo/api/campaignUpdateResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"subscriber_optin":false,
"subscriber_optout":false,
"subscriber_help":false
}
},
"created_at": "2023-03-07T11:25:28.262701Z"
}
}
Loading

0 comments on commit 0fa57b3

Please sign in to comment.