Shopify/Model/User.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 10 totaltotal 0.0% 0 / 54 CC 1 SCAR 6.9
CC
1
Cov
0%
fields
2.0
BEGIN
2.0
needs_plus
2.0
CRAP 2.0
1 #!/usr/bin/perl
2  
3 use strict;
4 use warnings;
5  
6 use WWW::Shopify;
7  
8 package WWW::Shopify::Model::User;
9 use parent 'WWW::Shopify::Model::Item';
10  
11 my $fields; sub fields { return $fields; }
12 BEGIN { $fields = {
13 "account_owner" => new WWW::Shopify::Field::Boolean(),
14 "bio" => new WWW::Shopify::Field::Text(),
15 "email" => new WWW::Shopify::Field::String::Email(),
16 "first_name" => new WWW::Shopify::Field::String::FirstName(),
17 "last_name" => new WWW::Shopify::Field::String::LastName(),
18 "id" => new WWW::Shopify::Field::Identifier(),
19 "im" => new WWW::Shopify::Field::String::Email(),
20 "permissions" => new WWW::Shopify::Field::Freeform::Array(),
21 "phone" => new WWW::Shopify::Field::String::Phone(),
22 "receive_announcements" => new WWW::Shopify::Field::Int(),
23 "url" => new WWW::Shopify::Field::String::URL(),
24 "user_type" => new WWW::Shopify::Field::String::Enum(["regular", "open_id", "restricted"])
25 }; }
26  
27 sub needs_plus { return 1; }
28 sub error_codes_if_unavailable { (403, 404) }
29 sub countable { return undef; }
30 sub creatable { return undef; }
31 sub deletable { return undef; }
32 sub updatable { return undef; }
33  
34  
35 sub read_scope { return "read_users"; }
36 sub write_scope { return undef; }
37  
38 eval(__PACKAGE__->generate_accessors); die $@ if $@;
39  
40 1