| 1 | package Net::Braintree::Subscription; | ||
| 2 | 1 | ▶ | use Net::Braintree::SubscriptionGateway; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Net::Braintree::Subscription::Status; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | extends 'Net::Braintree::ResultObject'; | |
| 7 | |||
| 8 | 1 | my $meta = __PACKAGE__->meta; | |
| 9 | |||
| 10 | 0 | ▶ | sub BUILD { |
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | my ($self, $attributes) = @_; | |
| 12 | 0 | my $sub_objects = { 'transactions' => 'Net::Braintree::Transaction'}; | |
| 13 | 0 | $self->setup_sub_objects($self, $attributes, $sub_objects); | |
| 14 | 0 | $self->set_attributes_from_hash($self, $attributes); | |
| 15 | } | ||
| 16 | |||
| 17 | 0 | ▶ | sub create { |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 18 | 0 | my ($class, $params) = @_; | |
| 19 | 0 | $class->gateway->subscription->create($params); | |
| 20 | } | ||
| 21 | |||
| 22 | 0 | ▶ | sub find { |
|
Subroutine
find: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 23 | 0 | my ($class, $id) = @_; | |
| 24 | 0 | $class->gateway->subscription->find($id); | |
| 25 | } | ||
| 26 | |||
| 27 | 0 | ▶ | sub update { |
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 28 | 0 | my ($class, $id, $params) = @_; | |
| 29 | 0 | $class->gateway->subscription->update($id, $params); | |
| 30 | } | ||
| 31 | |||
| 32 | 0 | ▶ | sub cancel { |
|
Subroutine
cancel: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | 0 | my ($class, $id) = @_; | |
| 34 | 0 | $class->gateway->subscription->cancel($id); | |
| 35 | } | ||
| 36 | |||
| 37 | 0 | ▶ | sub retry_charge { |
|
Subroutine
retry_charge: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 38 | 0 | my ($class, $subscription_id, $amount) = @_; | |
| 39 | 0 | $class->gateway->transaction->retry_subscription_charge($subscription_id, $amount); | |
| 40 | } | ||
| 41 | |||
| 42 | 0 | ▶ | sub search { |
|
Subroutine
search: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 43 | 0 | my($class, $block) = @_; | |
| 44 | 0 | $class->gateway->subscription->search($block); | |
| 45 | } | ||
| 46 | |||
| 47 | 0 | ▶ | sub all { |
|
Subroutine
all: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 48 | 0 | my $class = shift; | |
| 49 | 0 | $class->gateway->subscription->all; | |
| 50 | } | ||
| 51 | |||
| 52 | 0 | ▶ | sub gateway { |
|
Subroutine
gateway: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 53 | 0 | return Net::Braintree->configuration->gateway; | |
| 54 | } | ||
| 55 | |||
| 56 | 1 | 1; | |