Class: Peddler::APIs::ServicesV1
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::ServicesV1
- 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/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/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
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: AppointmentResources, AvailabilityRecords, ErrorList, FulfillmentDocuments, WarningList
Constant Summary collapse
- Poa =
Proof of Appointment (POA) details.
Structure.new do # @return [AppointmentTime] The time of the appointment window. attribute?(:appointment_time, AppointmentTime, from: "appointmentTime") # @return [String] The type of POA uploaded. attribute?(:poa_type, String, from: "poaType") # @return [Array<Technician>] A list of technicians. attribute?(:technicians, [Technician]) # @return [Time] The date and time when the POA was uploaded in ISO 8601 format. attribute?(:upload_time, Time, from: "uploadTime") # @return [String] The identifier of the technician who uploaded the POA. attribute?(:uploading_technician, String, from: "uploadingTechnician") end
- Buyer =
Information about the buyer.
Structure.new do # @return [String] The identifier of the buyer. attribute?(:buyer_id, String, from: "buyerId") # @return [:boolean] When true, the service is for an Amazon Prime buyer. attribute?(:prime_member, :boolean, from: "isPrimeMember") # @return [String] The name of the buyer. attribute?(:name, String) # @return [String] The phone number of the buyer. attribute?(:phone, String) end
- Error =
Error response returned when the request is unsuccessful.
Structure.new do # @return [String] An error code that identifies the type of error that occurred. attribute(:code, String) # @return [String] A message that describes the error condition. attribute(:message, String) # @return [String] Additional details that can help the caller understand or fix the issue. attribute?(:details, String) # @return [String] The type of error. attribute?(:error_level, String, from: "errorLevel") end
- Seller =
Information about the seller of the service job.
Structure.new do # @return [String] The identifier of the seller of the service job. attribute?(:seller_id, String, from: "sellerId") end
- Address =
The shipping address for the service job.
Structure.new do # @return [String] The first line of the address. attribute(:address_line1, String, from: "addressLine1") # @return [String] The name of the person, business, or institution. attribute(:name, String) # @return [String] Additional address information, if required. attribute?(:address_line2, String, from: "addressLine2") # @return [String] Additional address information, if required. attribute?(:address_line3, String, from: "addressLine3") # @return [String] The city. attribute?(:city, String) # @return [String] The two digit country code, in ISO 3166-1 alpha-2 format. attribute?(:country_code, String, from: "countryCode") # @return [String] The county. attribute?(:county, String) # @return [String] The district. attribute?(:district, String) # @return [String] The phone number. attribute?(:phone, String) # @return [String] The postal code. This can contain letters, digits, spaces, and/or punctuation. attribute?(:postal_code, String, from: "postalCode") # @return [String] The state or region. attribute?(:state_or_region, String, from: "stateOrRegion") end
- Warning =
Warning returned when the request is successful, but there are important callouts based on which API clients should take defined actions.
Structure.new do # @return [String] An warning code that identifies the type of warning that occurred. attribute(:code, String) # @return [String] A message that describes the warning condition in a human-readable form. attribute(:message, String) # @return [String] Additional details that can help the caller understand or address the warning. attribute?(:details, String) end
- FixedSlot =
In this slot format each slot only has the requested capacity types. This slot size is as specified by slot duration.
Structure.new do # @return [Integer] Available capacity corresponding to the slot. This capacity represents the capacity # available for allocation to reservations. attribute?(:available_capacity, Integer, from: "availableCapacity") # @return [Integer] Encumbered capacity corresponding to the slot. This capacity represents the capacity # allocated for Amazon Jobs/Appointments/Orders. attribute?(:encumbered_capacity, Integer, from: "encumberedCapacity") # @return [Integer] Reserved capacity corresponding to the slot. This capacity represents the capacity made # unavailable due to events like Breaks/Leaves/Lunch. attribute?(:reserved_capacity, Integer, from: "reservedCapacity") # @return [Integer] Scheduled capacity corresponding to the slot. This capacity represents the originally # allocated capacity as per resource schedule. attribute?(:scheduled_capacity, Integer, from: "scheduledCapacity") # @return [Time] Start date time of slot in ISO 8601 format with precision of seconds. attribute?(:start_date_time, Time, from: "startDateTime") end
- RangeSlot =
Capacity slots represented in a format similar to availability rules.
Structure.new do # @return [Integer] Capacity of the slot. attribute?(:capacity, Integer) # @return [Time] End date time of slot in ISO 8601 format with precision of seconds. attribute?(:end_date_time, Time, from: "endDateTime") # @return [Time] Start date time of slot in ISO 8601 format with precision of seconds. attribute?(:start_date_time, Time, from: "startDateTime") end
- Recurrence =
Repeated occurrence of an event in a time range.
Structure.new do # @return [Time] End time of the recurrence. attribute(:end_time, Time, from: "endTime") # @return [Array<Integer>] Days of the month when recurrence is valid. attribute?(:days_of_month, [Integer], from: "daysOfMonth") # @return [Array<DayOfWeek>] Days of the week when recurrence is valid. If the schedule is valid every Monday, # input will only contain `MONDAY` in the list. attribute?(:days_of_week, Array, from: "daysOfWeek") end
- Technician =
A technician who is assigned to perform the service job in part or in full.
Structure.new do # @return [String] The name of the technician. attribute?(:name, String) # @return [String] The technician identifier. attribute?(:technician_id, String, from: "technicianId") end
- Appointment =
The details of an appointment.
Structure.new do # @return [String] The appointment identifier. attribute?(:appointment_id, String, from: "appointmentId") # @return [String] The status of the appointment. attribute?(:appointment_status, String, from: "appointmentStatus") # @return [AppointmentTime] The time of the appointment window. attribute?(:appointment_time, AppointmentTime, from: "appointmentTime") # @return [Array<Technician>] A list of technicians assigned to the service job. attribute?(:assigned_technicians, [Technician], from: "assignedTechnicians") # @return [Poa] Proof of Appointment (POA) details. attribute?(:poa, Poa) # @return [String] The identifier of a rescheduled appointment. attribute?(:rescheduled_appointment_id, String, from: "rescheduledAppointmentId") end
- JobListing =
The payload for the
getServiceJobs
operation. Structure.new do # @return [Array<ServiceJob>] List of job details for the given input. attribute?(:jobs, [ServiceJob]) # @return [String] A generated string used to pass information to your next request. If `nextPageToken` is # returned, pass the value of `nextPageToken` to the `pageToken` to get next results. attribute?(:next_page_token, String, from: "nextPageToken") # @return [String] A generated string used to pass information to your next request. If `previousPageToken` is # returned, pass the value of `previousPageToken` to the `pageToken` to get previous page results. attribute?(:previous_page_token, String, from: "previousPageToken") # @return [Integer] Total result size of the query result. attribute?(:total_result_size, Integer, from: "totalResultSize") end
- Reservation =
Reservation object reduces the capacity of a resource.
Structure.new do # @return [AvailabilityRecord] `AvailabilityRecord` to represent the capacity of a resource over a time range. attribute(:availability, AvailabilityRecord) # @return [String] Type of reservation. attribute(:type, String) # @return [String] Unique identifier for a reservation. If present, it is treated as an update reservation # request and will update the corresponding reservation. Otherwise, it is treated as a new create reservation # request. attribute?(:reservation_id, String, from: "reservationId") end
- ServiceJob =
The job details of a service.
Structure.new do # @return [Array<Appointment>] A list of appointments. attribute?(:appointments, [Appointment]) # @return [Array<AssociatedItem>] A list of items associated with the service job. attribute?(:associated_items, [AssociatedItem], from: "associatedItems") # @return [Buyer] Information about the buyer. attribute?(:buyer, Buyer) # @return [Time] The date and time of the creation of the job in ISO 8601 format. attribute?(:create_time, Time, from: "createTime") # @return [String] The marketplace identifier. attribute?(:marketplace_id, String, from: "marketplaceId") # @return [Array<AppointmentTime>] A list of appointment windows preferred by the buyer. Included only if the # buyer selected appointment windows when creating the order. attribute?(:preferred_appointment_times, [AppointmentTime], from: "preferredAppointmentTimes") # @return [ScopeOfWork] The scope of work for the order. attribute?(:scope_of_work, ScopeOfWork, from: "scopeOfWork") # @return [Seller] Information about the seller of the service job. attribute?(:seller, Seller) # @return [String] The service job identifier. attribute?(:service_job_id, String, from: "serviceJobId") # @return [ServiceJobProvider] Information about the service job provider. attribute?(:service_job_provider, ServiceJobProvider, from: "serviceJobProvider") # @return [String] The status of the service job. attribute?(:service_job_status, String, from: "serviceJobStatus") # @return [ServiceLocation] Information about the location of the service job. attribute?(:service_location, ServiceLocation, from: "serviceLocation") # @return [String] The Amazon-defined identifier for an order placed by the buyer in 3-7-7 format. attribute?(:service_order_id, String, from: "serviceOrderId") # @return [String] The Amazon-defined identifier for the region scope. attribute?(:store_id, String, from: "storeId") end
- ItemDelivery =
Delivery information for the item.
Structure.new do # @return [Time] The date and time of the latest Estimated Delivery Date (EDD) of all the items with an EDD. In # ISO 8601 format. attribute?(:estimated_delivery_date, Time, from: "estimatedDeliveryDate") # @return [ItemDeliveryPromise] Promised delivery information for the item. attribute?(:item_delivery_promise, ItemDeliveryPromise, from: "itemDeliveryPromise") end
- ScopeOfWork =
The scope of work for the order.
Structure.new do # @return [String] The Amazon Standard Identification Number (ASIN) of the service job. attribute?(:asin, String) # @return [Integer] The number of service jobs. attribute?(:quantity, Integer) # @return [Array<String>] A list of skills required to perform the job. attribute?(:required_skills, [String], from: "requiredSkills") # @return [String] The title of the service job. attribute?(:title, String) end
- RangeCapacity =
Range capacity entity where each entry has a capacity type and corresponding slots.
Structure.new do # @return [String] Capacity type corresponding to the slots. attribute?(:capacity_type, String, from: "capacityType") # @return [Array<RangeSlot>] Array of capacity slots in range slot format. attribute?(:slots, [RangeSlot]) end
- AssociatedItem =
Information about an item associated with the service job.
Structure.new do # @return [String] The Amazon Standard Identification Number (ASIN) of the item. attribute?(:asin, String) # @return [String] The brand name of the item. attribute?(:brand_name, String, from: "brandName") # @return [ItemDelivery] Delivery information for the item. attribute?(:item_delivery, ItemDelivery, from: "itemDelivery") # @return [String] The status of the item. attribute?(:item_status, String, from: "itemStatus") # @return [String] The Amazon-defined identifier for an order placed by the buyer in 3-7-7 format. attribute?(:order_id, String, from: "orderId") # @return [Integer] The total number of items included in the order. attribute?(:quantity, Integer) # @return [String] The title of the item. attribute?(:title, String) end
- DateTimeRange =
A range of time.
Structure.new do # @return [Time] The end of the time range. Must be in UTC in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute(:end_time, Time, from: "endTime") # @return [Time] The beginning of the time range. Must be in UTC in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. attribute(:start_time, Time, from: "startTime") end
- AppointmentSlot =
A time window along with associated capacity in which the service can be performed.
Structure.new do # @return [Integer] Number of resources for which a slot can be reserved. attribute?(:capacity, Integer) # @return [Time] Time window end time in ISO 8601 format. attribute?(:end_time, Time, from: "endTime") # @return [Time] Time window start time in ISO 8601 format. attribute?(:start_time, Time, from: "startTime") end
- AppointmentTime =
The time of the appointment window.
Structure.new do # @return [Integer] The duration of the appointment window, in minutes. attribute(:duration_in_minutes, Integer, from: "durationInMinutes") # @return [Time] The date and time of the start of the appointment window in ISO 8601 format. attribute(:start_time, Time, from: "startTime") end
- FulfillmentTime =
Input for fulfillment time details
Structure.new do # @return [Time] The date, time in UTC of the fulfillment end time in ISO 8601 format. attribute?(:end_time, Time, from: "endTime") # @return [Time] The date, time in UTC of the fulfillment start time in ISO 8601 format. attribute?(:start_time, Time, from: "startTime") end
- ServiceLocation =
Information about the location of the service job.
Structure.new do # @return [Address] The shipping address for the service job. attribute?(:address, Address) # @return [String] The location of the service job. attribute?(:service_location_type, String, from: "serviceLocationType") end
- EncryptionDetails =
Encryption details for required client-side encryption and decryption of document contents.
Structure.new do # @return [String] The vector to encrypt or decrypt the document contents using Cipher Block Chaining (CBC). attribute(:initialization_vector, String, from: "initializationVector") # @return [String] The encryption key used to encrypt or decrypt the document contents. attribute(:key, String) # @return [String] The encryption standard required to encrypt or decrypt the document contents. attribute(:standard, String) end
- AvailabilityRecord =
AvailabilityRecord
to represent the capacity of a resource over a time range. Structure.new do # @return [Time] Denotes the time till when the resource is available in a day in ISO-8601 format. attribute(:end_time, Time, from: "endTime") # @return [Time] Denotes the time from when the resource is available in a day in ISO-8601 format. attribute(:start_time, Time, from: "startTime") # @return [Integer] Signifies the capacity of a resource which is available. attribute?(:capacity, Integer) # @return [Recurrence] Recurrence object containing the recurrence pattern of schedule. attribute?(:recurrence, Recurrence) end
- FixedSlotCapacity =
Response schema for the
getFixedSlotCapacity
operation. Structure.new do # @return [Array<FixedSlot>] Array of capacity slots in fixed slot format. attribute?(:capacities, [FixedSlot]) # @return [String] Next page token, if there are more pages. attribute?(:next_page_token, String, from: "nextPageToken") # @return [String] Resource Identifier. attribute?(:resource_id, String, from: "resourceId") # @return [Float] The duration of each slot which is returned. This value will be a multiple of 5 and fall in # the following range: 5 <= `slotDuration` <= 360. attribute?(:slot_duration, Float, from: "slotDuration") end
- RangeSlotCapacity =
Response schema for the
getRangeSlotCapacity
operation. Structure.new do # @return [Array<RangeCapacity>] Array of range capacities where each entry is for a specific capacity type. attribute?(:capacities, [RangeCapacity]) # @return [String] Next page token, if there are more pages. attribute?(:next_page_token, String, from: "nextPageToken") # @return [String] Resource Identifier. attribute?(:resource_id, String, from: "resourceId") end
- AppointmentResource =
The resource that performs or performed appointment fulfillment.
Structure.new do # @return [String] The resource identifier. attribute?(:resource_id, String, from: "resourceId") end
- FulfillmentDocument =
Document that captured during service appointment fulfillment that portrays proof of completion
Structure.new do # @return [String] Sha256 hash of the file content. This value is used to determine if the file has been # corrupted or tampered with during transit. attribute?(:content_sha256, String, from: "contentSha256") # @return [String] The identifier of the upload destination. Get this value by calling the # `createServiceDocumentUploadDestination` operation of the Services API. attribute?(:upload_destination_id, String, from: "uploadDestinationId") end
- ServiceJobProvider =
Information about the service job provider.
Structure.new do # @return [String] The identifier of the service job provider. attribute?(:service_job_provider_id, String, from: "serviceJobProviderId") end
- ItemDeliveryPromise =
Promised delivery information for the item.
Structure.new do # @return [Time] The date and time of the end of the promised delivery window in ISO 8601 format. attribute?(:end_time, Time, from: "endTime") # @return [Time] The date and time of the start of the promised delivery window in ISO 8601 format. attribute?(:start_time, Time, from: "startTime") end
- AppointmentTimeInput =
The input appointment time details.
Structure.new do # @return [Time] The date, time in UTC for the start time of an appointment in ISO 8601 format. attribute(:start_time, Time, from: "startTime") # @return [Integer] The duration of an appointment in minutes. attribute?(:duration_in_minutes, Integer, from: "durationInMinutes") end
- UpdateScheduleRecord =
UpdateScheduleRecord
entity contains theAvailabilityRecord
if there is an error/warning while performing the requested operation on it. Structure.new do # @return [AvailabilityRecord] Availability record if the operation failed. attribute?(:availability, AvailabilityRecord) # @return [Array<Error>] Errors encountered, if any. attribute?(:errors, [Error]) # @return [Array<Warning>] Warnings encountered, if any. attribute?(:warnings, [Warning]) end
- AddAppointmentRequest =
Input for add appointment operation.
Structure.new do # @return [AppointmentTimeInput] Input appointment time details. attribute(:appointment_time, AppointmentTimeInput, from: "appointmentTime") end
- AppointmentSlotReport =
Availability information as per the service context queried.
Structure.new do # @return [Array<AppointmentSlot>] A list of time windows along with associated capacity in which the service # can be performed. attribute?(:appointment_slots, [AppointmentSlot], from: "appointmentSlots") # @return [Time] End Time up to which the appointment slots are generated in ISO 8601 format. attribute?(:end_time, Time, from: "endTime") # @return [String] Defines the type of slots. attribute?(:scheduling_type, String, from: "schedulingType") # @return [Time] Start Time from which the appointment slots are generated in ISO 8601 format. attribute?(:start_time, Time, from: "startTime") end
- ServiceUploadDocument =
Input for to be uploaded document.
Structure.new do # @return [Float] The content length of the to-be-uploaded file attribute(:content_length, Float, from: "contentLength") # @return [String] The content type of the to-be-uploaded file attribute(:content_type, String, from: "contentType") # @return [String] An MD5 hash of the content to be submitted to the upload destination. This value is used to # determine if the data has been corrupted or tampered with during transit. attribute?(:content_md5, String, from: "contentMD5") end
- UpdateScheduleRequest =
Request schema for the
updateSchedule
operation. Structure.new do # @return [Array<AvailabilityRecord>] List of schedule objects to define the normal working hours of a resource. attribute(:schedules, [AvailabilityRecord]) end
- SetAppointmentResponse =
Response schema for the
addAppointmentForServiceJobByServiceJobId
andrescheduleAppointmentForServiceJobByServiceJobId
operations. Structure.new do # @return [String] New appointment identifier generated during the `addAppointmentForServiceJobByServiceJobId` # or `rescheduleAppointmentForServiceJobByServiceJobId` operations. attribute?(:appointment_id, String, from: "appointmentId") # @return [Array<Error>] Errors occurred during during the `addAppointmentForServiceJobByServiceJobId` or # `rescheduleAppointmentForServiceJobByServiceJobId` operations. attribute?(:errors, [Error]) # @return [Array<Warning>] Warnings generated during the `addAppointmentForServiceJobByServiceJobId` or # `rescheduleAppointmentForServiceJobByServiceJobId` operations. attribute?(:warnings, [Warning]) end
- UpdateScheduleResponse =
Response schema for the
updateSchedule
operation. Structure.new do # @return [Array<Error>] Errors encountered, if any. attribute?(:errors, [Error]) # @return [Array<UpdateScheduleRecord>] Contains the `UpdateScheduleRecords` for which the error/warning has # occurred. attribute?(:payload, [UpdateScheduleRecord]) end
- CreateReservationRecord =
CreateReservationRecord
entity contains theReservation
if there is an error/warning while performing the requested operation on it, otherwise it will contain the newreservationId
. Structure.new do # @return [Array<Error>] Errors encountered, if any. attribute?(:errors, [Error]) # @return [Reservation] Reservation record if the operation failed. It will only contain the new `reservationId` # if the operation is successful. attribute?(:reservation, Reservation) # @return [Array<Warning>] Warnings encountered, if any. attribute?(:warnings, [Warning]) end
- FixedSlotCapacityQuery =
Request schema for the
getFixedSlotCapacity
operation. This schema is used to define the time range, capacity types and slot duration which are being queried. Structure.new do # @return [Time] End date time up to which the capacity slots are being requested in ISO 8601 format. attribute(:end_date_time, Time, from: "endDateTime") # @return [Time] Start date time from which the capacity slots are being requested in ISO 8601 format. attribute(:start_date_time, Time, from: "startDateTime") # @return [Array<CapacityType>] An array of capacity types which are being requested. Default value is # `[SCHEDULED_CAPACITY]`. attribute?(:capacity_types, Array, from: "capacityTypes") # @return [Float] Size in which slots are being requested. This value should be a multiple of 5 and fall in the # range: 5 <= `slotDuration` <= 360. attribute?(:slot_duration, Float, from: "slotDuration") end
- GetServiceJobsResponse =
Response schema for the
getServiceJobs
operation. Structure.new do # @return [Array<Error>] An unexpected condition occurred during the `getServiceJobs` operation. attribute?(:errors, [Error]) # @return [JobListing] The payload for the `getServiceJobs` operation. attribute?(:payload, JobListing) end
- RangeSlotCapacityQuery =
Request schema for the
getRangeSlotCapacity
operation. This schema is used to define the time range and capacity types that are being queried. Structure.new do # @return [Time] End date time up to which the capacity slots are being requested in ISO 8601 format. attribute(:end_date_time, Time, from: "endDateTime") # @return [Time] Start date time from which the capacity slots are being requested in ISO 8601 format. attribute(:start_date_time, Time, from: "startDateTime") # @return [Array<CapacityType>] An array of capacity types which are being requested. Default value is # `[SCHEDULED_CAPACITY]`. attribute?(:capacity_types, Array, from: "capacityTypes") end
- UpdateReservationRecord =
UpdateReservationRecord
entity contains theReservation
if there is an error/warning while performing the requested operation on it, otherwise it will contain the newreservationId
. Structure.new do # @return [Array<Error>] Errors encountered, if any. attribute?(:errors, [Error]) # @return [Reservation] Reservation record if the operation failed. It will only contain the new `reservationId` # if the operation is successful. attribute?(:reservation, Reservation) # @return [Array<Warning>] Warnings encountered, if any. attribute?(:warnings, [Warning]) end
- CreateReservationRequest =
Request schema for the
createReservation
operation. Structure.new do # @return [Reservation] `Reservation` object to reduce the capacity of a resource. attribute(:reservation, Reservation) # @return [String] Resource (store) identifier. attribute(:resource_id, String, from: "resourceId") end
- FixedSlotCapacityErrors =
The error response schema for the
getFixedSlotCapacity
operation. Structure.new do # @return [Array<Error>] Errors encountered during the `getFixedSlotCapacity` operation. attribute?(:errors, [Error]) end
- RangeSlotCapacityErrors =
The error response schema for the
getRangeSlotCapacity
operation. Structure.new do # @return [Array<Error>] Errors encountered during the `getRangeSlotCapacity` operation. attribute?(:errors, [Error]) end
- UpdateReservationRequest =
Request schema for the
updateReservation
operation. Structure.new do # @return [Reservation] `Reservation` object to reduce the capacity of a resource. attribute(:reservation, Reservation) # @return [String] Resource (store) identifier. attribute(:resource_id, String, from: "resourceId") end
- CancelReservationResponse =
Response schema for the
cancelReservation
operation. Structure.new do # @return [Array<Error>] Errors encountered, if any attribute?(:errors, [Error]) end
- CreateReservationResponse =
Response schema for the
createReservation
operation. Structure.new do # @return [Array<Error>] Errors encountered, if any. attribute?(:errors, [Error]) # @return [CreateReservationRecord] `CreateReservationRecord` contains only the new `reservationId` if the # operation was successful. Otherwise it will contain the reservation entity with warnings/errors. attribute?(:payload, CreateReservationRecord) end
- UpdateReservationResponse =
Response schema for the
updateReservation
operation. Structure.new do # @return [Array<Error>] Errors encountered, if any. attribute?(:errors, [Error]) # @return [UpdateReservationRecord] `UpdateReservationRecord` contains only the new `reservationId` if the # operation was successful. Otherwise it will contain the reservation entity with warnings/errors. attribute?(:payload, UpdateReservationRecord) end
- GetAppointmentSlotsResponse =
The response of fetching appointment slots based on service context.
Structure.new do # @return [Array<Error>] Errors occurred in getting schedule. attribute?(:errors, [Error]) # @return [AppointmentSlotReport] The appointment slots fetched based on service context. attribute?(:payload, AppointmentSlotReport) end
- RescheduleAppointmentRequest =
Input for rescheduled appointment operation.
Structure.new do # @return [AppointmentTimeInput] Input appointment time details. attribute(:appointment_time, AppointmentTimeInput, from: "appointmentTime") # @return [String] Input appointment reschedule reason. attribute(:reschedule_reason_code, String, from: "rescheduleReasonCode") end
- ServiceDocumentUploadDestination =
Information about an upload destination.
Structure.new do # @return [EncryptionDetails] attribute(:encryption_details, EncryptionDetails, from: "encryptionDetails") # @return [String] The unique identifier to be used by APIs that reference the upload destination. attribute(:upload_destination_id, String, from: "uploadDestinationId") # @return [String] The URL to which to upload the file. attribute(:url, String) # @return [Hash] The headers to include in the upload request. attribute?(:headers, Hash) end
- AssignAppointmentResourcesRequest =
Request schema for the
assignAppointmentResources
operation. Structure.new do # @return [Array<AppointmentResource>] List of resource objects to be assigned. attribute(:resources, [AppointmentResource]) end
- AssignAppointmentResourcesResponse =
Response schema for the
assignAppointmentResources
operation. Structure.new do # @return [Array<Error>] Errors occurred during during the `assignAppointmentResources` operation. attribute?(:errors, [Error]) # @return [Hash] The payload for the `assignAppointmentResource` operation. attribute?(:payload, Hash) end
- SetAppointmentFulfillmentDataRequest =
Input for set appointment fulfillment data operation.
Structure.new do # @return [Array<AppointmentResource>] Resources involved in appointment fulfillment. attribute?(:appointment_resources, [AppointmentResource], from: "appointmentResources") # @return [DateTimeRange] The range of time when the technician is expected to arrive at the fulfillment # location. attribute?(:estimated_arrival_time, DateTimeRange, from: "estimatedArrivalTime") # @return [Array<FulfillmentDocument>] Documents specific to appointment fulfillment. attribute?(:fulfillment_documents, [FulfillmentDocument], from: "fulfillmentDocuments") # @return [FulfillmentTime] Input appointment time details. attribute?(:fulfillment_time, FulfillmentTime, from: "fulfillmentTime") end
- CreateServiceDocumentUploadDestination =
The response schema for the
createServiceDocumentUploadDestination
operation. Structure.new do # @return [Array<Error>] attribute?(:errors, [Error]) # @return [ServiceDocumentUploadDestination] attribute?(:payload, ServiceDocumentUploadDestination) end
- GetServiceJobByServiceJobIdResponse =
The response schema for the
getServiceJobByServiceJobId
operation. Structure.new do # @return [Array<Error>] An unexpected condition occurred during the `getServiceJobByServiceJobId` operation. attribute?(:errors, [Error]) # @return [ServiceJob] The payload for the `getServiceJobByServiceJobId` operation. attribute?(:payload, ServiceJob) end
- CancelServiceJobByServiceJobIdResponse =
Response schema for the
cancelServiceJobByServiceJobId
operation. Structure.new do # @return [Array<Error>] Encountered errors for the `cancelServiceJobByServiceJobId` operation. attribute?(:errors, [Error]) end
- CompleteServiceJobByServiceJobIdResponse =
Response schema for the
completeServiceJobByServiceJobId
operation. Structure.new do # @return [Array<Error>] Encountered errors for the `completeServiceJobByServiceJobId` operation. attribute?(:errors, [Error]) end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate_limit: 5.0) ⇒ Peddler::Response
Adds an appointment to the service job indicated by the service job identifier specified.
-
#assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0) ⇒ Peddler::Response
Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment.
-
#cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
Cancel a reservation.
-
#cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_code, rate_limit: 5.0) ⇒ Peddler::Response
Cancels the service job indicated by the service job identifier specified.
-
#complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0) ⇒ Peddler::Response
Completes the service job indicated by the service job identifier specified.
-
#create_reservation(body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
Create a reservation.
-
#create_service_document_upload_destination(body, rate_limit: 5.0) ⇒ Peddler::Response
Creates an upload destination.
-
#get_appointment_slots(asin, store_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 20.0) ⇒ Peddler::Response
Gets appointment slots as per the service context specified.
-
#get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 5.0) ⇒ Peddler::Response
Gets appointment slots for the service associated with the service job id specified.
-
#get_fixed_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response
Provides capacity in fixed-size slots.
-
#get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response
Provides capacity slots in a format similar to availability records.
-
#get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0) ⇒ Peddler::Response
Gets details of service job indicated by the provided
serviceJobID
. -
#get_service_jobs(marketplace_ids, service_order_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, rate_limit: 10.0) ⇒ Peddler::Response
Gets service job details for the specified filter query.
-
#reschedule_appointment_for_service_job_by_service_job_id(service_job_id, appointment_id, body, rate_limit: 5.0) ⇒ Peddler::Response
Reschedules an appointment for the service job indicated by the service job identifier specified.
-
#set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_limit: 5.0) ⇒ Peddler::Response
Updates the appointment fulfillment data related to a given
jobID
andappointmentID
. -
#update_reservation(reservation_id, body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
Update a reservation.
-
#update_schedule(resource_id, body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
Update the schedule of the given resource.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via
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
This operation can make a static sandbox call.
Adds an appointment to the service job indicated by the service job identifier specified.
124 125 126 127 128 |
# File 'lib/peddler/apis/services_v1.rb', line 124 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 } meter(rate_limit).post(path, body:, parser:) end |
#assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment.
getServiceJobs
operation of the Services API.
154 155 156 157 158 |
# File 'lib/peddler/apis/services_v1.rb', line 154 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 } meter(rate_limit).put(path, body:, parser:) end |
#cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Cancel a reservation.
269 270 271 272 273 274 275 276 |
# File 'lib/peddler/apis/services_v1.rb', line 269 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 } meter(rate_limit).delete(path, params:, parser:) end |
#cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_code, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Cancels the service job indicated by the service job identifier specified.
job.
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 } meter(rate_limit).put(path, params:, parser:) end |
#complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Completes the service job indicated by the service job identifier specified.
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 } meter(rate_limit).put(path, parser:) end |
#create_reservation(body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Create a reservation.
236 237 238 239 240 241 242 243 |
# File 'lib/peddler/apis/services_v1.rb', line 236 def create_reservation(body, marketplace_ids, rate_limit: 5.0) path = "/service/v1/reservation" params = { "marketplaceIds" => stringify_array(marketplace_ids), }.compact parser = -> { CreateReservationResponse } meter(rate_limit).post(path, body:, params:, parser:) end |
#create_service_document_upload_destination(body, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Creates an upload destination.
336 337 338 339 340 |
# File 'lib/peddler/apis/services_v1.rb', line 336 def create_service_document_upload_destination(body, rate_limit: 5.0) path = "/service/v1/documents" parser = -> { CreateServiceDocumentUploadDestination } meter(rate_limit).post(path, body:, parser:) end |
#get_appointment_slots(asin, store_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 20.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Gets appointment slots as per the service context specified.
in ISO 8601 format. If startTime
is provided, endTime
should also be provided. Default value is as per
business configuration.
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.
317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'lib/peddler/apis/services_v1.rb', line 317 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 } meter(rate_limit).get(path, params:, 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
This operation can make a static sandbox call.
Gets appointment slots for the service associated with the service job id specified.
in ISO 8601 format. If startTime
is provided, endTime
should also be provided. Default value is as per
business configuration.
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.
291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/peddler/apis/services_v1.rb', line 291 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 } meter(rate_limit).get(path, params:, parser:) end |
#get_fixed_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Provides capacity in fixed-size slots.
202 203 204 205 206 207 208 209 210 |
# File 'lib/peddler/apis/services_v1.rb', line 202 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 } meter(rate_limit).post(path, body:, params:, parser:) end |
#get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Provides capacity slots in a format similar to availability records.
183 184 185 186 187 188 189 190 191 |
# File 'lib/peddler/apis/services_v1.rb', line 183 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 } meter(rate_limit).post(path, body:, params:, parser:) end |
#get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Gets details of service job indicated by the provided serviceJobID
.
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 } meter(rate_limit).get(path, parser:) end |
#get_service_jobs(marketplace_ids, service_order_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, rate_limit: 10.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Gets service job details for the specified filter query.
supported 20.
list, Value must be 1 - 20. Default 20.
ISO 8601 format. Required if LastUpdatedAfter
is not specified. Specifying both CreatedAfter
and
LastUpdatedAfter
returns an error.
ISO 8601 format.
in ISO 8601 format. Required if createdAfter
is not specified. Specifying both CreatedAfter
and
LastUpdatedAfter
returns an error.
be in ISO 8601 format.
be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.
be in ISO 8601 format. Schedule end date should not be earlier than schedule start date.
supported is 20.
and work processes common to service delivery for a set of products and/or service scenarios. Max values
supported is 20.
is 50.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/peddler/apis/services_v1.rb', line 90 def get_service_jobs(marketplace_ids, service_order_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, rate_limit: 10.0) path = "/service/v1/serviceJobs" params = { "serviceOrderIds" => stringify_array(service_order_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), }.compact parser = -> { GetServiceJobsResponse } meter(rate_limit).get(path, params:, parser:) end |
#reschedule_appointment_for_service_job_by_service_job_id(service_job_id, appointment_id, body, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Reschedules an appointment for the service job indicated by the service job identifier specified.
138 139 140 141 142 143 |
# File 'lib/peddler/apis/services_v1.rb', line 138 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 } meter(rate_limit).post(path, body:, parser:) end |
#set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Updates the appointment fulfillment data related to a given jobID
and appointmentID
.
getServiceJobs
operation of the Services API.
169 170 171 172 |
# File 'lib/peddler/apis/services_v1.rb', line 169 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" meter(rate_limit).put(path, body:) end |
#update_reservation(reservation_id, body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Update a reservation.
253 254 255 256 257 258 259 260 |
# File 'lib/peddler/apis/services_v1.rb', line 253 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 } meter(rate_limit).put(path, body:, params:, parser:) end |
#update_schedule(resource_id, body, marketplace_ids, rate_limit: 5.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Update the schedule of the given resource.
220 221 222 223 224 225 226 227 |
# File 'lib/peddler/apis/services_v1.rb', line 220 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 } meter(rate_limit).put(path, body:, params:, parser:) end |