Skip to content

Commit

Permalink
extending message object filter option (#159)
Browse files Browse the repository at this point in the history
* message object feature object

* version upgrade
  • Loading branch information
narayana-plivo authored Feb 23, 2023
1 parent 32383e9 commit 2d8ce54
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Change Log
## [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

## [7.21.0](https://github.com/plivo/plivo-go/tree/v7.21.0) (2023-02-21)
**Feature - MPC Speak API**
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.21.0"
const sdkVersion = "7.22.0"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
34 changes: 20 additions & 14 deletions messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,23 @@ type MessageCreateParams struct {
}

type Message struct {
ToNumber string `json:"to_number,omitempty" url:"to_number,omitempty"`
FromNumber string `json:"from_number,omitempty" url:"from_number,omitempty"`
CloudRate string `json:"cloud_rate,omitempty" url:"cloud_rate,omitempty"`
MessageType string `json:"message_type,omitempty" url:"message_type,omitempty"`
ResourceURI string `json:"resource_uri,omitempty" url:"resource_uri,omitempty"`
CarrierRate string `json:"carrier_rate,omitempty" url:"carrier_rate,omitempty"`
MessageDirection string `json:"message_direction,omitempty" url:"message_direction,omitempty"`
MessageState string `json:"message_state,omitempty" url:"message_state,omitempty"`
TotalAmount string `json:"total_amount,omitempty" url:"total_amount,omitempty"`
MessageUUID string `json:"message_uuid,omitempty" url:"message_uuid,omitempty"`
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"`
ToNumber string `json:"to_number,omitempty" url:"to_number,omitempty"`
FromNumber string `json:"from_number,omitempty" url:"from_number,omitempty"`
CloudRate string `json:"cloud_rate,omitempty" url:"cloud_rate,omitempty"`
MessageType string `json:"message_type,omitempty" url:"message_type,omitempty"`
ResourceURI string `json:"resource_uri,omitempty" url:"resource_uri,omitempty"`
CarrierRate string `json:"carrier_rate,omitempty" url:"carrier_rate,omitempty"`
MessageDirection string `json:"message_direction,omitempty" url:"message_direction,omitempty"`
MessageState string `json:"message_state,omitempty" url:"message_state,omitempty"`
TotalAmount string `json:"total_amount,omitempty" url:"total_amount,omitempty"`
MessageUUID string `json:"message_uuid,omitempty" url:"message_uuid,omitempty"`
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"`
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"`
}

// Stores response for ending a message.
Expand Down Expand Up @@ -92,6 +95,9 @@ type MessageListParams struct {
MessageTimeGreaterOrEqual string `url:"message_time__gte,omitempty"`
MessageTimeLessThan string `url:"message_time__lt,omitempty"`
MessageTimeLessOrEqual string `url:"message_time__lte,omitempty"`
TendlcCampaignID string `url:"tendlc_campaign_id,omitempty"`
TendlcRegistrationStatus string `url:"tendlc_registration_status,omitempty"`
DestinationCountryISO2 string `url:"destination_country_iso2,omitempty"`
}

func (service *MessageService) List(params MessageListParams) (response *MessageList, err error) {
Expand Down

0 comments on commit 2d8ce54

Please sign in to comment.