| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::Usage; | ||||||||||
| 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::Api::V2010::Account::UsageList; | ||||||||||
| 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 | 18 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 18 | my ($class, $version, $account_sid) = @_; | |||||||||
| 17 | 18 | my $self = $class->SUPER::new($version); | |||||||||
| 18 | 18 | $self->{solution} = { account_sid => $account_sid }; | |||||||||
| 19 | 18 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||
| 20 | '/Usage.json'; | ||||||||||
| 21 | 18 | return $self; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 11 | ▶ | sub records { | ||||||||
|
Subroutine
records: called CC=1 SCAR=0.0
| |||||||||||
| 25 | 11 | my ($self) = @_; | |||||||||
| 26 | 11 | require Twilio::Rest::Api::V2010::Account::Usage::Record; | |||||||||
| 27 | return Twilio::Rest::Api::V2010::Account::Usage::RecordList->new($self->{version}, | ||||||||||
| 28 | 11 | $self->{solution}{account_sid}); | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 6 | ▶ | sub triggers { | ||||||||
|
Subroutine
triggers: called CC=2 SCAR=6.9
| |||||||||||
| 32 | 6 | my ($self, $sid) = @_; | |||||||||
| 33 | 6 | require Twilio::Rest::Api::V2010::Account::Usage::Trigger; | |||||||||
| 34 | my $list = Twilio::Rest::Api::V2010::Account::Usage::TriggerList->new($self->{version}, | ||||||||||
| 35 | 6 | $self->{solution}{account_sid}); | |||||||||
| 36 | 6 | ▶ | return defined $sid ? $list->get_context($sid) : $list; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 3 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||