Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added stirVerification field as part of get CDR / live call API response #221

Merged
merged 3 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Plivo/Resources/Call/Call.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @property string $hangupCauseCode Hangup Cause Code
* @property string $hangupCauseName Hangup Cause Name
* @property string $hangupSource Hangup Source
* @property string $stirVerification Stir Verification
*/
class Call extends Resource
{
Expand Down Expand Up @@ -59,7 +60,8 @@ function __construct(
'totalRate' => $response['total_rate'],
'hangupCauseCode' => $response['hangup_cause_code'],
'hangupCauseName' => $response['hangup_cause_name'],
'hangupSource' => $response['hangup_source']
'hangupSource' => $response['hangup_source'],
'stirVerification' => $response['stir_verification']
];

$this->pathParams = [
Expand Down
3 changes: 2 additions & 1 deletion src/Plivo/Resources/Call/CallLive.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function __construct(BaseClient $client, $response, $authId)
'to' => $response['to'],
'callName' => $response['caller_name'],
'callUuid' => $response['call_uuid'],
'sessionStart' => $response['session_start']
'sessionStart' => $response['session_start'],
'stirVerification' => $response['stir_verification']
];

$this->pathParams = [
Expand Down
3 changes: 2 additions & 1 deletion tests/Mocks/callGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"resource_uri": "/v1/Account/MAXXXXXXXXXXXXXXXXXX/Call/4d04c52e-cea3-4458-bbdb-0bfc314ee7cd/",
"to_number": "919686218339",
"total_amount": "0.02770",
"total_rate": "0.02770"
"total_rate": "0.02770",
"stir_verification": "Not Applicable"
}
6 changes: 4 additions & 2 deletions tests/Mocks/callListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"resource_uri": "/v1/Account/MAXXXXXXXXXXXXXXXXXX/Call/73b3b6cc-2d6c-4566-8d19-10e6fda55df8/",
"to_number": "919686218339",
"total_amount": "0.02770",
"total_rate": "0.02770"
"total_rate": "0.02770",
"stir_verification": "Verified"
},
{
"answer_time": null,
Expand All @@ -46,7 +47,8 @@
"resource_uri": "/v1/Account/MAXXXXXXXXXXXXXXXXXX/Call/7dddc9ac-db63-11e8-bd1f-2da0e9cc90d8/",
"to_number": "19792014278",
"total_amount": "0.00000",
"total_rate": "0.00000"
"total_rate": "0.00000",
"stir_verification": "Not Verified"
}
]
}
3 changes: 2 additions & 1 deletion tests/Mocks/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": "Not Applicable"
}