| 1 | ### AUTO-GENERATED FILE ### | ||||||||||||||||||||||||||||
| 2 | ### DO NOT EDIT. YOUR CHANGES WILL BE LOST. ### | ||||||||||||||||||||||||||||
| 3 | package WebService::Bonusly::Users; | ||||||||||||||||||||||||||||
| 4 | 1 | $WebService::Bonusly::Users::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 users service | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 9 | ▶ | sub add { | ||||||||||||||||||||||||||
|
Subroutine
add: called CC=13 SCAR=25.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 16 | 9 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 9 | my %clean; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | croak "parameter email is required for users->add" | ||||||||||||||||||||||||||||
| 21 | 9 | ▶ | unless defined $params{email}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | $clean{email} = delete $params{email} | ||||||||||||||||||||||||||||
| 24 | 8 | ▶ | if defined $params{email}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | croak "parameter first_name is required for users->add" | ||||||||||||||||||||||||||||
| 27 | 8 | ▶ | unless defined $params{first_name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | $clean{first_name} = delete $params{first_name} | ||||||||||||||||||||||||||||
| 30 | 7 | ▶ | if defined $params{first_name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | croak "parameter last_name is required for users->add" | ||||||||||||||||||||||||||||
| 33 | 7 | ▶ | unless defined $params{last_name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | $clean{last_name} = delete $params{last_name} | ||||||||||||||||||||||||||||
| 36 | 6 | ▶ | if defined $params{last_name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | croak "parameter custom_properties must be a HASH for users->add" | ||||||||||||||||||||||||||||
| 39 | 6 | ▶ | if defined $params{custom_properties} and ref($params{custom_properties}) ne 'HASH'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $params{"custom_properties"} and ref $params{"custom_properties"} ne "HASH"
MC/DC0%0/2
defined $params{"custom_properties"} and ref $params{"custom_properties"} ne "HASH"
defined $params{"custom_properties"}
ref $params{"custom_properties"} ne "HASH"
Truth table66%2/3
A and B
A= defined $params{"custom_properties"}B= ref $params{"custom_properties"} ne "HASH"
| |||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | $clean{custom_properties} = delete $params{custom_properties} | ||||||||||||||||||||||||||||
| 42 | 6 | ▶ | if defined $params{custom_properties}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | $clean{user_mode} = delete $params{user_mode} | ||||||||||||||||||||||||||||
| 45 | 6 | ▶ | if defined $params{user_mode}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | $clean{budget_boost} = delete $params{budget_boost} | ||||||||||||||||||||||||||||
| 48 | 6 | ▶ | if defined $params{budget_boost}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | $clean{external_unique_id} = delete $params{external_unique_id} | ||||||||||||||||||||||||||||
| 51 | 6 | ▶ | if defined $params{external_unique_id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 6 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 55 | 'POST', | ||||||||||||||||||||||||||||
| 56 | 'users', | ||||||||||||||||||||||||||||
| 57 | \%clean, | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | ); | ||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 3 | ▶ | sub autocomplete { | ||||||||||||||||||||||||||
|
Subroutine
autocomplete: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 63 | 3 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | 3 | my %clean; | |||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | croak "parameter search is required for users->autocomplete" | ||||||||||||||||||||||||||||
| 68 | 3 | ▶ | unless defined $params{search}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | $clean{search} = delete $params{search} | ||||||||||||||||||||||||||||
| 71 | 2 | ▶ | if defined $params{search}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 2 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 75 | 'GET', | ||||||||||||||||||||||||||||
| 76 | 'users/autocomplete', | ||||||||||||||||||||||||||||
| 77 | \%clean, | ||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | ); | ||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 10 | ▶ | sub bonuses { | ||||||||||||||||||||||||||
|
Subroutine
bonuses: called CC=11 SCAR=24.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 83 | 10 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||
| 85 | 10 | my %clean; | |||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | croak "parameter id is required for users->bonuses" | ||||||||||||||||||||||||||||
| 88 | 10 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||
| 90 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 91 | 9 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||
| 93 | $clean{skip} = delete $params{skip} | ||||||||||||||||||||||||||||
| 94 | 9 | ▶ | if defined $params{skip}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||
| 96 | $clean{start_time} = delete $params{start_time} | ||||||||||||||||||||||||||||
| 97 | 9 | ▶ | if defined $params{start_time}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | $clean{hashtag} = delete $params{hashtag} | ||||||||||||||||||||||||||||
| 100 | 9 | ▶ | if defined $params{hashtag}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | $clean{end_time} = delete $params{end_time} | ||||||||||||||||||||||||||||
| 103 | 9 | ▶ | if defined $params{end_time}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | $clean{include_children} = delete $params{include_children} | ||||||||||||||||||||||||||||
| 106 | 9 | ▶ | if defined $params{include_children}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||
| 108 | $clean{limit} = delete $params{limit} | ||||||||||||||||||||||||||||
| 109 | 9 | ▶ | if defined $params{limit}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | $clean{role} = delete $params{role} | ||||||||||||||||||||||||||||
| 112 | 9 | ▶ | if defined $params{role}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||
| 115 | 9 | $clean{$_} = $params{$_} for keys %params; | |||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||
| 117 | 9 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 118 | 'GET', | ||||||||||||||||||||||||||||
| 119 | 'users/:id/bonuses', | ||||||||||||||||||||||||||||
| 120 | \%clean, | ||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||
| 122 | ); | ||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 4 | ▶ | sub create_redemption { | ||||||||||||||||||||||||||
|
Subroutine
create_redemption: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 126 | 4 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | 4 | my %clean; | |||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||
| 130 | croak "parameter id is required for users->create_redemption" | ||||||||||||||||||||||||||||
| 131 | 4 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||
| 133 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 134 | 3 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||
| 136 | croak "parameter denomination_id is required for users->create_redemption" | ||||||||||||||||||||||||||||
| 137 | 3 | ▶ | unless defined $params{denomination_id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||
| 139 | $clean{denomination_id} = delete $params{denomination_id} | ||||||||||||||||||||||||||||
| 140 | 2 | ▶ | if defined $params{denomination_id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | 2 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 144 | 'POST', | ||||||||||||||||||||||||||||
| 145 | 'users/:id/redemptions', | ||||||||||||||||||||||||||||
| 146 | \%clean, | ||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||
| 148 | ); | ||||||||||||||||||||||||||||
| 149 | } | ||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||
| 151 | 3 | ▶ | sub delete { | ||||||||||||||||||||||||||
|
Subroutine
delete: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 152 | 3 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||
| 154 | 3 | my %clean; | |||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | croak "parameter id is required for users->delete" | ||||||||||||||||||||||||||||
| 157 | 3 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||
| 159 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 160 | 2 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||
| 162 | |||||||||||||||||||||||||||||
| 163 | 2 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 164 | 'DELETE', | ||||||||||||||||||||||||||||
| 165 | 'users/:id', | ||||||||||||||||||||||||||||
| 166 | \%clean, | ||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | ); | ||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||
| 171 | 3 | ▶ | sub get { | ||||||||||||||||||||||||||
|
Subroutine
get: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 172 | 3 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||
| 174 | 3 | my %clean; | |||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | croak "parameter id is required for users->get" | ||||||||||||||||||||||||||||
| 177 | 3 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||||
| 179 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 180 | 2 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||
| 183 | 2 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 184 | 'GET', | ||||||||||||||||||||||||||||
| 185 | 'users/:id', | ||||||||||||||||||||||||||||
| 186 | \%clean, | ||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||
| 188 | ); | ||||||||||||||||||||||||||||
| 189 | } | ||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||
| 191 | 6 | ▶ | sub list { | ||||||||||||||||||||||||||
|
Subroutine
list: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 192 | 6 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||
| 194 | 6 | my %clean; | |||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||
| 196 | $clean{limit} = delete $params{limit} | ||||||||||||||||||||||||||||
| 197 | 6 | ▶ | if defined $params{limit}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||
| 199 | $clean{skip} = delete $params{skip} | ||||||||||||||||||||||||||||
| 200 | 6 | ▶ | if defined $params{skip}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||
| 202 | $clean{email} = delete $params{email} | ||||||||||||||||||||||||||||
| 203 | 6 | ▶ | if defined $params{email}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | $clean{sort} = delete $params{sort} | ||||||||||||||||||||||||||||
| 206 | 6 | ▶ | if defined $params{sort}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | 6 | $clean{$_} = $params{$_} for keys %params; | |||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||
| 211 | 6 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 212 | 'GET', | ||||||||||||||||||||||||||||
| 213 | 'users', | ||||||||||||||||||||||||||||
| 214 | \%clean, | ||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||
| 216 | ); | ||||||||||||||||||||||||||||
| 217 | } | ||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||
| 219 | 2 | ▶ | sub me { | ||||||||||||||||||||||||||
|
Subroutine
me: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 220 | 2 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||
| 222 | 2 | my %clean; | |||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||
| 225 | 2 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 226 | 'GET', | ||||||||||||||||||||||||||||
| 227 | 'users/me', | ||||||||||||||||||||||||||||
| 228 | \%clean, | ||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||
| 230 | ); | ||||||||||||||||||||||||||||
| 231 | } | ||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | 4 | ▶ | sub neighborhood { | ||||||||||||||||||||||||||
|
Subroutine
neighborhood: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 234 | 4 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||
| 236 | 4 | my %clean; | |||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||
| 238 | croak "parameter id is required for users->neighborhood" | ||||||||||||||||||||||||||||
| 239 | 4 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||||
| 241 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 242 | 3 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||
| 244 | $clean{days} = delete $params{days} | ||||||||||||||||||||||||||||
| 245 | 3 | ▶ | if defined $params{days}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||
| 248 | 3 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 249 | 'GET', | ||||||||||||||||||||||||||||
| 250 | 'users/:id/neighborhood', | ||||||||||||||||||||||||||||
| 251 | \%clean, | ||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||
| 253 | ); | ||||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||
| 256 | 5 | ▶ | sub redemptions { | ||||||||||||||||||||||||||
|
Subroutine
redemptions: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 257 | 5 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||
| 259 | 5 | my %clean; | |||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||
| 261 | croak "parameter id is required for users->redemptions" | ||||||||||||||||||||||||||||
| 262 | 5 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||
| 264 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 265 | 4 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||
| 267 | $clean{limit} = delete $params{limit} | ||||||||||||||||||||||||||||
| 268 | 4 | ▶ | if defined $params{limit}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||
| 270 | $clean{skip} = delete $params{skip} | ||||||||||||||||||||||||||||
| 271 | 4 | ▶ | if defined $params{skip}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||
| 274 | 4 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 275 | 'GET', | ||||||||||||||||||||||||||||
| 276 | 'users/:id/redemptions', | ||||||||||||||||||||||||||||
| 277 | \%clean, | ||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||
| 279 | ); | ||||||||||||||||||||||||||||
| 280 | } | ||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||
| 282 | 10 | ▶ | sub update { | ||||||||||||||||||||||||||
|
Subroutine
update: called CC=12 SCAR=24.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 283 | 10 | my ($self, %params) = @_; | |||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||
| 285 | 10 | my %clean; | |||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||
| 287 | croak "parameter id is required for users->update" | ||||||||||||||||||||||||||||
| 288 | 10 | ▶ | unless defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||
| 290 | $clean{id} = delete $params{id} | ||||||||||||||||||||||||||||
| 291 | 9 | ▶ | if defined $params{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||
| 293 | $clean{email} = delete $params{email} | ||||||||||||||||||||||||||||
| 294 | 9 | ▶ | if defined $params{email}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||
| 296 | $clean{first_name} = delete $params{first_name} | ||||||||||||||||||||||||||||
| 297 | 9 | ▶ | if defined $params{first_name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||
| 299 | $clean{last_name} = delete $params{last_name} | ||||||||||||||||||||||||||||
| 300 | 9 | ▶ | if defined $params{last_name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||
| 302 | croak "parameter custom_properties must be a HASH for users->update" | ||||||||||||||||||||||||||||
| 303 | 9 | ▶ | if defined $params{custom_properties} and ref($params{custom_properties}) ne 'HASH'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $params{"custom_properties"} and ref $params{"custom_properties"} ne "HASH"
MC/DC0%0/2
defined $params{"custom_properties"} and ref $params{"custom_properties"} ne "HASH"
defined $params{"custom_properties"}
ref $params{"custom_properties"} ne "HASH"
Truth table66%2/3
A and B
A= defined $params{"custom_properties"}B= ref $params{"custom_properties"} ne "HASH"
| |||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||
| 305 | $clean{custom_properties} = delete $params{custom_properties} | ||||||||||||||||||||||||||||
| 306 | 9 | ▶ | if defined $params{custom_properties}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||||
| 308 | $clean{user_mode} = delete $params{user_mode} | ||||||||||||||||||||||||||||
| 309 | 9 | ▶ | if defined $params{user_mode}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||
| 311 | $clean{budget_boost} = delete $params{budget_boost} | ||||||||||||||||||||||||||||
| 312 | 9 | ▶ | if defined $params{budget_boost}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||
| 314 | $clean{external_unique_id} = delete $params{external_unique_id} | ||||||||||||||||||||||||||||
| 315 | 9 | ▶ | if defined $params{external_unique_id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||
| 318 | 9 | return $self->_perform_action( | |||||||||||||||||||||||||||
| 319 | 'PUT', | ||||||||||||||||||||||||||||
| 320 | 'users/:id', | ||||||||||||||||||||||||||||
| 321 | \%clean, | ||||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||||
| 323 | ); | ||||||||||||||||||||||||||||
| 324 | } | ||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||
| 326 | |||||||||||||||||||||||||||||
| 327 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||
| 329 | __END__ | ||||||||||||||||||||||||||||