Class: Peddler::APIs::ServicesV1

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/services_v1.rb,
lib/peddler/apis/services_v1/poa.rb,
lib/peddler/apis/services_v1/buyer.rb,
lib/peddler/apis/services_v1/error.rb,
lib/peddler/apis/services_v1/seller.rb,
lib/peddler/apis/services_v1/address.rb,
lib/peddler/apis/services_v1/payment.rb,
lib/peddler/apis/services_v1/warning.rb,
lib/peddler/apis/services_v1/error_list.rb,
lib/peddler/apis/services_v1/fixed_slot.rb,
lib/peddler/apis/services_v1/range_slot.rb,
lib/peddler/apis/services_v1/recurrence.rb,
lib/peddler/apis/services_v1/technician.rb,
lib/peddler/apis/services_v1/appointment.rb,
lib/peddler/apis/services_v1/job_listing.rb,
lib/peddler/apis/services_v1/reservation.rb,
lib/peddler/apis/services_v1/service_job.rb,
lib/peddler/apis/services_v1/linked_asset.rb,
lib/peddler/apis/services_v1/money_amount.rb,
lib/peddler/apis/services_v1/warning_list.rb,
lib/peddler/apis/services_v1/item_delivery.rb,
lib/peddler/apis/services_v1/scope_of_work.rb,
lib/peddler/apis/services_v1/range_capacity.rb,
lib/peddler/apis/services_v1/associated_item.rb,
lib/peddler/apis/services_v1/date_time_range.rb,
lib/peddler/apis/services_v1/appointment_slot.rb,
lib/peddler/apis/services_v1/appointment_time.rb,
lib/peddler/apis/services_v1/fulfillment_time.rb,
lib/peddler/apis/services_v1/service_location.rb,
lib/peddler/apis/services_v1/encryption_details.rb,
lib/peddler/apis/services_v1/availability_record.rb,
lib/peddler/apis/services_v1/fixed_slot_capacity.rb,
lib/peddler/apis/services_v1/range_slot_capacity.rb,
lib/peddler/apis/services_v1/appointment_resource.rb,
lib/peddler/apis/services_v1/availability_records.rb,
lib/peddler/apis/services_v1/fulfillment_document.rb,
lib/peddler/apis/services_v1/service_job_provider.rb,
lib/peddler/apis/services_v1/appointment_resources.rb,
lib/peddler/apis/services_v1/fulfillment_documents.rb,
lib/peddler/apis/services_v1/item_delivery_promise.rb,
lib/peddler/apis/services_v1/appointment_time_input.rb,
lib/peddler/apis/services_v1/update_schedule_record.rb,
lib/peddler/apis/services_v1/add_appointment_request.rb,
lib/peddler/apis/services_v1/appointment_slot_report.rb,
lib/peddler/apis/services_v1/service_upload_document.rb,
lib/peddler/apis/services_v1/update_schedule_request.rb,
lib/peddler/apis/services_v1/set_appointment_response.rb,
lib/peddler/apis/services_v1/update_schedule_response.rb,
lib/peddler/apis/services_v1/create_reservation_record.rb,
lib/peddler/apis/services_v1/fixed_slot_capacity_query.rb,
lib/peddler/apis/services_v1/get_service_jobs_response.rb,
lib/peddler/apis/services_v1/range_slot_capacity_query.rb,
lib/peddler/apis/services_v1/update_reservation_record.rb,
lib/peddler/apis/services_v1/create_reservation_request.rb,
lib/peddler/apis/services_v1/fixed_slot_capacity_errors.rb,
lib/peddler/apis/services_v1/range_slot_capacity_errors.rb,
lib/peddler/apis/services_v1/update_reservation_request.rb,
lib/peddler/apis/services_v1/cancel_reservation_response.rb,
lib/peddler/apis/services_v1/create_reservation_response.rb,
lib/peddler/apis/services_v1/update_reservation_response.rb,
lib/peddler/apis/services_v1/get_appointment_slots_response.rb,
lib/peddler/apis/services_v1/reschedule_appointment_request.rb,
lib/peddler/apis/services_v1/service_document_upload_destination.rb,
lib/peddler/apis/services_v1/assign_appointment_resources_request.rb,
lib/peddler/apis/services_v1/assign_appointment_resources_response.rb,
lib/peddler/apis/services_v1/set_appointment_fulfillment_data_request.rb,
lib/peddler/apis/services_v1/create_service_document_upload_destination.rb,
lib/peddler/apis/services_v1/get_service_job_by_service_job_id_response.rb,
lib/peddler/apis/services_v1/cancel_service_job_by_service_job_id_response.rb,
lib/peddler/apis/services_v1/complete_service_job_by_service_job_id_response.rb,
sig/peddler/apis/services_v1.rbs

