« Twilio/Rest/Accounts/V1/BulkContacts.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/Payload/Data.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||
| 2 | package Twilio::Rest::Api::V2010::Account::Balance; | ||
| 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::BalanceList; | ||
| 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 | 2 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 16 | 2 | my ($class, $version, $account_sid) = @_; | |
| 17 | 2 | my $self = $class->SUPER::new($version); | |
| 18 | 2 | $self->{solution} = { account_sid => $account_sid }; | |
| 19 | 2 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |
| 20 | '/Balance.json'; | ||
| 21 | 2 | return $self; | |
| 22 | } | ||
| 23 | |||
| 24 | 2 | ▶ | sub fetch { |
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||
| 25 | 2 | my ($self) = @_; | |
| 26 | |||
| 27 | 2 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |
| 28 | return Twilio::Rest::Api::V2010::Account::BalanceInstance->new($self->{version}, | ||
| 29 | 2 | $response->get_content, $self->{solution}{account_sid}); | |
| 30 | } | ||
| 31 | |||
| 32 | package Twilio::Rest::Api::V2010::Account::BalanceInstance; | ||
| 33 | |||
| 34 | 3 | ▶ | use parent 'Twilio::InstanceResource'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | |||
| 36 | 3 | ▶ | use Twilio::Deserialize; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | |||
| 38 | 2 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
| |||
| 39 | 2 | my ($class, $version, $payload, $account_sid) = @_; | |
| 40 | 2 | my $self = $class->SUPER::new($version, $payload); | |
| 41 | 2 | $self->{solution} = { account_sid => $account_sid }; | |
| 42 | 2 | return $self; | |
| 43 | } | ||
| 44 | |||
| 45 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } |
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||
| 46 | 2 | ▶ | sub balance { return $_[0]{properties}{balance} } |
|
Subroutine
balance: called CC=1 SCAR=0.0
| |||
| 47 | 2 | ▶ | sub currency { return $_[0]{properties}{currency} } |
|
Subroutine
currency: called CC=1 SCAR=0.0
| |||
| 48 | |||
| 49 | 3 | 1; | |
| 50 | |||
| 51 | __END__ | ||