Skip to content

Commit

Permalink
SMS-4946/SMS-4848: adding new param 'is_domestic' in Get Message and …
Browse files Browse the repository at this point in the history
…List Mssage API (#164)

This reverts commit 0c85a7a.
  • Loading branch information
saurabhnewatiya-plivo authored Mar 3, 2023
1 parent 2d8ce54 commit df884c7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 23 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

## [7.23.0](https://github.com/plivo/plivo-go/tree/v7.23.0) (2023-03-03)
**Feature - Added New Param 'is_domestic' in Get Message and List Message APIs**
- Add `is_domestic` 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)

## [7.22.0](https://github.com/plivo/plivo-go/tree/v7.22.0) (2023-02-23)
**Feature - Enhance MDR filtering capabilities **
- Added new fields on MDR object response
Expand Down
2 changes: 1 addition & 1 deletion baseclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/google/go-querystring/query"
)

const sdkVersion = "7.22.0"
const sdkVersion = "7.23.0"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
3 changes: 2 additions & 1 deletion fixtures/messageGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.1"
"requester_ip": "192.168.1.1",
"is_domestic": false
}
60 changes: 40 additions & 20 deletions fixtures/messageListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.1"
"requester_ip": "192.168.1.1",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -35,7 +36,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.2"
"requester_ip": "192.168.1.2",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -50,7 +52,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.3"
"requester_ip": "192.168.1.3",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -65,7 +68,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.4"
"requester_ip": "192.168.1.4",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -80,7 +84,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.5"
"requester_ip": "192.168.1.5",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -95,7 +100,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.6"
"requester_ip": "192.168.1.6",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -110,7 +116,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.7"
"requester_ip": "192.168.1.7",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -125,7 +132,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.8"
"requester_ip": "192.168.1.8",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -140,7 +148,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.9"
"requester_ip": "192.168.1.9",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -155,7 +164,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.10"
"requester_ip": "192.168.1.10",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -170,7 +180,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.11"
"requester_ip": "192.168.1.11",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -185,7 +196,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.12"
"requester_ip": "192.168.1.12",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -200,7 +212,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.13"
"requester_ip": "192.168.1.13",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -215,7 +228,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.14"
"requester_ip": "192.168.1.14",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -230,7 +244,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.15"
"requester_ip": "192.168.1.15",
"is_domestic": false
},
{
"error_code": null,
Expand All @@ -245,7 +260,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.16"
"requester_ip": "192.168.1.16",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -260,7 +276,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.17"
"requester_ip": "192.168.1.17",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -275,7 +292,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.18"
"requester_ip": "192.168.1.18",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -290,7 +308,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.19"
"requester_ip": "192.168.1.19",
"is_domestic": false
},
{
"error_code": "000",
Expand All @@ -305,7 +324,8 @@
"total_amount": "0.00250",
"total_rate": "0.00250",
"units": 1,
"requester_ip": "192.168.1.20"
"requester_ip": "192.168.1.20",
"is_domestic": false
}
]
}
3 changes: 2 additions & 1 deletion messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ type Message struct {
MessageTime string `json:"message_time,omitempty" url:"message_time,omitempty"`
ErrorCode string `json:"error_code,omitempty" url:"error_code,omitempty"`
PowerpackID string `json:"powerpack_id,omitempty" url:"powerpack_id,omitempty"`
RequesterIP string `json:"requester_ip,omitempty" url:"requester_ip,omitempty"`
RequesterIP string `json:"requester_ip,omitempty" url:"requester_ip,omitempty"`
IsDomestic *bool `json:"is_domestic,omitempty" url:"is_domestic,omitempty"`
TendlcCampaignID string `json:"tendlc_campaign_id" url:"tendlc_campaign_id,omitempty"`
TendlcRegistrationStatus string `json:"tendlc_registration_status" url:"tendlc_registration_status,omitempty"`
DestinationCountryISO2 string `json:"destination_country_iso2" url:"destination_country_iso2,omitempty"`
Expand Down

0 comments on commit df884c7

Please sign in to comment.