Overview

Selling Partner API for Services

With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.

Defined Under Namespace

Classes: AddAppointmentRequest, Address, Appointment, AppointmentResource, AppointmentResources, AppointmentSlot, AppointmentSlotReport, AppointmentTime, AppointmentTimeInput, AssignAppointmentResourcesRequest, AssignAppointmentResourcesResponse, AssociatedItem, AvailabilityRecord, AvailabilityRecords, Buyer, CancelReservationResponse, CancelServiceJobByServiceJobIdResponse, CompleteServiceJobByServiceJobIdResponse, CreateReservationRecord, CreateReservationRequest, CreateReservationResponse, CreateServiceDocumentUploadDestination, DateTimeRange, EncryptionDetails, Error, ErrorList, FixedSlot, FixedSlotCapacity, FixedSlotCapacityErrors, FixedSlotCapacityQuery, FulfillmentDocument, FulfillmentDocuments, FulfillmentTime, GetAppointmentSlotsResponse, GetServiceJobByServiceJobIdResponse, GetServiceJobsResponse, ItemDelivery, ItemDeliveryPromise, JobListing, LinkedAsset, MoneyAmount, Payment, Poa, RangeCapacity, RangeSlot, RangeSlotCapacity, RangeSlotCapacityErrors, RangeSlotCapacityQuery, Recurrence, RescheduleAppointmentRequest, Reservation, ScopeOfWork, Seller, ServiceDocumentUploadDestination, ServiceJob, ServiceJobProvider, ServiceLocation, ServiceUploadDocument, SetAppointmentFulfillmentDataRequest, SetAppointmentResponse, Technician, UpdateReservationRecord, UpdateReservationRequest, UpdateReservationResponse, UpdateScheduleRecord, UpdateScheduleRequest, UpdateScheduleResponse, Warning, WarningList

Constant Summary

Constants inherited from Peddler::API

Peddler::API::TRANSIENT_STATUSES

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #base_url, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #delete, #endpoint_uri, #get, #host_header, #http, #initialize, #must_sandbox!, #parse_base_url, #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

#add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Adds an appointment to the service job indicated by the service job identifier specified.

Parameters:

  • service_job_id (String) —

    An Amazon defined service job identifier.

  • body (Hash) —

    Add appointment operation input details.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



137
138
139
140
141
# File 'lib/peddler/apis/services_v1.rb', line 137

def add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate_limit: 5.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments"
  parser = -> { SetAppointmentResponse }
  post(path, body:, rate_limit:, parser:)
end

#assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment.

Parameters:

  • service_job_id (String) —

    An Amazon-defined service job identifier. Get this value by calling the getServiceJobs operation of the Services API.

  • appointment_id (String) —

    An Amazon-defined identifier of active service job appointment.

  • body (Hash) —

    Input containing the resource details to be assigned to the appointment.

  • rate_limit (Float) (defaults to: 1.0) —

    Requests per second

  • (String)
  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 1.0)

Returns:



167
168
169
170
171
# File 'lib/peddler/apis/services_v1.rb', line 167

def assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments/#{percent_encode(appointment_id)}/resources"
  parser = -> { AssignAppointmentResourcesResponse }
  put(path, body:, rate_limit:, parser:)
end

#cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Cancel a reservation.

