Class: MuffinMan::VendorShipments::V1
- Inherits:
-
SpApiClient
- Object
- SpApiClient
- MuffinMan::VendorShipments::V1
- Defined in:
- lib/muffin_man/vendor_shipments/v1.rb
Constant Summary collapse
- GET_SHIPMENT_DETAILS_PARAMS =
%w[ limit sortOrder nextToken createdAfter createdBefore shipmentConfirmedBefore shipmentConfirmedAfter packageLabelCreatedBefore packageLabelCreatedAfter shippedBefore shippedAfter estimatedDeliveryBefore estimatedDeliveryAfter shipmentDeliveryBefore shipmentDeliveryAfter requestedPickUpBefore requestedPickUpAfter scheduledPickUpBefore scheduledPickUpAfter currentShipmentStatus vendorShipmentIdentifier buyerReferenceNumber buyerWarehouseCode sellerWarehouseCode ].freeze
Constants inherited from SpApiClient
SpApiClient::ACCESS_TOKEN_URL, SpApiClient::AWS_REGION_MAP, SpApiClient::SERVICE_NAME, SpApiClient::UNPROCESSABLE_ENTITY_STATUS_CODE
Instance Attribute Summary
Attributes inherited from SpApiClient
#access_token_cache_key, #aws_access_key_id, #aws_secret_access_key, #client_id, #client_secret, #config, #credentials, #local_var_path, #pii_data_elements, #query_params, #refresh_token, #region, #request_body, #request_type, #sandbox, #scope, #sts_iam_role_arn
Instance Method Summary collapse
- #get_shipment_details(params = {}) ⇒ Object
- #submit_shipment_confirmations(shipment_confirmations) ⇒ Object
- #submit_shipments(shipments) ⇒ Object
Methods inherited from SpApiClient
Constructor Details
This class inherits a constructor from MuffinMan::SpApiClient
Instance Method Details
#get_shipment_details(params = {}) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/muffin_man/vendor_shipments/v1.rb', line 40 def get_shipment_details(params = {}) @local_var_path = "/vendor/shipping/v1/shipments" @query_params = params.slice(*GET_SHIPMENT_DETAILS_PARAMS) @request_type = "GET" call_api end |
#submit_shipment_confirmations(shipment_confirmations) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/muffin_man/vendor_shipments/v1.rb', line 33 def submit_shipment_confirmations(shipment_confirmations) @local_var_path = "/vendor/shipping/v1/shipmentConfirmations" @request_body = { "shipmentConfirmations" => shipment_confirmations } @request_type = "POST" call_api end |
#submit_shipments(shipments) ⇒ Object
47 48 49 50 51 52 |
# File 'lib/muffin_man/vendor_shipments/v1.rb', line 47 def submit_shipments(shipments) @local_var_path = "/vendor/shipping/v1/shipments" @request_body = { "shipments" => shipments } @request_type = "POST" call_api end |