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.
Files changed (480) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE.md +21 -0
  4. data/README.md +99 -0
  5. data/Rakefile +10 -0
  6. data/docs/AddressesApi.md +375 -0
  7. data/docs/BatchSendShipments200Response.md +20 -0
  8. data/docs/BatchSendShipments200ResponseResultsInner.md +26 -0
  9. data/docs/BatchSendShipments200ResponseSummary.md +22 -0
  10. data/docs/BatchSendShipmentsRequest.md +18 -0
  11. data/docs/BatchSplitShipment201Response.md +20 -0
  12. data/docs/BatchSplitShipmentRequest.md +28 -0
  13. data/docs/BatchSplitShipmentRequestShipmentsInner.md +20 -0
  14. data/docs/BatchSplitShipmentRequestShipmentsInnerOrderLinesInner.md +20 -0
  15. data/docs/BillingApi.md +77 -0
  16. data/docs/CarrierCatalogApi.md +77 -0
  17. data/docs/CarriersApi.md +521 -0
  18. data/docs/ConnectCarrierRequest.md +22 -0
  19. data/docs/CreateAddressRequest.md +40 -0
  20. data/docs/CreateApiToken201Response.md +32 -0
  21. data/docs/CreateApiTokenRequest.md +22 -0
  22. data/docs/CreateOrder201Response.md +52 -0
  23. data/docs/CreateOrder201ResponseOrderLinesInner.md +54 -0
  24. data/docs/CreateOrder201ResponseShippingAddress.md +42 -0
  25. data/docs/CreateOrderRequest.md +40 -0
  26. data/docs/CreateOrderRequestOrderLinesInner.md +54 -0
  27. data/docs/CreateOrderRequestShippingAddress.md +42 -0
  28. data/docs/CreateOrgWebhook201Response.md +32 -0
  29. data/docs/CreateOrgWebhookRequest.md +24 -0
  30. data/docs/CreateShipment201Response.md +64 -0
  31. data/docs/CreateShipment201ResponseActivitiesInner.md +26 -0
  32. data/docs/CreateShipment201ResponseDocumentsInner.md +32 -0
  33. data/docs/CreateShipment201ResponseErrorsInner.md +26 -0
  34. data/docs/CreateShipment201ResponseLogsInner.md +32 -0
  35. data/docs/CreateShipment201ResponseParcelsInner.md +38 -0
  36. data/docs/CreateShipment201ResponseParcelsInnerDimensions.md +22 -0
  37. data/docs/CreateShipment201ResponseParcelsInnerOrderLinesInner.md +36 -0
  38. data/docs/CreateShipment201ResponsePartiesInner.md +38 -0
  39. data/docs/CreateShipment201ResponsePartiesInnerAttributesInner.md +20 -0
  40. data/docs/CreateShipment201ResponsePickupDetails.md +24 -0
  41. data/docs/CreateShipment201ResponseShippingRule.md +40 -0
  42. data/docs/CreateShipment201ResponseTracking.md +28 -0
  43. data/docs/CreateShipmentRequest.md +42 -0
  44. data/docs/CreateShipmentRequestCarrierSettings.md +24 -0
  45. data/docs/CreateShipmentRequestParcelsInner.md +38 -0
  46. data/docs/CreateShipmentRequestParcelsInnerDimensions.md +22 -0
  47. data/docs/CreateShipmentRequestParcelsInnerOrderLinesInner.md +36 -0
  48. data/docs/CreateShipmentRequestPartiesInner.md +38 -0
  49. data/docs/CreateShipmentRequestPartiesInnerAttributesInner.md +20 -0
  50. data/docs/CreateShipmentRequestPickupDetails.md +24 -0
  51. data/docs/CreateShippingQuote200Response.md +18 -0
  52. data/docs/CreateShippingQuote200ResponseRatesInner.md +38 -0
  53. data/docs/CreateShippingQuote400Response.md +20 -0
  54. data/docs/CreateShippingQuote404Response.md +20 -0
  55. data/docs/CreateShippingQuoteRequest.md +24 -0
  56. data/docs/CreateShippingQuoteRequestDestination.md +28 -0
  57. data/docs/CreateShippingQuoteRequestItemsInner.md +30 -0
  58. data/docs/CreateShippingRule201Response.md +74 -0
  59. data/docs/CreateShippingRuleRequest.md +66 -0
  60. data/docs/CreateShippingRuleRequestAdditionalParameters.md +15 -0
  61. data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfInner.md +20 -0
  62. data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfValue.md +24 -0
  63. data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfValueAnyOf.md +24 -0
  64. data/docs/CreateShippingRuleRequestAdditionalParametersAnyOfValueAnyOfCoordinatesInner.md +15 -0
  65. data/docs/CreateShippingRuleRequestConditionsInner.md +55 -0
  66. data/docs/CreateShippingRuleRequestConditionsInnerOneOf.md +26 -0
  67. data/docs/CreateShippingRuleRequestConditionsInnerOneOf1.md +28 -0
  68. data/docs/CreateShippingRuleRequestConditionsInnerOneOf2.md +28 -0
  69. data/docs/CreateShippingRuleRequestConditionsInnerOneOf3.md +26 -0
  70. data/docs/CreateShippingRuleRequestConditionsInnerOneOf4.md +22 -0
  71. data/docs/DeleteOrgWebhook200Response.md +18 -0
  72. data/docs/DeleteShippingRule200Response.md +18 -0
  73. data/docs/GetBillingUsage200Response.md +24 -0
  74. data/docs/GetBillingUsage200ResponseAddOnsInner.md +24 -0
  75. data/docs/GetBillingUsage200ResponseCurrentPeriod.md +20 -0
  76. data/docs/GetBillingUsage200ResponseLimits.md +30 -0
  77. data/docs/GetBillingUsage200ResponseLimitsTeamMembers.md +20 -0
  78. data/docs/GetBillingUsage200ResponseShipments.md +24 -0
  79. data/docs/GetOrder200Response.md +58 -0
  80. data/docs/GetOrder200ResponseShipmentsInner.md +36 -0
  81. data/docs/GetOrder200ResponseShippingRule.md +40 -0
  82. data/docs/GetOrg200Response.md +50 -0
  83. data/docs/GetOrg200ResponseCount.md +18 -0
  84. data/docs/GetOrgBranding200Response.md +22 -0
  85. data/docs/HealthCheck200Response.md +22 -0
  86. data/docs/ListAddresses200Response.md +26 -0
  87. data/docs/ListAddresses200ResponseDataInner.md +48 -0
  88. data/docs/ListApiTokens200Response.md +26 -0
  89. data/docs/ListApiTokens200ResponseDataInner.md +32 -0
  90. data/docs/ListApiTokens200ResponseDataInnerCreatedBy.md +22 -0
  91. data/docs/ListApiTokens401Response.md +22 -0
  92. data/docs/ListAvailableCarriers200ResponseInner.md +38 -0
  93. data/docs/ListAvailableCarriers200ResponseInnerRequiredFieldsInner.md +28 -0
  94. data/docs/ListCarrierProductServicePoints200ResponseInner.md +32 -0
  95. data/docs/ListCarrierProductServicePoints200ResponseInnerAddress.md +28 -0
  96. data/docs/ListCarrierProductServicePointsRequest.md +28 -0
  97. data/docs/ListCarrierProducts200ResponseInner.md +38 -0
  98. data/docs/ListCarrierProducts200ResponseInnerAdditionalParametersInner.md +30 -0
  99. data/docs/ListCarrierProducts200ResponseInnerAdditionalParametersInnerOptionsInner.md +22 -0
  100. data/docs/ListCarrierProducts200ResponseInnerServicesInner.md +20 -0
  101. data/docs/ListCarrierProducts200ResponseInnerWeightLimits.md +22 -0
  102. data/docs/ListCarriers200Response.md +26 -0
  103. data/docs/ListCarriers200ResponseDataInner.md +38 -0
  104. data/docs/ListCarriers200ResponseDataInnerConfigValue.md +15 -0
  105. data/docs/ListOrders200Response.md +26 -0
  106. data/docs/ListOrders200ResponseDataInner.md +40 -0
  107. data/docs/ListOrders200ResponseDataInnerOrderChannel.md +22 -0
  108. data/docs/ListOrgWebhookDeliveries200Response.md +26 -0
  109. data/docs/ListOrgWebhookDeliveries200ResponseDataInner.md +38 -0
  110. data/docs/ListOrgWebhooks200Response.md +26 -0
  111. data/docs/ListOrgWebhooks200ResponseDataInner.md +30 -0
  112. data/docs/ListShipments200Response.md +26 -0
  113. data/docs/ListShipments200ResponseDataInner.md +32 -0
  114. data/docs/ListShipments200ResponseDataInnerAddress.md +48 -0
  115. data/docs/ListShipments200ResponseDataInnerCarrierSettings.md +24 -0
  116. data/docs/ListShipments200ResponseDataInnerCarrierSettingsAdditionalParametersValue.md +24 -0
  117. data/docs/ListShipments200ResponseDataInnerCarrierSettingsAdditionalParametersValueAnyOf.md +24 -0
  118. data/docs/ListShippingRules200Response.md +26 -0
  119. data/docs/ListShippingRules200ResponseDataInner.md +84 -0
  120. data/docs/ListShippingRules200ResponseDataInnerAdditionalParametersInner.md +20 -0
  121. data/docs/ListShippingRules200ResponseDataInnerCarrier.md +30 -0
  122. data/docs/ListShippingRules200ResponseDataInnerConditionsInner.md +55 -0
  123. data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf.md +26 -0
  124. data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf1.md +28 -0
  125. data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf2.md +28 -0
  126. data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf3.md +26 -0
  127. data/docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf4.md +22 -0
  128. data/docs/ListShippingRules200ResponseDataInnerLabelPrinter.md +20 -0
  129. data/docs/ListShippingRules200ResponseDataInnerReturnShippingRule.md +20 -0
  130. data/docs/OrdersApi.md +379 -0
  131. data/docs/OrgsApi.md +503 -0
  132. data/docs/QuotesApi.md +79 -0
  133. data/docs/RevokeApiToken200Response.md +18 -0
  134. data/docs/RulesApi.md +373 -0
  135. data/docs/SendShipment422Response.md +24 -0
  136. data/docs/SendShipment422ResponseErrorsInner.md +20 -0
  137. data/docs/ShipmentsApi.md +962 -0
  138. data/docs/SplitShipment201Response.md +20 -0
  139. data/docs/SplitShipmentParcel200Response.md +18 -0
  140. data/docs/SplitShipmentParcelRequest.md +18 -0
  141. data/docs/SplitShipmentParcelRequestParcelsInner.md +20 -0
  142. data/docs/SplitShipmentRequest.md +30 -0
  143. data/docs/SystemApi.md +74 -0
  144. data/docs/TestOrgWebhook200Response.md +18 -0
  145. data/docs/TokensApi.md +443 -0
  146. data/docs/TrackShipment200Response.md +26 -0
  147. data/docs/TrackShipment200ResponseEventsInner.md +28 -0
  148. data/docs/UpdateAddressRequest.md +40 -0
  149. data/docs/UpdateApiTokenRequest.md +18 -0
  150. data/docs/UpdateCarrierRequest.md +22 -0
  151. data/docs/UpdateOrderRequest.md +38 -0
  152. data/docs/UpdateOrg200Response.md +48 -0
  153. data/docs/UpdateOrgBrandingRequest.md +20 -0
  154. data/docs/UpdateOrgRequest.md +44 -0
  155. data/docs/UpdateOrgWebhookRequest.md +24 -0
  156. data/docs/UpdateShipmentRequest.md +44 -0
  157. data/docs/UpdateShippingRuleRequest.md +66 -0
  158. data/docs/VerifyApiToken200Response.md +28 -0
  159. data/docs/VerifyApiTokenRequest.md +18 -0
  160. data/docs/WebhooksApi.md +523 -0
  161. data/git_push.sh +57 -0
  162. data/lib/zippendo/api/addresses_api.rb +406 -0
  163. data/lib/zippendo/api/billing_api.rb +85 -0
  164. data/lib/zippendo/api/carrier_catalog_api.rb +85 -0
  165. data/lib/zippendo/api/carriers_api.rb +554 -0
  166. data/lib/zippendo/api/orders_api.rb +412 -0
  167. data/lib/zippendo/api/orgs_api.rb +497 -0
  168. data/lib/zippendo/api/quotes_api.rb +96 -0
  169. data/lib/zippendo/api/rules_api.rb +399 -0
  170. data/lib/zippendo/api/shipments_api.rb +1003 -0
  171. data/lib/zippendo/api/system_api.rb +79 -0
  172. data/lib/zippendo/api/tokens_api.rb +467 -0
  173. data/lib/zippendo/api/webhooks_api.rb +559 -0
  174. data/lib/zippendo/api_client.rb +397 -0
  175. data/lib/zippendo/api_error.rb +58 -0
  176. data/lib/zippendo/api_model_base.rb +88 -0
  177. data/lib/zippendo/configuration.rb +309 -0
  178. data/lib/zippendo/models/batch_send_shipments200_response.rb +193 -0
  179. data/lib/zippendo/models/batch_send_shipments200_response_results_inner.rb +260 -0
  180. data/lib/zippendo/models/batch_send_shipments200_response_summary.rb +274 -0
  181. data/lib/zippendo/models/batch_send_shipments_request.rb +185 -0
  182. data/lib/zippendo/models/batch_split_shipment201_response.rb +193 -0
  183. data/lib/zippendo/models/batch_split_shipment_request.rb +247 -0
  184. data/lib/zippendo/models/batch_split_shipment_request_shipments_inner.rb +186 -0
  185. data/lib/zippendo/models/batch_split_shipment_request_shipments_inner_order_lines_inner.rb +210 -0
  186. data/lib/zippendo/models/connect_carrier_request.rb +239 -0
  187. data/lib/zippendo/models/create_address_request.rb +508 -0
  188. data/lib/zippendo/models/create_api_token201_response.rb +328 -0
  189. data/lib/zippendo/models/create_api_token_request.rb +267 -0
  190. data/lib/zippendo/models/create_order201_response.rb +491 -0
  191. data/lib/zippendo/models/create_order201_response_order_lines_inner.rb +533 -0
  192. data/lib/zippendo/models/create_order201_response_shipping_address.rb +433 -0
  193. data/lib/zippendo/models/create_order_request.rb +410 -0
  194. data/lib/zippendo/models/create_order_request_order_lines_inner.rb +533 -0
  195. data/lib/zippendo/models/create_order_request_shipping_address.rb +433 -0
  196. data/lib/zippendo/models/create_org_webhook201_response.rb +356 -0
  197. data/lib/zippendo/models/create_org_webhook_request.rb +268 -0
  198. data/lib/zippendo/models/create_shipment201_response.rb +659 -0
  199. data/lib/zippendo/models/create_shipment201_response_activities_inner.rb +281 -0
  200. data/lib/zippendo/models/create_shipment201_response_documents_inner.rb +382 -0
  201. data/lib/zippendo/models/create_shipment201_response_errors_inner.rb +257 -0
  202. data/lib/zippendo/models/create_shipment201_response_logs_inner.rb +300 -0
  203. data/lib/zippendo/models/create_shipment201_response_parcels_inner.rb +356 -0
  204. data/lib/zippendo/models/create_shipment201_response_parcels_inner_dimensions.rb +246 -0
  205. data/lib/zippendo/models/create_shipment201_response_parcels_inner_order_lines_inner.rb +402 -0
  206. data/lib/zippendo/models/create_shipment201_response_parties_inner.rb +468 -0
  207. data/lib/zippendo/models/create_shipment201_response_parties_inner_attributes_inner.rb +210 -0
  208. data/lib/zippendo/models/create_shipment201_response_pickup_details.rb +229 -0
  209. data/lib/zippendo/models/create_shipment201_response_shipping_rule.rb +365 -0
  210. data/lib/zippendo/models/create_shipment201_response_tracking.rb +204 -0
  211. data/lib/zippendo/models/create_shipment_request.rb +407 -0
  212. data/lib/zippendo/models/create_shipment_request_carrier_settings.rb +250 -0
  213. data/lib/zippendo/models/create_shipment_request_parcels_inner.rb +356 -0
  214. data/lib/zippendo/models/create_shipment_request_parcels_inner_dimensions.rb +246 -0
  215. data/lib/zippendo/models/create_shipment_request_parcels_inner_order_lines_inner.rb +402 -0
  216. data/lib/zippendo/models/create_shipment_request_parties_inner.rb +451 -0
  217. data/lib/zippendo/models/create_shipment_request_parties_inner_attributes_inner.rb +210 -0
  218. data/lib/zippendo/models/create_shipment_request_pickup_details.rb +229 -0
  219. data/lib/zippendo/models/create_shipping_quote200_response.rb +167 -0
  220. data/lib/zippendo/models/create_shipping_quote200_response_rates_inner.rb +333 -0
  221. data/lib/zippendo/models/create_shipping_quote400_response.rb +192 -0
  222. data/lib/zippendo/models/create_shipping_quote404_response.rb +192 -0
  223. data/lib/zippendo/models/create_shipping_quote_request.rb +276 -0
  224. data/lib/zippendo/models/create_shipping_quote_request_destination.rb +233 -0
  225. data/lib/zippendo/models/create_shipping_quote_request_items_inner.rb +315 -0
  226. data/lib/zippendo/models/create_shipping_rule201_response.rb +910 -0
  227. data/lib/zippendo/models/create_shipping_rule_request.rb +640 -0
  228. data/lib/zippendo/models/create_shipping_rule_request_additional_parameters.rb +104 -0
  229. data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_inner.rb +201 -0
  230. data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_value.rb +105 -0
  231. data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of.rb +259 -0
  232. data/lib/zippendo/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of_coordinates_inner.rb +102 -0
  233. data/lib/zippendo/models/create_shipping_rule_request_conditions_inner.rb +107 -0
  234. data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of.rb +342 -0
  235. data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of1.rb +359 -0
  236. data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of2.rb +366 -0
  237. data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of3.rb +344 -0
  238. data/lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of4.rb +270 -0
  239. data/lib/zippendo/models/delete_org_webhook200_response.rb +165 -0
  240. data/lib/zippendo/models/delete_shipping_rule200_response.rb +165 -0
  241. data/lib/zippendo/models/get_billing_usage200_response.rb +245 -0
  242. data/lib/zippendo/models/get_billing_usage200_response_add_ons_inner.rb +270 -0
  243. data/lib/zippendo/models/get_billing_usage200_response_current_period.rb +192 -0
  244. data/lib/zippendo/models/get_billing_usage200_response_limits.rb +320 -0
  245. data/lib/zippendo/models/get_billing_usage200_response_limits_team_members.rb +192 -0
  246. data/lib/zippendo/models/get_billing_usage200_response_shipments.rb +246 -0
  247. data/lib/zippendo/models/get_order200_response.rb +555 -0
  248. data/lib/zippendo/models/get_order200_response_shipments_inner.rb +385 -0
  249. data/lib/zippendo/models/get_order200_response_shipping_rule.rb +365 -0
  250. data/lib/zippendo/models/get_org200_response.rb +440 -0
  251. data/lib/zippendo/models/get_org200_response_count.rb +165 -0
  252. data/lib/zippendo/models/get_org_branding200_response.rb +177 -0
  253. data/lib/zippendo/models/health_check200_response.rb +219 -0
  254. data/lib/zippendo/models/list_addresses200_response.rb +275 -0
  255. data/lib/zippendo/models/list_addresses200_response_data_inner.rb +553 -0
  256. data/lib/zippendo/models/list_api_tokens200_response.rb +275 -0
  257. data/lib/zippendo/models/list_api_tokens200_response_data_inner.rb +327 -0
  258. data/lib/zippendo/models/list_api_tokens200_response_data_inner_created_by.rb +205 -0
  259. data/lib/zippendo/models/list_api_tokens401_response.rb +236 -0
  260. data/lib/zippendo/models/list_available_carriers200_response_inner.rb +286 -0
  261. data/lib/zippendo/models/list_available_carriers200_response_inner_required_fields_inner.rb +292 -0
  262. data/lib/zippendo/models/list_carrier_product_service_points200_response_inner.rb +287 -0
  263. data/lib/zippendo/models/list_carrier_product_service_points200_response_inner_address.rb +314 -0
  264. data/lib/zippendo/models/list_carrier_product_service_points_request.rb +313 -0
  265. data/lib/zippendo/models/list_carrier_products200_response_inner.rb +398 -0
  266. data/lib/zippendo/models/list_carrier_products200_response_inner_additional_parameters_inner.rb +321 -0
  267. data/lib/zippendo/models/list_carrier_products200_response_inner_additional_parameters_inner_options_inner.rb +219 -0
  268. data/lib/zippendo/models/list_carrier_products200_response_inner_services_inner.rb +192 -0
  269. data/lib/zippendo/models/list_carrier_products200_response_inner_weight_limits.rb +244 -0
  270. data/lib/zippendo/models/list_carriers200_response.rb +275 -0
  271. data/lib/zippendo/models/list_carriers200_response_data_inner.rb +369 -0
  272. data/lib/zippendo/models/list_carriers200_response_data_inner_config_value.rb +104 -0
  273. data/lib/zippendo/models/list_orders200_response.rb +275 -0
  274. data/lib/zippendo/models/list_orders200_response_data_inner.rb +423 -0
  275. data/lib/zippendo/models/list_orders200_response_data_inner_order_channel.rb +244 -0
  276. data/lib/zippendo/models/list_org_webhook_deliveries200_response.rb +275 -0
  277. data/lib/zippendo/models/list_org_webhook_deliveries200_response_data_inner.rb +365 -0
  278. data/lib/zippendo/models/list_org_webhooks200_response.rb +275 -0
  279. data/lib/zippendo/models/list_org_webhooks200_response_data_inner.rb +329 -0
  280. data/lib/zippendo/models/list_shipments200_response.rb +275 -0
  281. data/lib/zippendo/models/list_shipments200_response_data_inner.rb +362 -0
  282. data/lib/zippendo/models/list_shipments200_response_data_inner_address.rb +553 -0
  283. data/lib/zippendo/models/list_shipments200_response_data_inner_carrier_settings.rb +250 -0
  284. data/lib/zippendo/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value.rb +105 -0
  285. data/lib/zippendo/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value_any_of.rb +259 -0
  286. data/lib/zippendo/models/list_shipping_rules200_response.rb +275 -0
  287. data/lib/zippendo/models/list_shipping_rules200_response_data_inner.rb +992 -0
  288. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_additional_parameters_inner.rb +201 -0
  289. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_carrier.rb +329 -0
  290. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner.rb +107 -0
  291. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of.rb +342 -0
  292. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of1.rb +364 -0
  293. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of2.rb +371 -0
  294. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of3.rb +344 -0
  295. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of4.rb +270 -0
  296. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_label_printer.rb +192 -0
  297. data/lib/zippendo/models/list_shipping_rules200_response_data_inner_return_shipping_rule.rb +192 -0
  298. data/lib/zippendo/models/revoke_api_token200_response.rb +165 -0
  299. data/lib/zippendo/models/send_shipment422_response.rb +265 -0
  300. data/lib/zippendo/models/send_shipment422_response_errors_inner.rb +175 -0
  301. data/lib/zippendo/models/split_shipment201_response.rb +190 -0
  302. data/lib/zippendo/models/split_shipment_parcel200_response.rb +164 -0
  303. data/lib/zippendo/models/split_shipment_parcel_request.rb +176 -0
  304. data/lib/zippendo/models/split_shipment_parcel_request_parcels_inner.rb +186 -0
  305. data/lib/zippendo/models/split_shipment_request.rb +231 -0
  306. data/lib/zippendo/models/test_org_webhook200_response.rb +165 -0
  307. data/lib/zippendo/models/track_shipment200_response.rb +251 -0
  308. data/lib/zippendo/models/track_shipment200_response_events_inner.rb +296 -0
  309. data/lib/zippendo/models/update_address_request.rb +471 -0
  310. data/lib/zippendo/models/update_api_token_request.rb +183 -0
  311. data/lib/zippendo/models/update_carrier_request.rb +208 -0
  312. data/lib/zippendo/models/update_order_request.rb +400 -0
  313. data/lib/zippendo/models/update_org200_response.rb +414 -0
  314. data/lib/zippendo/models/update_org_branding_request.rb +194 -0
  315. data/lib/zippendo/models/update_org_request.rb +389 -0
  316. data/lib/zippendo/models/update_org_webhook_request.rb +235 -0
  317. data/lib/zippendo/models/update_shipment_request.rb +394 -0
  318. data/lib/zippendo/models/update_shipping_rule_request.rb +531 -0
  319. data/lib/zippendo/models/verify_api_token200_response.rb +218 -0
  320. data/lib/zippendo/models/verify_api_token_request.rb +165 -0
  321. data/lib/zippendo/version.rb +15 -0
  322. data/lib/zippendo.rb +195 -0
  323. data/spec/api/addresses_api_spec.rb +103 -0
  324. data/spec/api/billing_api_spec.rb +47 -0
  325. data/spec/api/carrier_catalog_api_spec.rb +47 -0
  326. data/spec/api/carriers_api_spec.rb +130 -0
  327. data/spec/api/orders_api_spec.rb +105 -0
  328. data/spec/api/orgs_api_spec.rb +122 -0
  329. data/spec/api/quotes_api_spec.rb +48 -0
  330. data/spec/api/rules_api_spec.rb +102 -0
  331. data/spec/api/shipments_api_spec.rb +212 -0
  332. data/spec/api/system_api_spec.rb +46 -0
  333. data/spec/api/tokens_api_spec.rb +114 -0
  334. data/spec/api/webhooks_api_spec.rb +130 -0
  335. data/spec/models/batch_send_shipments200_response_results_inner_spec.rb +68 -0
  336. data/spec/models/batch_send_shipments200_response_spec.rb +42 -0
  337. data/spec/models/batch_send_shipments200_response_summary_spec.rb +48 -0
  338. data/spec/models/batch_send_shipments_request_spec.rb +36 -0
  339. data/spec/models/batch_split_shipment201_response_spec.rb +42 -0
  340. data/spec/models/batch_split_shipment_request_shipments_inner_order_lines_inner_spec.rb +42 -0
  341. data/spec/models/batch_split_shipment_request_shipments_inner_spec.rb +42 -0
  342. data/spec/models/batch_split_shipment_request_spec.rb +66 -0
  343. data/spec/models/connect_carrier_request_spec.rb +48 -0
  344. data/spec/models/create_address_request_spec.rb +106 -0
  345. data/spec/models/create_api_token201_response_spec.rb +78 -0
  346. data/spec/models/create_api_token_request_spec.rb +52 -0
  347. data/spec/models/create_order201_response_order_lines_inner_spec.rb +148 -0
  348. data/spec/models/create_order201_response_shipping_address_spec.rb +108 -0
  349. data/spec/models/create_order201_response_spec.rb +142 -0
  350. data/spec/models/create_order_request_order_lines_inner_spec.rb +148 -0
  351. data/spec/models/create_order_request_shipping_address_spec.rb +108 -0
  352. data/spec/models/create_order_request_spec.rb +102 -0
  353. data/spec/models/create_org_webhook201_response_spec.rb +78 -0
  354. data/spec/models/create_org_webhook_request_spec.rb +58 -0
  355. data/spec/models/create_shipment201_response_activities_inner_spec.rb +64 -0
  356. data/spec/models/create_shipment201_response_documents_inner_spec.rb +90 -0
  357. data/spec/models/create_shipment201_response_errors_inner_spec.rb +60 -0
  358. data/spec/models/create_shipment201_response_logs_inner_spec.rb +82 -0
  359. data/spec/models/create_shipment201_response_parcels_inner_dimensions_spec.rb +48 -0
  360. data/spec/models/create_shipment201_response_parcels_inner_order_lines_inner_spec.rb +90 -0
  361. data/spec/models/create_shipment201_response_parcels_inner_spec.rb +100 -0
  362. data/spec/models/create_shipment201_response_parties_inner_attributes_inner_spec.rb +42 -0
  363. data/spec/models/create_shipment201_response_parties_inner_spec.rb +100 -0
  364. data/spec/models/create_shipment201_response_pickup_details_spec.rb +54 -0
  365. data/spec/models/create_shipment201_response_shipping_rule_spec.rb +102 -0
  366. data/spec/models/create_shipment201_response_spec.rb +182 -0
  367. data/spec/models/create_shipment201_response_tracking_spec.rb +66 -0
  368. data/spec/models/create_shipment_request_carrier_settings_spec.rb +54 -0
  369. data/spec/models/create_shipment_request_parcels_inner_dimensions_spec.rb +48 -0
  370. data/spec/models/create_shipment_request_parcels_inner_order_lines_inner_spec.rb +90 -0
  371. data/spec/models/create_shipment_request_parcels_inner_spec.rb +100 -0
  372. data/spec/models/create_shipment_request_parties_inner_attributes_inner_spec.rb +42 -0
  373. data/spec/models/create_shipment_request_parties_inner_spec.rb +100 -0
  374. data/spec/models/create_shipment_request_pickup_details_spec.rb +54 -0
  375. data/spec/models/create_shipment_request_spec.rb +116 -0
  376. data/spec/models/create_shipping_quote200_response_rates_inner_spec.rb +96 -0
  377. data/spec/models/create_shipping_quote200_response_spec.rb +36 -0
  378. data/spec/models/create_shipping_quote400_response_spec.rb +42 -0
  379. data/spec/models/create_shipping_quote404_response_spec.rb +42 -0
  380. data/spec/models/create_shipping_quote_request_destination_spec.rb +66 -0
  381. data/spec/models/create_shipping_quote_request_items_inner_spec.rb +72 -0
  382. data/spec/models/create_shipping_quote_request_spec.rb +54 -0
  383. data/spec/models/create_shipping_rule201_response_spec.rb +208 -0
  384. data/spec/models/create_shipping_rule_request_additional_parameters_any_of_inner_spec.rb +42 -0
  385. data/spec/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of_coordinates_inner_spec.rb +21 -0
  386. data/spec/models/create_shipping_rule_request_additional_parameters_any_of_value_any_of_spec.rb +54 -0
  387. data/spec/models/create_shipping_rule_request_additional_parameters_any_of_value_spec.rb +21 -0
  388. data/spec/models/create_shipping_rule_request_additional_parameters_spec.rb +21 -0
  389. data/spec/models/create_shipping_rule_request_conditions_inner_one_of1_spec.rb +78 -0
  390. data/spec/models/create_shipping_rule_request_conditions_inner_one_of2_spec.rb +74 -0
  391. data/spec/models/create_shipping_rule_request_conditions_inner_one_of3_spec.rb +68 -0
  392. data/spec/models/create_shipping_rule_request_conditions_inner_one_of4_spec.rb +52 -0
  393. data/spec/models/create_shipping_rule_request_conditions_inner_one_of_spec.rb +64 -0
  394. data/spec/models/create_shipping_rule_request_conditions_inner_spec.rb +32 -0
  395. data/spec/models/create_shipping_rule_request_spec.rb +184 -0
  396. data/spec/models/delete_org_webhook200_response_spec.rb +36 -0
  397. data/spec/models/delete_shipping_rule200_response_spec.rb +36 -0
  398. data/spec/models/get_billing_usage200_response_add_ons_inner_spec.rb +58 -0
  399. data/spec/models/get_billing_usage200_response_current_period_spec.rb +42 -0
  400. data/spec/models/get_billing_usage200_response_limits_spec.rb +72 -0
  401. data/spec/models/get_billing_usage200_response_limits_team_members_spec.rb +42 -0
  402. data/spec/models/get_billing_usage200_response_shipments_spec.rb +54 -0
  403. data/spec/models/get_billing_usage200_response_spec.rb +54 -0
  404. data/spec/models/get_order200_response_shipments_inner_spec.rb +98 -0
  405. data/spec/models/get_order200_response_shipping_rule_spec.rb +102 -0
  406. data/spec/models/get_order200_response_spec.rb +160 -0
  407. data/spec/models/get_org200_response_count_spec.rb +36 -0
  408. data/spec/models/get_org200_response_spec.rb +132 -0
  409. data/spec/models/get_org_branding200_response_spec.rb +48 -0
  410. data/spec/models/health_check200_response_spec.rb +48 -0
  411. data/spec/models/list_addresses200_response_data_inner_spec.rb +130 -0
  412. data/spec/models/list_addresses200_response_spec.rb +60 -0
  413. data/spec/models/list_api_tokens200_response_data_inner_created_by_spec.rb +48 -0
  414. data/spec/models/list_api_tokens200_response_data_inner_spec.rb +78 -0
  415. data/spec/models/list_api_tokens200_response_spec.rb +60 -0
  416. data/spec/models/list_api_tokens401_response_spec.rb +52 -0
  417. data/spec/models/list_available_carriers200_response_inner_required_fields_inner_spec.rb +70 -0
  418. data/spec/models/list_available_carriers200_response_inner_spec.rb +96 -0
  419. data/spec/models/list_carrier_product_service_points200_response_inner_address_spec.rb +66 -0
  420. data/spec/models/list_carrier_product_service_points200_response_inner_spec.rb +78 -0
  421. data/spec/models/list_carrier_product_service_points_request_spec.rb +66 -0
  422. data/spec/models/list_carrier_products200_response_inner_additional_parameters_inner_options_inner_spec.rb +48 -0
  423. data/spec/models/list_carrier_products200_response_inner_additional_parameters_inner_spec.rb +76 -0
  424. data/spec/models/list_carrier_products200_response_inner_services_inner_spec.rb +42 -0
  425. data/spec/models/list_carrier_products200_response_inner_spec.rb +100 -0
  426. data/spec/models/list_carrier_products200_response_inner_weight_limits_spec.rb +52 -0
  427. data/spec/models/list_carriers200_response_data_inner_config_value_spec.rb +21 -0
  428. data/spec/models/list_carriers200_response_data_inner_spec.rb +96 -0
  429. data/spec/models/list_carriers200_response_spec.rb +60 -0
  430. data/spec/models/list_orders200_response_data_inner_order_channel_spec.rb +52 -0
  431. data/spec/models/list_orders200_response_data_inner_spec.rb +106 -0
  432. data/spec/models/list_orders200_response_spec.rb +60 -0
  433. data/spec/models/list_org_webhook_deliveries200_response_data_inner_spec.rb +96 -0
  434. data/spec/models/list_org_webhook_deliveries200_response_spec.rb +60 -0
  435. data/spec/models/list_org_webhooks200_response_data_inner_spec.rb +72 -0
  436. data/spec/models/list_org_webhooks200_response_spec.rb +60 -0
  437. data/spec/models/list_shipments200_response_data_inner_address_spec.rb +130 -0
  438. data/spec/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value_any_of_spec.rb +54 -0
  439. data/spec/models/list_shipments200_response_data_inner_carrier_settings_additional_parameters_value_spec.rb +21 -0
  440. data/spec/models/list_shipments200_response_data_inner_carrier_settings_spec.rb +54 -0
  441. data/spec/models/list_shipments200_response_data_inner_spec.rb +86 -0
  442. data/spec/models/list_shipments200_response_spec.rb +60 -0
  443. data/spec/models/list_shipping_rules200_response_data_inner_additional_parameters_inner_spec.rb +42 -0
  444. data/spec/models/list_shipping_rules200_response_data_inner_carrier_spec.rb +72 -0
  445. data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of1_spec.rb +78 -0
  446. data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of2_spec.rb +74 -0
  447. data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of3_spec.rb +68 -0
  448. data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of4_spec.rb +52 -0
  449. data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of_spec.rb +64 -0
  450. data/spec/models/list_shipping_rules200_response_data_inner_conditions_inner_spec.rb +32 -0
  451. data/spec/models/list_shipping_rules200_response_data_inner_label_printer_spec.rb +42 -0
  452. data/spec/models/list_shipping_rules200_response_data_inner_return_shipping_rule_spec.rb +42 -0
  453. data/spec/models/list_shipping_rules200_response_data_inner_spec.rb +238 -0
  454. data/spec/models/list_shipping_rules200_response_spec.rb +60 -0
  455. data/spec/models/revoke_api_token200_response_spec.rb +36 -0
  456. data/spec/models/send_shipment422_response_errors_inner_spec.rb +42 -0
  457. data/spec/models/send_shipment422_response_spec.rb +58 -0
  458. data/spec/models/split_shipment201_response_spec.rb +42 -0
  459. data/spec/models/split_shipment_parcel200_response_spec.rb +36 -0
  460. data/spec/models/split_shipment_parcel_request_parcels_inner_spec.rb +42 -0
  461. data/spec/models/split_shipment_parcel_request_spec.rb +36 -0
  462. data/spec/models/split_shipment_request_spec.rb +72 -0
  463. data/spec/models/test_org_webhook200_response_spec.rb +36 -0
  464. data/spec/models/track_shipment200_response_events_inner_spec.rb +70 -0
  465. data/spec/models/track_shipment200_response_spec.rb +64 -0
  466. data/spec/models/update_address_request_spec.rb +106 -0
  467. data/spec/models/update_api_token_request_spec.rb +36 -0
  468. data/spec/models/update_carrier_request_spec.rb +48 -0
  469. data/spec/models/update_order_request_spec.rb +100 -0
  470. data/spec/models/update_org200_response_spec.rb +126 -0
  471. data/spec/models/update_org_branding_request_spec.rb +42 -0
  472. data/spec/models/update_org_request_spec.rb +118 -0
  473. data/spec/models/update_org_webhook_request_spec.rb +58 -0
  474. data/spec/models/update_shipment_request_spec.rb +122 -0
  475. data/spec/models/update_shipping_rule_request_spec.rb +184 -0
  476. data/spec/models/verify_api_token200_response_spec.rb +66 -0
  477. data/spec/models/verify_api_token_request_spec.rb +36 -0
  478. data/spec/spec_helper.rb +111 -0
  479. data/zippendo.gemspec +39 -0
  480. metadata +715 -0