Parameters:

  • reservation_id (String) —

    Reservation Identifier

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Array[String])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



282
283
284
285
286
287
288
289
# File 'lib/peddler/apis/services_v1.rb', line 282

def cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0)
  path = "/service/v1/reservation/#{percent_encode(reservation_id)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
  }.compact
  parser = -> { CancelReservationResponse }
  delete(path, params:, rate_limit:, parser:)
end

#cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_code, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Cancels the service job indicated by the service job identifier specified.

Parameters:

  • service_job_id (String) —

    An Amazon defined service job identifier.

  • cancellation_reason_code (String) —

    A cancel reason code that specifies the reason for cancelling a service job.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (String)
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



34
35
36
37
38
39
40
41
# File 'lib/peddler/apis/services_v1.rb', line 34

def cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_code, rate_limit: 5.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/cancellations"
  params = {
    "cancellationReasonCode" => cancellation_reason_code,
  }.compact
  parser = -> { CancelServiceJobByServiceJobIdResponse }
  put(path, params:, rate_limit:, parser:)
end

#complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Completes the service job indicated by the service job identifier specified.

Parameters:

  • service_job_id (String) —

    An Amazon defined service job identifier.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



49
50
51
52
53
# File 'lib/peddler/apis/services_v1.rb', line 49

def complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/completions"
  parser = -> { CompleteServiceJobByServiceJobIdResponse }
  put(path, rate_limit:, parser:)
end

#create_reservation(body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Create a reservation.

Parameters:

  • body (Hash) —

    Reservation details

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (Hash[untyped, untyped])
  • (Array[String])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



249
250
251
252
253
254
255
256
# File 'lib/peddler/apis/services_v1.rb', line 249

def create_reservation(body, marketplace_ids, rate_limit: 5.0)
  path = "/service/v1/reservation"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
  }.compact
  parser = -> { CreateReservationResponse }
  post(path, body:, params:, rate_limit:, parser:)
end

#create_service_document_upload_destination(body, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Creates an upload destination.

Parameters:

  • body (Hash) —

    Upload document operation input details.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



349
350
351
352
353
# File 'lib/peddler/apis/services_v1.rb', line 349

def create_service_document_upload_destination(body, rate_limit: 5.0)
  path = "/service/v1/documents"
  parser = -> { CreateServiceDocumentUploadDestination }
  post(path, body:, rate_limit:, parser:)
end

#get_appointment_slots(asin, store_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 20.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Gets appointment slots as per the service context specified.

Parameters:

  • asin (String) —

    ASIN associated with the service.

  • store_id (String) —

    Store identifier defining the region scope to retrive appointment slots.

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace for which appointment slots are queried

  • start_time (String) (defaults to: nil) —

    A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If startTime is provided, endTime should also be provided. Default value is as per business configuration.

  • end_time (String) (defaults to: nil) —

    A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If endTime is provided, startTime should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days.

  • rate_limit (Float) (defaults to: 20.0) —

    Requests per second

  • (String)
  • (String)
  • (Array[String])
  • start_time: (String, nil) (defaults to: nil)
  • end_time: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 20.0)

Returns:



330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/peddler/apis/services_v1.rb', line 330

def get_appointment_slots(asin, store_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 20.0)
  path = "/service/v1/appointmentSlots"
  params = {
    "asin" => asin,
    "storeId" => store_id,
    "marketplaceIds" => stringify_array(marketplace_ids),
    "startTime" => start_time,
    "endTime" => end_time,
  }.compact
  parser = -> { GetAppointmentSlotsResponse }
  get(path, params:, rate_limit:, parser:)
end

#get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Gets appointment slots for the service associated with the service job id specified.

Parameters:

  • service_job_id (String) —

    A service job identifier to retrive appointment slots for associated service.

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • start_time (String) (defaults to: nil) —

    A time from which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If startTime is provided, endTime should also be provided. Default value is as per business configuration.

  • end_time (String) (defaults to: nil) —

    A time up to which the appointment slots will be retrieved. The specified time must be in ISO 8601 format. If endTime is provided, startTime should also be provided. Default value is as per business configuration. Maximum range of appointment slots can be 90 days.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Array[String])
  • start_time: (String, nil) (defaults to: nil)
  • end_time: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



