Marketplace-Rakuten
view release on metacpan or search on metacpan
lib/Marketplace/Rakuten/Order.pm view on Meta::CPAN
package Marketplace::Rakuten::Order;
use strict;
use warnings;
use Data::Dumper;
use DateTime;
use DateTime::Format::ISO8601;
use Moo;
use MooX::Types::MooseLike::Base qw(Str HashRef Int Object);
use Marketplace::Rakuten::Order::Address;
use Marketplace::Rakuten::Order::Item;
use Marketplace::Rakuten::Utils;
use namespace::clean;
=head1 NAME
=encoding utf8
Marketplace::Rakuten::Order
=head1 DESCRIPTION
Class to handle the xml structures returned by
L<http://webservice.rakuten.de/documentation/method/get_orders>
The aim is to have a consistent interface with
L<Amazon::MWS::XML::Order> so importing the orders can happens almost
transparently.
=cut
=head1 ACCESSORS/METHODS
=head2 order
The raw structure got from the XML parsing
=head2 shop_type
Always returns C<rakuten>
=cut
has order => (is => 'ro', isa => HashRef, required => 1);
sub shop_type {
return 'rakuten';
}
=head2 order_number
read-write accessor for the (shop) order number so you can set this
while importing it.
=cut
has order_number => (is => 'rw', isa => Str);
=head2 payment_status
read-write accessor for the payment status, so the shop can set it
while importing it.
=cut
has payment_status => (is => 'rw', isa => Str);
=head2 order_status
Unclear (for now) what to do here. List of statuses:
=over 4
=item pending
Bestellung ist neu eingegangen
=item editable
Bestellung ist zur Bearbeitung freigegeben
=item shipped
Bestellung ist versendet
=item payout
Bestellung ist ausbezahlt
=item cancelled
Bestellung ist storniert
=back
=head2 can_be_imported
It returns true if the status is pending or editable or payout.
=cut
sub can_be_imported {
my $self = shift;
my %map = (
( run in 1.585 second using v1.01-cache-2.11-cpan-ceb78f64989 )