| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use WWW::Shopify; | ||
| 7 | |||
| 8 | package WWW::Shopify::Model::Payout; | ||
| 9 | use parent "WWW::Shopify::Model::Item"; | ||
| 10 | |||
| 11 | my $fields; sub fields { return $fields; } | ||
| 12 | BEGIN { $fields = { | ||
| 13 | "id" => new WWW::Shopify::Field::Identifier(), | ||
| 14 | "amount" => new WWW::Shopify::Field::Money(), | ||
| 15 | "currency" => new WWW::Shopify::Field::Currency(), | ||
| 16 | "status" => new WWW::Shopify::Field::String::Enum([qw(scheduled in_transit paid failed cancelled)]), | ||
| 17 | "date" => new WWW::Shopify::Field::Date() | ||
| 18 | }; } | ||
| 19 | my $queries; sub queries { return $queries; } | ||
| 20 | BEGIN { $queries = { | ||
| 21 | since_id => new WWW::Shopify::Query::LowerBound('id'), | ||
| 22 | date_min => new WWW::Shopify::Query::LowerBound('date'), | ||
| 23 | date_max => new WWW::Shopify::Query::UpperBound('date'), | ||
| 24 | status => new WWW::Shopify::Query::Enum('status', [qw(scheduled in_transit paid failed cancelled)]), | ||
| 25 | date => new WWW::Shopify::Query::Match('date') | ||
| 26 | }; } | ||
| 27 | |||
| 28 | sub updatable { undef }; | ||
| 29 | sub creatable { undef }; | ||
| 30 | sub countable { undef }; | ||
| 31 | |||
| 32 | |||
| 33 | sub read_scope { return "read_shopify_payments_payouts"; } | ||
| 34 | |||
| 35 | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||
| 36 | |||
| 37 | 1; |