| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use WWW::Shopify; | ||
| 7 | |||
| 8 | package WWW::Shopify::Model::Country; | ||
| 9 | use parent "WWW::Shopify::Model::Item"; | ||
| 10 | |||
| 11 | my $fields; sub fields { return $fields; } | ||
| 12 | BEGIN { $fields = { | ||
| 13 | # Not described in detail enough. | ||
| 14 | "carrier_shipping_rate_proiders" => new WWW::Shopify::Field::Relation::Many("WWW::Shopify::Model::ShippingZone::CarrierServiceShippingRateProvider"), | ||
| 15 | "price_based_shipping_rates" => new WWW::Shopify::Field::Relation::Many("WWW::Shopify::Model::ShippingZone::PriceBasedShippingRate"), | ||
| 16 | "weight_based_shipping_rates" => new WWW::Shopify::Field::Relation::Many("WWW::Shopify::Model::ShippingZone::WeightBasedShippingRate"), | ||
| 17 | "code" => new WWW::Shopify::Field::String::CountryCode(), | ||
| 18 | "id" => new WWW::Shopify::Field::Identifier(), | ||
| 19 | "name" => new WWW::Shopify::Field::String::Country(), | ||
| 20 | "provinces" => new WWW::Shopify::Field::Relation::Many("WWW::Shopify::Model::Country::Province"), | ||
| 21 | "tax" => new WWW::Shopify::Field::Float(), | ||
| 22 | "tax_name" => new WWW::Shopify::Field::String(), | ||
| 23 | "shipping_zone_id" => new WWW::Shopify::Field::Relation::ReferenceOne("WWW::Shopify::Model::ShippingZone") | ||
| 24 | |||
| 25 | }; } | ||
| 26 | my $queries; sub queries { return $queries; } | ||
| 27 | BEGIN { $queries = { | ||
| 28 | since_id => new WWW::Shopify::Query::LowerBound('id') | ||
| 29 | }; } | ||
| 30 | |||
| 31 | sub plural { return "countries"; } | ||
| 32 | |||
| 33 | sub creation_minimal { return qw(code); } | ||
| 34 | |||
| 35 | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||
| 36 | |||
| 37 | 1 |