Class: Peddler::APIs::ExternalFulfillmentReturns20240911

Inherits:
Peddler::API
  • Object
show all
Defined in:
lib/peddler/apis/external_fulfillment_returns_2024_09_11.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/error.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/return.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/error_list.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/otp_details.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/tracking_info.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/return_metadata.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/returns_response.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/replanning_details.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/invoice_information.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/marketplace_channel.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/return_shipping_info.rb,
lib/peddler/apis/external_fulfillment_returns_2024_09_11/marketplace_channel_details.rb,
sig/peddler/apis/external_fulfillment_returns_2024_09_11.rbs

Overview

The Selling Partner API for Amazon External Fulfillment Return Item Processing

You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon's External Fulfillment returns management system.

Defined Under Namespace

Classes: Error, ErrorList, InvoiceInformation, MarketplaceChannel, MarketplaceChannelDetails, OtpDetails, ReplanningDetails, Return, ReturnMetadata, ReturnShippingInfo, ReturnsResponse, TrackingInfo

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #http, #initialize, #must_sandbox!, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#get_return(return_id) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve the return item with the specified ID.

Parameters:

  • return_id (String)

    The ID of the return item you want.

  • (String)

Returns:



69
70
71
72
73
# File 'lib/peddler/apis/external_fulfillment_returns_2024_09_11.rb', line 69

def get_return(return_id)
  path = "/externalFulfillment/2024-09-11/returns/#{percent_encode(return_id)}"
  parser = -> { Return }
  get(path, parser:)
end

#list_returns(return_location_id: nil, rma_id: nil, status: nil, reverse_tracking_id: nil, created_since: nil, created_until: nil, last_updated_since: nil, last_updated_until: nil, last_updated_after: nil, last_updated_before: nil, max_results: nil, next_token: nil) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Retrieve a list of return items. You can filter results by location, RMA ID, status, or time.

Parameters:

  • return_location_id (String) (defaults to: nil)

    The SmartConnect location ID of the location from which you want to retrieve return items.

  • rma_id (String) (defaults to: nil)

    The RMA ID of the return items you want to list.

  • status (String) (defaults to: nil)

    The status of return items you want to list. You can retrieve all new return items with the CREATED status.

  • reverse_tracking_id (String) (defaults to: nil)

    The reverse tracking ID of the return items you want to list.

  • created_since (String) (defaults to: nil)

    Return items created after the specified date are included in the response. In ISO 8601 date-time format.

  • created_until (String) (defaults to: nil)

    Return items created before the specified date are included in the response. In ISO 8601 date-time format.

  • last_updated_since (String) (defaults to: nil)

    Return items updated after the specified date are included in the response. In ISO 8601 date-time format. If you supply this parameter, you must also supply returnLocationId and status.

  • last_updated_until (String) (defaults to: nil)

    Return items whose most recent update is before the specified date are included in the response. In ISO 8601 date-time format. If you supply this parameter, you must also supply returnLocationId and status.

  • last_updated_after (String) (defaults to: nil)

    DEPRECATED. Use the createdSince parameter.

  • last_updated_before (String) (defaults to: nil)

    DEPRECATED. Use the createdUntil parameter.

  • max_results (Integer) (defaults to: nil)

    The number of return items you want to include in the response. Default: 10 Maximum: 100

  • next_token (String) (defaults to: nil)

    A token that you use to retrieve the next page of results. The response includes nextToken when there are multiple pages of results. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until nextToken is null. Note that this operation can return empty pages.

  • return_location_id: (String, nil) (defaults to: nil)
  • rma_id: (String, nil) (defaults to: nil)
  • status: (String, nil) (defaults to: nil)
  • reverse_tracking_id: (String, nil) (defaults to: nil)
  • created_since: (String, nil) (defaults to: nil)
  • created_until: (String, nil) (defaults to: nil)
  • last_updated_since: (String, nil) (defaults to: nil)
  • last_updated_until: (String, nil) (defaults to: nil)
  • last_updated_after: (String, nil) (defaults to: nil)
  • last_updated_before: (String, nil) (defaults to: nil)
  • max_results: (Integer, nil) (defaults to: nil)
  • next_token: (String, nil) (defaults to: nil)

Returns:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/peddler/apis/external_fulfillment_returns_2024_09_11.rb', line 42

def list_returns(return_location_id: nil, rma_id: nil, status: nil, reverse_tracking_id: nil, created_since: nil,
  created_until: nil, last_updated_since: nil, last_updated_until: nil, last_updated_after: nil,
  last_updated_before: nil, max_results: nil, next_token: nil)
  path = "/externalFulfillment/2024-09-11/returns"
  params = {
    "returnLocationId" => return_location_id,
    "rmaId" => rma_id,
    "status" => status,
    "reverseTrackingId" => reverse_tracking_id,
    "createdSince" => created_since,
    "createdUntil" => created_until,
    "lastUpdatedSince" => last_updated_since,
    "lastUpdatedUntil" => last_updated_until,
    "lastUpdatedAfter" => last_updated_after,
    "lastUpdatedBefore" => last_updated_before,
    "maxResults" => max_results,
    "nextToken" => next_token,
  }.compact
  parser = -> { ReturnsResponse }
  get(path, params:, parser:)
end