| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | use WWW::Shopify; | ||
| 5 | |||
| 6 | package WWW::Shopify::Model::ShopifyPayment::Balance::Transaction; | ||
| 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 | "type" => new WWW::Shopify::Field::String::Enum([qw(charge refund dispute reserve adjustment credit debit payout payout_failure payout_cancellation)]), | ||
| 13 | "test" => new WWW::Shopify::Field::Boolean(), | ||
| 14 | "payout_id" => new WWW::Shopify::Field::Relation::Parent(), | ||
| 15 | "payout_status" => new WWW::Shopify::Field::String::Enum([qw(pending scheduled paid)]), | ||
| 16 | "currency" => new WWW::Shopify::Field::Currency(), | ||
| 17 | "amount" => new WWW::Shopify::Field::Money(), | ||
| 18 | "fee" => new WWW::Shopify::Field::Money(), | ||
| 19 | "net" => new WWW::Shopify::Field::Money(), | ||
| 20 | "source_id" => new WWW::Shopify::Field::BigInt(), | ||
| 21 | "source_type" => new WWW::Shopify::Field::String::Enum([qw(charge refund dispute reserve adjustment payout)]), | ||
| 22 | "source_order_transaction_id" => new WWW::Shopify::Field::Relation::ReferenceOne("WWW::Shopify::Model::Transaction"), | ||
| 23 | "source_order_id" => new WWW::Shopify::Field::Relation::ReferenceOne("WWW::Shopify::Model::Order"), | ||
| 24 | "processed_at" => new WWW::Shopify::Field::Date(), | ||
| 25 | }; } | ||
| 26 | |||
| 27 | my $queries; sub queries { return $queries; } | ||
| 28 | BEGIN { $queries = { | ||
| 29 | test => new WWW::Shopify::Query::Match('test'), | ||
| 30 | payout_id => new WWW::Shopify::Query::Match('payout_id'), | ||
| 31 | payout_status => new WWW::Shopify::Query::Match('payout_status'), | ||
| 32 | last_id => new WWW::Shopify::Query::UpperBound('id'), | ||
| 33 | since_id => new WWW::Shopify::Query::LowerBound('id') | ||
| 34 | }; } | ||
| 35 | |||
| 36 | sub parent { 'WWW::Shopify::Model::ShopifyPayment::Payout' } | ||
| 37 | |||
| 38 | |||
| 39 | sub get_all_through_parent { undef; } | ||
| 40 | sub get_through_parent { undef; } | ||
| 41 | sub creatable { undef; } | ||
| 42 | sub updatable { undef; } | ||
| 43 | sub read_scope { "read_shopify_payments_payouts"; } | ||
| 44 | sub write_scope { undef; } | ||
| 45 | sub prefix { '/shopify_payments/balance/'; } | ||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||
| 50 | |||
| 51 | 1 |