304
305
306
307
308
309
310
311
312
313
314
# File 'lib/peddler/apis/services_v1.rb', line 304

def get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, start_time: nil, end_time: nil,
  rate_limit: 5.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointmentSlots"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "startTime" => start_time,
    "endTime" => end_time,
  }.compact
  parser = -> { GetAppointmentSlotsResponse }
  get(path, params:, rate_limit:, parser:)
end

#get_fixed_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Provides capacity in fixed-size slots.

Parameters:

  • resource_id (String) —

    Resource Identifier.

  • body (Hash) —

    Request body.

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • next_page_token (String) (defaults to: nil) —

    Next page token returned in the response of your previous request.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • (Array[String])
  • next_page_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



215
216
217
218
219
220
221
222
223
# File 'lib/peddler/apis/services_v1.rb', line 215

def get_fixed_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0)
  path = "/service/v1/serviceResources/#{percent_encode(resource_id)}/capacity/fixed"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "nextPageToken" => next_page_token,
  }.compact
  parser = -> { FixedSlotCapacity }
  post(path, body:, params:, rate_limit:, parser:)
end

#get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Provides capacity slots in a format similar to availability records.

Parameters:

  • resource_id (String) —

    Resource Identifier.

  • body (Hash) —

    Request body.

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • next_page_token (String) (defaults to: nil) —

    Next page token returned in the response of your previous request.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • (Array[String])
  • next_page_token: (String, nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



196
197
198
199
200
201
202
203
204
# File 'lib/peddler/apis/services_v1.rb', line 196

def get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0)
  path = "/service/v1/serviceResources/#{percent_encode(resource_id)}/capacity/range"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
    "nextPageToken" => next_page_token,
  }.compact
  parser = -> { RangeSlotCapacity }
  post(path, body:, params:, rate_limit:, parser:)
end

#get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Gets details of service job indicated by the provided serviceJobID.

Parameters:

  • service_job_id (String) —

    A service job identifier.

  • rate_limit (Float) (defaults to: 20.0) —

    Requests per second

  • (String)
  • rate_limit: (Float) (defaults to: 20.0)

Returns:



20
21
22
23
24
# File 'lib/peddler/apis/services_v1.rb', line 20

def get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}"
  parser = -> { GetServiceJobByServiceJobIdResponse }
  get(path, rate_limit:, parser:)
end

#get_service_jobs(marketplace_ids, service_order_ids: nil, product_order_ids: nil, tracking_ids: nil, service_job_status: nil, page_token: nil, page_size: 20, sort_field: nil, sort_order: nil, created_after: nil, created_before: nil, last_updated_after: nil, last_updated_before: nil, schedule_start_date: nil, schedule_end_date: nil, asins: nil, required_skills: nil, store_ids: nil, provider_service_job_reference_ids: nil, rate_limit: 10.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Gets service job details for the specified filter query.

