| 1 | package Net::Payjp::Customer::Subscription; | ||||||||||
| 2 | |||||||||||
| 3 | 15 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 15 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 15 | ▶ | use base 'Net::Payjp'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 4 | ▶ | sub cus_id{ | ||||||||
|
Subroutine
cus_id: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 4 | my $self = shift; | |||||||||
| 10 | 4 | ▶ | $self->{cus_id} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 4 | return $self->{cus_id}; | |||||||||
| 12 | } | ||||||||||
| 13 | |||||||||||
| 14 | 1 | ▶ | sub retrieve{ | ||||||||
|
Subroutine
retrieve: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 15 | 1 | my $self = shift; | |||||||||
| 16 | 1 | my $id = shift; | |||||||||
| 17 | 1 | ▶ | $self->id($id) if $id; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | |||||||||||
| 19 | 1 | $self->_request(method => 'GET', url => $self->_instance_url.'/'.$self->id); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | ▶ | sub all{ | ||||||||
|
Subroutine
all: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 23 | 1 | my $self = shift; | |||||||||
| 24 | 1 | my %p = @_; | |||||||||
| 25 | |||||||||||
| 26 | 1 | $self->_request(method => 'GET', url => $self->_instance_url, param => \%p); | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 2 | ▶ | sub _instance_url{ | ||||||||
|
Subroutine
_instance_url: called CC=1 SCAR=0.0
| |||||||||||
| 30 | 2 | my $self = shift; | |||||||||
| 31 | 2 | return $self->api_base.'/v1/customers/'.$self->cus_id.'/subscriptions'; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | |||||||||||
| 35 | 15 | 1; | |||||||||