| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiries; | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 3 | ▶ | use 5.016; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 3 | our $VERSION = '2.001'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | package Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesList; | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 3 | ▶ | use parent 'Twilio::ListResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 3 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 3 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 3 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 3 | $self->{uri} = '/ComplianceInquiries/Registration/RegulatoryCompliance/GB/Initialize'; | |||||||||||||||||||
| 20 | 3 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 2 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 24 | 2 | my ($self, $end_user_type, $phone_number_type, $options) = @_; | |||||||||||||||||||
| 25 | 2 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | my $data = { | ||||||||||||||||||||
| 28 | EndUserType => $end_user_type, | ||||||||||||||||||||
| 29 | PhoneNumberType => $phone_number_type, | ||||||||||||||||||||
| 30 | AcceptedNotificationReceipt => | ||||||||||||||||||||
| 31 | Twilio::Serialize::boolean_to_string($options->{accepted_notification_receipt}), | ||||||||||||||||||||
| 32 | AddressCity => $options->{address_city}, | ||||||||||||||||||||
| 33 | AddressCountryCode => $options->{address_country_code}, | ||||||||||||||||||||
| 34 | AddressPostalCode => $options->{address_postal_code}, | ||||||||||||||||||||
| 35 | AddressStreet => $options->{address_street}, | ||||||||||||||||||||
| 36 | AddressStreetSecondary => $options->{address_street_secondary}, | ||||||||||||||||||||
| 37 | AddressSubdivision => $options->{address_subdivision}, | ||||||||||||||||||||
| 38 | AuthorizedRepresentative1DateOfBirth => $options->{authorized_representative1_date_of_birth}, | ||||||||||||||||||||
| 39 | AuthorizedRepresentative1Email => $options->{authorized_representative1_email}, | ||||||||||||||||||||
| 40 | AuthorizedRepresentative1FirstName => $options->{authorized_representative1_first_name}, | ||||||||||||||||||||
| 41 | AuthorizedRepresentative1LastName => $options->{authorized_representative1_last_name}, | ||||||||||||||||||||
| 42 | AuthorizedRepresentative1Phone => $options->{authorized_representative1_phone}, | ||||||||||||||||||||
| 43 | BusinessIdentityType => $options->{business_identity_type}, | ||||||||||||||||||||
| 44 | BusinessLegalName => $options->{business_legal_name}, | ||||||||||||||||||||
| 45 | BusinessRegistrationAuthority => $options->{business_registration_authority}, | ||||||||||||||||||||
| 46 | BusinessRegistrationNumber => $options->{business_registration_number}, | ||||||||||||||||||||
| 47 | BusinessWebsiteUrl => $options->{business_website_url}, | ||||||||||||||||||||
| 48 | DateOfBirth => $options->{date_of_birth}, | ||||||||||||||||||||
| 49 | EmergencyAddressCity => $options->{emergency_address_city}, | ||||||||||||||||||||
| 50 | EmergencyAddressCountryCode => $options->{emergency_address_country_code}, | ||||||||||||||||||||
| 51 | EmergencyAddressPostalCode => $options->{emergency_address_postal_code}, | ||||||||||||||||||||
| 52 | EmergencyAddressStreet => $options->{emergency_address_street}, | ||||||||||||||||||||
| 53 | EmergencyAddressStreetSecondary => $options->{emergency_address_street_secondary}, | ||||||||||||||||||||
| 54 | EmergencyAddressSubdivision => $options->{emergency_address_subdivision}, | ||||||||||||||||||||
| 55 | File => $options->{file}, | ||||||||||||||||||||
| 56 | FileName => $options->{file_name}, | ||||||||||||||||||||
| 57 | FirstName => $options->{first_name}, | ||||||||||||||||||||
| 58 | FriendlyName => $options->{friendly_name}, | ||||||||||||||||||||
| 59 | IndividualEmail => $options->{individual_email}, | ||||||||||||||||||||
| 60 | IndividualPhone => $options->{individual_phone}, | ||||||||||||||||||||
| 61 | IsIsvEmbed => Twilio::Serialize::boolean_to_string($options->{is_isv_embed}), | ||||||||||||||||||||
| 62 | IsvRegisteringForSelfOrTenant => $options->{isv_registering_for_self_or_tenant}, | ||||||||||||||||||||
| 63 | LastName => $options->{last_name}, | ||||||||||||||||||||
| 64 | NotificationEmail => $options->{notification_email}, | ||||||||||||||||||||
| 65 | StatusCallbackUrl => $options->{status_callback_url}, | ||||||||||||||||||||
| 66 | ThemeSetId => $options->{theme_set_id}, | ||||||||||||||||||||
| 67 | UseAddressAsEmergencyAddress => | ||||||||||||||||||||
| 68 | 2 | Twilio::Serialize::boolean_to_string($options->{use_address_as_emergency_address}), | |||||||||||||||||||
| 69 | }; | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | my $response = | ||||||||||||||||||||
| 72 | 2 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 73 | return Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesInstance->new($self->{version}, | ||||||||||||||||||||
| 74 | 2 | $response->get_content); | |||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 78 | 1 | my ($self, $registration_id) = @_; | |||||||||||||||||||
| 79 | return Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesContext->new($self->{version}, | ||||||||||||||||||||
| 80 | 1 | $registration_id); | |||||||||||||||||||
| 81 | } | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | package Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesContext; | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 3 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 3 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 90 | 1 | my ($class, $version, $registration_id) = @_; | |||||||||||||||||||
| 91 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 92 | 1 | $self->{solution} = { registration_id => $registration_id }; | |||||||||||||||||||
| 93 | 1 | $self->{uri} = join q{}, '/ComplianceInquiries/Registration/', | |||||||||||||||||||
| 94 | Twilio::Serialize::path_segment($registration_id), '/RegulatoryCompliance/GB/Initialize'; | ||||||||||||||||||||
| 95 | 1 | return $self; | |||||||||||||||||||
| 96 | } | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 99 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 100 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | my $data = { | ||||||||||||||||||||
| 103 | IsIsvEmbed => Twilio::Serialize::boolean_to_string($options->{is_isv_embed}), | ||||||||||||||||||||
| 104 | ThemeSetId => $options->{theme_set_id}, | ||||||||||||||||||||
| 105 | 1 | }; | |||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | my $response = | ||||||||||||||||||||
| 108 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 109 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 110 | } | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 114 | return Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesInstance->new($self->{version}, | ||||||||||||||||||||
| 115 | 1 | $response->get_content, $self->{solution}{registration_id}); | |||||||||||||||||||
| 116 | } | ||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | package Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesInstance; | ||||||||||||||||||||
| 119 | |||||||||||||||||||||
| 120 | 3 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 121 | |||||||||||||||||||||
| 122 | 3 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 123 | |||||||||||||||||||||
| 124 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 125 | 3 | my ($class, $version, $payload, $registration_id) = @_; | |||||||||||||||||||
| 126 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 127 | $self->{solution} = | ||||||||||||||||||||
| 128 | 3 | ▶ | { registration_id => $registration_id // $self->{properties}{registration_id} }; | ||||||||||||||||||
|
Condition100%3/3
$registration_id // $self->{"properties"}{"registration_id"}
MC/DC100%2/2
$registration_id // $self->{"properties"}{"registration_id"}
$registration_id
$self->{"properties"}{"registration_id"}
Truth table100%3/3
A // B
A= $registration_idB= $self->{"properties"}{"registration_id"}
| |||||||||||||||||||||
| 129 | 3 | return $self; | |||||||||||||||||||
| 130 | } | ||||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 133 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 134 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 135 | } | ||||||||||||||||||||
| 136 | |||||||||||||||||||||
| 137 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 138 | 0 | my ($self) = @_; | |||||||||||||||||||
| 139 | return Twilio::Rest::Trusthub::V1::ComplianceRegistrationInquiriesContext->new($self->{version}, | ||||||||||||||||||||
| 140 | 0 | $self->{solution}{registration_id}); | |||||||||||||||||||
| 141 | } | ||||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | 3 | ▶ | sub inquiry_id { return $_[0]{properties}{inquiry_id} } | ||||||||||||||||||
|
Subroutine
inquiry_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 144 | 2 | ▶ | sub inquiry_session_token { return $_[0]{properties}{inquiry_session_token} } | ||||||||||||||||||
|
Subroutine
inquiry_session_token: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 145 | 2 | ▶ | sub registration_id { return $_[0]{properties}{registration_id} } | ||||||||||||||||||
|
Subroutine
registration_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 146 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 147 | |||||||||||||||||||||
| 148 | 3 | 1; | |||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | __END__ | ||||||||||||||||||||