Parameters:

  • service_order_ids (Array<String>) (defaults to: nil) —

    List of service order ids for the query you want to perform.Max values supported 20.

  • product_order_ids (Array<String>) (defaults to: nil) —

    A list of up to 20 associated product order IDs. You can use these IDs to query service jobs.

  • tracking_ids (Array<String>) (defaults to: nil) —

    A list of up to 20 associated product tracking IDs. You can use these IDs to query service jobs.

  • service_job_status (Array<String>) (defaults to: nil) —

    A list of one or more job status by which to filter the list of jobs. Known values: NOT_SERVICED, CANCELLED, COMPLETED, PENDING_SCHEDULE, NOT_FULFILLABLE, HOLD, PAYMENT_DECLINED.

  • page_token (String) (defaults to: nil) —

    String returned in the response of your previous request.

  • page_size (Integer) (defaults to: 20) —

    A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.

  • sort_field (String) (defaults to: nil) —

    Sort fields on which you want to sort the output. Known values: JOB_DATE, JOB_STATUS.

  • sort_order (String) (defaults to: nil) —

    Sort order for the query you want to perform. Known values: ASC, DESC.

  • created_after (String) (defaults to: nil) —

    A date used for selecting jobs created at or after a specified time. Must be in ISO 8601 format. Required if LastUpdatedAfter is not specified. Specifying both CreatedAfter and LastUpdatedAfter returns an error.

  • created_before (String) (defaults to: nil) —

    A date used for selecting jobs created at or before a specified time. Must be in ISO 8601 format.

  • last_updated_after (String) (defaults to: nil) —

    A date used for selecting jobs updated at or after a specified time. Must be in ISO 8601 format. Required if createdAfter is not specified. Specifying both CreatedAfter and LastUpdatedAfter returns an error.

  • last_updated_before (String) (defaults to: nil) —

    A date used for selecting jobs updated at or before a specified time. Must be in ISO 8601 format.

  • schedule_start_date (String) (defaults to: nil) —

    A date used for filtering jobs schedules at or after a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.

  • schedule_end_date (String) (defaults to: nil) —

    A date used for filtering jobs schedules at or before a specified time. Must be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.

  • marketplace_ids (Array<String>) —

    Used to select jobs that were placed in the specified marketplaces.

  • asins (Array<String>) (defaults to: nil) —

    List of Amazon Standard Identification Numbers (ASIN) of the items. Max values supported is 20.

  • required_skills (Array<String>) (defaults to: nil) —

    A defined set of related knowledge, skills, experience, tools, materials, and work processes common to service delivery for a set of products and/or service scenarios. Max values supported is 20.

  • store_ids (Array<String>) (defaults to: nil) —

    List of Amazon-defined identifiers for the region scope. Max values supported is 50.

  • provider_service_job_reference_ids (Array<String>) (defaults to: nil) —

    A list of up to 20 reference IDs for the service jobs assigned to the provider. You can use these IDs to query service jobs.

  • rate_limit (Float) (defaults to: 10.0) —

    Requests per second

  • (Array[String])
  • service_order_ids: (Array[String], nil) (defaults to: nil)
  • product_order_ids: (Array[String], nil) (defaults to: nil)
  • tracking_ids: (Array[String], nil) (defaults to: nil)
  • service_job_status: (Array[String], nil) (defaults to: nil)
  • page_token: (String, nil) (defaults to: nil)
  • page_size: (Integer, nil) (defaults to: 20)
  • sort_field: (String, nil) (defaults to: nil)
  • sort_order: (String, nil) (defaults to: nil)
  • created_after: (String, nil) (defaults to: nil)
  • created_before: (String, nil) (defaults to: nil)
  • last_updated_after: (String, nil) (defaults to: nil)
  • last_updated_before: (String, nil) (defaults to: nil)
  • schedule_start_date: (String, nil) (defaults to: nil)
  • schedule_end_date: (String, nil) (defaults to: nil)
  • asins: (Array[String], nil) (defaults to: nil)
  • required_skills: (Array[String], nil) (defaults to: nil)
  • store_ids: (Array[String], nil) (defaults to: nil)
  • provider_service_job_reference_ids: (Array[String], nil) (defaults to: nil)
  • rate_limit: (Float) (defaults to: 10.0)

Returns:



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/peddler/apis/services_v1.rb', line 99

