Class: MWS::EasyShip::Client

Inherits:
Peddler::Client show all
Defined in:
lib/mws/easy_ship/client.rb

Overview

Note:

This functionality is available only in the India marketplace.

With the Easy Ship API section, you can build applications that help sellers in India manage and ship their Amazon Easy Ship orders.

Instance Attribute Summary

Attributes inherited from Peddler::Client

#auth_token, #body, #marketplace, #merchant_id

Instance Method Summary collapse

Methods inherited from Peddler::Client

#initialize

Constructor Details

This class inherits a constructor from Peddler::Client

Instance Method Details

#create_scheduled_package(marketplace_id, amazon_order_id, package_request_details) ⇒ Peddler::XMLParser

Schedules an Amazon Easy Ship pickup slot

Parameters:

  • marketplace_id (String)
  • amazon_order_id (String)
  • package_request_details (Struct, Hash)

Returns:

  • (Peddler::XMLParser)

See Also:


41
42
43
44
45
46
47
48
49
# File 'lib/mws/easy_ship/client.rb', line 41

def create_scheduled_package(marketplace_id, amazon_order_id,
                             package_request_details)
  operation('CreateScheduledPackage')
    .add('MarketplaceId' => marketplace_id,
         'AmazonOrderId' => amazon_order_id,
         'PackageRequestDetails' => package_request_details)

  run
end

#get_scheduled_package(marketplace_id, scheduled_package_id) ⇒ Peddler::XMLParser

Returns information about a scheduled package

Parameters:

  • marketplace_id (String)
  • scheduled_package_id (Struct, Hash)

Returns:

  • (Peddler::XMLParser)

See Also:


75
76
77
78
79
80
81
# File 'lib/mws/easy_ship/client.rb', line 75

def get_scheduled_package(marketplace_id, scheduled_package_id)
  operation('GetScheduledPackage')
    .add('MarketplaceId' => marketplace_id,
         'ScheduledPackageId' => scheduled_package_id)

  run
end

#get_service_statusPeddler::XMLParser

Returns the operational status of the API


87
88
89
90
# File 'lib/mws/easy_ship/client.rb', line 87

def get_service_status
  operation('GetServiceStatus')
  run
end

#list_pickup_slots(marketplace_id, amazon_order_id, package_dimensions, package_weight) ⇒ Peddler::XMLParser

Returns time slots for Amazon Easy Ship package pickup

Parameters:

  • marketplace_id (String)
  • amazon_order_id (String)
  • package_dimensions (Struct, Hash)
  • package_weight (Struct, Hash)

Returns:

  • (Peddler::XMLParser)

See Also:


23
24
25
26
27
28
29
30
31
32
# File 'lib/mws/easy_ship/client.rb', line 23

def list_pickup_slots(marketplace_id, amazon_order_id, package_dimensions,
                      package_weight)
  operation('ListPickupSlots')
    .add('MarketplaceId' => marketplace_id,
         'AmazonOrderId' => amazon_order_id,
         'PackageDimensions' => package_dimensions,
         'PackageWeight' => package_weight)

  run
end

#update_scheduled_packages(marketplace_id, scheduled_package_update_details_list) ⇒ Peddler::XMLParser

Updates an Amazon Easy Ship pickup slot

Parameters:

  • marketplace_id (String)
  • scheduled_package_update_details_list (Array<Struct, Hash>)

Returns:

  • (Peddler::XMLParser)

See Also:


57
58
59
60
61
62
63
64
65
66
67
# File 'lib/mws/easy_ship/client.rb', line 57

def update_scheduled_packages(marketplace_id,
                              scheduled_package_update_details_list)
  operation('UpdateScheduledPackages')
    .add('MarketplaceId' => marketplace_id,
         'ScheduledPackageUpdateDetailsList' =>
           scheduled_package_update_details_list)
    .structure!('ScheduledPackageUpdateDetailsList',
                'PackageUpdateDetails')

  run
end