| 1 | ### AUTO-GENERATED FILE ### | ||||||||||
| 2 | ### DO NOT EDIT. YOUR CHANGES WILL BE LOST. ### | ||||||||||
| 3 | package WebService::Bonusly::Rewards; | ||||||||||
| 4 | 1 | $WebService::Bonusly::Rewards::VERSION = '1.001'; | |||||||||
| 5 | 1 | ▶ | use v5.14; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | extends 'WebService::Bonusly::Service'; | |||||||||
| 10 | |||||||||||
| 11 | # ABSTRACT: Implements the bonus.ly rewards service | ||||||||||
| 12 | |||||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | 3 | ▶ | sub get { | ||||||||
|
Subroutine
get: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 16 | 3 | my ($self, %params) = @_; | |||||||||
| 17 | |||||||||||
| 18 | 3 | my %clean; | |||||||||
| 19 | |||||||||||
| 20 | croak "parameter id is required for rewards->get" | ||||||||||
| 21 | 3 | ▶ | unless defined $params{id}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | $clean{id} = delete $params{id} | ||||||||||
| 24 | 2 | ▶ | if defined $params{id}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | |||||||||||
| 27 | 2 | return $self->_perform_action( | |||||||||
| 28 | 'GET', | ||||||||||
| 29 | 'rewards/:id', | ||||||||||
| 30 | \%clean, | ||||||||||
| 31 | |||||||||||
| 32 | ); | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 5 | ▶ | sub list { | ||||||||
|
Subroutine
list: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||
| 36 | 5 | my ($self, %params) = @_; | |||||||||
| 37 | |||||||||||
| 38 | 5 | my %clean; | |||||||||
| 39 | |||||||||||
| 40 | $clean{catalog_country} = delete $params{catalog_country} | ||||||||||
| 41 | 5 | ▶ | if defined $params{catalog_country}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | |||||||||||
| 43 | $clean{request_country} = delete $params{request_country} | ||||||||||
| 44 | 5 | ▶ | if defined $params{request_country}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 45 | |||||||||||
| 46 | $clean{personalize_for} = delete $params{personalize_for} | ||||||||||
| 47 | 5 | ▶ | if defined $params{personalize_for}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | |||||||||||
| 49 | |||||||||||
| 50 | 5 | return $self->_perform_action( | |||||||||
| 51 | 'GET', | ||||||||||
| 52 | 'rewards', | ||||||||||
| 53 | \%clean, | ||||||||||
| 54 | |||||||||||
| 55 | ); | ||||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | |||||||||||
| 59 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 60 | |||||||||||
| 61 | __END__ | ||||||||||