Shopify/Model/Theme.pm untested

filter: Statementstmt 0.0% 0 / 29 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 / 55 CC 1 SCAR 6.9
CC
1
Cov
0%
fields
2.0
BEGIN
2.0
countable
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::Theme;
9 use parent 'WWW::Shopify::Model::Item';
10  
11 my $fields; sub fields { return $fields; }
12 BEGIN { $fields = {
13 "name" => new WWW::Shopify::Field::String::Words(1),
14 "role" => new WWW::Shopify::Field::String::Enum(["main", "mobile", "unpublished"]),
15 "id" => new WWW::Shopify::Field::Identifier(),
16 "created_at" => new WWW::Shopify::Field::Date(),
17 "updated_at" => new WWW::Shopify::Field::Date(),
18 "assets" => new WWW::Shopify::Field::Relation::Many('WWW::Shopify::Model::Asset')
19 }; }
20  
21 sub countable { return 0; }
22  
23 sub get_fields { return grep { $_ ne "assets" } keys(%$fields); }
24 sub creation_minimal { return qw(name role); }
25 sub creation_filled { return qw(id created_at); }
26 sub update_filled { return qw(updated_at); }
27 sub update_fields { return qw(role name); }
28  
29 sub read_scope { return "read_themes"; }
30 sub write_scope { return "write_themes"; }
31  
32 eval(__PACKAGE__->generate_accessors); die $@ if $@;
33  
34 1