Twilio/Rest/Marketplace/V1/InstalledAddOn/InstalledAddOnUsage.pm

filter: Statementstmt 100% 34 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 11 / 11 Podpod n/a totaltotal 100% 45 / 45 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Twilio/Rest/Marketplace.pm ↑ Summary Twilio/Rest/Marketplace/V1/ReferralConversion.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Marketplace::V1::InstalledAddOn::InstalledAddOnUsage;
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::Marketplace::V1::InstalledAddOn::InstalledAddOnUsageList;
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, $installed_add_on_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = { installed_add_on_sid => $installed_add_on_sid };
19 1 $self->{uri} = join q{}, '/InstalledAddOns/',
20 Twilio::Serialize::path_segment($installed_add_on_sid), '/Usage';
21 1 return $self;
22 }
23  
24 1 ▶sub create {
Subroutine create: called CC=1 SCAR=0.0
25 1 my ($self, $body) = @_;
26  
27 1 my $data = Twilio::Serialize::json_body($body, {});
28  
29 my $response = $self->{version}->handle_request(
30 'POST',
31 $self->{uri},
32 1 'create',
33 {
34 data => $data,
35 headers => { 'Content-Type' => 'application/json', }
36 }
37 );
38 return Twilio::Rest::Marketplace::V1::InstalledAddOn::InstalledAddOnUsageInstance->new(
39 1 $self->{version}, $response->get_content, $self->{solution}{installed_add_on_sid});
40 }
41  
42 package Twilio::Rest::Marketplace::V1::InstalledAddOn::InstalledAddOnUsageInstance;
43  
44 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
47  
48 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
49 1 my ($class, $version, $payload, $installed_add_on_sid) = @_;
50 1 my $self = $class->SUPER::new($version, $payload);
51 1 $self->{solution} = { installed_add_on_sid => $installed_add_on_sid };
52 1 return $self;
53 }
54  
55 1 ▶sub billable_items { return $_[0]{properties}{billable_items} }
Subroutine billable_items: called CC=1 SCAR=0.0
56 1 ▶sub total_submitted { return $_[0]{properties}{total_submitted} }
Subroutine total_submitted: called CC=1 SCAR=0.0
57  
58 2 1;
59  
60 __END__
« Twilio/Rest/Marketplace.pm ↑ Summary Twilio/Rest/Marketplace/V1/ReferralConversion.pm »