« blib/lib/WWW/Shopify/Model/Order/Fulfillment/Receipt.pm
↑ Summary
blib/lib/WWW/Shopify/Model/Refund/Transaction.pm »
| 1 | #!/usr/bin/perl | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | =head1 NAME | ||||||||||
| 7 | |||||||||||
| 8 | Query - Basic Description of Filters on Shopify | ||||||||||
| 9 | |||||||||||
| 10 | =cut | ||||||||||
| 11 | |||||||||||
| 12 | =head1 DESCRIPTION | ||||||||||
| 13 | |||||||||||
| 14 | Queries describe Shopify filters that can be put on get requests. This allows them to be translated into local database queries for testing purposes. | ||||||||||
| 15 | |||||||||||
| 16 | The following queries exist: | ||||||||||
| 17 | |||||||||||
| 18 | =cut | ||||||||||
| 19 | |||||||||||
| 20 | package WWW::Shopify::Query; | ||||||||||
| 21 | 0 | ▶ | sub new { return bless { name => undef }, $_[0]; } | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 22 | 68 | ▶ | sub name { $_[0]->{name} = $_[1] if defined $_[1]; return $_[0]->{name}; } | ||||||||
|
Subroutine
name: called CC=2 SCAR=7.2
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 23 | 0 | ▶ | sub field_name { $_[0]->{field_name} = $_[1] if defined $_[1]; return $_[0]->{field_name}; } | ||||||||
|
Subroutine
field_name: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | =head2 WWW::Shopify::Query::LowerBound | ||||||||||
| 26 | |||||||||||
| 27 | Specifies a lower bound on the specified field. An example of this is WWW::Shopify::Model::Product's created_at_min query, which links to the created_at field. | ||||||||||
| 28 | |||||||||||
| 29 | =cut | ||||||||||
| 30 | |||||||||||
| 31 | package WWW::Shopify::Query::LowerBound; | ||||||||||
| 32 | 1 | ▶ | use parent 'WWW::Shopify::Query'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 33 | 27 | ▶ | sub new { return bless { 'field_name' => $_[1] }, $_[0]; } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||
| 34 | |||||||||||
| 35 | =head2 WWW::Shopify::Query::UpperBound | ||||||||||
| 36 | |||||||||||
| 37 | As above, except an upper bound. | ||||||||||
| 38 | |||||||||||
| 39 | =cut | ||||||||||
| 40 | |||||||||||
| 41 | package WWW::Shopify::Query::UpperBound; | ||||||||||
| 42 | 1 | ▶ | use parent 'WWW::Shopify::Query'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 43 | 19 | ▶ | sub new { return bless { 'field_name' => $_[1] }, $_[0]; } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||
| 44 | |||||||||||
| 45 | =head2 WWW::Shopify::Query::Enum | ||||||||||
| 46 | |||||||||||
| 47 | A query that states that a field can be equal to one of the specified enumerations. | ||||||||||
| 48 | |||||||||||
| 49 | =cut | ||||||||||
| 50 | |||||||||||
| 51 | package WWW::Shopify::Query::Enum; | ||||||||||
| 52 | 1 | ▶ | use parent 'WWW::Shopify::Query'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 53 | 7 | ▶ | sub new { return bless { 'field_name' => $_[1], 'enums' => $_[2] }, $_[0]; } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||
| 54 | 0 | ▶ | sub enums { return @{$_[0]->{enums}}; } | ||||||||
|
Subroutine
enums: not called CC=1 SCAR=6.9
| |||||||||||
| 55 | |||||||||||
| 56 | =head2 WWW::Shopify::Query::Match | ||||||||||
| 57 | |||||||||||
| 58 | A query that states that the specified field must exactly equal the input, though there is no restriction on what this input might be. | ||||||||||
| 59 | |||||||||||
| 60 | =cut | ||||||||||
| 61 | |||||||||||
| 62 | package WWW::Shopify::Query::Match; | ||||||||||
| 63 | 1 | ▶ | use parent 'WWW::Shopify::Query'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 64 | 12 | ▶ | sub new { return bless { 'field_name' => $_[1] }, $_[0]; } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||
| 65 | |||||||||||
| 66 | =head2 WWW::Shopify::Query::Custom | ||||||||||
| 67 | |||||||||||
| 68 | A query that takes a sub that details how to handle the query. | ||||||||||
| 69 | |||||||||||
| 70 | =cut | ||||||||||
| 71 | |||||||||||
| 72 | |||||||||||
| 73 | package WWW::Shopify::Query::Custom; | ||||||||||
| 74 | 1 | ▶ | use parent 'WWW::Shopify::Query'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 75 | 3 | ▶ | sub new { return bless { 'field_name' => $_[1], 'sub' => $_[2] }, $_[0]; } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||
| 76 | 0 | ▶ | sub routine { return $_[0]->{'sub'}; } | ||||||||
|
Subroutine
routine: not called CC=1 SCAR=6.9
| |||||||||||
| 77 | |||||||||||
| 78 | 1 | 1; | |||||||||