Skip to content

Commit

Permalink
Added sdk changes for masking session. (#215)
Browse files Browse the repository at this point in the history
Added sdk changes for masking session.
  • Loading branch information
JayaBharat-plivo authored Sep 30, 2024
1 parent 726868c commit 19900b2
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 77 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Change Log
## [7.52.0](https://github.com/plivo/plivo-go/tree/v7.52.0) (2024-09-30)
**Feature - Adding new param support for Number Masking session with single party **
- Added `create_session_with_single_party`, `virtual_number_cooloff_period` and `force_pin_authentication` attributes in Masking Session

## [7.51.3](https://github.com/plivo/plivo-go/tree/v7.53.0) (2024-09-06)
**Feature - Adding support for Locale param in Create, Get and List Session**
- Enhance message object
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 = "7.51.3"
const sdkVersion = "7.52.0"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
161 changes: 85 additions & 76 deletions maskingsession.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,97 @@ type MaskingSessionService struct {
}

type MaskingSession struct {
FirstParty string `json:"first_party,omitempty" url:"first_party,omitempty"`
SecondParty string `json:"second_party,omitempty" url:"second_party,omitempty"`
VirtualNumber string `json:"virtual_number,omitempty" url:"virtual_number,omitempty"`
Status string `json:"status,omitempty" url:"status,omitempty"`
InitiateCallToFirstParty bool `json:"initiate_call_to_first_party,omitempty" url:"initiate_call_to_first_party,omitempty"`
SessionUUID string `json:"session_uuid,omitempty" url:"session_uuid,omitempty"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
CallbackMethod string `json:"callback_method,omitempty" url:"callback_method,omitempty"`
CreatedAt string `json:"created_time,omitempty" url:"created_time,omitempty"`
UpdatedAt string `json:"modified_time,omitempty" url:"updated_at,omitempty"`
ExpiryAt string `json:"expiry_time,omitempty" url:"expiry_time,omitempty"`
Duration int64 `json:"duration,omitempty" url:"duration,omitempty"`
SessionCreationAmount int64 `json:"amount" url:"amount"`
CallTimeLimit int64 `json:"call_time_limit,omitempty" url:"call_time_limit,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
FirstPartyPlayUrl string `json:"first_party_play_url,omitempty" url:"first_party_play_url,omitempty"`
SecondPartyPlayUrl string `json:"second_party_play_url,omitempty" url:"second_party_play_url,omitempty"`
Record bool `json:"record,omitempty" url:"record,omitempty"`
RecordFileFormat string `json:"record_file_format,omitempty" url:"record_file_format,omitempty"`
RecordingCallbackUrl string `json:"recording_callback_url,omitempty" url:"recording_callback_url,omitempty"`
RecordingCallbackMethod string `json:"recording_callback_method,omitempty" url:"recording_callback_method,omitempty"`
Interaction []VoiceInteractionResponse `json:"interaction" url:"interaction"`
TotalCallAmount float64 `json:"total_call_amount" url:"total_call_amount"`
TotalCallCount int `json:"total_call_count" url:"total_call_count"`
TotalCallBilledDuration int `json:"total_call_billed_duration" url:"total_call_billed_duration"`
TotalSessionAmount float64 `json:"total_session_amount" url:"total_session_amount"`
LastInteractionTime string `json:"last_interaction_time" url:"last_interaction_time"`
IsPinAuthenticationRequired bool `json:"is_pin_authentication_required" url:"is_pin_authentication_required"`
GeneratePin bool `json:"generate_pin" url:"generate_pin"`
GeneratePinLength int64 `json:"generate_pin_length" url:"generate_pin_length"`
FirstPartyPin string `json:"first_party_pin" url:"first_party_pin"`
SecondPartyPin string `json:"second_party_pin" url:"second_party_pin"`
PinPromptPlay string `json:"pin_prompt_play" url:"pin_prompt_play"`
PinRetry int64 `json:"pin_retry" url:"pin_retry"`
PinRetryWait int64 `json:"pin_retry_wait" url:"pin_retry_wait"`
IncorrectPinPlay string `json:"incorrect_pin_play" url:"incorrect_pin_play"`
UnknownCallerPlay string `json:"unknown_caller_play" url:"unknown_caller_play"`
FirstParty string `json:"first_party,omitempty" url:"first_party,omitempty"`
SecondParty string `json:"second_party,omitempty" url:"second_party,omitempty"`
VirtualNumber string `json:"virtual_number,omitempty" url:"virtual_number,omitempty"`
Status string `json:"status,omitempty" url:"status,omitempty"`
InitiateCallToFirstParty bool `json:"initiate_call_to_first_party,omitempty" url:"initiate_call_to_first_party,omitempty"`
SessionUUID string `json:"session_uuid,omitempty" url:"session_uuid,omitempty"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
CallbackMethod string `json:"callback_method,omitempty" url:"callback_method,omitempty"`
CreatedAt string `json:"created_time,omitempty" url:"created_time,omitempty"`
UpdatedAt string `json:"modified_time,omitempty" url:"updated_at,omitempty"`
ExpiryAt string `json:"expiry_time,omitempty" url:"expiry_time,omitempty"`
Duration int64 `json:"duration,omitempty" url:"duration,omitempty"`
SessionCreationAmount int64 `json:"amount" url:"amount"`
CallTimeLimit int64 `json:"call_time_limit,omitempty" url:"call_time_limit,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
FirstPartyPlayUrl string `json:"first_party_play_url,omitempty" url:"first_party_play_url,omitempty"`
SecondPartyPlayUrl string `json:"second_party_play_url,omitempty" url:"second_party_play_url,omitempty"`
Record bool `json:"record,omitempty" url:"record,omitempty"`
RecordFileFormat string `json:"record_file_format,omitempty" url:"record_file_format,omitempty"`
RecordingCallbackUrl string `json:"recording_callback_url,omitempty" url:"recording_callback_url,omitempty"`
RecordingCallbackMethod string `json:"recording_callback_method,omitempty" url:"recording_callback_method,omitempty"`
Interaction []VoiceInteractionResponse `json:"interaction" url:"interaction"`
TotalCallAmount float64 `json:"total_call_amount" url:"total_call_amount"`
TotalCallCount int `json:"total_call_count" url:"total_call_count"`
TotalCallBilledDuration int `json:"total_call_billed_duration" url:"total_call_billed_duration"`
TotalSessionAmount float64 `json:"total_session_amount" url:"total_session_amount"`
LastInteractionTime string `json:"last_interaction_time" url:"last_interaction_time"`
IsPinAuthenticationRequired bool `json:"is_pin_authentication_required" url:"is_pin_authentication_required"`
GeneratePin bool `json:"generate_pin" url:"generate_pin"`
GeneratePinLength int64 `json:"generate_pin_length" url:"generate_pin_length"`
FirstPartyPin string `json:"first_party_pin" url:"first_party_pin"`
SecondPartyPin string `json:"second_party_pin" url:"second_party_pin"`
PinPromptPlay string `json:"pin_prompt_play" url:"pin_prompt_play"`
PinRetry int64 `json:"pin_retry" url:"pin_retry"`
PinRetryWait int64 `json:"pin_retry_wait" url:"pin_retry_wait"`
IncorrectPinPlay string `json:"incorrect_pin_play" url:"incorrect_pin_play"`
UnknownCallerPlay string `json:"unknown_caller_play" url:"unknown_caller_play"`
VirtualNumberCooloffPeriod int `json:"virtual_number_cooloff_period,omitempty" url:"virtual_number_cooloff_period,omitempty"`
ForcePinAuthentication bool `json:"force_pin_authentication" url:"force_pin_authentication"`
CreateSessionWithSingleParty bool `json:"create_session_with_single_Party" url:"create_session_with_single_Party"`
}

type CreateMaskingSessionParams struct {
FirstParty string `json:"first_party,omitempty" url:"first_party,omitempty"`
SecondParty string `json:"second_party,omitempty" url:"second_party,omitempty"`
SessionExpiry int `json:"session_expiry" url:"session_expiry,omitempty"`
CallTimeLimit int `json:"call_time_limit,omitempty" url:"call_time_limit,omitempty"`
Record bool `json:"record,omitempty" url:"record,omitempty"`
RecordFileFormat string `json:"record_file_format,omitempty" url:"record_file_format,omitempty"`
RecordingCallbackUrl string `json:"recording_callback_url,omitempty" url:"recording_callback_url,omitempty"`
InitiateCallToFirstParty bool `json:"initiate_call_to_first_party,omitempty" url:"initiate_call_to_first_party,omitempty"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
CallbackMethod string `json:"callback_method,omitempty" url:"callback_method,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
FirstPartyPlayUrl string `json:"first_party_play_url,omitempty" url:"first_party_play_url,omitempty"`
SecondPartyPlayUrl string `json:"second_party_play_url,omitempty" url:"second_party_play_url,omitempty"`
RecordingCallbackMethod string `json:"recording_callback_method,omitempty" url:"recording_callback_method,omitempty"`
IsPinAuthenticationRequired bool `json:"is_pin_authentication_required,omitempty" url:"is_pin_authentication_required,omitempty"`
GeneratePin bool `json:"generate_pin,omitempty" url:"generate_pin,omitempty"`
GeneratePinLength int64 `json:"generate_pin_length,omitempty" url:"generate_pin_length,omitempty"`
FirstPartyPin string `json:"first_party_pin,omitempty" url:"first_party_pin,omitempty"`
SecondPartyPin string `json:"second_party_pin,omitempty" url:"second_party_pin,omitempty"`
PinPromptPlay string `json:"pin_prompt_play,omitempty" url:"pin_prompt_play,omitempty"`
PinRetry int64 `json:"pin_retry,omitempty" url:"pin_retry,omitempty"`
PinRetryWait int64 `json:"pin_retry_wait,omitempty" url:"pin_retry_wait,omitempty"`
IncorrectPinPlay string `json:"incorrect_pin_play,omitempty" url:"incorrect_pin_play,omitempty"`
UnknownCallerPlay string `json:"unknown_caller_play,omitempty" url:"unknown_caller_play,omitempty"`
SubAccount string `json:"subaccount,omitempty" url:"subaccount,omitempty"`
GeoMatch *bool `json:"geomatch,omitempty" url:"geomatch,omitempty"`
FirstParty string `json:"first_party,omitempty" url:"first_party,omitempty"`
SecondParty string `json:"second_party,omitempty" url:"second_party,omitempty"`
SessionExpiry int `json:"session_expiry" url:"session_expiry,omitempty"`
CallTimeLimit int `json:"call_time_limit,omitempty" url:"call_time_limit,omitempty"`
Record bool `json:"record,omitempty" url:"record,omitempty"`
RecordFileFormat string `json:"record_file_format,omitempty" url:"record_file_format,omitempty"`
RecordingCallbackUrl string `json:"recording_callback_url,omitempty" url:"recording_callback_url,omitempty"`
InitiateCallToFirstParty bool `json:"initiate_call_to_first_party,omitempty" url:"initiate_call_to_first_party,omitempty"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
CallbackMethod string `json:"callback_method,omitempty" url:"callback_method,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
FirstPartyPlayUrl string `json:"first_party_play_url,omitempty" url:"first_party_play_url,omitempty"`
SecondPartyPlayUrl string `json:"second_party_play_url,omitempty" url:"second_party_play_url,omitempty"`
RecordingCallbackMethod string `json:"recording_callback_method,omitempty" url:"recording_callback_method,omitempty"`
IsPinAuthenticationRequired bool `json:"is_pin_authentication_required,omitempty" url:"is_pin_authentication_required,omitempty"`
GeneratePin bool `json:"generate_pin,omitempty" url:"generate_pin,omitempty"`
GeneratePinLength int64 `json:"generate_pin_length,omitempty" url:"generate_pin_length,omitempty"`
FirstPartyPin string `json:"first_party_pin,omitempty" url:"first_party_pin,omitempty"`
SecondPartyPin string `json:"second_party_pin,omitempty" url:"second_party_pin,omitempty"`
PinPromptPlay string `json:"pin_prompt_play,omitempty" url:"pin_prompt_play,omitempty"`
PinRetry int64 `json:"pin_retry,omitempty" url:"pin_retry,omitempty"`
PinRetryWait int64 `json:"pin_retry_wait,omitempty" url:"pin_retry_wait,omitempty"`
IncorrectPinPlay string `json:"incorrect_pin_play,omitempty" url:"incorrect_pin_play,omitempty"`
UnknownCallerPlay string `json:"unknown_caller_play,omitempty" url:"unknown_caller_play,omitempty"`
SubAccount string `json:"subaccount,omitempty" url:"subaccount,omitempty"`
GeoMatch *bool `json:"geomatch,omitempty" url:"geomatch,omitempty"`
VirtualNumberCooloffPeriod int `json:"virtual_number_cooloff_period,omitempty" url:"virtual_number_cooloff_period,omitempty"`
ForcePinAuthentication bool `json:"force_pin_authentication,omitempty" url:"force_pin_authentication,omitempty"`
CreateSessionWithSingleParty bool `json:"create_session_with_single_Party,omitempty" url:"create_session_with_single_Party,omitempty"`
}

type UpdateMaskingSessionParams struct {
SessionExpiry int64 `json:"session_expiry,omitempty" url:"session_expiry,omitempty"`
CallTimeLimit int64 `json:"call_time_limit,omitempty" url:"call_time_limit,omitempty"`
Record bool `json:"record,omitempty" url:"record,omitempty"`
RecordFileFormat string `json:"record_file_format,omitempty" url:"record_file_format,omitempty"`
RecordingCallbackUrl string `json:"recording_callback_url,omitempty" url:"recording_callback_url,omitempty"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
CallbackMethod string `json:"callback_method,omitempty" url:"callback_method,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
FirstPartyPlayUrl string `json:"first_party_play_url,omitempty" url:"first_party_play_url,omitempty"`
SecondPartyPlayUrl string `json:"second_party_play_url,omitempty" url:"second_party_play_url,omitempty"`
RecordingCallbackMethod string `json:"recording_callback_method,omitempty" url:"recording_callback_method,omitempty"`
SubAccount string `json:"subaccount,omitempty" url:"subaccount,omitempty"`
GeoMatch *bool `json:"geomatch,omitempty" url:"geomatch,omitempty"`
FirstParty string `json:"first_party,omitempty" url:"first_party,omitempty"`
SecondParty string `json:"second_party,omitempty" url:"second_party,omitempty"`
SessionExpiry int64 `json:"session_expiry,omitempty" url:"session_expiry,omitempty"`
CallTimeLimit int64 `json:"call_time_limit,omitempty" url:"call_time_limit,omitempty"`
Record bool `json:"record,omitempty" url:"record,omitempty"`
RecordFileFormat string `json:"record_file_format,omitempty" url:"record_file_format,omitempty"`
RecordingCallbackUrl string `json:"recording_callback_url,omitempty" url:"recording_callback_url,omitempty"`
CallbackUrl string `json:"callback_url,omitempty" url:"callback_url,omitempty"`
CallbackMethod string `json:"callback_method,omitempty" url:"callback_method,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
FirstPartyPlayUrl string `json:"first_party_play_url,omitempty" url:"first_party_play_url,omitempty"`
SecondPartyPlayUrl string `json:"second_party_play_url,omitempty" url:"second_party_play_url,omitempty"`
RecordingCallbackMethod string `json:"recording_callback_method,omitempty" url:"recording_callback_method,omitempty"`
SubAccount string `json:"subaccount,omitempty" url:"subaccount,omitempty"`
GeoMatch *bool `json:"geomatch,omitempty" url:"geomatch,omitempty"`
CreateSessionWithSingleParty bool `json:"create_session_with_single_Party,omitempty" url:"create_session_with_single_Party,omitempty"`
}

type ListSessionFilterParams struct {
Expand Down
Loading

0 comments on commit 19900b2

Please sign in to comment.