Shopify/Model/Checkout.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 13 Podpod 0.0% 0 / 9 totaltotal 0.0% 0 / 53 CC 1 SCAR 6.9
CC
1
Cov
0%
fields
2.0
BEGIN
2.0
queries
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::Checkout;
9 use parent "WWW::Shopify::Model::Item";
10  
11 my $fields; sub fields { return $fields; }
12 BEGIN { $fields = {
13 "buyer_accepts_marketing" => new WWW::Shopify::Field::Boolean(),
14 "cart_token" => new WWW::Shopify::Field::String::Hash(),
15 "created_at" => new WWW::Shopify::Field::Date(),
16 "email" => new WWW::Shopify::Field::String::Email(),
17 "id" => new WWW::Shopify::Field::Identifier(),
18 "token" => new WWW::Shopify::Field::String::Hash(),
19 "abandoned_checkout_url" => new WWW::Shopify::Field::String::URL(),
20 "landing_site" => new WWW::Shopify::Field::String::URL(),
21 "referring_site" => new WWW::Shopify::Field::String::URL(),
22 "note" => new WWW::Shopify::Field::String(),
23 "updated_at" => new WWW::Shopify::Field::Date(),
24 "source_name" => new WWW::Shopify::Field::String::Enum(["web", "pos"]),
25 "gateway" => new WWW::Shopify::Field::String(),
26 "subtotal_price" => new WWW::Shopify::Field::Money(),
27 "taxes_included" => new WWW::Shopify::Field::Boolean(),
28 "total_discounts" => new WWW::Shopify::Field::Money(),
29 "total_line_items_price" => new WWW::Shopify::Field::Money(),
30 "total_price" => new WWW::Shopify::Field::Money(),
31 "total_tax" => new WWW::Shopify::Field::Money(),
32 "total_weight" => new WWW::Shopify::Field::Float(),
33 "note_attributes" => new WWW::Shopify::Field::Relation::Many('WWW::Shopify::Model::Checkout::NoteAttribute'),
34 "discount_codes" => new WWW::Shopify::Field::Relation::Many('WWW::Shopify::Model::Checkout::DiscountCode'),
35 "tax_lines" => new WWW::Shopify::Field::Relation::Many('WWW::Shopify::Model::Checkout::TaxLine'),
36 "shipping_lines" => new WWW::Shopify::Field::Relation::Many('WWW::Shopify::Model::Checkout::ShippingLine'),
37 "line_items" => new WWW::Shopify::Field::Relation::Many('WWW::Shopify::Model::Checkout::LineItem'),
38 "billing_address" => new WWW::Shopify::Field::Relation::OwnOne('WWW::Shopify::Model::Checkout::BillingAddress'),
39 "shipping_address" => new WWW::Shopify::Field::Relation::OwnOne('WWW::Shopify::Model::Checkout::ShippingAddress'),
40 "customer" => new WWW::Shopify::Field::Relation::OwnOne('WWW::Shopify::Model::Customer'),
41 "customer_locale" => new WWW::Shopify::Field::String()
42 };
43 }
44  
45 my $queries; sub queries { return $queries; }
46 BEGIN { $queries = {
47 created_at_min => new WWW::Shopify::Query::LowerBound('created_at'),
48 created_at_max => new WWW::Shopify::Query::UpperBound('created_at'),
49 updated_at_min => new WWW::Shopify::Query::LowerBound('updated_at'),
50 updated_at_max => new WWW::Shopify::Query::UpperBound('updated_at'),
51 status => new WWW::Shopify::Query::Enum('status', ['open', 'closed']),
52 since_id => new WWW::Shopify::Query::LowerBound('id')
53 }; }
54  
55  
56 sub read_scope { return "read_checkouts"; }
57 sub write_scope { return "write_checkouts"; }
58  
59 sub creatable { return undef; }
60 sub updatable { return undef; }
61 sub deletable { return undef; }
62  
63 eval(__PACKAGE__->generate_accessors); die $@ if $@;
64  
65 1;