« Shopify/Model/ShopifyPayment/Balance/Transaction.pm
↑ Summary
Shopify/Model/ShopifyPayment/Payout.pm »
| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | use WWW::Shopify; | ||
| 5 | |||
| 6 | package WWW::Shopify::Model::ShopifyPayment::Dispute; | ||
| 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 | "order_id" => new WWW::Shopify::Field::Relation::ReferenceOne('WWW::Shopify::Model::Order'), | ||
| 13 | "type" => new WWW::Shopify::Field::String::Enum([qw(inquiry chargeback)]), | ||
| 14 | "currency" => new WWW::Shopify::Field::Currency(), | ||
| 15 | "amount" => new WWW::Shopify::Field::Money(), | ||
| 16 | "reason" => new WWW::Shopify::Field::String::Enum([qw(bank_not_process credit_not_processed customer_initiated debit_not_authorized duplicate fraudulent general incorrect_account_details insufficient_funds product_not_received product_unacceptable subscription_cancelled unrecognized)]), | ||
| 17 | "network_reason_code" => new WWW::Shopify::Field::Int(), | ||
| 18 | "status" => new WWW::Shopify::Field::String::Enum([qw(needs_response under_review charge_refunded accepted won lost)]), | ||
| 19 | "evidence_due_by" => new WWW::Shopify::Field::Date(), | ||
| 20 | "evidence_sent_on" => new WWW::Shopify::Field::Date(), | ||
| 21 | "finalized_on" => new WWW::Shopify::Field::Date(), | ||
| 22 | "initiated_at" => new WWW::Shopify::Field::Date() | ||
| 23 | }; } | ||
| 24 | |||
| 25 | sub creatable { undef; } | ||
| 26 | sub updatable { undef; } | ||
| 27 | sub read_scope { "read_shopify_payments_disputes"; } | ||
| 28 | sub write_scope { undef; } | ||
| 29 | |||
| 30 | |||
| 31 | my $queries; sub queries { return $queries; } | ||
| 32 | BEGIN { $queries = { | ||
| 33 | since_id => new WWW::Shopify::Query::LowerBound('id'), | ||
| 34 | last_id => new WWW::Shopify::Query::UpperBound('id'), | ||
| 35 | status => new WWW::Shopify::Query::Match('status'), | ||
| 36 | initiated_at => new WWW::Shopify::Query::Match('initiated_at') | ||
| 37 | }; } | ||
| 38 | |||
| 39 | eval(__PACKAGE__->generate_accessors); die $@ if $@; | ||
| 40 | |||
| 41 | sub prefix { '/shopify_payments/'; } | ||
| 42 | |||
| 43 | 1 |