zippendo 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE.md +21 -0
- data/README.md +99 -0
- data/Rakefile +10 -0
- data/docs/AddressesApi.md +375 -0
- data/docs/BatchSendShipments200Response.md +20 -0
- data/docs/BatchSendShipments200ResponseResultsInner.md +26 -0
- data/docs/BatchSendShipments200ResponseSummary.md +22 -0
- data/docs/BatchSendShipmentsRequest.md +18 -0
- data/docs/BatchSplitShipment201Response.md +20 -0
- data/docs/BatchSplitShipmentRequest.md +28 -0
- data/docs/BatchSplitShipmentRequestShipmentsInner.md +20 -0
- data/docs/BatchSplitShipmentRequestShipmentsInnerOrderLinesInner.md +20 -0
- data/docs/BillingApi.md +77 -0
- data/docs/CarrierCatalogApi.md +77 -0
- data/docs/CarriersApi.md +521 -0
- data/docs/ConnectCarrierRequest.md +22 -0
- data/docs/CreateAddressRequest.md +40 -0
- data/docs/CreateApiToken201Response.md +32 -0
- data/docs/CreateApiTokenRequest.md +22 -0
- data/docs/CreateOrder201Response.md +52 -0
- data/docs/CreateOrder201ResponseOrderLinesInner.md +54 -0
- data/docs/CreateOrder201ResponseShippingAddress.md +42 -0
- data/docs/CreateOrderRequest.md +40 -0
- data/docs/CreateOrderRequestOrderLinesInner.md +54 -0
- data/docs/CreateOrderRequestShippingAddress.md +42 -0
- data/docs/CreateOrgWebhook201Response.md +32 -0
- data/docs/CreateOrgWebhookRequest.md +24 -0
- data/docs/CreateShipment201Response.md +64 -0
- data/docs/CreateShipment201ResponseActivitiesInner.md +26 -0
- data/docs/CreateShipment201ResponseDocumentsInner.md +32 -0
- data/docs/CreateShipment201ResponseErrorsInner.md +26 -0
- data/docs/CreateShipment201ResponseLogsInner.md +32 -0
- data/docs/CreateShipment201ResponseParcelsInner.md +38 -0
- data/docs/CreateShipment201ResponseParcelsInnerDimensions.md +22 -0
- data/docs/CreateShipment201ResponseParcelsInnerOrderLinesInner.md +36 -0
- data/docs/CreateShipment201ResponsePartiesInner.md +38 -0
- data/docs/CreateShipment201ResponsePartiesInnerAttributesInner.md +20 -0
- data/docs/CreateShipment201ResponsePickupDetails.md +24 -0
- data/docs/CreateShipment201ResponseShippingRule.md +40 -0
- data/docs/CreateShipment201ResponseTracking.md +28 -0
- data/docs/CreateShipmentRequest.md +42 -0
- data/docs/CreateShipmentRequestCarrierSettings.md +24 -0
- data/docs/CreateShipmentRequestParcelsInner.md +38 -0
- data/docs/CreateShipmentRequestParcelsInnerDimensions.md +22 -0
- data/docs/CreateShipmentRequestParcelsInnerOrderLinesInner.md +36 -0
- data/docs/CreateShipmentRequestPartiesInner.md +38 -0
- data/docs/CreateShipmentRequestPartiesInnerAttributesInner.md +20 -0
- data/docs/CreateShipmentRequestPickupDetails.md +24 -0
- data/docs/CreateShippingQuote200Response.md +18 -0
- data/docs/CreateShippingQuote200ResponseRatesInner.md +38 -0
- data/docs/CreateShippingQuote400Response.md +20 -0
- data/docs/CreateShippingQuote404Response.md +20 -0
- data/docs/CreateShippingQuoteRequest.md +24 -0
- data/docs/CreateShippingQuoteRequestDestination.md +28 -0
- data/docs/CreateShippingQuoteRequestItemsInner.md +30 -0
- data/docs/CreateShippingRule201Response.md +74 -0
- data/docs/CreateShippingRuleRequest.md +66 -0
- data/docs/CreateShippingRuleRequestAdditionalParameters.md +15 -0
- data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfInner.md +20 -0
- data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfValue.md +24 -0
- data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfValueAnyOf.md +24 -0
- data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfValueAnyOfCoordinatesInner.md +15 -0
- data/docs/CreateShippingRuleRequestConditionsInner.md +55 -0
- data/docs/CreateShippingRuleRequestConditionsInnerOneOf.md +26 -0
- data/docs/CreateShippingRuleRequestConditionsInnerOneOf1.md +28 -0
- data/docs/CreateShippingRuleRequestConditionsInnerOneOf2.md +28 -0
- data/docs/CreateShippingRuleRequestConditionsInnerOneOf3.md +26 -0
- data/docs/CreateShippingRuleRequestConditionsInnerOneOf4.md +22 -0
- data/docs/DeleteOrgWebhook200Response.md +18 -0
- data/docs/DeleteShippingRule200Response.md +18 -0
- data/docs/GetBillingUsage200Response.md +24 -0
- data/docs/GetBillingUsage200ResponseAddOnsInner.md +24 -0
- data/docs/GetBillingUsage200ResponseCurrentPeriod.md +20 -0
- data/docs/GetBillingUsage200ResponseLimits.md +30 -0
- data/docs/GetBillingUsage200ResponseLimitsTeamMembers.md +20 -0
- data/docs/GetBillingUsage200ResponseShipments.md +24 -0
- data/docs/GetOrder200Response.md +58 -0
- data/docs/GetOrder200ResponseShipmentsInner.md +36 -0
- data/docs/GetOrder200ResponseShippingRule.md +40 -0
- data/docs/GetOrg200Response.md +50 -0
- data/docs/GetOrg200ResponseCount.md +18 -0
- data/docs/GetOrgBranding200Response.md +22 -0
- data/docs/HealthCheck200Response.md +22 -0
- data/docs/ListAddresses200Response.md +26 -0
- data/docs/ListAddresses200ResponseDataInner.md +48 -0
- data/docs/ListApiTokens200Response.md +26 -0
- data/docs/ListApiTokens200ResponseDataInner.md +32 -0
- data/docs/ListApiTokens200ResponseDataInnerCreatedBy.md +22 -0
- data/docs/ListApiTokens401Response.md +22 -0
- data/docs/ListAvailableCarriers200ResponseInner.md +38 -0
- data/docs/ListAvailableCarriers200ResponseInnerRequiredFieldsInner.md +28 -0
- data/docs/ListCarrierProductServicePoints200ResponseInner.md +32 -0
- data/docs/ListCarrierProductServicePoints200ResponseInnerAddress.md +28 -0
- data/docs/ListCarrierProductServicePointsRequest.md +28 -0
- data/docs/ListCarrierProducts200ResponseInner.md +38 -0
- data/docs/ListCarrierProducts200ResponseInnerAdditionalParametersInner.md +30 -0
- data/docs/ListCarrierProducts200ResponseInnerAdditionalParametersInnerOptionsInner.md +22 -0
- data/docs/ListCarrierProducts200ResponseInnerServicesInner.md +20 -0
- data/docs/ListCarrierProducts200ResponseInnerWeightLimits.md +22 -0
- data/docs/ListCarriers200Response.md +26 -0
- data/docs/ListCarriers200ResponseDataInner.md +38 -0
- data/docs/ListCarriers200ResponseDataInnerConfigValue.md +15 -0
- data/docs/ListOrders200Response.md +26 -0
- data/docs/ListOrders200ResponseDataInner.md +40 -0
- data/docs/ListOrders200ResponseDataInnerOrderChannel.md +22 -0
- data/docs/ListOrgWebhookDeliveries200Response.md +26 -0
- data/docs/ListOrgWebhookDeliveries200ResponseDataInner.md +38 -0
- data/docs/ListOrgWebhooks200Response.md +26 -0
- data/docs/ListOrgWebhooks200ResponseDataInner.md +30 -0
- data/docs/ListShipments200Response.md +26 -0
- data/docs/ListShipments200ResponseDataInner.md +32 -0
- data/docs/ListShipments200ResponseDataInnerAddress.md +48 -0
- data/docs/ListShipments200ResponseDataInnerCarrierSettings.md +24 -0
- data/docs/ListShipments200ResponseDataInnerCarrierSettingsAdditionalParametersValue.md +24 -0
- data/docs/ListShipments200ResponseDataInnerCarrierSettingsAdditionalParametersValueAnyOf.md +24 -0
- data/docs/ListShippingRules200Response.md +26 -0
- data/docs/ListShippingRules200ResponseDataInner.md +84 -0
- data/docs/ListShippingRules200ResponseDataInnerAdditionalParametersInner.md +20 -0
- data/docs/ListShippingRules200ResponseDataInnerCarrier.md +30 -0
- data/docs/ListShippingRules200ResponseDataInnerConditionsInner.md +55 -0
- data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf.md +26 -0
- data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf1.md +28 -0
- data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf2.md +28 -0
- data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf3.md +26 -0
- data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf4.md +22 -0
- data/docs/ListShippingRules200ResponseDataInnerLabelPrinter.md +20 -0
- data/docs/ListShippingRules200ResponseDataInnerReturnShippingRule.md +20 -0
- data/docs/OrdersApi.md +379 -0
- data/docs/OrgsApi.md +503 -0
- data/docs/QuotesApi.md +79 -0
- data/docs/RevokeApiToken200Response.md +18 -0
- data/docs/RulesApi.md +373 -0
- data/docs/SendShipment422Response.md +24 -0
- data/docs/SendShipment422ResponseErrorsInner.md +20 -0
- data/docs/ShipmentsApi.md +962 -0
- data/docs/SplitShipment201Response.md +20 -0
- data/docs/SplitShipmentParcel200Response.md +18 -0
- data/docs/SplitShipmentParcelRequest.md +18 -0
- data/docs/SplitShipmentParcelRequestParcelsInner.md +20 -0
- data/docs/SplitShipmentRequest.md +30 -0
- data/docs/SystemApi.md +74 -0
- data/docs/TestOrgWebhook200Response.md +18 -0
- data/docs/TokensApi.md +443 -0
- data/docs/TrackShipment200Response.md +26 -0
- data/docs/TrackShipment200ResponseEventsInner.md +28 -0
- data/docs/UpdateAddressRequest.md +40 -0
- data/docs/UpdateApiTokenRequest.md +18 -0
- data/docs/UpdateCarrierRequest.md +22 -0
- data/docs/UpdateOrderRequest.md +38 -0
- data/docs/UpdateOrg200Response.md +48 -0
- data/docs/UpdateOrgBrandingRequest.md +20 -0
- data/docs/UpdateOrgRequest.md +44 -0
- data/docs/UpdateOrgWebhookRequest.md +24 -0
- data/docs/UpdateShipmentRequest.md +44 -0
- data/docs/UpdateShippingRuleRequest.md +66 -0
- data/docs/VerifyApiToken200Response.md +28 -0
- data/docs/VerifyApiTokenRequest.md +18 -0
- data/docs/WebhooksApi.md +523 -0
- data/git_push.sh +57 -0
- data/lib/zippendo/api/addresses_api.rb +406 -0
- data/lib/zippendo/api/billing_api.rb +85 -0
- data/lib/zippendo/api/carrier_catalog_api.rb +85 -0
- data/lib/zippendo/api/carriers_api.rb +554 -0
- data/lib/zippendo/api/orders_api.rb +412 -0
- data/lib/zippendo/api/orgs_api.rb +497 -0
- data/lib/zippendo/api/quotes_api.rb +96 -0
- data/lib/zippendo/api/rules_api.rb +399 -0
- data/lib/zippendo/api/shipments_api.rb +1003 -0
- data/lib/zippendo/api/system_api.rb +79 -0
- data/lib/zippendo/api/tokens_api.rb +467 -0
- data/lib/zippendo/api/webhooks_api.rb +559 -0
- data/lib/zippendo/api_client.rb +397 -0
- data/lib/zippendo/api_error.rb +58 -0
- data/lib/zippendo/api_model_base.rb +88 -0
- data/lib/zippendo/configuration.rb +309 -0
- data/lib/zippendo/models/batch_send_shipments200_response.rb +193 -0
- data/lib/zippendo/models/batch_send_shipments200_response_results_inner.rb +260 -0
- data/lib/zippendo/models/batch_send_shipments200_response_summary.rb +274 -0
- data/lib/zippendo/models/batch_send_shipments_request.rb +185 -0
- data/lib/zippendo/models/batch_split_shipment201_response.rb +193 -0
- data/lib/zippendo/models/batch_split_shipment_request.rb +247 -0
- data/lib/zippendo/models/batch_split_shipment_request_shipments_inner.rb +186 -0
- data/lib/zippendo/models/batch_split_shipment_request_shipments_inner_order_lines_inner.rb +210 -0
- data/lib/zippendo/models/connect_carrier_request.rb +239 -0
- data/lib/zippendo/models/create_address_request.rb +508 -0
- data/lib/zippendo/models/create_api_token201_response.rb +328 -0
- data/lib/zippendo/models/create_api_token_request.rb +267 -0
- data/lib/zippendo/models/create_order201_response.rb +491 -0
- data/lib/zippendo/models/create_order201_response_order_lines_inner.rb +533 -0
- data/lib/zippendo/models/create_order201_response_shipping_address.rb +433 -0
- data/lib/zippendo/models/create_order_request.rb +410 -0
- data/lib/zippendo/models/create_order_request_order_lines_inner.rb +533 -0
- data/lib/zippendo/models/create_order_request_shipping_address.rb +433 -0
- data/lib/zippendo/models/create_org_webhook201_response.rb +356 -0
- data/lib/zippendo/models/create_org_webhook_request.rb +268 -0
- data/lib/zippendo/models/create_shipment201_response.rb +659 -0
- data/lib/zippendo/models/create_shipment201_response_activities_inner.rb +281 -0
- data/lib/zippendo/models/create_shipment201_response_documents_inner.rb +382 -0
- data/lib/zippendo/models/create_shipment201_response_errors_inner.rb +257 -0
- data/lib/zippendo/models/create_shipment201_response_logs_inner.rb +300 -0
- data/lib/zippendo/models/create_shipment201_response_parcels_inner.rb +356 -0
- data/lib/zippendo/models/create_shipment201_response_parcels_inner_dimensions.rb +246 -0
- data/lib/zippendo/models/create_shipment201_response_parcels_inner_order_lines_inner.rb +402 -0
- data/lib/zippendo/models/create_shipment201_response_parties_inner.rb +468 -0
- data/lib/zippendo/models/create_shipment201_response_parties_inner_attributes_inner.rb +210 -0
- data/lib/zippendo/models/create_shipment201_response_pickup_details.rb +229 -0
- data/lib/zippendo/models/create_shipment201_response_shipping_rule.rb +365 -0
- data/lib/zippendo/models/create_shipment201_response_tracking.rb +204 -0
- data/lib/zippendo/models/create_shipment_request.rb +407 -0
- data/lib/zippendo/models/create_shipment_request_carrier_settings.rb +250 -0
- data/lib/zippendo/models/create_shipment_request_parcels_inner.rb +356 -0
- data/lib/zippendo/models/create_shipment_request_parcels_inner_dimensions.rb +246 -0
- data/lib/zippendo/models/create_shipment_request_parcels_inner_order_lines_inner.rb +402 -0
- data/lib/zippendo/models/create_shipment_request_parties_inner.rb +451 -0
- data/lib/zippendo/models/create_shipment_request_parties_inner_attributes_inner.rb +210 -0
- data/lib/zippendo/models/create_shipment_request_pickup_details.rb +229 -0
- data/lib/zippendo/models/create_shipping_quote200_response.rb +167 -0
- data/lib/zippendo/models/create_shipping_quote200_response_rates_inner.rb +333 -0
- data/lib/zippendo/models/create_shipping_quote400_response.rb +192 -0
- data/lib/zippendo/models/create_shipping_quote404_response.rb +192 -0
- data/lib/zippendo/models/create_shipping_quote_request.rb +276 -0
- data/lib/zippendo/models/create_shipping_quote_request_destination.rb +233 -0
- data/lib/zippendo/models/create_shipping_quote_request_items_inner.rb +315 -0
- data/lib/zippendo/models/create_shipping_rule201_response.rb +910 -0
- data/lib/zippendo/models/create_shipping_rule_request.rb +640 -0
- data/lib/zippendo/models/create_shipping_rule_request_additional_parameters.rb +104 -0
- data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_inner.rb +201 -0
- data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_value.rb +105 -0
- data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of.rb +259 -0
- data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of_coordinates_inner.rb +102 -0
- data/lib/zippendo/models/create_shipping_rule_request_conditions_inner.rb +107 -0
- data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of.rb +342 -0
- data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of1.rb +359 -0
- data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of2.rb +366 -0
- data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of3.rb +344 -0
- data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of4.rb +270 -0
- data/lib/zippendo/models/delete_org_webhook200_response.rb +165 -0
- data/lib/zippendo/models/delete_shipping_rule200_response.rb +165 -0
- data/lib/zippendo/models/get_billing_usage200_response.rb +245 -0
- data/lib/zippendo/models/get_billing_usage200_response_add_ons_inner.rb +270 -0
- data/lib/zippendo/models/get_billing_usage200_response_current_period.rb +192 -0
- data/lib/zippendo/models/get_billing_usage200_response_limits.rb +320 -0
- data/lib/zippendo/models/get_billing_usage200_response_limits_team_members.rb +192 -0
- data/lib/zippendo/models/get_billing_usage200_response_shipments.rb +246 -0
- data/lib/zippendo/models/get_order200_response.rb +555 -0
- data/lib/zippendo/models/get_order200_response_shipments_inner.rb +385 -0
- data/lib/zippendo/models/get_order200_response_shipping_rule.rb +365 -0
- data/lib/zippendo/models/get_org200_response.rb +440 -0
- data/lib/zippendo/models/get_org200_response_count.rb +165 -0
- data/lib/zippendo/models/get_org_branding200_response.rb +177 -0
- data/lib/zippendo/models/health_check200_response.rb +219 -0
- data/lib/zippendo/models/list_addresses200_response.rb +275 -0
- data/lib/zippendo/models/list_addresses200_response_data_inner.rb +553 -0
- data/lib/zippendo/models/list_api_tokens200_response.rb +275 -0
- data/lib/zippendo/models/list_api_tokens200_response_data_inner.rb +327 -0
- data/lib/zippendo/models/list_api_tokens200_response_data_inner_created_by.rb +205 -0
- data/lib/zippendo/models/list_api_tokens401_response.rb +236 -0
- data/lib/zippendo/models/list_available_carriers200_response_inner.rb +286 -0
- data/lib/zippendo/models/list_available_carriers200_response_inner_required_fields_inner.rb +292 -0
- data/lib/zippendo/models/list_carrier_product_service_points200_response_inner.rb +287 -0
- data/lib/zippendo/models/list_carrier_product_service_points200_response_inner_address.rb +314 -0
- data/lib/zippendo/models/list_carrier_product_service_points_request.rb +313 -0
- data/lib/zippendo/models/list_carrier_products200_response_inner.rb +398 -0
- data/lib/zippendo/models/list_carrier_products200_response_inner_additional_parameters_inner.rb +321 -0
- data/lib/zippendo/models/list_carrier_products200_response_inner_additional_parameters_inner_options_inner.rb +219 -0
- data/lib/zippendo/models/list_carrier_products200_response_inner_services_inner.rb +192 -0
- data/lib/zippendo/models/list_carrier_products200_response_inner_weight_limits.rb +244 -0
- data/lib/zippendo/models/list_carriers200_response.rb +275 -0
- data/lib/zippendo/models/list_carriers200_response_data_inner.rb +369 -0
- data/lib/zippendo/models/list_carriers200_response_data_inner_config_value.rb +104 -0
- data/lib/zippendo/models/list_orders200_response.rb +275 -0
- data/lib/zippendo/models/list_orders200_response_data_inner.rb +423 -0
- data/lib/zippendo/models/list_orders200_response_data_inner_order_channel.rb +244 -0
- data/lib/zippendo/models/list_org_webhook_deliveries200_response.rb +275 -0
- data/lib/zippendo/models/list_org_webhook_deliveries200_response_data_inner.rb +365 -0
- data/lib/zippendo/models/list_org_webhooks200_response.rb +275 -0
- data/lib/zippendo/models/list_org_webhooks200_response_data_inner.rb +329 -0
- data/lib/zippendo/models/list_shipments200_response.rb +275 -0
- data/lib/zippendo/models/list_shipments200_response_data_inner.rb +362 -0
- data/lib/zippendo/models/list_shipments200_response_data_inner_address.rb +553 -0
- data/lib/zippendo/models/list_shipments200_response_data_inner_carrier_settings.rb +250 -0
- data/lib/zippendo/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value.rb +105 -0
- data/lib/zippendo/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value_any_of.rb +259 -0
- data/lib/zippendo/models/list_shipping_rules200_response.rb +275 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner.rb +992 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_additional_parameters_inner.rb +201 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_carrier.rb +329 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner.rb +107 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of.rb +342 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of1.rb +364 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of2.rb +371 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of3.rb +344 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of4.rb +270 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_label_printer.rb +192 -0
- data/lib/zippendo/models/list_shipping_rules200_response_data_inner_return_shipping_rule.rb +192 -0
- data/lib/zippendo/models/revoke_api_token200_response.rb +165 -0
- data/lib/zippendo/models/send_shipment422_response.rb +265 -0
- data/lib/zippendo/models/send_shipment422_response_errors_inner.rb +175 -0
- data/lib/zippendo/models/split_shipment201_response.rb +190 -0
- data/lib/zippendo/models/split_shipment_parcel200_response.rb +164 -0
- data/lib/zippendo/models/split_shipment_parcel_request.rb +176 -0
- data/lib/zippendo/models/split_shipment_parcel_request_parcels_inner.rb +186 -0
- data/lib/zippendo/models/split_shipment_request.rb +231 -0
- data/lib/zippendo/models/test_org_webhook200_response.rb +165 -0
- data/lib/zippendo/models/track_shipment200_response.rb +251 -0
- data/lib/zippendo/models/track_shipment200_response_events_inner.rb +296 -0
- data/lib/zippendo/models/update_address_request.rb +471 -0
- data/lib/zippendo/models/update_api_token_request.rb +183 -0
- data/lib/zippendo/models/update_carrier_request.rb +208 -0
- data/lib/zippendo/models/update_order_request.rb +400 -0
- data/lib/zippendo/models/update_org200_response.rb +414 -0
- data/lib/zippendo/models/update_org_branding_request.rb +194 -0
- data/lib/zippendo/models/update_org_request.rb +389 -0
- data/lib/zippendo/models/update_org_webhook_request.rb +235 -0
- data/lib/zippendo/models/update_shipment_request.rb +394 -0
- data/lib/zippendo/models/update_shipping_rule_request.rb +531 -0
- data/lib/zippendo/models/verify_api_token200_response.rb +218 -0
- data/lib/zippendo/models/verify_api_token_request.rb +165 -0
- data/lib/zippendo/version.rb +15 -0
- data/lib/zippendo.rb +195 -0
- data/spec/api/addresses_api_spec.rb +103 -0
- data/spec/api/billing_api_spec.rb +47 -0
- data/spec/api/carrier_catalog_api_spec.rb +47 -0
- data/spec/api/carriers_api_spec.rb +130 -0
- data/spec/api/orders_api_spec.rb +105 -0
- data/spec/api/orgs_api_spec.rb +122 -0
- data/spec/api/quotes_api_spec.rb +48 -0
- data/spec/api/rules_api_spec.rb +102 -0
- data/spec/api/shipments_api_spec.rb +212 -0
- data/spec/api/system_api_spec.rb +46 -0
- data/spec/api/tokens_api_spec.rb +114 -0
- data/spec/api/webhooks_api_spec.rb +130 -0
- data/spec/models/batch_send_shipments200_response_results_inner_spec.rb +68 -0
- data/spec/models/batch_send_shipments200_response_spec.rb +42 -0
- data/spec/models/batch_send_shipments200_response_summary_spec.rb +48 -0
- data/spec/models/batch_send_shipments_request_spec.rb +36 -0
- data/spec/models/batch_split_shipment201_response_spec.rb +42 -0
- data/spec/models/batch_split_shipment_request_shipments_inner_order_lines_inner_spec.rb +42 -0
- data/spec/models/batch_split_shipment_request_shipments_inner_spec.rb +42 -0
- data/spec/models/batch_split_shipment_request_spec.rb +66 -0
- data/spec/models/connect_carrier_request_spec.rb +48 -0
- data/spec/models/create_address_request_spec.rb +106 -0
- data/spec/models/create_api_token201_response_spec.rb +78 -0
- data/spec/models/create_api_token_request_spec.rb +52 -0
- data/spec/models/create_order201_response_order_lines_inner_spec.rb +148 -0
- data/spec/models/create_order201_response_shipping_address_spec.rb +108 -0
- data/spec/models/create_order201_response_spec.rb +142 -0
- data/spec/models/create_order_request_order_lines_inner_spec.rb +148 -0
- data/spec/models/create_order_request_shipping_address_spec.rb +108 -0
- data/spec/models/create_order_request_spec.rb +102 -0
- data/spec/models/create_org_webhook201_response_spec.rb +78 -0
- data/spec/models/create_org_webhook_request_spec.rb +58 -0
- data/spec/models/create_shipment201_response_activities_inner_spec.rb +64 -0
- data/spec/models/create_shipment201_response_documents_inner_spec.rb +90 -0
- data/spec/models/create_shipment201_response_errors_inner_spec.rb +60 -0
- data/spec/models/create_shipment201_response_logs_inner_spec.rb +82 -0
- data/spec/models/create_shipment201_response_parcels_inner_dimensions_spec.rb +48 -0
- data/spec/models/create_shipment201_response_parcels_inner_order_lines_inner_spec.rb +90 -0
- data/spec/models/create_shipment201_response_parcels_inner_spec.rb +100 -0
- data/spec/models/create_shipment201_response_parties_inner_attributes_inner_spec.rb +42 -0
- data/spec/models/create_shipment201_response_parties_inner_spec.rb +100 -0
- data/spec/models/create_shipment201_response_pickup_details_spec.rb +54 -0
- data/spec/models/create_shipment201_response_shipping_rule_spec.rb +102 -0
- data/spec/models/create_shipment201_response_spec.rb +182 -0
- data/spec/models/create_shipment201_response_tracking_spec.rb +66 -0
- data/spec/models/create_shipment_request_carrier_settings_spec.rb +54 -0
- data/spec/models/create_shipment_request_parcels_inner_dimensions_spec.rb +48 -0
- data/spec/models/create_shipment_request_parcels_inner_order_lines_inner_spec.rb +90 -0
- data/spec/models/create_shipment_request_parcels_inner_spec.rb +100 -0
- data/spec/models/create_shipment_request_parties_inner_attributes_inner_spec.rb +42 -0
- data/spec/models/create_shipment_request_parties_inner_spec.rb +100 -0
- data/spec/models/create_shipment_request_pickup_details_spec.rb +54 -0
- data/spec/models/create_shipment_request_spec.rb +116 -0
- data/spec/models/create_shipping_quote200_response_rates_inner_spec.rb +96 -0
- data/spec/models/create_shipping_quote200_response_spec.rb +36 -0
- data/spec/models/create_shipping_quote400_response_spec.rb +42 -0
- data/spec/models/create_shipping_quote404_response_spec.rb +42 -0
- data/spec/models/create_shipping_quote_request_destination_spec.rb +66 -0
- data/spec/models/create_shipping_quote_request_items_inner_spec.rb +72 -0
- data/spec/models/create_shipping_quote_request_spec.rb +54 -0
- data/spec/models/create_shipping_rule201_response_spec.rb +208 -0
- data/spec/models/create_shipping_rule_request_additional_parameters_any_of_inner_spec.rb +42 -0
- data/spec/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of_coordinates_inner_spec.rb +21 -0
- data/spec/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of_spec.rb +54 -0
- data/spec/models/create_shipping_rule_request_additional_parameters_any_of_value_spec.rb +21 -0
- data/spec/models/create_shipping_rule_request_additional_parameters_spec.rb +21 -0
- data/spec/models/create_shipping_rule_request_conditions_inner_one_of1_spec.rb +78 -0
- data/spec/models/create_shipping_rule_request_conditions_inner_one_of2_spec.rb +74 -0
- data/spec/models/create_shipping_rule_request_conditions_inner_one_of3_spec.rb +68 -0
- data/spec/models/create_shipping_rule_request_conditions_inner_one_of4_spec.rb +52 -0
- data/spec/models/create_shipping_rule_request_conditions_inner_one_of_spec.rb +64 -0
- data/spec/models/create_shipping_rule_request_conditions_inner_spec.rb +32 -0
- data/spec/models/create_shipping_rule_request_spec.rb +184 -0
- data/spec/models/delete_org_webhook200_response_spec.rb +36 -0
- data/spec/models/delete_shipping_rule200_response_spec.rb +36 -0
- data/spec/models/get_billing_usage200_response_add_ons_inner_spec.rb +58 -0
- data/spec/models/get_billing_usage200_response_current_period_spec.rb +42 -0
- data/spec/models/get_billing_usage200_response_limits_spec.rb +72 -0
- data/spec/models/get_billing_usage200_response_limits_team_members_spec.rb +42 -0
- data/spec/models/get_billing_usage200_response_shipments_spec.rb +54 -0
- data/spec/models/get_billing_usage200_response_spec.rb +54 -0
- data/spec/models/get_order200_response_shipments_inner_spec.rb +98 -0
- data/spec/models/get_order200_response_shipping_rule_spec.rb +102 -0
- data/spec/models/get_order200_response_spec.rb +160 -0
- data/spec/models/get_org200_response_count_spec.rb +36 -0
- data/spec/models/get_org200_response_spec.rb +132 -0
- data/spec/models/get_org_branding200_response_spec.rb +48 -0
- data/spec/models/health_check200_response_spec.rb +48 -0
- data/spec/models/list_addresses200_response_data_inner_spec.rb +130 -0
- data/spec/models/list_addresses200_response_spec.rb +60 -0
- data/spec/models/list_api_tokens200_response_data_inner_created_by_spec.rb +48 -0
- data/spec/models/list_api_tokens200_response_data_inner_spec.rb +78 -0
- data/spec/models/list_api_tokens200_response_spec.rb +60 -0
- data/spec/models/list_api_tokens401_response_spec.rb +52 -0
- data/spec/models/list_available_carriers200_response_inner_required_fields_inner_spec.rb +70 -0
- data/spec/models/list_available_carriers200_response_inner_spec.rb +96 -0
- data/spec/models/list_carrier_product_service_points200_response_inner_address_spec.rb +66 -0
- data/spec/models/list_carrier_product_service_points200_response_inner_spec.rb +78 -0
- data/spec/models/list_carrier_product_service_points_request_spec.rb +66 -0
- data/spec/models/list_carrier_products200_response_inner_additional_parameters_inner_options_inner_spec.rb +48 -0
- data/spec/models/list_carrier_products200_response_inner_additional_parameters_inner_spec.rb +76 -0
- data/spec/models/list_carrier_products200_response_inner_services_inner_spec.rb +42 -0
- data/spec/models/list_carrier_products200_response_inner_spec.rb +100 -0
- data/spec/models/list_carrier_products200_response_inner_weight_limits_spec.rb +52 -0
- data/spec/models/list_carriers200_response_data_inner_config_value_spec.rb +21 -0
- data/spec/models/list_carriers200_response_data_inner_spec.rb +96 -0
- data/spec/models/list_carriers200_response_spec.rb +60 -0
- data/spec/models/list_orders200_response_data_inner_order_channel_spec.rb +52 -0
- data/spec/models/list_orders200_response_data_inner_spec.rb +106 -0
- data/spec/models/list_orders200_response_spec.rb +60 -0
- data/spec/models/list_org_webhook_deliveries200_response_data_inner_spec.rb +96 -0
- data/spec/models/list_org_webhook_deliveries200_response_spec.rb +60 -0
- data/spec/models/list_org_webhooks200_response_data_inner_spec.rb +72 -0
- data/spec/models/list_org_webhooks200_response_spec.rb +60 -0
- data/spec/models/list_shipments200_response_data_inner_address_spec.rb +130 -0
- data/spec/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value_any_of_spec.rb +54 -0
- data/spec/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value_spec.rb +21 -0
- data/spec/models/list_shipments200_response_data_inner_carrier_settings_spec.rb +54 -0
- data/spec/models/list_shipments200_response_data_inner_spec.rb +86 -0
- data/spec/models/list_shipments200_response_spec.rb +60 -0
- data/spec/models/list_shipping_rules200_response_data_inner_additional_parameters_inner_spec.rb +42 -0
- data/spec/models/list_shipping_rules200_response_data_inner_carrier_spec.rb +72 -0
- data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of1_spec.rb +78 -0
- data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of2_spec.rb +74 -0
- data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of3_spec.rb +68 -0
- data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of4_spec.rb +52 -0
- data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of_spec.rb +64 -0
- data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_spec.rb +32 -0
- data/spec/models/list_shipping_rules200_response_data_inner_label_printer_spec.rb +42 -0
- data/spec/models/list_shipping_rules200_response_data_inner_return_shipping_rule_spec.rb +42 -0
- data/spec/models/list_shipping_rules200_response_data_inner_spec.rb +238 -0
- data/spec/models/list_shipping_rules200_response_spec.rb +60 -0
- data/spec/models/revoke_api_token200_response_spec.rb +36 -0
- data/spec/models/send_shipment422_response_errors_inner_spec.rb +42 -0
- data/spec/models/send_shipment422_response_spec.rb +58 -0
- data/spec/models/split_shipment201_response_spec.rb +42 -0
- data/spec/models/split_shipment_parcel200_response_spec.rb +36 -0
- data/spec/models/split_shipment_parcel_request_parcels_inner_spec.rb +42 -0
- data/spec/models/split_shipment_parcel_request_spec.rb +36 -0
- data/spec/models/split_shipment_request_spec.rb +72 -0
- data/spec/models/test_org_webhook200_response_spec.rb +36 -0
- data/spec/models/track_shipment200_response_events_inner_spec.rb +70 -0
- data/spec/models/track_shipment200_response_spec.rb +64 -0
- data/spec/models/update_address_request_spec.rb +106 -0
- data/spec/models/update_api_token_request_spec.rb +36 -0
- data/spec/models/update_carrier_request_spec.rb +48 -0
- data/spec/models/update_order_request_spec.rb +100 -0
- data/spec/models/update_org200_response_spec.rb +126 -0
- data/spec/models/update_org_branding_request_spec.rb +42 -0
- data/spec/models/update_org_request_spec.rb +118 -0
- data/spec/models/update_org_webhook_request_spec.rb +58 -0
- data/spec/models/update_shipment_request_spec.rb +122 -0
- data/spec/models/update_shipping_rule_request_spec.rb +184 -0
- data/spec/models/verify_api_token200_response_spec.rb +66 -0
- data/spec/models/verify_api_token_request_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- data/zippendo.gemspec +39 -0
- metadata +715 -0
|
@@ -0,0 +1,1003 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zippendo Public API
|
|
3
|
+
|
|
4
|
+
#Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@zippendo.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Zippendo
|
|
16
|
+
class ShipmentsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Batch send shipments
|
|
23
|
+
# Book multiple pending/error shipments with their carriers in one request. Each shipment is processed independently and reported in `results`; a failure on one shipment never aborts the others. Use it to send every shipment on an order at once.
|
|
24
|
+
# @param org_id [String] Organization ID
|
|
25
|
+
# @param batch_send_shipments_request [BatchSendShipmentsRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [BatchSendShipments200Response]
|
|
28
|
+
def batch_send_shipments(org_id, batch_send_shipments_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = batch_send_shipments_with_http_info(org_id, batch_send_shipments_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Batch send shipments
|
|
34
|
+
# Book multiple pending/error shipments with their carriers in one request. Each shipment is processed independently and reported in `results`; a failure on one shipment never aborts the others. Use it to send every shipment on an order at once.
|
|
35
|
+
# @param org_id [String] Organization ID
|
|
36
|
+
# @param batch_send_shipments_request [BatchSendShipmentsRequest]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(BatchSendShipments200Response, Integer, Hash)>] BatchSendShipments200Response data, response status code and response headers
|
|
39
|
+
def batch_send_shipments_with_http_info(org_id, batch_send_shipments_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.batch_send_shipments ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'org_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.batch_send_shipments"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'batch_send_shipments_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && batch_send_shipments_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'batch_send_shipments_request' when calling ShipmentsApi.batch_send_shipments"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/orgs/{orgId}/shipments/batch-send'.sub('{orgId}', CGI.escape(org_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_send_shipments_request)
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'BatchSendShipments200Response'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"ShipmentsApi.batch_send_shipments",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#batch_send_shipments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Batch split shipment
|
|
97
|
+
# Split a parcel into multiple new shipments with per-line quantities in a single atomic operation. Only draft or pending shipments can be split.
|
|
98
|
+
# @param org_id [String] Organization identifier.
|
|
99
|
+
# @param shipment_id [String] Shipment identifier.
|
|
100
|
+
# @param batch_split_shipment_request [BatchSplitShipmentRequest]
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [BatchSplitShipment201Response]
|
|
103
|
+
def batch_split_shipment(org_id, shipment_id, batch_split_shipment_request, opts = {})
|
|
104
|
+
data, _status_code, _headers = batch_split_shipment_with_http_info(org_id, shipment_id, batch_split_shipment_request, opts)
|
|
105
|
+
data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Batch split shipment
|
|
109
|
+
# Split a parcel into multiple new shipments with per-line quantities in a single atomic operation. Only draft or pending shipments can be split.
|
|
110
|
+
# @param org_id [String] Organization identifier.
|
|
111
|
+
# @param shipment_id [String] Shipment identifier.
|
|
112
|
+
# @param batch_split_shipment_request [BatchSplitShipmentRequest]
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @return [Array<(BatchSplitShipment201Response, Integer, Hash)>] BatchSplitShipment201Response data, response status code and response headers
|
|
115
|
+
def batch_split_shipment_with_http_info(org_id, shipment_id, batch_split_shipment_request, opts = {})
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.batch_split_shipment ...'
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'org_id' is set
|
|
120
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.batch_split_shipment"
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'shipment_id' is set
|
|
124
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.batch_split_shipment"
|
|
126
|
+
end
|
|
127
|
+
# verify the required parameter 'batch_split_shipment_request' is set
|
|
128
|
+
if @api_client.config.client_side_validation && batch_split_shipment_request.nil?
|
|
129
|
+
fail ArgumentError, "Missing the required parameter 'batch_split_shipment_request' when calling ShipmentsApi.batch_split_shipment"
|
|
130
|
+
end
|
|
131
|
+
# resource path
|
|
132
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/batch-split-shipment'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
133
|
+
|
|
134
|
+
# query parameters
|
|
135
|
+
query_params = opts[:query_params] || {}
|
|
136
|
+
|
|
137
|
+
# header parameters
|
|
138
|
+
header_params = opts[:header_params] || {}
|
|
139
|
+
# HTTP header 'Accept' (if needed)
|
|
140
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
141
|
+
# HTTP header 'Content-Type'
|
|
142
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
143
|
+
if !content_type.nil?
|
|
144
|
+
header_params['Content-Type'] = content_type
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# form parameters
|
|
148
|
+
form_params = opts[:form_params] || {}
|
|
149
|
+
|
|
150
|
+
# http body (model)
|
|
151
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_split_shipment_request)
|
|
152
|
+
|
|
153
|
+
# return_type
|
|
154
|
+
return_type = opts[:debug_return_type] || 'BatchSplitShipment201Response'
|
|
155
|
+
|
|
156
|
+
# auth_names
|
|
157
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
158
|
+
|
|
159
|
+
new_options = opts.merge(
|
|
160
|
+
:operation => :"ShipmentsApi.batch_split_shipment",
|
|
161
|
+
:header_params => header_params,
|
|
162
|
+
:query_params => query_params,
|
|
163
|
+
:form_params => form_params,
|
|
164
|
+
:body => post_body,
|
|
165
|
+
:auth_names => auth_names,
|
|
166
|
+
:return_type => return_type
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
170
|
+
if @api_client.config.debugging
|
|
171
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#batch_split_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
172
|
+
end
|
|
173
|
+
return data, status_code, headers
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Create return shipment
|
|
177
|
+
# Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
|
|
178
|
+
# @param org_id [String] Organization identifier.
|
|
179
|
+
# @param shipment_id [String] Shipment identifier.
|
|
180
|
+
# @param [Hash] opts the optional parameters
|
|
181
|
+
# @return [CreateShipment201Response]
|
|
182
|
+
def create_return_shipment(org_id, shipment_id, opts = {})
|
|
183
|
+
data, _status_code, _headers = create_return_shipment_with_http_info(org_id, shipment_id, opts)
|
|
184
|
+
data
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Create return shipment
|
|
188
|
+
# Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
|
|
189
|
+
# @param org_id [String] Organization identifier.
|
|
190
|
+
# @param shipment_id [String] Shipment identifier.
|
|
191
|
+
# @param [Hash] opts the optional parameters
|
|
192
|
+
# @return [Array<(CreateShipment201Response, Integer, Hash)>] CreateShipment201Response data, response status code and response headers
|
|
193
|
+
def create_return_shipment_with_http_info(org_id, shipment_id, opts = {})
|
|
194
|
+
if @api_client.config.debugging
|
|
195
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.create_return_shipment ...'
|
|
196
|
+
end
|
|
197
|
+
# verify the required parameter 'org_id' is set
|
|
198
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
199
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.create_return_shipment"
|
|
200
|
+
end
|
|
201
|
+
# verify the required parameter 'shipment_id' is set
|
|
202
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
203
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.create_return_shipment"
|
|
204
|
+
end
|
|
205
|
+
# resource path
|
|
206
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/create-return'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
207
|
+
|
|
208
|
+
# query parameters
|
|
209
|
+
query_params = opts[:query_params] || {}
|
|
210
|
+
|
|
211
|
+
# header parameters
|
|
212
|
+
header_params = opts[:header_params] || {}
|
|
213
|
+
# HTTP header 'Accept' (if needed)
|
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
215
|
+
|
|
216
|
+
# form parameters
|
|
217
|
+
form_params = opts[:form_params] || {}
|
|
218
|
+
|
|
219
|
+
# http body (model)
|
|
220
|
+
post_body = opts[:debug_body]
|
|
221
|
+
|
|
222
|
+
# return_type
|
|
223
|
+
return_type = opts[:debug_return_type] || 'CreateShipment201Response'
|
|
224
|
+
|
|
225
|
+
# auth_names
|
|
226
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
227
|
+
|
|
228
|
+
new_options = opts.merge(
|
|
229
|
+
:operation => :"ShipmentsApi.create_return_shipment",
|
|
230
|
+
:header_params => header_params,
|
|
231
|
+
:query_params => query_params,
|
|
232
|
+
:form_params => form_params,
|
|
233
|
+
:body => post_body,
|
|
234
|
+
:auth_names => auth_names,
|
|
235
|
+
:return_type => return_type
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
239
|
+
if @api_client.config.debugging
|
|
240
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#create_return_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
241
|
+
end
|
|
242
|
+
return data, status_code, headers
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Create shipment
|
|
246
|
+
# Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
247
|
+
# @param org_id [String] Organization ID
|
|
248
|
+
# @param create_shipment_request [CreateShipmentRequest]
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [CreateShipment201Response]
|
|
251
|
+
def create_shipment(org_id, create_shipment_request, opts = {})
|
|
252
|
+
data, _status_code, _headers = create_shipment_with_http_info(org_id, create_shipment_request, opts)
|
|
253
|
+
data
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Create shipment
|
|
257
|
+
# Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
|
|
258
|
+
# @param org_id [String] Organization ID
|
|
259
|
+
# @param create_shipment_request [CreateShipmentRequest]
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @return [Array<(CreateShipment201Response, Integer, Hash)>] CreateShipment201Response data, response status code and response headers
|
|
262
|
+
def create_shipment_with_http_info(org_id, create_shipment_request, opts = {})
|
|
263
|
+
if @api_client.config.debugging
|
|
264
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.create_shipment ...'
|
|
265
|
+
end
|
|
266
|
+
# verify the required parameter 'org_id' is set
|
|
267
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
268
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.create_shipment"
|
|
269
|
+
end
|
|
270
|
+
# verify the required parameter 'create_shipment_request' is set
|
|
271
|
+
if @api_client.config.client_side_validation && create_shipment_request.nil?
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'create_shipment_request' when calling ShipmentsApi.create_shipment"
|
|
273
|
+
end
|
|
274
|
+
# resource path
|
|
275
|
+
local_var_path = '/orgs/{orgId}/shipments'.sub('{orgId}', CGI.escape(org_id.to_s))
|
|
276
|
+
|
|
277
|
+
# query parameters
|
|
278
|
+
query_params = opts[:query_params] || {}
|
|
279
|
+
|
|
280
|
+
# header parameters
|
|
281
|
+
header_params = opts[:header_params] || {}
|
|
282
|
+
# HTTP header 'Accept' (if needed)
|
|
283
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
284
|
+
# HTTP header 'Content-Type'
|
|
285
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
286
|
+
if !content_type.nil?
|
|
287
|
+
header_params['Content-Type'] = content_type
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# form parameters
|
|
291
|
+
form_params = opts[:form_params] || {}
|
|
292
|
+
|
|
293
|
+
# http body (model)
|
|
294
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_shipment_request)
|
|
295
|
+
|
|
296
|
+
# return_type
|
|
297
|
+
return_type = opts[:debug_return_type] || 'CreateShipment201Response'
|
|
298
|
+
|
|
299
|
+
# auth_names
|
|
300
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
301
|
+
|
|
302
|
+
new_options = opts.merge(
|
|
303
|
+
:operation => :"ShipmentsApi.create_shipment",
|
|
304
|
+
:header_params => header_params,
|
|
305
|
+
:query_params => query_params,
|
|
306
|
+
:form_params => form_params,
|
|
307
|
+
:body => post_body,
|
|
308
|
+
:auth_names => auth_names,
|
|
309
|
+
:return_type => return_type
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#create_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Delete shipment
|
|
320
|
+
# Delete a shipment. Only shipments in pending status can be deleted.
|
|
321
|
+
# @param org_id [String] Organization identifier.
|
|
322
|
+
# @param shipment_id [String] Shipment identifier.
|
|
323
|
+
# @param [Hash] opts the optional parameters
|
|
324
|
+
# @return [RevokeApiToken200Response]
|
|
325
|
+
def delete_shipment(org_id, shipment_id, opts = {})
|
|
326
|
+
data, _status_code, _headers = delete_shipment_with_http_info(org_id, shipment_id, opts)
|
|
327
|
+
data
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Delete shipment
|
|
331
|
+
# Delete a shipment. Only shipments in pending status can be deleted.
|
|
332
|
+
# @param org_id [String] Organization identifier.
|
|
333
|
+
# @param shipment_id [String] Shipment identifier.
|
|
334
|
+
# @param [Hash] opts the optional parameters
|
|
335
|
+
# @return [Array<(RevokeApiToken200Response, Integer, Hash)>] RevokeApiToken200Response data, response status code and response headers
|
|
336
|
+
def delete_shipment_with_http_info(org_id, shipment_id, opts = {})
|
|
337
|
+
if @api_client.config.debugging
|
|
338
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.delete_shipment ...'
|
|
339
|
+
end
|
|
340
|
+
# verify the required parameter 'org_id' is set
|
|
341
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
342
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.delete_shipment"
|
|
343
|
+
end
|
|
344
|
+
# verify the required parameter 'shipment_id' is set
|
|
345
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
346
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.delete_shipment"
|
|
347
|
+
end
|
|
348
|
+
# resource path
|
|
349
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
350
|
+
|
|
351
|
+
# query parameters
|
|
352
|
+
query_params = opts[:query_params] || {}
|
|
353
|
+
|
|
354
|
+
# header parameters
|
|
355
|
+
header_params = opts[:header_params] || {}
|
|
356
|
+
# HTTP header 'Accept' (if needed)
|
|
357
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
358
|
+
|
|
359
|
+
# form parameters
|
|
360
|
+
form_params = opts[:form_params] || {}
|
|
361
|
+
|
|
362
|
+
# http body (model)
|
|
363
|
+
post_body = opts[:debug_body]
|
|
364
|
+
|
|
365
|
+
# return_type
|
|
366
|
+
return_type = opts[:debug_return_type] || 'RevokeApiToken200Response'
|
|
367
|
+
|
|
368
|
+
# auth_names
|
|
369
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
370
|
+
|
|
371
|
+
new_options = opts.merge(
|
|
372
|
+
:operation => :"ShipmentsApi.delete_shipment",
|
|
373
|
+
:header_params => header_params,
|
|
374
|
+
:query_params => query_params,
|
|
375
|
+
:form_params => form_params,
|
|
376
|
+
:body => post_body,
|
|
377
|
+
:auth_names => auth_names,
|
|
378
|
+
:return_type => return_type
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#delete_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
384
|
+
end
|
|
385
|
+
return data, status_code, headers
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Get shipment
|
|
389
|
+
# Retrieve a single shipment by its ID, including parcels, parties, documents and activity.
|
|
390
|
+
# @param org_id [String] Organization identifier.
|
|
391
|
+
# @param shipment_id [String] Shipment identifier.
|
|
392
|
+
# @param [Hash] opts the optional parameters
|
|
393
|
+
# @return [CreateShipment201Response]
|
|
394
|
+
def get_shipment(org_id, shipment_id, opts = {})
|
|
395
|
+
data, _status_code, _headers = get_shipment_with_http_info(org_id, shipment_id, opts)
|
|
396
|
+
data
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
# Get shipment
|
|
400
|
+
# Retrieve a single shipment by its ID, including parcels, parties, documents and activity.
|
|
401
|
+
# @param org_id [String] Organization identifier.
|
|
402
|
+
# @param shipment_id [String] Shipment identifier.
|
|
403
|
+
# @param [Hash] opts the optional parameters
|
|
404
|
+
# @return [Array<(CreateShipment201Response, Integer, Hash)>] CreateShipment201Response data, response status code and response headers
|
|
405
|
+
def get_shipment_with_http_info(org_id, shipment_id, opts = {})
|
|
406
|
+
if @api_client.config.debugging
|
|
407
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.get_shipment ...'
|
|
408
|
+
end
|
|
409
|
+
# verify the required parameter 'org_id' is set
|
|
410
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
411
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.get_shipment"
|
|
412
|
+
end
|
|
413
|
+
# verify the required parameter 'shipment_id' is set
|
|
414
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
415
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.get_shipment"
|
|
416
|
+
end
|
|
417
|
+
# resource path
|
|
418
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
419
|
+
|
|
420
|
+
# query parameters
|
|
421
|
+
query_params = opts[:query_params] || {}
|
|
422
|
+
|
|
423
|
+
# header parameters
|
|
424
|
+
header_params = opts[:header_params] || {}
|
|
425
|
+
# HTTP header 'Accept' (if needed)
|
|
426
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
427
|
+
|
|
428
|
+
# form parameters
|
|
429
|
+
form_params = opts[:form_params] || {}
|
|
430
|
+
|
|
431
|
+
# http body (model)
|
|
432
|
+
post_body = opts[:debug_body]
|
|
433
|
+
|
|
434
|
+
# return_type
|
|
435
|
+
return_type = opts[:debug_return_type] || 'CreateShipment201Response'
|
|
436
|
+
|
|
437
|
+
# auth_names
|
|
438
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
439
|
+
|
|
440
|
+
new_options = opts.merge(
|
|
441
|
+
:operation => :"ShipmentsApi.get_shipment",
|
|
442
|
+
:header_params => header_params,
|
|
443
|
+
:query_params => query_params,
|
|
444
|
+
:form_params => form_params,
|
|
445
|
+
:body => post_body,
|
|
446
|
+
:auth_names => auth_names,
|
|
447
|
+
:return_type => return_type
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
451
|
+
if @api_client.config.debugging
|
|
452
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#get_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
453
|
+
end
|
|
454
|
+
return data, status_code, headers
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Download shipment document
|
|
458
|
+
# Streams a shipment document or label file from storage.
|
|
459
|
+
# @param org_id [String] Organization identifier.
|
|
460
|
+
# @param shipment_id [String] Shipment identifier.
|
|
461
|
+
# @param document_id [String] Document identifier.
|
|
462
|
+
# @param [Hash] opts the optional parameters
|
|
463
|
+
# @option opts [String] :disposition Render the document inline (default) or force a download. (default to 'inline')
|
|
464
|
+
# @option opts [String] :filename Suggested filename (without extension) for attachment downloads.
|
|
465
|
+
# @return [nil]
|
|
466
|
+
def get_shipment_document_content(org_id, shipment_id, document_id, opts = {})
|
|
467
|
+
get_shipment_document_content_with_http_info(org_id, shipment_id, document_id, opts)
|
|
468
|
+
nil
|
|
469
|
+
end
|
|
470
|
+
|
|
471
|
+
# Download shipment document
|
|
472
|
+
# Streams a shipment document or label file from storage.
|
|
473
|
+
# @param org_id [String] Organization identifier.
|
|
474
|
+
# @param shipment_id [String] Shipment identifier.
|
|
475
|
+
# @param document_id [String] Document identifier.
|
|
476
|
+
# @param [Hash] opts the optional parameters
|
|
477
|
+
# @option opts [String] :disposition Render the document inline (default) or force a download. (default to 'inline')
|
|
478
|
+
# @option opts [String] :filename Suggested filename (without extension) for attachment downloads.
|
|
479
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
480
|
+
def get_shipment_document_content_with_http_info(org_id, shipment_id, document_id, opts = {})
|
|
481
|
+
if @api_client.config.debugging
|
|
482
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.get_shipment_document_content ...'
|
|
483
|
+
end
|
|
484
|
+
# verify the required parameter 'org_id' is set
|
|
485
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
486
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.get_shipment_document_content"
|
|
487
|
+
end
|
|
488
|
+
# verify the required parameter 'shipment_id' is set
|
|
489
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
490
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.get_shipment_document_content"
|
|
491
|
+
end
|
|
492
|
+
# verify the required parameter 'document_id' is set
|
|
493
|
+
if @api_client.config.client_side_validation && document_id.nil?
|
|
494
|
+
fail ArgumentError, "Missing the required parameter 'document_id' when calling ShipmentsApi.get_shipment_document_content"
|
|
495
|
+
end
|
|
496
|
+
allowable_values = ["inline", "attachment"]
|
|
497
|
+
if @api_client.config.client_side_validation && opts[:'disposition'] && !allowable_values.include?(opts[:'disposition'])
|
|
498
|
+
fail ArgumentError, "invalid value for \"disposition\", must be one of #{allowable_values}"
|
|
499
|
+
end
|
|
500
|
+
# resource path
|
|
501
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/documents/{documentId}/content'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s)).sub('{documentId}', CGI.escape(document_id.to_s))
|
|
502
|
+
|
|
503
|
+
# query parameters
|
|
504
|
+
query_params = opts[:query_params] || {}
|
|
505
|
+
query_params[:'disposition'] = opts[:'disposition'] if !opts[:'disposition'].nil?
|
|
506
|
+
query_params[:'filename'] = opts[:'filename'] if !opts[:'filename'].nil?
|
|
507
|
+
|
|
508
|
+
# header parameters
|
|
509
|
+
header_params = opts[:header_params] || {}
|
|
510
|
+
|
|
511
|
+
# form parameters
|
|
512
|
+
form_params = opts[:form_params] || {}
|
|
513
|
+
|
|
514
|
+
# http body (model)
|
|
515
|
+
post_body = opts[:debug_body]
|
|
516
|
+
|
|
517
|
+
# return_type
|
|
518
|
+
return_type = opts[:debug_return_type]
|
|
519
|
+
|
|
520
|
+
# auth_names
|
|
521
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
522
|
+
|
|
523
|
+
new_options = opts.merge(
|
|
524
|
+
:operation => :"ShipmentsApi.get_shipment_document_content",
|
|
525
|
+
:header_params => header_params,
|
|
526
|
+
:query_params => query_params,
|
|
527
|
+
:form_params => form_params,
|
|
528
|
+
:body => post_body,
|
|
529
|
+
:auth_names => auth_names,
|
|
530
|
+
:return_type => return_type
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
534
|
+
if @api_client.config.debugging
|
|
535
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#get_shipment_document_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
536
|
+
end
|
|
537
|
+
return data, status_code, headers
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# List shipments
|
|
541
|
+
# List all shipments for an organization, paginated and ordered by newest first.
|
|
542
|
+
# @param org_id [String] Organization ID
|
|
543
|
+
# @param [Hash] opts the optional parameters
|
|
544
|
+
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
545
|
+
# @option opts [Integer] :limit Items per page (max 100) (default to 20)
|
|
546
|
+
# @return [ListShipments200Response]
|
|
547
|
+
def list_shipments(org_id, opts = {})
|
|
548
|
+
data, _status_code, _headers = list_shipments_with_http_info(org_id, opts)
|
|
549
|
+
data
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# List shipments
|
|
553
|
+
# List all shipments for an organization, paginated and ordered by newest first.
|
|
554
|
+
# @param org_id [String] Organization ID
|
|
555
|
+
# @param [Hash] opts the optional parameters
|
|
556
|
+
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
557
|
+
# @option opts [Integer] :limit Items per page (max 100) (default to 20)
|
|
558
|
+
# @return [Array<(ListShipments200Response, Integer, Hash)>] ListShipments200Response data, response status code and response headers
|
|
559
|
+
def list_shipments_with_http_info(org_id, opts = {})
|
|
560
|
+
if @api_client.config.debugging
|
|
561
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.list_shipments ...'
|
|
562
|
+
end
|
|
563
|
+
# verify the required parameter 'org_id' is set
|
|
564
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
565
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.list_shipments"
|
|
566
|
+
end
|
|
567
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 9007199254740991
|
|
568
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ShipmentsApi.list_shipments, must be smaller than or equal to 9007199254740991.'
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
572
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ShipmentsApi.list_shipments, must be greater than or equal to 1.'
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
576
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ShipmentsApi.list_shipments, must be smaller than or equal to 100.'
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
580
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ShipmentsApi.list_shipments, must be greater than or equal to 1.'
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
# resource path
|
|
584
|
+
local_var_path = '/orgs/{orgId}/shipments'.sub('{orgId}', CGI.escape(org_id.to_s))
|
|
585
|
+
|
|
586
|
+
# query parameters
|
|
587
|
+
query_params = opts[:query_params] || {}
|
|
588
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
589
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
590
|
+
|
|
591
|
+
# header parameters
|
|
592
|
+
header_params = opts[:header_params] || {}
|
|
593
|
+
# HTTP header 'Accept' (if needed)
|
|
594
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
595
|
+
|
|
596
|
+
# form parameters
|
|
597
|
+
form_params = opts[:form_params] || {}
|
|
598
|
+
|
|
599
|
+
# http body (model)
|
|
600
|
+
post_body = opts[:debug_body]
|
|
601
|
+
|
|
602
|
+
# return_type
|
|
603
|
+
return_type = opts[:debug_return_type] || 'ListShipments200Response'
|
|
604
|
+
|
|
605
|
+
# auth_names
|
|
606
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
607
|
+
|
|
608
|
+
new_options = opts.merge(
|
|
609
|
+
:operation => :"ShipmentsApi.list_shipments",
|
|
610
|
+
:header_params => header_params,
|
|
611
|
+
:query_params => query_params,
|
|
612
|
+
:form_params => form_params,
|
|
613
|
+
:body => post_body,
|
|
614
|
+
:auth_names => auth_names,
|
|
615
|
+
:return_type => return_type
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
619
|
+
if @api_client.config.debugging
|
|
620
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#list_shipments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
621
|
+
end
|
|
622
|
+
return data, status_code, headers
|
|
623
|
+
end
|
|
624
|
+
|
|
625
|
+
# Send shipment
|
|
626
|
+
# Book a pending or error shipment with the carrier, generating labels and tracking. Returns 422 with carrier errors if booking fails.
|
|
627
|
+
# @param org_id [String] Organization identifier.
|
|
628
|
+
# @param shipment_id [String] Shipment identifier.
|
|
629
|
+
# @param [Hash] opts the optional parameters
|
|
630
|
+
# @return [CreateShipment201Response]
|
|
631
|
+
def send_shipment(org_id, shipment_id, opts = {})
|
|
632
|
+
data, _status_code, _headers = send_shipment_with_http_info(org_id, shipment_id, opts)
|
|
633
|
+
data
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
# Send shipment
|
|
637
|
+
# Book a pending or error shipment with the carrier, generating labels and tracking. Returns 422 with carrier errors if booking fails.
|
|
638
|
+
# @param org_id [String] Organization identifier.
|
|
639
|
+
# @param shipment_id [String] Shipment identifier.
|
|
640
|
+
# @param [Hash] opts the optional parameters
|
|
641
|
+
# @return [Array<(CreateShipment201Response, Integer, Hash)>] CreateShipment201Response data, response status code and response headers
|
|
642
|
+
def send_shipment_with_http_info(org_id, shipment_id, opts = {})
|
|
643
|
+
if @api_client.config.debugging
|
|
644
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.send_shipment ...'
|
|
645
|
+
end
|
|
646
|
+
# verify the required parameter 'org_id' is set
|
|
647
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
648
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.send_shipment"
|
|
649
|
+
end
|
|
650
|
+
# verify the required parameter 'shipment_id' is set
|
|
651
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
652
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.send_shipment"
|
|
653
|
+
end
|
|
654
|
+
# resource path
|
|
655
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/send'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
656
|
+
|
|
657
|
+
# query parameters
|
|
658
|
+
query_params = opts[:query_params] || {}
|
|
659
|
+
|
|
660
|
+
# header parameters
|
|
661
|
+
header_params = opts[:header_params] || {}
|
|
662
|
+
# HTTP header 'Accept' (if needed)
|
|
663
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
664
|
+
|
|
665
|
+
# form parameters
|
|
666
|
+
form_params = opts[:form_params] || {}
|
|
667
|
+
|
|
668
|
+
# http body (model)
|
|
669
|
+
post_body = opts[:debug_body]
|
|
670
|
+
|
|
671
|
+
# return_type
|
|
672
|
+
return_type = opts[:debug_return_type] || 'CreateShipment201Response'
|
|
673
|
+
|
|
674
|
+
# auth_names
|
|
675
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
676
|
+
|
|
677
|
+
new_options = opts.merge(
|
|
678
|
+
:operation => :"ShipmentsApi.send_shipment",
|
|
679
|
+
:header_params => header_params,
|
|
680
|
+
:query_params => query_params,
|
|
681
|
+
:form_params => form_params,
|
|
682
|
+
:body => post_body,
|
|
683
|
+
:auth_names => auth_names,
|
|
684
|
+
:return_type => return_type
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
688
|
+
if @api_client.config.debugging
|
|
689
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#send_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
690
|
+
end
|
|
691
|
+
return data, status_code, headers
|
|
692
|
+
end
|
|
693
|
+
|
|
694
|
+
# Split shipment
|
|
695
|
+
# Move order lines from a parcel into a new shipment. Only draft or pending shipments can be split.
|
|
696
|
+
# @param org_id [String] Organization identifier.
|
|
697
|
+
# @param shipment_id [String] Shipment identifier.
|
|
698
|
+
# @param split_shipment_request [SplitShipmentRequest]
|
|
699
|
+
# @param [Hash] opts the optional parameters
|
|
700
|
+
# @return [SplitShipment201Response]
|
|
701
|
+
def split_shipment(org_id, shipment_id, split_shipment_request, opts = {})
|
|
702
|
+
data, _status_code, _headers = split_shipment_with_http_info(org_id, shipment_id, split_shipment_request, opts)
|
|
703
|
+
data
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
# Split shipment
|
|
707
|
+
# Move order lines from a parcel into a new shipment. Only draft or pending shipments can be split.
|
|
708
|
+
# @param org_id [String] Organization identifier.
|
|
709
|
+
# @param shipment_id [String] Shipment identifier.
|
|
710
|
+
# @param split_shipment_request [SplitShipmentRequest]
|
|
711
|
+
# @param [Hash] opts the optional parameters
|
|
712
|
+
# @return [Array<(SplitShipment201Response, Integer, Hash)>] SplitShipment201Response data, response status code and response headers
|
|
713
|
+
def split_shipment_with_http_info(org_id, shipment_id, split_shipment_request, opts = {})
|
|
714
|
+
if @api_client.config.debugging
|
|
715
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.split_shipment ...'
|
|
716
|
+
end
|
|
717
|
+
# verify the required parameter 'org_id' is set
|
|
718
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
719
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.split_shipment"
|
|
720
|
+
end
|
|
721
|
+
# verify the required parameter 'shipment_id' is set
|
|
722
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
723
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.split_shipment"
|
|
724
|
+
end
|
|
725
|
+
# verify the required parameter 'split_shipment_request' is set
|
|
726
|
+
if @api_client.config.client_side_validation && split_shipment_request.nil?
|
|
727
|
+
fail ArgumentError, "Missing the required parameter 'split_shipment_request' when calling ShipmentsApi.split_shipment"
|
|
728
|
+
end
|
|
729
|
+
# resource path
|
|
730
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/split-shipment'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
731
|
+
|
|
732
|
+
# query parameters
|
|
733
|
+
query_params = opts[:query_params] || {}
|
|
734
|
+
|
|
735
|
+
# header parameters
|
|
736
|
+
header_params = opts[:header_params] || {}
|
|
737
|
+
# HTTP header 'Accept' (if needed)
|
|
738
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
739
|
+
# HTTP header 'Content-Type'
|
|
740
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
741
|
+
if !content_type.nil?
|
|
742
|
+
header_params['Content-Type'] = content_type
|
|
743
|
+
end
|
|
744
|
+
|
|
745
|
+
# form parameters
|
|
746
|
+
form_params = opts[:form_params] || {}
|
|
747
|
+
|
|
748
|
+
# http body (model)
|
|
749
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(split_shipment_request)
|
|
750
|
+
|
|
751
|
+
# return_type
|
|
752
|
+
return_type = opts[:debug_return_type] || 'SplitShipment201Response'
|
|
753
|
+
|
|
754
|
+
# auth_names
|
|
755
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
756
|
+
|
|
757
|
+
new_options = opts.merge(
|
|
758
|
+
:operation => :"ShipmentsApi.split_shipment",
|
|
759
|
+
:header_params => header_params,
|
|
760
|
+
:query_params => query_params,
|
|
761
|
+
:form_params => form_params,
|
|
762
|
+
:body => post_body,
|
|
763
|
+
:auth_names => auth_names,
|
|
764
|
+
:return_type => return_type
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
768
|
+
if @api_client.config.debugging
|
|
769
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#split_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
770
|
+
end
|
|
771
|
+
return data, status_code, headers
|
|
772
|
+
end
|
|
773
|
+
|
|
774
|
+
# Split parcels
|
|
775
|
+
# Redistribute order lines across parcels within a shipment, moving lines between parcels and creating new ones. Only draft, pending or error shipments can be modified.
|
|
776
|
+
# @param org_id [String] Organization identifier.
|
|
777
|
+
# @param shipment_id [String] Shipment identifier.
|
|
778
|
+
# @param split_shipment_parcel_request [SplitShipmentParcelRequest]
|
|
779
|
+
# @param [Hash] opts the optional parameters
|
|
780
|
+
# @return [SplitShipmentParcel200Response]
|
|
781
|
+
def split_shipment_parcel(org_id, shipment_id, split_shipment_parcel_request, opts = {})
|
|
782
|
+
data, _status_code, _headers = split_shipment_parcel_with_http_info(org_id, shipment_id, split_shipment_parcel_request, opts)
|
|
783
|
+
data
|
|
784
|
+
end
|
|
785
|
+
|
|
786
|
+
# Split parcels
|
|
787
|
+
# Redistribute order lines across parcels within a shipment, moving lines between parcels and creating new ones. Only draft, pending or error shipments can be modified.
|
|
788
|
+
# @param org_id [String] Organization identifier.
|
|
789
|
+
# @param shipment_id [String] Shipment identifier.
|
|
790
|
+
# @param split_shipment_parcel_request [SplitShipmentParcelRequest]
|
|
791
|
+
# @param [Hash] opts the optional parameters
|
|
792
|
+
# @return [Array<(SplitShipmentParcel200Response, Integer, Hash)>] SplitShipmentParcel200Response data, response status code and response headers
|
|
793
|
+
def split_shipment_parcel_with_http_info(org_id, shipment_id, split_shipment_parcel_request, opts = {})
|
|
794
|
+
if @api_client.config.debugging
|
|
795
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.split_shipment_parcel ...'
|
|
796
|
+
end
|
|
797
|
+
# verify the required parameter 'org_id' is set
|
|
798
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
799
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.split_shipment_parcel"
|
|
800
|
+
end
|
|
801
|
+
# verify the required parameter 'shipment_id' is set
|
|
802
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
803
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.split_shipment_parcel"
|
|
804
|
+
end
|
|
805
|
+
# verify the required parameter 'split_shipment_parcel_request' is set
|
|
806
|
+
if @api_client.config.client_side_validation && split_shipment_parcel_request.nil?
|
|
807
|
+
fail ArgumentError, "Missing the required parameter 'split_shipment_parcel_request' when calling ShipmentsApi.split_shipment_parcel"
|
|
808
|
+
end
|
|
809
|
+
# resource path
|
|
810
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/split-parcel'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
811
|
+
|
|
812
|
+
# query parameters
|
|
813
|
+
query_params = opts[:query_params] || {}
|
|
814
|
+
|
|
815
|
+
# header parameters
|
|
816
|
+
header_params = opts[:header_params] || {}
|
|
817
|
+
# HTTP header 'Accept' (if needed)
|
|
818
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
819
|
+
# HTTP header 'Content-Type'
|
|
820
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
821
|
+
if !content_type.nil?
|
|
822
|
+
header_params['Content-Type'] = content_type
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
# form parameters
|
|
826
|
+
form_params = opts[:form_params] || {}
|
|
827
|
+
|
|
828
|
+
# http body (model)
|
|
829
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(split_shipment_parcel_request)
|
|
830
|
+
|
|
831
|
+
# return_type
|
|
832
|
+
return_type = opts[:debug_return_type] || 'SplitShipmentParcel200Response'
|
|
833
|
+
|
|
834
|
+
# auth_names
|
|
835
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
836
|
+
|
|
837
|
+
new_options = opts.merge(
|
|
838
|
+
:operation => :"ShipmentsApi.split_shipment_parcel",
|
|
839
|
+
:header_params => header_params,
|
|
840
|
+
:query_params => query_params,
|
|
841
|
+
:form_params => form_params,
|
|
842
|
+
:body => post_body,
|
|
843
|
+
:auth_names => auth_names,
|
|
844
|
+
:return_type => return_type
|
|
845
|
+
)
|
|
846
|
+
|
|
847
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
848
|
+
if @api_client.config.debugging
|
|
849
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#split_shipment_parcel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
850
|
+
end
|
|
851
|
+
return data, status_code, headers
|
|
852
|
+
end
|
|
853
|
+
|
|
854
|
+
# Get shipment tracking
|
|
855
|
+
# Retrieve the tracking timeline for a shipment, including current status and all carrier events.
|
|
856
|
+
# @param org_id [String] Organization identifier.
|
|
857
|
+
# @param shipment_id [String] Shipment identifier.
|
|
858
|
+
# @param [Hash] opts the optional parameters
|
|
859
|
+
# @return [TrackShipment200Response]
|
|
860
|
+
def track_shipment(org_id, shipment_id, opts = {})
|
|
861
|
+
data, _status_code, _headers = track_shipment_with_http_info(org_id, shipment_id, opts)
|
|
862
|
+
data
|
|
863
|
+
end
|
|
864
|
+
|
|
865
|
+
# Get shipment tracking
|
|
866
|
+
# Retrieve the tracking timeline for a shipment, including current status and all carrier events.
|
|
867
|
+
# @param org_id [String] Organization identifier.
|
|
868
|
+
# @param shipment_id [String] Shipment identifier.
|
|
869
|
+
# @param [Hash] opts the optional parameters
|
|
870
|
+
# @return [Array<(TrackShipment200Response, Integer, Hash)>] TrackShipment200Response data, response status code and response headers
|
|
871
|
+
def track_shipment_with_http_info(org_id, shipment_id, opts = {})
|
|
872
|
+
if @api_client.config.debugging
|
|
873
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.track_shipment ...'
|
|
874
|
+
end
|
|
875
|
+
# verify the required parameter 'org_id' is set
|
|
876
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
877
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.track_shipment"
|
|
878
|
+
end
|
|
879
|
+
# verify the required parameter 'shipment_id' is set
|
|
880
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
881
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.track_shipment"
|
|
882
|
+
end
|
|
883
|
+
# resource path
|
|
884
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}/tracking'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
885
|
+
|
|
886
|
+
# query parameters
|
|
887
|
+
query_params = opts[:query_params] || {}
|
|
888
|
+
|
|
889
|
+
# header parameters
|
|
890
|
+
header_params = opts[:header_params] || {}
|
|
891
|
+
# HTTP header 'Accept' (if needed)
|
|
892
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
893
|
+
|
|
894
|
+
# form parameters
|
|
895
|
+
form_params = opts[:form_params] || {}
|
|
896
|
+
|
|
897
|
+
# http body (model)
|
|
898
|
+
post_body = opts[:debug_body]
|
|
899
|
+
|
|
900
|
+
# return_type
|
|
901
|
+
return_type = opts[:debug_return_type] || 'TrackShipment200Response'
|
|
902
|
+
|
|
903
|
+
# auth_names
|
|
904
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
905
|
+
|
|
906
|
+
new_options = opts.merge(
|
|
907
|
+
:operation => :"ShipmentsApi.track_shipment",
|
|
908
|
+
:header_params => header_params,
|
|
909
|
+
:query_params => query_params,
|
|
910
|
+
:form_params => form_params,
|
|
911
|
+
:body => post_body,
|
|
912
|
+
:auth_names => auth_names,
|
|
913
|
+
:return_type => return_type
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
917
|
+
if @api_client.config.debugging
|
|
918
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#track_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
919
|
+
end
|
|
920
|
+
return data, status_code, headers
|
|
921
|
+
end
|
|
922
|
+
|
|
923
|
+
# Update shipment
|
|
924
|
+
# Update an existing shipment. Only draft, pending or error shipments can be updated; an applied shipping rule overrides carrier settings and sender party.
|
|
925
|
+
# @param org_id [String] Organization identifier.
|
|
926
|
+
# @param shipment_id [String] Shipment identifier.
|
|
927
|
+
# @param update_shipment_request [UpdateShipmentRequest]
|
|
928
|
+
# @param [Hash] opts the optional parameters
|
|
929
|
+
# @return [CreateShipment201Response]
|
|
930
|
+
def update_shipment(org_id, shipment_id, update_shipment_request, opts = {})
|
|
931
|
+
data, _status_code, _headers = update_shipment_with_http_info(org_id, shipment_id, update_shipment_request, opts)
|
|
932
|
+
data
|
|
933
|
+
end
|
|
934
|
+
|
|
935
|
+
# Update shipment
|
|
936
|
+
# Update an existing shipment. Only draft, pending or error shipments can be updated; an applied shipping rule overrides carrier settings and sender party.
|
|
937
|
+
# @param org_id [String] Organization identifier.
|
|
938
|
+
# @param shipment_id [String] Shipment identifier.
|
|
939
|
+
# @param update_shipment_request [UpdateShipmentRequest]
|
|
940
|
+
# @param [Hash] opts the optional parameters
|
|
941
|
+
# @return [Array<(CreateShipment201Response, Integer, Hash)>] CreateShipment201Response data, response status code and response headers
|
|
942
|
+
def update_shipment_with_http_info(org_id, shipment_id, update_shipment_request, opts = {})
|
|
943
|
+
if @api_client.config.debugging
|
|
944
|
+
@api_client.config.logger.debug 'Calling API: ShipmentsApi.update_shipment ...'
|
|
945
|
+
end
|
|
946
|
+
# verify the required parameter 'org_id' is set
|
|
947
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
|
948
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling ShipmentsApi.update_shipment"
|
|
949
|
+
end
|
|
950
|
+
# verify the required parameter 'shipment_id' is set
|
|
951
|
+
if @api_client.config.client_side_validation && shipment_id.nil?
|
|
952
|
+
fail ArgumentError, "Missing the required parameter 'shipment_id' when calling ShipmentsApi.update_shipment"
|
|
953
|
+
end
|
|
954
|
+
# verify the required parameter 'update_shipment_request' is set
|
|
955
|
+
if @api_client.config.client_side_validation && update_shipment_request.nil?
|
|
956
|
+
fail ArgumentError, "Missing the required parameter 'update_shipment_request' when calling ShipmentsApi.update_shipment"
|
|
957
|
+
end
|
|
958
|
+
# resource path
|
|
959
|
+
local_var_path = '/orgs/{orgId}/shipments/{shipmentId}'.sub('{orgId}', CGI.escape(org_id.to_s)).sub('{shipmentId}', CGI.escape(shipment_id.to_s))
|
|
960
|
+
|
|
961
|
+
# query parameters
|
|
962
|
+
query_params = opts[:query_params] || {}
|
|
963
|
+
|
|
964
|
+
# header parameters
|
|
965
|
+
header_params = opts[:header_params] || {}
|
|
966
|
+
# HTTP header 'Accept' (if needed)
|
|
967
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
968
|
+
# HTTP header 'Content-Type'
|
|
969
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
970
|
+
if !content_type.nil?
|
|
971
|
+
header_params['Content-Type'] = content_type
|
|
972
|
+
end
|
|
973
|
+
|
|
974
|
+
# form parameters
|
|
975
|
+
form_params = opts[:form_params] || {}
|
|
976
|
+
|
|
977
|
+
# http body (model)
|
|
978
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_shipment_request)
|
|
979
|
+
|
|
980
|
+
# return_type
|
|
981
|
+
return_type = opts[:debug_return_type] || 'CreateShipment201Response'
|
|
982
|
+
|
|
983
|
+
# auth_names
|
|
984
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
985
|
+
|
|
986
|
+
new_options = opts.merge(
|
|
987
|
+
:operation => :"ShipmentsApi.update_shipment",
|
|
988
|
+
:header_params => header_params,
|
|
989
|
+
:query_params => query_params,
|
|
990
|
+
:form_params => form_params,
|
|
991
|
+
:body => post_body,
|
|
992
|
+
:auth_names => auth_names,
|
|
993
|
+
:return_type => return_type
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
997
|
+
if @api_client.config.debugging
|
|
998
|
+
@api_client.config.logger.debug "API called: ShipmentsApi#update_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
999
|
+
end
|
|
1000
|
+
return data, status_code, headers
|
|
1001
|
+
end
|
|
1002
|
+
end
|
|
1003
|
+
end
|