| 1 | ### AUTO-GENERATED FILE ### | ||||||||||
| 2 | ### DO NOT EDIT. YOUR CHANGES WILL BE LOST. ### | ||||||||||
| 3 | package WebService::Bonusly::Bonuses; | ||||||||||
| 4 | 1 | $WebService::Bonusly::Bonuses::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 bonuses 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 bonuses->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 | 'bonuses/:id', | ||||||||||
| 30 | \%clean, | ||||||||||
| 31 | |||||||||||
| 32 | ); | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 7 | ▶ | sub give { | ||||||||
|
Subroutine
give: called CC=7 SCAR=19.5
Pod
undocumented
| |||||||||||
| 36 | 7 | my ($self, %params) = @_; | |||||||||
| 37 | |||||||||||
| 38 | 7 | my %clean; | |||||||||
| 39 | |||||||||||
| 40 | croak "parameter reason is required for bonuses->give" | ||||||||||
| 41 | 7 | ▶ | unless defined $params{reason}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | |||||||||||
| 43 | $clean{reason} = delete $params{reason} | ||||||||||
| 44 | 6 | ▶ | if defined $params{reason}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 45 | |||||||||||
| 46 | $clean{giver_email} = delete $params{giver_email} | ||||||||||
| 47 | 6 | ▶ | if defined $params{giver_email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | |||||||||||
| 49 | $clean{parent_bonus_id} = delete $params{parent_bonus_id} | ||||||||||
| 50 | 6 | ▶ | if defined $params{parent_bonus_id}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 51 | |||||||||||
| 52 | $clean{receiver_email} = delete $params{receiver_email} | ||||||||||
| 53 | 6 | ▶ | if defined $params{receiver_email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | |||||||||||
| 55 | $clean{amount} = delete $params{amount} | ||||||||||
| 56 | 6 | ▶ | if defined $params{amount}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | |||||||||||
| 58 | |||||||||||
| 59 | 6 | return $self->_perform_action( | |||||||||
| 60 | 'POST', | ||||||||||
| 61 | 'bonuses', | ||||||||||
| 62 | \%clean, | ||||||||||
| 63 | |||||||||||
| 64 | ); | ||||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | 13 | ▶ | sub list { | ||||||||
|
Subroutine
list: called CC=13 SCAR=25.6
Pod
undocumented
| |||||||||||
| 68 | 13 | my ($self, %params) = @_; | |||||||||
| 69 | |||||||||||
| 70 | 13 | my %clean; | |||||||||
| 71 | |||||||||||
| 72 | $clean{limit} = delete $params{limit} | ||||||||||
| 73 | 13 | ▶ | if defined $params{limit}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 74 | |||||||||||
| 75 | $clean{skip} = delete $params{skip} | ||||||||||
| 76 | 13 | ▶ | if defined $params{skip}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 77 | |||||||||||
| 78 | $clean{start_time} = delete $params{start_time} | ||||||||||
| 79 | 13 | ▶ | if defined $params{start_time}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | |||||||||||
| 81 | $clean{end_time} = delete $params{end_time} | ||||||||||
| 82 | 13 | ▶ | if defined $params{end_time}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 83 | |||||||||||
| 84 | $clean{non_zero} = delete $params{non_zero} | ||||||||||
| 85 | 13 | ▶ | if defined $params{non_zero}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 86 | |||||||||||
| 87 | $clean{top_level} = delete $params{top_level} | ||||||||||
| 88 | 13 | ▶ | if defined $params{top_level}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 89 | |||||||||||
| 90 | $clean{giver_email} = delete $params{giver_email} | ||||||||||
| 91 | 13 | ▶ | if defined $params{giver_email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 92 | |||||||||||
| 93 | $clean{receiver_email} = delete $params{receiver_email} | ||||||||||
| 94 | 13 | ▶ | if defined $params{receiver_email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 95 | |||||||||||
| 96 | $clean{user_email} = delete $params{user_email} | ||||||||||
| 97 | 13 | ▶ | if defined $params{user_email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 98 | |||||||||||
| 99 | $clean{hashtag} = delete $params{hashtag} | ||||||||||
| 100 | 13 | ▶ | if defined $params{hashtag}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 101 | |||||||||||
| 102 | $clean{include_children} = delete $params{include_children} | ||||||||||
| 103 | 13 | ▶ | if defined $params{include_children}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 104 | |||||||||||
| 105 | |||||||||||
| 106 | 13 | $clean{$_} = $params{$_} for keys %params; | |||||||||
| 107 | |||||||||||
| 108 | 13 | return $self->_perform_action( | |||||||||
| 109 | 'GET', | ||||||||||
| 110 | 'bonuses', | ||||||||||
| 111 | \%clean, | ||||||||||
| 112 | |||||||||||
| 113 | ); | ||||||||||
| 114 | } | ||||||||||
| 115 | |||||||||||
| 116 | |||||||||||
| 117 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 118 | |||||||||||
| 119 | __END__ | ||||||||||