Skip to content

Commit

Permalink
Merge pull request #100 from plivo/go-vng
Browse files Browse the repository at this point in the history
[VT-2461] VNG changes
  • Loading branch information
huzaif-plivo authored Jul 2, 2021
2 parents 592a4ab + 8341100 commit e11cebd
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 24 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
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 = "6.0.0"
const sdkVersion = "6.0.1"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
39 changes: 21 additions & 18 deletions calls.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions fixtures/callGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
8 changes: 5 additions & 3 deletions fixtures/callListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
]
}
}
1 change: 1 addition & 0 deletions pricing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit e11cebd

Please sign in to comment.