« Twilio/Rest/FlexApi/V1/FlexFlow.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Recording/AddOnResult.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Preview::Wireless::RatePlan; | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 2 | ▶ | use 5.016; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 2 | our $VERSION = '2.001'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | package Twilio::Rest::Preview::Wireless::RatePlanList; | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | ▶ | use parent 'Twilio::ListResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 5 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 5 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 5 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 5 | $self->{uri} = '/RatePlans'; | |||||||||||||||||||
| 20 | 5 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 24 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 25 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | my $data = { | ||||||||||||||||||||
| 28 | CommandsEnabled => Twilio::Serialize::boolean_to_string($options->{commands_enabled}), | ||||||||||||||||||||
| 29 | DataEnabled => Twilio::Serialize::boolean_to_string($options->{data_enabled}), | ||||||||||||||||||||
| 30 | DataLimit => $options->{data_limit}, | ||||||||||||||||||||
| 31 | DataMetering => $options->{data_metering}, | ||||||||||||||||||||
| 32 | FriendlyName => $options->{friendly_name}, | ||||||||||||||||||||
| 33 | InternationalRoaming => $options->{international_roaming}, | ||||||||||||||||||||
| 34 | MessagingEnabled => Twilio::Serialize::boolean_to_string($options->{messaging_enabled}), | ||||||||||||||||||||
| 35 | NationalRoamingEnabled => | ||||||||||||||||||||
| 36 | Twilio::Serialize::boolean_to_string($options->{national_roaming_enabled}), | ||||||||||||||||||||
| 37 | UniqueName => $options->{unique_name}, | ||||||||||||||||||||
| 38 | 1 | VoiceEnabled => Twilio::Serialize::boolean_to_string($options->{voice_enabled}), | |||||||||||||||||||
| 39 | }; | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | my $response = | ||||||||||||||||||||
| 42 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 43 | return Twilio::Rest::Preview::Wireless::RatePlanInstance->new($self->{version}, | ||||||||||||||||||||
| 44 | 1 | $response->get_content); | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 48 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 49 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 50 | } | ||||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 53 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 54 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 58 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 59 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 1 | my $params = { | |||||||||||||||||||
| 62 | PageToken => $page_token, | ||||||||||||||||||||
| 63 | Page => $page_number, | ||||||||||||||||||||
| 64 | PageSize => $page_size, | ||||||||||||||||||||
| 65 | }; | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 68 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 69 | } | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 72 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 73 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 74 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 78 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 79 | return Twilio::Rest::Preview::Wireless::RatePlanPage->new($self->{version}, $response, | ||||||||||||||||||||
| 80 | 1 | $self->{solution}); | |||||||||||||||||||
| 81 | } | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | 3 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 84 | 3 | my ($self, $sid) = @_; | |||||||||||||||||||
| 85 | 3 | return Twilio::Rest::Preview::Wireless::RatePlanContext->new($self->{version}, $sid); | |||||||||||||||||||
| 86 | } | ||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | package Twilio::Rest::Preview::Wireless::RatePlanPage; | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | 1 | ▶ | sub records_key { return 'rate_plans' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 95 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 96 | 1 | return Twilio::Rest::Preview::Wireless::RatePlanInstance->new($self->{version}, $payload); | |||||||||||||||||||
| 97 | } | ||||||||||||||||||||
| 98 | |||||||||||||||||||||
| 99 | package Twilio::Rest::Preview::Wireless::RatePlanContext; | ||||||||||||||||||||
| 100 | |||||||||||||||||||||
| 101 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 102 | |||||||||||||||||||||
| 103 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 106 | 3 | my ($class, $version, $sid) = @_; | |||||||||||||||||||
| 107 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 108 | 3 | $self->{solution} = { sid => $sid }; | |||||||||||||||||||
| 109 | 3 | $self->{uri} = join q{}, '/RatePlans/', Twilio::Serialize::path_segment($sid); | |||||||||||||||||||
| 110 | 3 | return $self; | |||||||||||||||||||
| 111 | } | ||||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 114 | 1 | my ($self) = @_; | |||||||||||||||||||
| 115 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 116 | 1 | return 1; | |||||||||||||||||||
| 117 | } | ||||||||||||||||||||
| 118 | |||||||||||||||||||||
| 119 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 120 | 1 | my ($self) = @_; | |||||||||||||||||||
| 121 | |||||||||||||||||||||
| 122 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 123 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 124 | } | ||||||||||||||||||||
| 125 | |||||||||||||||||||||
| 126 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 127 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 128 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | my $data = { | ||||||||||||||||||||
| 131 | FriendlyName => $options->{friendly_name}, | ||||||||||||||||||||
| 132 | UniqueName => $options->{unique_name}, | ||||||||||||||||||||
| 133 | 1 | }; | |||||||||||||||||||
| 134 | |||||||||||||||||||||
| 135 | my $response = | ||||||||||||||||||||
| 136 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 137 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 138 | } | ||||||||||||||||||||
| 139 | |||||||||||||||||||||
| 140 | 2 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 141 | 2 | my ($self, $response) = @_; | |||||||||||||||||||
| 142 | return Twilio::Rest::Preview::Wireless::RatePlanInstance->new($self->{version}, | ||||||||||||||||||||
| 143 | 2 | $response->get_content, $self->{solution}{sid}); | |||||||||||||||||||
| 144 | } | ||||||||||||||||||||
| 145 | |||||||||||||||||||||
| 146 | package Twilio::Rest::Preview::Wireless::RatePlanInstance; | ||||||||||||||||||||
| 147 | |||||||||||||||||||||
| 148 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 151 | |||||||||||||||||||||
| 152 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 153 | 4 | my ($class, $version, $payload, $sid) = @_; | |||||||||||||||||||
| 154 | 4 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 155 | 4 | ▶ | $self->{solution} = { sid => $sid // $self->{properties}{sid} }; | ||||||||||||||||||
|
Condition66%2/3
$sid // $self->{"properties"}{"sid"}
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid
$self->{"properties"}{"sid"}
Truth table66%2/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
| |||||||||||||||||||||
| 156 | 4 | return $self; | |||||||||||||||||||
| 157 | } | ||||||||||||||||||||
| 158 | |||||||||||||||||||||
| 159 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 160 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 161 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 162 | } | ||||||||||||||||||||
| 163 | |||||||||||||||||||||
| 164 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 165 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 166 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 167 | } | ||||||||||||||||||||
| 168 | |||||||||||||||||||||
| 169 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 170 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 171 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 172 | } | ||||||||||||||||||||
| 173 | |||||||||||||||||||||
| 174 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 175 | 0 | my ($self) = @_; | |||||||||||||||||||
| 176 | return Twilio::Rest::Preview::Wireless::RatePlanContext->new($self->{version}, | ||||||||||||||||||||
| 177 | 0 | $self->{solution}{sid}); | |||||||||||||||||||
| 178 | } | ||||||||||||||||||||
| 179 | |||||||||||||||||||||
| 180 | 4 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 181 | 4 | ▶ | sub data_enabled { return $_[0]{properties}{data_enabled} } | ||||||||||||||||||
|
Subroutine
data_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 182 | 4 | ▶ | sub data_limit { return $_[0]{properties}{data_limit} } | ||||||||||||||||||
|
Subroutine
data_limit: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 183 | 4 | ▶ | sub data_metering { return $_[0]{properties}{data_metering} } | ||||||||||||||||||
|
Subroutine
data_metering: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 184 | 4 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 185 | 4 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 186 | 4 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 187 | 4 | ▶ | sub international_roaming { return $_[0]{properties}{international_roaming} } | ||||||||||||||||||
|
Subroutine
international_roaming: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 188 | 4 | ▶ | sub messaging_enabled { return $_[0]{properties}{messaging_enabled} } | ||||||||||||||||||
|
Subroutine
messaging_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 189 | 4 | ▶ | sub national_roaming_enabled { return $_[0]{properties}{national_roaming_enabled} } | ||||||||||||||||||
|
Subroutine
national_roaming_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 190 | 4 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 191 | 4 | ▶ | sub unique_name { return $_[0]{properties}{unique_name} } | ||||||||||||||||||
|
Subroutine
unique_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 192 | 4 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 193 | 4 | ▶ | sub voice_enabled { return $_[0]{properties}{voice_enabled} } | ||||||||||||||||||
|
Subroutine
voice_enabled: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 194 | |||||||||||||||||||||
| 195 | 2 | 1; | |||||||||||||||||||
| 196 | |||||||||||||||||||||
| 197 | __END__ | ||||||||||||||||||||