@@ -0,0 +1,246 @@
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 CreateShipmentRequestParcelsInnerDimensions < ApiModelBase
18
+ # Parcel length in centimetres.
19
+ attr_accessor :length
20
+
21
+ # Parcel width in centimetres.
22
+ attr_accessor :width
23
+
24
+ # Parcel height in centimetres.
25
+ attr_accessor :height
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'length' => :'length',
31
+ :'width' => :'width',
32
+ :'height' => :'height'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'length' => :'Float',
50
+ :'width' => :'Float',
51
+ :'height' => :'Float'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::CreateShipmentRequestParcelsInnerDimensions` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::CreateShipmentRequestParcelsInnerDimensions`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'length')
78
+ self.length = attributes[:'length']
79
+ else
80
+ self.length = nil
81
+ end
82
+
83
+ if attributes.key?(:'width')
84
+ self.width = attributes[:'width']
85
+ else
86
+ self.width = nil
87
+ end
88
+
89
+ if attributes.key?(:'height')
90
+ self.height = attributes[:'height']
91
+ else
92
+ self.height = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if @length.nil?
102
+ invalid_properties.push('invalid value for "length", length cannot be nil.')
103
+ end
104
+
105
+ if @length < 0
106
+ invalid_properties.push('invalid value for "length", must be greater than or equal to 0.')
107
+ end
108
+
109
+ if @width.nil?
110
+ invalid_properties.push('invalid value for "width", width cannot be nil.')
111
+ end
112
+
113
+ if @width < 0
114
+ invalid_properties.push('invalid value for "width", must be greater than or equal to 0.')
115
+ end
116
+
117
+ if @height.nil?
118
+ invalid_properties.push('invalid value for "height", height cannot be nil.')
119
+ end
120
+
121
+ if @height < 0
122
+ invalid_properties.push('invalid value for "height", must be greater than or equal to 0.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ return false if @length.nil?
133
+ return false if @length < 0
134
+ return false if @width.nil?
135
+ return false if @width < 0
136
+ return false if @height.nil?
137
+ return false if @height < 0
138
+ true
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] length Value to be assigned
143
+ def length=(length)
144
+ if length.nil?
145
+ fail ArgumentError, 'length cannot be nil'
146
+ end
147
+
148
+ if length < 0
149
+ fail ArgumentError, 'invalid value for "length", must be greater than or equal to 0.'
150
+ end
151
+
152
+ @length = length
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] width Value to be assigned
157
+ def width=(width)
158
+ if width.nil?
159
+ fail ArgumentError, 'width cannot be nil'
160
+ end
161
+
162
+ if width < 0
163
+ fail ArgumentError, 'invalid value for "width", must be greater than or equal to 0.'
164
+ end
165
+
166
+ @width = width
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] height Value to be assigned
171
+ def height=(height)
172
+ if height.nil?
173
+ fail ArgumentError, 'height cannot be nil'
174
+ end
175
+
176
+ if height < 0
177
+ fail ArgumentError, 'invalid value for "height", must be greater than or equal to 0.'
178
+ end
179
+
180
+ @height = height
181
+ end
182
+
183
+ # Checks equality by comparing each attribute.
184
+ # @param [Object] Object to be compared
185
+ def ==(o)
186
+ return true if self.equal?(o)
187
+ self.class == o.class &&
188
+ length == o.length &&
189
+ width == o.width &&
190
+ height == o.height
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [length, width, height].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ attributes = attributes.transform_keys(&:to_sym)
211
+ transformed_hash = {}
212
+ openapi_types.each_pair do |key, type|
213
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
214
+ transformed_hash["#{key}"] = nil
215
+ elsif type =~ /\AArray<(.*)>/i
216
+ # check to ensure the input is an array given that the attribute
217
+ # is documented as an array but the input is not
218
+ if attributes[attribute_map[key]].is_a?(Array)
219
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
220
+ end
221
+ elsif !attributes[attribute_map[key]].nil?
222
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
223
+ end
224
+ end
225
+ new(transformed_hash)
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ self.class.attribute_map.each_pair do |attr, param|
233
+ value = self.send(attr)
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ end
245
+
246
+ end
@@ -0,0 +1,402 @@
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 CreateShipmentRequestParcelsInnerOrderLinesInner < ApiModelBase
18
+ # Unique order line identifier.
19
+ attr_accessor :id
20
+
21
+ # Stock keeping unit of the product.
22
+ attr_accessor :sku
23
+
24
+ # Number of units in this order line.
25
+ attr_accessor :quantity
26
+
27
+ # Human-readable product description.
28
+ attr_accessor :description
29
+
30
+ # Price per unit in the order line currency.
31
+ attr_accessor :unit_price
32
+
33
+ # ISO 4217 currency code.
34
+ attr_accessor :currency
35
+
36
+ # VAT percentage applied to the unit price.
37
+ attr_accessor :vat_percent
38
+
39
+ # Warehouse picking location.
40
+ attr_accessor :location
41
+
42
+ # ISO 3166-1 alpha-2 country of origin.
43
+ attr_accessor :country_of_origin
44
+
45
+ # Customs tariff (HS) code.
46
+ attr_accessor :tarrif_number
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'sku' => :'sku',
53
+ :'quantity' => :'quantity',
54
+ :'description' => :'description',
55
+ :'unit_price' => :'unitPrice',
56
+ :'currency' => :'currency',
57
+ :'vat_percent' => :'vatPercent',
58
+ :'location' => :'location',
59
+ :'country_of_origin' => :'countryOfOrigin',
60
+ :'tarrif_number' => :'tarrifNumber'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'id' => :'String',
78
+ :'sku' => :'String',
79
+ :'quantity' => :'Integer',
80
+ :'description' => :'String',
81
+ :'unit_price' => :'Float',
82
+ :'currency' => :'String',
83
+ :'vat_percent' => :'Float',
84
+ :'location' => :'String',
85
+ :'country_of_origin' => :'String',
86
+ :'tarrif_number' => :'String'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ :'description',
94
+ :'unit_price',
95
+ :'currency',
96
+ :'vat_percent',
97
+ :'location',
98
+ :'tarrif_number'
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::CreateShipmentRequestParcelsInnerOrderLinesInner` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ acceptable_attribute_map = self.class.acceptable_attribute_map
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!acceptable_attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::CreateShipmentRequestParcelsInnerOrderLinesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'id')
119
+ self.id = attributes[:'id']
120
+ end
121
+
122
+ if attributes.key?(:'sku')
123
+ self.sku = attributes[:'sku']
124
+ else
125
+ self.sku = nil
126
+ end
127
+
128
+ if attributes.key?(:'quantity')
129
+ self.quantity = attributes[:'quantity']
130
+ else
131
+ self.quantity = nil
132
+ end
133
+
134
+ if attributes.key?(:'description')
135
+ self.description = attributes[:'description']
136
+ end
137
+
138
+ if attributes.key?(:'unit_price')
139
+ self.unit_price = attributes[:'unit_price']
140
+ end
141
+
142
+ if attributes.key?(:'currency')
143
+ self.currency = attributes[:'currency']
144
+ end
145
+
146
+ if attributes.key?(:'vat_percent')
147
+ self.vat_percent = attributes[:'vat_percent']
148
+ end
149
+
150
+ if attributes.key?(:'location')
151
+ self.location = attributes[:'location']
152
+ end
153
+
154
+ if attributes.key?(:'country_of_origin')
155
+ self.country_of_origin = attributes[:'country_of_origin']
156
+ end
157
+
158
+ if attributes.key?(:'tarrif_number')
159
+ self.tarrif_number = attributes[:'tarrif_number']
160
+ end
161
+ end
162
+
163
+ # Show invalid properties with the reasons. Usually used together with valid?
164
+ # @return Array for valid properties with the reasons
165
+ def list_invalid_properties
166
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
167
+ invalid_properties = Array.new
168
+ if @sku.nil?
169
+ invalid_properties.push('invalid value for "sku", sku cannot be nil.')
170
+ end
171
+
172
+ if @sku.to_s.length < 1
173
+ invalid_properties.push('invalid value for "sku", the character length must be greater than or equal to 1.')
174
+ end
175
+
176
+ if @quantity.nil?
177
+ invalid_properties.push('invalid value for "quantity", quantity cannot be nil.')
178
+ end
179
+
180
+ if @quantity > 9007199254740991
181
+ invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 9007199254740991.')
182
+ end
183
+
184
+ if @quantity < 1
185
+ invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.')
186
+ end
187
+
188
+ if !@description.nil? && @description.to_s.length < 1
189
+ invalid_properties.push('invalid value for "description", the character length must be greater than or equal to 1.')
190
+ end
191
+
192
+ if !@unit_price.nil? && @unit_price < 0
193
+ invalid_properties.push('invalid value for "unit_price", must be greater than or equal to 0.')
194
+ end
195
+
196
+ if !@currency.nil? && @currency.to_s.length > 3
197
+ invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
198
+ end
199
+
200
+ if !@currency.nil? && @currency.to_s.length < 3
201
+ invalid_properties.push('invalid value for "currency", the character length must be greater than or equal to 3.')
202
+ end
203
+
204
+ if !@vat_percent.nil? && @vat_percent < 0
205
+ invalid_properties.push('invalid value for "vat_percent", must be greater than or equal to 0.')
206
+ end
207
+
208
+ if !@country_of_origin.nil? && @country_of_origin.to_s.length > 2
209
+ invalid_properties.push('invalid value for "country_of_origin", the character length must be smaller than or equal to 2.')
210
+ end
211
+
212
+ if !@country_of_origin.nil? && @country_of_origin.to_s.length < 2
213
+ invalid_properties.push('invalid value for "country_of_origin", the character length must be greater than or equal to 2.')
214
+ end
215
+
216
+ invalid_properties
217
+ end
218
+
219
+ # Check to see if the all the properties in the model are valid
220
+ # @return true if the model is valid
221
+ def valid?
222
+ warn '[DEPRECATED] the `valid?` method is obsolete'
223
+ return false if @sku.nil?
224
+ return false if @sku.to_s.length < 1
225
+ return false if @quantity.nil?
226
+ return false if @quantity > 9007199254740991
227
+ return false if @quantity < 1
228
+ return false if !@description.nil? && @description.to_s.length < 1
229
+ return false if !@unit_price.nil? && @unit_price < 0
230
+ return false if !@currency.nil? && @currency.to_s.length > 3
231
+ return false if !@currency.nil? && @currency.to_s.length < 3
232
+ return false if !@vat_percent.nil? && @vat_percent < 0
233
+ return false if !@country_of_origin.nil? && @country_of_origin.to_s.length > 2
234
+ return false if !@country_of_origin.nil? && @country_of_origin.to_s.length < 2
235
+ true
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] sku Value to be assigned
240
+ def sku=(sku)
241
+ if sku.nil?
242
+ fail ArgumentError, 'sku cannot be nil'
243
+ end
244
+
245
+ if sku.to_s.length < 1
246
+ fail ArgumentError, 'invalid value for "sku", the character length must be greater than or equal to 1.'
247
+ end
248
+
249
+ @sku = sku
250
+ end
251
+
252
+ # Custom attribute writer method with validation
253
+ # @param [Object] quantity Value to be assigned
254
+ def quantity=(quantity)
255
+ if quantity.nil?
256
+ fail ArgumentError, 'quantity cannot be nil'
257
+ end
258
+
259
+ if quantity > 9007199254740991
260
+ fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 9007199254740991.'
261
+ end
262
+
263
+ if quantity < 1
264
+ fail ArgumentError, 'invalid value for "quantity", must be greater than or equal to 1.'
265
+ end
266
+
267
+ @quantity = quantity
268
+ end
269
+
270
+ # Custom attribute writer method with validation
271
+ # @param [Object] description Value to be assigned
272
+ def description=(description)
273
+ if !description.nil? && description.to_s.length < 1
274
+ fail ArgumentError, 'invalid value for "description", the character length must be greater than or equal to 1.'
275
+ end
276
+
277
+ @description = description
278
+ end
279
+
280
+ # Custom attribute writer method with validation
281
+ # @param [Object] unit_price Value to be assigned
282
+ def unit_price=(unit_price)
283
+ if !unit_price.nil? && unit_price < 0
284
+ fail ArgumentError, 'invalid value for "unit_price", must be greater than or equal to 0.'
285
+ end
286
+
287
+ @unit_price = unit_price
288
+ end
289
+
290
+ # Custom attribute writer method with validation
291
+ # @param [Object] currency Value to be assigned
292
+ def currency=(currency)
293
+ if !currency.nil? && currency.to_s.length > 3
294
+ fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
295
+ end
296
+
297
+ if !currency.nil? && currency.to_s.length < 3
298
+ fail ArgumentError, 'invalid value for "currency", the character length must be greater than or equal to 3.'
299
+ end
300
+
301
+ @currency = currency
302
+ end
303
+
304
+ # Custom attribute writer method with validation
305
+ # @param [Object] vat_percent Value to be assigned
306
+ def vat_percent=(vat_percent)
307
+ if !vat_percent.nil? && vat_percent < 0
308
+ fail ArgumentError, 'invalid value for "vat_percent", must be greater than or equal to 0.'
309
+ end
310
+
311
+ @vat_percent = vat_percent
312
+ end
313
+
314
+ # Custom attribute writer method with validation
315
+ # @param [Object] country_of_origin Value to be assigned
316
+ def country_of_origin=(country_of_origin)
317
+ if country_of_origin.nil?
318
+ fail ArgumentError, 'country_of_origin cannot be nil'
319
+ end
320
+
321
+ if country_of_origin.to_s.length > 2
322
+ fail ArgumentError, 'invalid value for "country_of_origin", the character length must be smaller than or equal to 2.'
323
+ end
324
+
325
+ if country_of_origin.to_s.length < 2
326
+ fail ArgumentError, 'invalid value for "country_of_origin", the character length must be greater than or equal to 2.'
327
+ end
328
+
329
+ @country_of_origin = country_of_origin
330
+ end
331
+
332
+ # Checks equality by comparing each attribute.
333
+ # @param [Object] Object to be compared
334
+ def ==(o)
335
+ return true if self.equal?(o)
336
+ self.class == o.class &&
337
+ id == o.id &&
338
+ sku == o.sku &&
339
+ quantity == o.quantity &&
340
+ description == o.description &&
341
+ unit_price == o.unit_price &&
342
+ currency == o.currency &&
343
+ vat_percent == o.vat_percent &&
344
+ location == o.location &&
345
+ country_of_origin == o.country_of_origin &&
346
+ tarrif_number == o.tarrif_number
347
+ end
348
+
349
+ # @see the `==` method
350
+ # @param [Object] Object to be compared
351
+ def eql?(o)
352
+ self == o
353
+ end
354
+
355
+ # Calculates hash code according to all attributes.
356
+ # @return [Integer] Hash code
357
+ def hash
358
+ [id, sku, quantity, description, unit_price, currency, vat_percent, location, country_of_origin, tarrif_number].hash
359
+ end
360
+
361
+ # Builds the object from hash
362
+ # @param [Hash] attributes Model attributes in the form of hash
363
+ # @return [Object] Returns the model itself
364
+ def self.build_from_hash(attributes)
365
+ return nil unless attributes.is_a?(Hash)
366
+ attributes = attributes.transform_keys(&:to_sym)
367
+ transformed_hash = {}
368
+ openapi_types.each_pair do |key, type|
369
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
370
+ transformed_hash["#{key}"] = nil
371
+ elsif type =~ /\AArray<(.*)>/i
372
+ # check to ensure the input is an array given that the attribute
373
+ # is documented as an array but the input is not
374
+ if attributes[attribute_map[key]].is_a?(Array)
375
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
376
+ end
377
+ elsif !attributes[attribute_map[key]].nil?
378
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
379
+ end
380
+ end
381
+ new(transformed_hash)
382
+ end
383
+
384
+ # Returns the object in the form of hash
385
+ # @return [Hash] Returns the object in the form of hash
386
+ def to_hash
387
+ hash = {}
388
+ self.class.attribute_map.each_pair do |attr, param|
389
+ value = self.send(attr)
390
+ if value.nil?
391
+ is_nullable = self.class.openapi_nullable.include?(attr)
392
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
393
+ end
394
+
395
+ hash[param] = _to_hash(value)
396
+ end
397
+ hash
398
+ end
399
+
400
+ end
401
+
402
+ end