Skip to content

Commit

Permalink
Merge pull request #101 from plivo/VT-3196
Browse files Browse the repository at this point in the history
Added stir verification field as part of Get CDR / live call API resp…
  • Loading branch information
nixonsam authored Jun 23, 2021
2 parents 4b402ae + be3178a commit 175bb2b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 30 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [5.6.0](https://github.com/plivo/plivo-go/tree/v5.6.0) (2021-06-15)
- Add stir verification param as part of Get CDR and live call APIs

## [5.5.2](https://github.com/plivo/plivo-go/tree/v5.5.2) (2021-04-08)
- Read origination prefix from voice pricing

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 = "5.5.2"
const sdkVersion = "5.6.0"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
52 changes: 27 additions & 25 deletions calls.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,36 @@ 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"`
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"`
}

type LiveCall struct {
From string `json:"from,omitempty" url:"from,omitempty"`
To string `json:"to,omitempty" url:"to,omitempty"`
AnswerURL string `json:"answer_url,omitempty" url:"answer_url,omitempty"`
CallUUID string `json:"call_uuid,omitempty" url:"call_uuid,omitempty"`
CallerName string `json:"caller_name,omitempty" url:"caller_name,omitempty"`
ParentCallUUID string `json:"parent_call_uuid,omitempty" url:"parent_call_uuid,omitempty"`
SessionStart string `json:"session_start,omitempty" url:"session_start,omitempty"`
CallStatus string `json:"call_status,omitempty" url:"call_status,omitempty"`
From string `json:"from,omitempty" url:"from,omitempty"`
To string `json:"to,omitempty" url:"to,omitempty"`
AnswerURL string `json:"answer_url,omitempty" url:"answer_url,omitempty"`
CallUUID string `json:"call_uuid,omitempty" url:"call_uuid,omitempty"`
CallerName string `json:"caller_name,omitempty" url:"caller_name,omitempty"`
ParentCallUUID string `json:"parent_call_uuid,omitempty" url:"parent_call_uuid,omitempty"`
SessionStart string `json:"session_start,omitempty" url:"session_start,omitempty"`
CallStatus string `json:"call_status,omitempty" url:"call_status,omitempty"`
StirVerification string `json:"stir_verification,omitempty" url:"stir_verification,omitempty"`
}

type QueuedCall struct {
Expand Down
3 changes: 2 additions & 1 deletion fixtures/callGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"resource_uri": "/v1/Account/MAJHUDTEYWLSIUYTDBCZ/Call/4d04c52e-cea3-4458-bbdb-0bfc314ee7cd/",
"to_number": "919999999999",
"total_amount": "0.00000",
"total_rate": "0.03570"
"total_rate": "0.03570",
"stir_verification": "Not Applicable"
}
6 changes: 4 additions & 2 deletions fixtures/callListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Call/eba53b9e-8fbd-45c1-9444-696d2172fbc8/",
"to_number": "14153268174",
"total_amount": "0.13600",
"total_rate": "0.00850"
"total_rate": "0.00850",
"stir_verification": "Not Verified"
},
{
"answer_time": "2015-07-26 16:45:02+05:30",
Expand All @@ -40,7 +41,8 @@
"resource_uri": "/v1/Account/MANWVLYTK4ZWU1YTY4ZT/Call/eba53b9e-8fbd-45c1-9444-696d2172fbc8/",
"to_number": "14153268174",
"total_amount": "0.13600",
"total_rate": "0.00850"
"total_rate": "0.00850",
"stir_verification": "Verified"
}
]
}
3 changes: 2 additions & 1 deletion fixtures/liveCallGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"from": "+918687888990",
"request_uuid": "d0a87a1a-b0e9-4ab2-ac07-c22ee87cd04a",
"session_start": "2017-05-22 13:17:49.050872",
"to": "919798990001"
"to": "919798990001",
"stir_verification": "Verified"
}

0 comments on commit 175bb2b

Please sign in to comment.