diff --git a/CHANGELOG.md b/CHANGELOG.md index eae3e76..b9eb6c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [7.1.0](https://github.com/plivo/plivo-go/tree/v7.1.0) (2021-07-13) +- Power pack ID has been included 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). +- Support for filtering messages by Power pack ID has been added to the [list all messages API](https://www.plivo.com/docs/sms/api/message#list-all-messages). + + ## [7.0.0](https://github.com/plivo/plivo-go/tree/v7.0.0) (2021-07-05) - **BREAKING**: Remove the total_count parameter in meta data for list MDR response diff --git a/baseclient.go b/baseclient.go index 68cb006..7692886 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "7.0.0" +const sdkVersion = "7.1.0" const lookupBaseUrl = "lookup.plivo.com" diff --git a/messages.go b/messages.go index 90d0c37..0666986 100644 --- a/messages.go +++ b/messages.go @@ -38,6 +38,8 @@ type Message struct { 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"` } // Stores response for ending a message. @@ -76,8 +78,18 @@ type MediaListResponseBody struct { } type MessageListParams struct { - Limit int `url:"limit,omitempty"` - Offset int `url:"offset,omitempty"` + Limit int `url:"limit,omitempty"` + Offset int `url:"offset,omitempty"` + PowerpackID string `url:"powerpack_id,omitempty"` + Subaccount string `url:"subaccount,omitempty"` + MessageDirection string `url:"message_direction,omitempty"` + MessageState string `url:"message_state,omitempty"` + ErrorCode int `url:"error_code,omitempty"` + MessageTime string `url:"message_time,omitempty"` + MessageTimeGreaterThan string `url:"message_time__gt,omitempty"` + MessageTimeGreaterOrEqual string `url:"message_time__gte,omitempty"` + MessageTimeLessThan string `url:"message_time__lt,omitempty"` + MessageTimeLessOrEqual string `url:"message_time__lte,omitempty"` } func (service *MessageService) List(params MessageListParams) (response *MessageList, err error) {