Twilio/Rest/Supersim/V1/UsageRecord.pm

filter: Statementstmt 88.1% 52 / 59 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 88.8% 24 / 27 Podpod n/a totaltotal 86.5% 77 / 89 CC 2 SCAR 1.7
CC
2
Cov
87%
page
2.0
read
2.0
stream
2.0
CRAP 1.2
« Twilio/Rest/Content/V1/LegacyContent.pm ↑ Summary Twilio/Rest/Api/V2010/Account/Notification.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Supersim::V1::UsageRecord;
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::Supersim::V1::UsageRecordList;
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 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 1 my ($class, $version) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = {};
19 1 $self->{uri} = '/UsageRecords';
20 1 return $self;
21 }
22  
23 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
24 0 my ($self, @arguments) = @_;
25 0 return $self->read_records(@arguments);
26 }
27  
28 0 ▶sub stream {
Subroutine stream: not called CC=1 SCAR=6.9
29 0 my ($self, @arguments) = @_;
30 0 return $self->stream_records(@arguments);
31 }
32  
33 1 ▶sub page {
Subroutine page: called CC=2 SCAR=7.0
34 1 my ($self, $options, $page_size, $page_token, $page_number) = @_;
35 1 ▶ $options //= {};
Condition50%1/2
$options //= {}
l!l
10
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
36  
37 my $params = {
38 EndTime => Twilio::Serialize::iso8601_date_time($options->{end_time}),
39 Fleet => $options->{fleet},
40 Granularity => $options->{granularity},
41 Group => $options->{group},
42 IsoCountry => $options->{iso_country},
43 Network => $options->{network},
44 Sim => $options->{sim},
45 1 StartTime => Twilio::Serialize::iso8601_date_time($options->{start_time}),
46 PageToken => $page_token,
47 Page => $page_number,
48 PageSize => $page_size,
49 };
50  
51 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
52 1 return $self->_build_page($response);
53 }
54  
55 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
56 0 my ($self, $target_url) = @_;
57 0 my $client = $self->{version}->get_domain->get_client;
58 0 return $self->_build_page($client->request('GET', $target_url));
59 }
60  
61 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
62 1 my ($self, $response) = @_;
63 return Twilio::Rest::Supersim::V1::UsageRecordPage->new($self->{version}, $response,
64 1 $self->{solution});
65 }
66  
67 package Twilio::Rest::Supersim::V1::UsageRecordPage;
68  
69 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
70  
71 1 ▶sub records_key { return 'usage_records' }
Subroutine records_key: called CC=1 SCAR=0.0
72  
73 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
74 1 my ($self, $payload) = @_;
75 1 return Twilio::Rest::Supersim::V1::UsageRecordInstance->new($self->{version}, $payload);
76 }
77  
78 package Twilio::Rest::Supersim::V1::UsageRecordInstance;
79  
80 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
81  
82 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
83  
84 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
85 1 my ($class, $version, $payload) = @_;
86 1 my $self = $class->SUPER::new($version, $payload);
87 1 $self->{solution} = {};
88 1 return $self;
89 }
90  
91 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
92 1 ▶sub billed_unit { return $_[0]{properties}{billed_unit} }
Subroutine billed_unit: called CC=1 SCAR=0.0
93 1 ▶sub data_download { return $_[0]{properties}{data_download} }
Subroutine data_download: called CC=1 SCAR=0.0
94 1 ▶sub data_total { return $_[0]{properties}{data_total} }
Subroutine data_total: called CC=1 SCAR=0.0
95 1 ▶sub data_total_billed { return $_[0]{properties}{data_total_billed} }
Subroutine data_total_billed: called CC=1 SCAR=0.0
96 1 ▶sub data_upload { return $_[0]{properties}{data_upload} }
Subroutine data_upload: called CC=1 SCAR=0.0
97 1 ▶sub fleet_sid { return $_[0]{properties}{fleet_sid} }
Subroutine fleet_sid: called CC=1 SCAR=0.0
98 1 ▶sub iso_country { return $_[0]{properties}{iso_country} }
Subroutine iso_country: called CC=1 SCAR=0.0
99 1 ▶sub network_sid { return $_[0]{properties}{network_sid} }
Subroutine network_sid: called CC=1 SCAR=0.0
100 1 ▶sub period { return $_[0]{properties}{period} }
Subroutine period: called CC=1 SCAR=0.0
101 1 ▶sub sim_sid { return $_[0]{properties}{sim_sid} }
Subroutine sim_sid: called CC=1 SCAR=0.0
102  
103 2 1;
104  
105 __END__
« Twilio/Rest/Content/V1/LegacyContent.pm ↑ Summary Twilio/Rest/Api/V2010/Account/Notification.pm »