| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | package WWW::Shopify::Model::PriceRule::DiscountCode; | ||
| 7 | use parent "WWW::Shopify::Model::Item"; | ||
| 8 | |||
| 9 | my $fields; sub fields { return $fields; } | ||
| 10 | BEGIN { $fields = { | ||
| 11 | "id" => new WWW::Shopify::Field::Identifier(), | ||
| 12 | "price_rule_id" => new WWW::Shopify::Field::Relation::Parent('WWW::Shopify::Model::PriceRule'), | ||
| 13 | "code" => new WWW::Shopify::Field::String(), | ||
| 14 | "created_at" => new WWW::Shopify::Field::Date(), | ||
| 15 | "updated_at" => new WWW::Shopify::Field::Date(), | ||
| 16 | "usage_count" => new WWW::Shopify::Field::Int() | ||
| 17 | }; } | ||
| 18 | |||
| 19 | sub parent { 'WWW::Shopify::Model::PriceRule'; } | ||
| 20 | sub creation_filled { return qw(id created_at updated_at); } | ||
| 21 | sub throws_webhooks { return 1; } | ||
| 22 | |||
| 23 | sub read_scope { return "read_price_rules"; } | ||
| 24 | sub write_scope { return "write_price_rules"; } | ||
| 25 | sub countable { undef; } | ||
| 26 | |||
| 27 | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||
| 28 | |||
| 29 | 1 |