diff --git a/CHANGELOG.md b/CHANGELOG.md index af56fa2..c989c08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## [7.25.1](https://github.com/plivo/plivo-go/tree/v7.25.1) (2023-04-04) +**Feature - Recording API changes** +- Added `cost`, `rounded_duration`, and `days_of_storage` parameters to the response for [get single recording API](https://www.plivo.com/docs/voice/api/recording#retrieve-a-recording) and [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) +- Added `rounded_duration` parameter as a filter option for [get all recordings API](https://www.plivo.com/docs/voice/api/recording#list-all-recordings) + ## [7.25.0](https://github.com/plivo/plivo-go/tree/v7.25.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) diff --git a/baseclient.go b/baseclient.go index 87c7d87..f6d6472 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "7.25.0" +const sdkVersion = "7.25.1" const lookupBaseUrl = "lookup.plivo.com" diff --git a/fixtures/recordingGetResponse.json b/fixtures/recordingGetResponse.json index 8bb70ce..83ec606 100644 --- a/fixtures/recordingGetResponse.json +++ b/fixtures/recordingGetResponse.json @@ -10,5 +10,8 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-11e4-a664-0026b945b52x.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-11e4-a664-0026b945b52x/", + "cost": "0.0004", + "rounded_duration": "120", + "days_of_storage": "209" } diff --git a/fixtures/recordingListResponse.json b/fixtures/recordingListResponse.json index 54ecd56..5d3cc68 100644 --- a/fixtures/recordingListResponse.json +++ b/fixtures/recordingListResponse.json @@ -19,7 +19,10 @@ "recording_start_ms": "1407235163907.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/c2186400-1c8c-1124-a664-0026b945b522.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/c2186400-1c8c-1124-a664-0026b945b522/", + "cost": "0.0004", + "rounded_duration": "120", + "days_of_storage": "209" }, { "add_time": "2014-08-05 16:05:21.993853+05:30", @@ -32,7 +35,10 @@ "recording_start_ms": "1407234829553.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/fc2716b0-1c8b-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/fc2716b0-1c8b-11e4-bwad-842b2b17453e/", + "cost": "0.0004", + "rounded_duration": "120", + "days_of_storage": "209" }, { "add_time": "2014-08-05 15:51:56.582492+05:30", @@ -45,7 +51,10 @@ "recording_start_ms": "1407234081443.00000", "recording_type": "conference", "recording_url": "http://s3.amazonaws.com/recordings_2013/3e701c9e-1c8a-11e4-bwad-842b2b17453e.mp3", - "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/" + "resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Recording/3e701c9e-1c8a-11e4-bwad-842b2b17453e/", + "cost": "0.0004", + "rounded_duration": "120", + "days_of_storage": "209" } ] } diff --git a/recordings.go b/recordings.go index abeb375..27dc169 100644 --- a/recordings.go +++ b/recordings.go @@ -7,6 +7,8 @@ type RecordingService struct { type Recording struct { AddTime string `json:"add_time,omitempty" url:"add_time,omitempty"` CallUUID string `json:"call_uuid,omitempty" url:"call_uuid,omitempty"` + Cost string `json:"cost,omitempty" url:"cost,omitempty"` + DaysOfStorage string `json:"days_of_storage,omitempty" url:"days_of_storage,omitempty"` RecordingID string `json:"recording_id,omitempty" url:"recording_id,omitempty"` RecordingType string `json:"recording_type,omitempty" url:"recording_type,omitempty"` RecordingFormat string `json:"recording_format,omitempty" url:"recording_format,omitempty"` @@ -16,6 +18,7 @@ type Recording struct { RecordingStartMS string `json:"recording_start_ms,omitempty" url:"recording_start_ms,omitempty"` RecordingEndMS string `json:"recording_end_ms,omitempty" url:"recording_end_ms,omitempty"` RecordingDurationMS string `json:"recording_duration_ms,omitempty" url:"recording_duration_ms,omitempty"` + RoundedDuration string `json:"rounded_duration,omitempty" url:"rounded_duration,omitempty"` FromNumber string `json:"from_number,omitempty" url:"from_number,omitempty"` ToNumber string `json:"to_number,omitempty" url:"to_number,omitempty"` } @@ -37,6 +40,7 @@ type RecordingListParams struct { MpcName string `json:"mpc_name,omitempty" url:"mpc_name,omitempty"` ConferenceUuid string `json:"conference_uuid,omitempty" url:"conference_uuid,omitempty"` MpcUuid string `json:"mpc_uuid,omitempty" url:"mpc_uuid,omitempty"` + RoundedDuration string `json:"rounded_duration,omitempty" url:"rounded_duration,omitempty"` } type RecordingListResponse struct {