def get_service_jobs(marketplace_ids, service_order_ids: nil, product_order_ids: nil, tracking_ids: nil,
  service_job_status: nil, page_token: nil, page_size: 20, sort_field: nil, sort_order: nil, created_after: nil,
  created_before: nil, last_updated_after: nil, last_updated_before: nil, schedule_start_date: nil,
  schedule_end_date: nil, asins: nil, required_skills: nil, store_ids: nil,
  provider_service_job_reference_ids: nil, rate_limit: 10.0)
  path = "/service/v1/serviceJobs"
  params = {
    "serviceOrderIds" => stringify_array(service_order_ids),
    "productOrderIds" => stringify_array(product_order_ids),
    "trackingIds" => stringify_array(tracking_ids),
    "serviceJobStatus" => stringify_array(service_job_status),
    "pageToken" => page_token,
    "pageSize" => page_size,
    "sortField" => sort_field,
    "sortOrder" => sort_order,
    "createdAfter" => created_after,
    "createdBefore" => created_before,
    "lastUpdatedAfter" => last_updated_after,
    "lastUpdatedBefore" => last_updated_before,
    "scheduleStartDate" => schedule_start_date,
    "scheduleEndDate" => schedule_end_date,
    "marketplaceIds" => stringify_array(marketplace_ids),
    "asins" => stringify_array(asins),
    "requiredSkills" => stringify_array(required_skills),
    "storeIds" => stringify_array(store_ids),
    "providerServiceJobReferenceIds" => stringify_array(provider_service_job_reference_ids),
  }.compact
  parser = -> { GetServiceJobsResponse }
  get(path, params:, rate_limit:, parser:)
end

#reschedule_appointment_for_service_job_by_service_job_id(service_job_id, appointment_id, body, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Reschedules an appointment for the service job indicated by the service job identifier specified.

Parameters:

  • service_job_id (String) —

    An Amazon defined service job identifier.

  • appointment_id (String) —

    An existing appointment identifier for the Service Job.

  • body (Hash) —

    Reschedule appointment operation input details.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



151
152
153
154
155
156
# File 'lib/peddler/apis/services_v1.rb', line 151

def reschedule_appointment_for_service_job_by_service_job_id(service_job_id, appointment_id, body,
  rate_limit: 5.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments/#{percent_encode(appointment_id)}"
  parser = -> { SetAppointmentResponse }
  post(path, body:, rate_limit:, parser:)
end

#set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Updates the appointment fulfillment data related to a given jobID and appointmentID.

Parameters:

  • service_job_id (String) —

    An Amazon-defined service job identifier. Get this value by calling the getServiceJobs operation of the Services API.

  • appointment_id (String) —

    An Amazon-defined identifier of active service job appointment.

  • body (Hash) —

    Appointment fulfillment data collection details.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (String)
  • (Hash[untyped, untyped])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



182
183
184
185
# File 'lib/peddler/apis/services_v1.rb', line 182

def set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_limit: 5.0)
  path = "/service/v1/serviceJobs/#{percent_encode(service_job_id)}/appointments/#{percent_encode(appointment_id)}/fulfillment"
  put(path, body:, rate_limit:)
end

#update_reservation(reservation_id, body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Update a reservation.

Parameters:

  • reservation_id (String) —

    Reservation Identifier

  • body (Hash) —

    Reservation details

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • (Array[String])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



266
267
268
269
270
271
272
273
# File 'lib/peddler/apis/services_v1.rb', line 266

def update_reservation(reservation_id, body, marketplace_ids, rate_limit: 5.0)
  path = "/service/v1/reservation/#{percent_encode(reservation_id)}"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
  }.compact
  parser = -> { UpdateReservationResponse }
  put(path, body:, params:, rate_limit:, parser:)
end

#update_schedule(resource_id, body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Update the schedule of the given resource.

Parameters:

  • resource_id (String) —

    Resource (store) Identifier

  • body (Hash) —

    Schedule details

  • marketplace_ids (Array<String>) —

    An identifier for the marketplace in which the resource operates.

  • rate_limit (Float) (defaults to: 5.0) —

    Requests per second

  • (String)
  • (Hash[untyped, untyped])
  • (Array[String])
  • rate_limit: (Float) (defaults to: 5.0)

Returns:



233
234
235
236
237
238
239
240
# File 'lib/peddler/apis/services_v1.rb', line 233

def update_schedule(resource_id, body, marketplace_ids, rate_limit: 5.0)
  path = "/service/v1/serviceResources/#{percent_encode(resource_id)}/schedules"
  params = {
    "marketplaceIds" => stringify_array(marketplace_ids),
  }.compact
  parser = -> { UpdateScheduleResponse }
  put(path, body:, params:, rate_limit:, parser:)
end