| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use WWW::Shopify; | ||
| 7 | |||
| 8 | package WWW::Shopify::Model::Order::DiscountCode; | ||
| 9 | use parent "WWW::Shopify::Model::NestedItem"; | ||
| 10 | |||
| 11 | my $fields; sub fields { return $fields; } | ||
| 12 | BEGIN { $fields = { | ||
| 13 | "code" => new WWW::Shopify::Field::String("[A-Z][0-9]{4,10}"), | ||
| 14 | "amount" => new WWW::Shopify::Field::Money(), | ||
| 15 | "type" => new WWW::Shopify::Field::String::Enum([qw(code percentage shipping)]) | ||
| 16 | }; } | ||
| 17 | sub creatable { return undef; } | ||
| 18 | sub updatable { return undef; } | ||
| 19 | sub deletable { return undef; } | ||
| 20 | |||
| 21 | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||
| 22 | |||
| 23 | 1 |