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,250 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zippendo
|
|
17
|
+
class CreateShipmentRequestCarrierSettings < ApiModelBase
|
|
18
|
+
# Identifier of the carrier to use.
|
|
19
|
+
attr_accessor :carrier_id
|
|
20
|
+
|
|
21
|
+
# Identifier of the carrier product/service.
|
|
22
|
+
attr_accessor :product_id
|
|
23
|
+
|
|
24
|
+
# Additional service codes requested from the carrier.
|
|
25
|
+
attr_accessor :services
|
|
26
|
+
|
|
27
|
+
# Carrier-specific extra parameters as key/value pairs.
|
|
28
|
+
attr_accessor :additional_parameters
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'carrier_id' => :'carrierId',
|
|
34
|
+
:'product_id' => :'productId',
|
|
35
|
+
:'services' => :'services',
|
|
36
|
+
:'additional_parameters' => :'additionalParameters'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'carrier_id' => :'String',
|
|
54
|
+
:'product_id' => :'String',
|
|
55
|
+
:'services' => :'Array<String>',
|
|
56
|
+
:'additional_parameters' => :'Hash<String, CreateShippingRuleRequestAdditionalParametersAnyOfValue>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::CreateShipmentRequestCarrierSettings` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::CreateShipmentRequestCarrierSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'carrier_id')
|
|
83
|
+
self.carrier_id = attributes[:'carrier_id']
|
|
84
|
+
else
|
|
85
|
+
self.carrier_id = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'product_id')
|
|
89
|
+
self.product_id = attributes[:'product_id']
|
|
90
|
+
else
|
|
91
|
+
self.product_id = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'services')
|
|
95
|
+
if (value = attributes[:'services']).is_a?(Array)
|
|
96
|
+
self.services = value
|
|
97
|
+
end
|
|
98
|
+
else
|
|
99
|
+
self.services = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'additional_parameters')
|
|
103
|
+
if (value = attributes[:'additional_parameters']).is_a?(Hash)
|
|
104
|
+
self.additional_parameters = value
|
|
105
|
+
end
|
|
106
|
+
else
|
|
107
|
+
self.additional_parameters = nil
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if @carrier_id.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "carrier_id", carrier_id cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @product_id.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @services.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "services", services cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @additional_parameters.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "additional_parameters", additional_parameters cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @carrier_id.nil?
|
|
140
|
+
return false if @product_id.nil?
|
|
141
|
+
return false if @services.nil?
|
|
142
|
+
return false if @additional_parameters.nil?
|
|
143
|
+
true
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] carrier_id Value to be assigned
|
|
148
|
+
def carrier_id=(carrier_id)
|
|
149
|
+
if carrier_id.nil?
|
|
150
|
+
fail ArgumentError, 'carrier_id cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@carrier_id = carrier_id
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] product_id Value to be assigned
|
|
158
|
+
def product_id=(product_id)
|
|
159
|
+
if product_id.nil?
|
|
160
|
+
fail ArgumentError, 'product_id cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@product_id = product_id
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] services Value to be assigned
|
|
168
|
+
def services=(services)
|
|
169
|
+
if services.nil?
|
|
170
|
+
fail ArgumentError, 'services cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
@services = services
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] additional_parameters Value to be assigned
|
|
178
|
+
def additional_parameters=(additional_parameters)
|
|
179
|
+
if additional_parameters.nil?
|
|
180
|
+
fail ArgumentError, 'additional_parameters cannot be nil'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@additional_parameters = additional_parameters
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Checks equality by comparing each attribute.
|
|
187
|
+
# @param [Object] Object to be compared
|
|
188
|
+
def ==(o)
|
|
189
|
+
return true if self.equal?(o)
|
|
190
|
+
self.class == o.class &&
|
|
191
|
+
carrier_id == o.carrier_id &&
|
|
192
|
+
product_id == o.product_id &&
|
|
193
|
+
services == o.services &&
|
|
194
|
+
additional_parameters == o.additional_parameters
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# @see the `==` method
|
|
198
|
+
# @param [Object] Object to be compared
|
|
199
|
+
def eql?(o)
|
|
200
|
+
self == o
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Calculates hash code according to all attributes.
|
|
204
|
+
# @return [Integer] Hash code
|
|
205
|
+
def hash
|
|
206
|
+
[carrier_id, product_id, services, additional_parameters].hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Builds the object from hash
|
|
210
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
211
|
+
# @return [Object] Returns the model itself
|
|
212
|
+
def self.build_from_hash(attributes)
|
|
213
|
+
return nil unless attributes.is_a?(Hash)
|
|
214
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
215
|
+
transformed_hash = {}
|
|
216
|
+
openapi_types.each_pair do |key, type|
|
|
217
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = nil
|
|
219
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
220
|
+
# check to ensure the input is an array given that the attribute
|
|
221
|
+
# is documented as an array but the input is not
|
|
222
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
223
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
224
|
+
end
|
|
225
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
226
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
new(transformed_hash)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Returns the object in the form of hash
|
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
|
234
|
+
def to_hash
|
|
235
|
+
hash = {}
|
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
237
|
+
value = self.send(attr)
|
|
238
|
+
if value.nil?
|
|
239
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
240
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
hash[param] = _to_hash(value)
|
|
244
|
+
end
|
|
245
|
+
hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
@@ -0,0 +1,356 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zippendo
|
|
17
|
+
class CreateShipmentRequestParcelsInner < ApiModelBase
|
|
18
|
+
# Unique parcel identifier.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Parcel weight in the given weight unit.
|
|
22
|
+
attr_accessor :weight
|
|
23
|
+
|
|
24
|
+
# Unit of measurement for parcel weight.
|
|
25
|
+
attr_accessor :weight_unit
|
|
26
|
+
|
|
27
|
+
attr_accessor :dimensions
|
|
28
|
+
|
|
29
|
+
# Order lines contained in this parcel.
|
|
30
|
+
attr_accessor :order_lines
|
|
31
|
+
|
|
32
|
+
# Carrier tracking number for this parcel.
|
|
33
|
+
attr_accessor :tracking_number
|
|
34
|
+
|
|
35
|
+
# Public carrier tracking URL for this parcel.
|
|
36
|
+
attr_accessor :tracking_url
|
|
37
|
+
|
|
38
|
+
# Label-free drop-off code for the parcel.
|
|
39
|
+
attr_accessor :label_free_code
|
|
40
|
+
|
|
41
|
+
# DEPRECATED — use `qrCodeDataUri` (embeddable data URI) or `qrCodeUrl` (hosted link). Catch-all that carries whichever applies, kept populated for backwards compatibility during the migration and until it is disabled.
|
|
42
|
+
attr_accessor :qr_code_link
|
|
43
|
+
|
|
44
|
+
# Embeddable `data:` URI of the QR code image for label-free drop-off — base64 image bytes you can drop straight into an <img>/email. Null when the carrier returns a hosted link instead (see `qrCodeUrl`).
|
|
45
|
+
attr_accessor :qr_code_data_uri
|
|
46
|
+
|
|
47
|
+
# Carrier-hosted URL of the QR code image for label-free drop-off, returned by carriers (e.g. Bring) that link to the image rather than embedding it. Null when the carrier returns embeddable bytes (see `qrCodeDataUri`).
|
|
48
|
+
attr_accessor :qr_code_url
|
|
49
|
+
|
|
50
|
+
class EnumAttributeValidator
|
|
51
|
+
attr_reader :datatype
|
|
52
|
+
attr_reader :allowable_values
|
|
53
|
+
|
|
54
|
+
def initialize(datatype, allowable_values)
|
|
55
|
+
@allowable_values = allowable_values.map do |value|
|
|
56
|
+
case datatype.to_s
|
|
57
|
+
when /Integer/i
|
|
58
|
+
value.to_i
|
|
59
|
+
when /Float/i
|
|
60
|
+
value.to_f
|
|
61
|
+
else
|
|
62
|
+
value
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def valid?(value)
|
|
68
|
+
!value || allowable_values.include?(value)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
73
|
+
def self.attribute_map
|
|
74
|
+
{
|
|
75
|
+
:'id' => :'id',
|
|
76
|
+
:'weight' => :'weight',
|
|
77
|
+
:'weight_unit' => :'weightUnit',
|
|
78
|
+
:'dimensions' => :'dimensions',
|
|
79
|
+
:'order_lines' => :'orderLines',
|
|
80
|
+
:'tracking_number' => :'trackingNumber',
|
|
81
|
+
:'tracking_url' => :'trackingUrl',
|
|
82
|
+
:'label_free_code' => :'labelFreeCode',
|
|
83
|
+
:'qr_code_link' => :'qrCodeLink',
|
|
84
|
+
:'qr_code_data_uri' => :'qrCodeDataUri',
|
|
85
|
+
:'qr_code_url' => :'qrCodeUrl'
|
|
86
|
+
}
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Returns attribute mapping this model knows about
|
|
90
|
+
def self.acceptable_attribute_map
|
|
91
|
+
attribute_map
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Returns all the JSON keys this model knows about
|
|
95
|
+
def self.acceptable_attributes
|
|
96
|
+
acceptable_attribute_map.values
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Attribute type mapping.
|
|
100
|
+
def self.openapi_types
|
|
101
|
+
{
|
|
102
|
+
:'id' => :'String',
|
|
103
|
+
:'weight' => :'Float',
|
|
104
|
+
:'weight_unit' => :'String',
|
|
105
|
+
:'dimensions' => :'CreateShipmentRequestParcelsInnerDimensions',
|
|
106
|
+
:'order_lines' => :'Array<CreateShipmentRequestParcelsInnerOrderLinesInner>',
|
|
107
|
+
:'tracking_number' => :'String',
|
|
108
|
+
:'tracking_url' => :'String',
|
|
109
|
+
:'label_free_code' => :'String',
|
|
110
|
+
:'qr_code_link' => :'String',
|
|
111
|
+
:'qr_code_data_uri' => :'String',
|
|
112
|
+
:'qr_code_url' => :'String'
|
|
113
|
+
}
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# List of attributes with nullable: true
|
|
117
|
+
def self.openapi_nullable
|
|
118
|
+
Set.new([
|
|
119
|
+
:'tracking_number',
|
|
120
|
+
:'tracking_url',
|
|
121
|
+
:'label_free_code',
|
|
122
|
+
:'qr_code_link',
|
|
123
|
+
:'qr_code_data_uri',
|
|
124
|
+
:'qr_code_url'
|
|
125
|
+
])
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Initializes the object
|
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
+
def initialize(attributes = {})
|
|
131
|
+
if (!attributes.is_a?(Hash))
|
|
132
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::CreateShipmentRequestParcelsInner` initialize method"
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
136
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
137
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
138
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
139
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::CreateShipmentRequestParcelsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
140
|
+
end
|
|
141
|
+
h[k.to_sym] = v
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'id')
|
|
145
|
+
self.id = attributes[:'id']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'weight')
|
|
149
|
+
self.weight = attributes[:'weight']
|
|
150
|
+
else
|
|
151
|
+
self.weight = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'weight_unit')
|
|
155
|
+
self.weight_unit = attributes[:'weight_unit']
|
|
156
|
+
else
|
|
157
|
+
self.weight_unit = nil
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'dimensions')
|
|
161
|
+
self.dimensions = attributes[:'dimensions']
|
|
162
|
+
else
|
|
163
|
+
self.dimensions = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'order_lines')
|
|
167
|
+
if (value = attributes[:'order_lines']).is_a?(Array)
|
|
168
|
+
self.order_lines = value
|
|
169
|
+
end
|
|
170
|
+
else
|
|
171
|
+
self.order_lines = nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'tracking_number')
|
|
175
|
+
self.tracking_number = attributes[:'tracking_number']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'tracking_url')
|
|
179
|
+
self.tracking_url = attributes[:'tracking_url']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'label_free_code')
|
|
183
|
+
self.label_free_code = attributes[:'label_free_code']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'qr_code_link')
|
|
187
|
+
self.qr_code_link = attributes[:'qr_code_link']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'qr_code_data_uri')
|
|
191
|
+
self.qr_code_data_uri = attributes[:'qr_code_data_uri']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'qr_code_url')
|
|
195
|
+
self.qr_code_url = attributes[:'qr_code_url']
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
200
|
+
# @return Array for valid properties with the reasons
|
|
201
|
+
def list_invalid_properties
|
|
202
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
203
|
+
invalid_properties = Array.new
|
|
204
|
+
if @weight.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "weight", weight cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @weight < 0
|
|
209
|
+
invalid_properties.push('invalid value for "weight", must be greater than or equal to 0.')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if @weight_unit.nil?
|
|
213
|
+
invalid_properties.push('invalid value for "weight_unit", weight_unit cannot be nil.')
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if @dimensions.nil?
|
|
217
|
+
invalid_properties.push('invalid value for "dimensions", dimensions cannot be nil.')
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if @order_lines.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "order_lines", order_lines cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
invalid_properties
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Check to see if the all the properties in the model are valid
|
|
228
|
+
# @return true if the model is valid
|
|
229
|
+
def valid?
|
|
230
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
231
|
+
return false if @weight.nil?
|
|
232
|
+
return false if @weight < 0
|
|
233
|
+
return false if @weight_unit.nil?
|
|
234
|
+
weight_unit_validator = EnumAttributeValidator.new('String', ["kg", "g", "lb", "oz"])
|
|
235
|
+
return false unless weight_unit_validator.valid?(@weight_unit)
|
|
236
|
+
return false if @dimensions.nil?
|
|
237
|
+
return false if @order_lines.nil?
|
|
238
|
+
true
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Custom attribute writer method with validation
|
|
242
|
+
# @param [Object] weight Value to be assigned
|
|
243
|
+
def weight=(weight)
|
|
244
|
+
if weight.nil?
|
|
245
|
+
fail ArgumentError, 'weight cannot be nil'
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if weight < 0
|
|
249
|
+
fail ArgumentError, 'invalid value for "weight", must be greater than or equal to 0.'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
@weight = weight
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
256
|
+
# @param [Object] weight_unit Object to be assigned
|
|
257
|
+
def weight_unit=(weight_unit)
|
|
258
|
+
validator = EnumAttributeValidator.new('String', ["kg", "g", "lb", "oz"])
|
|
259
|
+
unless validator.valid?(weight_unit)
|
|
260
|
+
fail ArgumentError, "invalid value for \"weight_unit\", must be one of #{validator.allowable_values}."
|
|
261
|
+
end
|
|
262
|
+
@weight_unit = weight_unit
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Custom attribute writer method with validation
|
|
266
|
+
# @param [Object] dimensions Value to be assigned
|
|
267
|
+
def dimensions=(dimensions)
|
|
268
|
+
if dimensions.nil?
|
|
269
|
+
fail ArgumentError, 'dimensions cannot be nil'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@dimensions = dimensions
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Custom attribute writer method with validation
|
|
276
|
+
# @param [Object] order_lines Value to be assigned
|
|
277
|
+
def order_lines=(order_lines)
|
|
278
|
+
if order_lines.nil?
|
|
279
|
+
fail ArgumentError, 'order_lines cannot be nil'
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
@order_lines = order_lines
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Checks equality by comparing each attribute.
|
|
286
|
+
# @param [Object] Object to be compared
|
|
287
|
+
def ==(o)
|
|
288
|
+
return true if self.equal?(o)
|
|
289
|
+
self.class == o.class &&
|
|
290
|
+
id == o.id &&
|
|
291
|
+
weight == o.weight &&
|
|
292
|
+
weight_unit == o.weight_unit &&
|
|
293
|
+
dimensions == o.dimensions &&
|
|
294
|
+
order_lines == o.order_lines &&
|
|
295
|
+
tracking_number == o.tracking_number &&
|
|
296
|
+
tracking_url == o.tracking_url &&
|
|
297
|
+
label_free_code == o.label_free_code &&
|
|
298
|
+
qr_code_link == o.qr_code_link &&
|
|
299
|
+
qr_code_data_uri == o.qr_code_data_uri &&
|
|
300
|
+
qr_code_url == o.qr_code_url
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# @see the `==` method
|
|
304
|
+
# @param [Object] Object to be compared
|
|
305
|
+
def eql?(o)
|
|
306
|
+
self == o
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Calculates hash code according to all attributes.
|
|
310
|
+
# @return [Integer] Hash code
|
|
311
|
+
def hash
|
|
312
|
+
[id, weight, weight_unit, dimensions, order_lines, tracking_number, tracking_url, label_free_code, qr_code_link, qr_code_data_uri, qr_code_url].hash
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Builds the object from hash
|
|
316
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
317
|
+
# @return [Object] Returns the model itself
|
|
318
|
+
def self.build_from_hash(attributes)
|
|
319
|
+
return nil unless attributes.is_a?(Hash)
|
|
320
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
321
|
+
transformed_hash = {}
|
|
322
|
+
openapi_types.each_pair do |key, type|
|
|
323
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
324
|
+
transformed_hash["#{key}"] = nil
|
|
325
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
326
|
+
# check to ensure the input is an array given that the attribute
|
|
327
|
+
# is documented as an array but the input is not
|
|
328
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
329
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
330
|
+
end
|
|
331
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
332
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
new(transformed_hash)
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# Returns the object in the form of hash
|
|
339
|
+
# @return [Hash] Returns the object in the form of hash
|
|
340
|
+
def to_hash
|
|
341
|
+
hash = {}
|
|
342
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
343
|
+
value = self.send(attr)
|
|
344
|
+
if value.nil?
|
|
345
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
346
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
hash[param] = _to_hash(value)
|
|
350
|
+
end
|
|
351
|
+
hash
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
end
|