diff --git a/CHANGELOG.md b/CHANGELOG.md index 97a98e4..6588925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [6.0.1](https://github.com/plivo/plivo-go/tree/v6.0.1) (2021-07-02) +- Read voice network group from voice pricing +- Fix GetCDR and ListCDR response to include all fields + ## [6.0.0](https://github.com/plivo/plivo-go/tree/v6.0.0) (2021-06-29) - **BREAKING**: Update AddSpeak method signature: remove optional parameters - Add methods to set SpeakElement attributes diff --git a/baseclient.go b/baseclient.go index 7d8c786..76eb80b 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "6.0.0" +const sdkVersion = "6.0.1" const lookupBaseUrl = "lookup.plivo.com" diff --git a/calls.go b/calls.go index e6842c1..330ef48 100644 --- a/calls.go +++ b/calls.go @@ -13,24 +13,27 @@ type QueuedCallService struct { } type Call struct { - FromNumber string `json:"from_number,omitempty" url:"from_number,omitempty"` - ToNumber string `json:"to_number,omitempty" url:"to_number,omitempty"` - AnswerURL string `json:"answer_url,omitempty" url:"answer_url,omitempty"` - CallUUID string `json:"call_uuid,omitempty" url:"call_uuid,omitempty"` - ParentCallUUID string `json:"parent_call_uuid,omitempty" url:"parent_call_uuid,omitempty"` - EndTime string `json:"end_time,omitempty" url:"end_time,omitempty"` - TotalAmount string `json:"total_amount,omitempty" url:"total_amount,omitempty"` - CallDirection string `json:"call_direction,omitempty" url:"call_direction,omitempty"` - CallDuration int64 `json:"call_duration,omitempty" url:"call_duration,omitempty"` - MessageURL string `json:"message_url,omitempty" url:"message_url,omitempty"` - ResourceURI string `json:"resource_uri,omitempty" url:"resource_uri,omitempty"` - CallState string `json:"call_state,omitempty" url:"call_state,omitempty"` - HangupCauseCode int64 `json:"hangup_cause_code,omitempty" url:"hangup_cause_code,omitempty"` - HangupCauseName string `json:"hangup_cause_name,omitempty" url:"hangup_cause_name,omitempty"` - HangupSource string `json:"hangup_source,omitempty" url:"hangup_source,omitempty"` - TotalRate string `json:"total_rate,omitempty" url:"total_rate,omitempty"` - ConferenceUUID string `json:"conference_uuid,omitempty"` - StirVerification string `json:"stir_verification,omitempty" url:"stir_verification,omitempty"` + AnswerTime string `json:"answer_time,omitempty" url:"answer_time,omitempty"` + BillDuration int64 `json:"bill_duration,omitempty" url:"bill_duration,omitempty"` + BilledDuration int64 `json:"billed_duration,omitempty" url:"billed_duration,omitempty"` + CallDirection string `json:"call_direction,omitempty" url:"call_direction,omitempty"` + CallDuration int64 `json:"call_duration,omitempty" url:"call_duration,omitempty"` + CallState string `json:"call_state,omitempty" url:"call_state,omitempty"` + CallUUID string `json:"call_uuid,omitempty" url:"call_uuid,omitempty"` + ConferenceUUID string `json:"conference_uuid,omitempty"` + EndTime string `json:"end_time,omitempty" url:"end_time,omitempty"` + FromNumber string `json:"from_number,omitempty" url:"from_number,omitempty"` + HangupCauseCode int64 `json:"hangup_cause_code,omitempty" url:"hangup_cause_code,omitempty"` + HangupCauseName string `json:"hangup_cause_name,omitempty" url:"hangup_cause_name,omitempty"` + HangupSource string `json:"hangup_source,omitempty" url:"hangup_source,omitempty"` + InitiationTime string `json:"initiation_time,omitempty" url:"initiation_time,omitempty"` + ParentCallUUID string `json:"parent_call_uuid,omitempty" url:"parent_call_uuid,omitempty"` + ResourceURI string `json:"resource_uri,omitempty" url:"resource_uri,omitempty"` + ToNumber string `json:"to_number,omitempty" url:"to_number,omitempty"` + TotalAmount string `json:"total_amount,omitempty" url:"total_amount,omitempty"` + TotalRate string `json:"total_rate,omitempty" url:"total_rate,omitempty"` + StirVerification string `json:"stir_verification,omitempty" url:"stir_verification,omitempty"` + VoiceNetworkGroup string `json:"voice_network_group,omitempty" url:"voice_network_group,omitempty"` } type LiveCall struct { diff --git a/fixtures/callGetResponse.json b/fixtures/callGetResponse.json index d50217e..0a248cd 100644 --- a/fixtures/callGetResponse.json +++ b/fixtures/callGetResponse.json @@ -14,5 +14,6 @@ "to_number": "919999999999", "total_amount": "0.00000", "total_rate": "0.03570", - "stir_verification": "Not Applicable" -} + "stir_verification": "Not Applicable", + "voice_network_group": "India All Networks" +} \ No newline at end of file diff --git a/fixtures/callListResponse.json b/fixtures/callListResponse.json index 47a2950..44249e0 100644 --- a/fixtures/callListResponse.json +++ b/fixtures/callListResponse.json @@ -24,7 +24,8 @@ "to_number": "14153268174", "total_amount": "0.13600", "total_rate": "0.00850", - "stir_verification": "Not Verified" + "stir_verification": "Not Verified", + "voice_network_group": "USA All Networks" }, { "answer_time": "2015-07-26 16:45:02+05:30", @@ -42,7 +43,8 @@ "to_number": "14153268174", "total_amount": "0.13600", "total_rate": "0.00850", - "stir_verification": "Verified" + "stir_verification": "Verified", + "voice_network_group": "USA All Networks" } ] -} +} \ No newline at end of file diff --git a/pricing.go b/pricing.go index e5ee4e3..657f553 100644 --- a/pricing.go +++ b/pricing.go @@ -56,6 +56,7 @@ type Pricing struct { OriginationPrefix []string `json:"origination_prefix" url:"origination_prefix"` Prefix []string `json:"prefix" url:"prefix"` Rate string `json:"rate" url:"rate"` + VoiceNetworkGroup string `json:"voice_network_group" url:"voice_network_group"` } `json:"rates" url:"rates"` Tollfree struct { Rate string `json:"rate" url:"rate"`