zippendo 1.1.4 → 1.2.1

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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/docs/BatchSendShipments200ResponseResultsInner.md +3 -3
  3. data/docs/BatchSendShipments200ResponseSummary.md +5 -3
  4. data/docs/CreateShipment201ResponseParcelsInnerOrderLinesInner.md +1 -1
  5. data/docs/CreateShipmentRequest.md +6 -2
  6. data/docs/CreateShipmentRequestDroppoint.md +24 -0
  7. data/docs/CreateShipmentRequestParcelsInnerOrderLinesInner.md +1 -1
  8. data/docs/GetOrder200ResponseShipmentsInner.md +2 -0
  9. data/docs/ShipmentsApi.md +2 -2
  10. data/docs/UpdateShipmentRequest.md +4 -2
  11. data/docs/UpdateShipmentRequestCarrierSettings.md +24 -0
  12. data/docs/UpdateShipmentRequestDroppoint.md +24 -0
  13. data/lib/zippendo/api/shipments_api.rb +2 -2
  14. data/lib/zippendo/models/batch_send_shipments200_response_results_inner.rb +7 -7
  15. data/lib/zippendo/models/batch_send_shipments200_response_summary.rb +51 -6
  16. data/lib/zippendo/models/create_shipment201_response_parcels_inner_order_lines_inner.rb +5 -15
  17. data/lib/zippendo/models/create_shipment_request.rb +24 -22
  18. data/lib/zippendo/models/create_shipment_request_carrier_settings.rb +1 -0
  19. data/lib/zippendo/models/create_shipment_request_droppoint.rb +260 -0
  20. data/lib/zippendo/models/create_shipment_request_parcels_inner_order_lines_inner.rb +5 -15
  21. data/lib/zippendo/models/get_order200_response_shipments_inner.rb +12 -1
  22. data/lib/zippendo/models/list_api_tokens401_response.rb +2 -2
  23. data/lib/zippendo/models/send_shipment422_response.rb +2 -2
  24. data/lib/zippendo/models/update_shipment_request.rb +15 -6
  25. data/lib/zippendo/models/update_shipment_request_carrier_settings.rb +250 -0
  26. data/lib/zippendo/models/update_shipment_request_droppoint.rb +260 -0
  27. data/lib/zippendo/version.rb +1 -1
  28. data/lib/zippendo.rb +3 -0
  29. metadata +7 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f1fd3fb3e24a4236350f098c4bbb42958c9b9594573b1a9b31231db93af4213
4
- data.tar.gz: 4f0c7247864b61936c1be3bf37e2b928d2454f0e4a20805d117e2e28c4c708ac
3
+ metadata.gz: 9046cd444c2dbbda30c2e2c8e2e08aec15d8206be3287f0d043bcb74f97657b3
4
+ data.tar.gz: 726e7ca6345cad33efc1cf35ab023be4c56d7f85ac1c74d3e40350581e7afffc
5
5
  SHA512:
6
- metadata.gz: 762b9743e3d730de1dd5228904a454275cb36284adb06b5a5102a1baf03114091c9ff9515489433ec8f69278df43f748c9a75791ee0d51bb86e476ffe159463f
7
- data.tar.gz: 61566cb8dbe7a72a8cb2f56550c29866e5cc156e1945239cc12bad22bb5f30b25cdd7772a33762ce4ccb71e509474f5cf8068088526ccd432f3c51c6e82e4208
6
+ metadata.gz: 36ddb9373acdf2fe3f645127e0815bc5f0956c134da085c1e15c4cf0f2b9443ed09e414e22c0caea750c056ebb30a0de180e4784430f9dac3e30b97f543b30f8
7
+ data.tar.gz: 9e4bf9bd6aebe0033eaa37a2d34eafaf84d68b10d3e7b643dab8cc26e351bafa4eb180800863902bea437a8eb40e425eb364405895a510819fc76e05b12206c1
@@ -5,9 +5,9 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **shipment_id** | **String** | The shipment this result refers to. | |
8
- | **status** | **String** | Whether this shipment was successfully booked with its carrier. | |
9
- | **code** | **String** | Canonical machine-readable error code, present when `status` is `failed`. | [optional] |
10
- | **message** | **String** | Human-readable failure detail, present when `status` is `failed`. | [optional] |
8
+ | **status** | **String** | `sent` when the carrier booked it, `failed` when the carrier or Zippendo rejected it, and `skipped` when the batch ran out of time before reaching it. A `skipped` shipment was never sent to the carrier and is safe to submit again. | |
9
+ | **code** | **String** | Canonical machine-readable error code, present when `status` is `failed` or `skipped`. | [optional] |
10
+ | **message** | **String** | Human-readable detail, present when `status` is `failed` or `skipped`. | [optional] |
11
11
  | **errors** | [**Array<SendShipment422ResponseErrorsInner>**](SendShipment422ResponseErrorsInner.md) | Carrier-specific errors, present when the carrier rejected the booking. | [optional] |
12
12
 
13
13
  ## Example
@@ -4,9 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **total** | **Integer** | Number of unique shipments processed. | |
7
+ | **total** | **Integer** | Number of unique shipments requested. | |
8
8
  | **sent** | **Integer** | How many were successfully booked. | |
9
- | **failed** | **Integer** | How many failed. | |
9
+ | **failed** | **Integer** | How many the carrier or Zippendo rejected. | |
10
+ | **skipped** | **Integer** | How many the batch ran out of time to attempt. Submit these again. | |
10
11
 
11
12
  ## Example
12
13
 
@@ -16,7 +17,8 @@ require 'zippendo'
16
17
  instance = Zippendo::BatchSendShipments200ResponseSummary.new(
17
18
  total: 3,
18
19
  sent: 2,
19
- failed: 1
20
+ failed: 1,
21
+ skipped: 0
20
22
  )
21
23
  ```
22
24
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | Unique order line identifier. | [optional] |
8
- | **sku** | **String** | Stock keeping unit of the product. | |
8
+ | **sku** | **String** | Stock keeping unit of the product. Optional — not every webshop assigns SKUs. | [optional] |
9
9
  | **quantity** | **Integer** | Number of units in this order line. | |
10
10
  | **description** | **String** | Human-readable product description. | [optional] |
11
11
  | **unit_price** | **Float** | Price per unit in the order line currency. | [optional] |
@@ -9,7 +9,7 @@
9
9
  | **service_point_id** | **String** | Selected carrier service point identifier. | [optional] |
10
10
  | **parties** | [**Array<CreateShipmentRequestPartiesInner>**](CreateShipmentRequestPartiesInner.md) | Parties involved in the shipment. Optional when orderId is provided. | [optional] |
11
11
  | **type** | **String** | Direction of the shipment relative to the organization. | |
12
- | **carrier_settings** | [**CreateShipmentRequestCarrierSettings**](CreateShipmentRequestCarrierSettings.md) | | |
12
+ | **carrier_settings** | [**CreateShipmentRequestCarrierSettings**](CreateShipmentRequestCarrierSettings.md) | | [optional] |
13
13
  | **parcels** | [**Array<CreateShipmentRequestParcelsInner>**](CreateShipmentRequestParcelsInner.md) | Parcels to include. Optional when orderId is provided. | [optional] |
14
14
  | **pickup_details** | [**CreateShipmentRequestPickupDetails**](CreateShipmentRequestPickupDetails.md) | | [optional] |
15
15
  | **term_of_trade** | **String** | Incoterm governing the shipment. | [optional][default to 'DAP'] |
@@ -17,6 +17,8 @@
17
17
  | **order_id** | **String** | Order to derive parties and parcels from. | [optional] |
18
18
  | **label_printer_id** | **String** | Printer to assign for labels. | [optional] |
19
19
  | **document_printer_id** | **String** | Printer to assign for documents. | [optional] |
20
+ | **shipping_rule_id** | **String** | Create the shipment from this shipping rule: carrier settings and the sender address derive from the rule (explicit carrierSettings and addressId are then ignored). | [optional] |
21
+ | **droppoint** | [**CreateShipmentRequestDroppoint**](CreateShipmentRequestDroppoint.md) | | [optional] |
20
22
 
21
23
  ## Example
22
24
 
@@ -36,7 +38,9 @@ instance = Zippendo::CreateShipmentRequest.new(
36
38
  status: pending,
37
39
  order_id: ord_5e6f7a8b,
38
40
  label_printer_id: prn_label_01,
39
- document_printer_id: prn_doc_01
41
+ document_printer_id: prn_doc_01,
42
+ shipping_rule_id: rule_3c4d5e6f,
43
+ droppoint: null
40
44
  )
41
45
  ```
42
46
 
@@ -0,0 +1,24 @@
1
+ # Zippendo::CreateShipmentRequestDroppoint
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Identifier of the selected service point. | |
8
+ | **name** | **String** | Display name of the service point. | |
9
+ | **address** | **String** | Formatted address of the service point. | |
10
+ | **coordinates** | [**Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>**](ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner.md) | Latitude/longitude of the service point. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zippendo'
16
+
17
+ instance = Zippendo::CreateShipmentRequestDroppoint.new(
18
+ id: sp_pn_4521,
19
+ name: Føtex Nørrebro,
20
+ address: Nørrebrogade 20, 2200 København N,
21
+ coordinates: [55.6987,12.5501]
22
+ )
23
+ ```
24
+
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **String** | Unique order line identifier. | [optional] |
8
- | **sku** | **String** | Stock keeping unit of the product. | |
8
+ | **sku** | **String** | Stock keeping unit of the product. Optional — not every webshop assigns SKUs. | [optional] |
9
9
  | **quantity** | **Integer** | Number of units in this order line. | |
10
10
  | **description** | **String** | Human-readable product description. | [optional] |
11
11
  | **unit_price** | **Float** | Price per unit in the order line currency. | [optional] |
@@ -10,6 +10,7 @@
10
10
  | **type** | **String** | Direction of the shipment relative to the organization. | |
11
11
  | **tracking** | [**CreateShipment201ResponseTracking**](CreateShipment201ResponseTracking.md) | | [optional] |
12
12
  | **carrier_settings** | [**ListShipments200ResponseDataInnerCarrierSettings**](ListShipments200ResponseDataInnerCarrierSettings.md) | | |
13
+ | **service_point_id** | **String** | Selected carrier service point identifier. | [optional] |
13
14
  | **created_at** | **String** | Timestamp when the shipment was created. | |
14
15
  | **updated_at** | **String** | Timestamp when the shipment was last updated. | |
15
16
  | **shipping_rule_id** | **String** | ID of the shipping rule used for this shipment. | [optional] |
@@ -27,6 +28,7 @@ instance = Zippendo::GetOrder200ResponseShipmentsInner.new(
27
28
  type: outbound,
28
29
  tracking: null,
29
30
  carrier_settings: null,
31
+ service_point_id: sp_pn_4521,
30
32
  created_at: 2026-06-22T14:30:00.000Z,
31
33
  updated_at: 2026-06-22T14:30:00.000Z,
32
34
  shipping_rule_id: clz9k2f0a0002abcd5678ijkl,
data/docs/ShipmentsApi.md CHANGED
@@ -240,7 +240,7 @@ end
240
240
 
241
241
  Create shipment
242
242
 
243
- Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
243
+ Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
244
244
 
245
245
  ### Examples
246
246
 
@@ -255,7 +255,7 @@ end
255
255
 
256
256
  api_instance = Zippendo::ShipmentsApi.new
257
257
  org_id = 'org_8f3kd92ld0' # String | Organization ID
258
- create_shipment_request = Zippendo::CreateShipmentRequest.new({type: 'outbound', carrier_settings: Zippendo::CreateShipmentRequestCarrierSettings.new({carrier_id: 'car_pn_001', product_id: 'prod_mypack_home', services: ["A7"], additional_parameters: { key: Zippendo::CreateShippingRuleRequestAdditionalParametersValue.new({id: 'sp_pn_4521', name: 'Føtex Nørrebro', address: 'Nørrebrogade 20, 2200 København N'})}})}) # CreateShipmentRequest |
258
+ create_shipment_request = Zippendo::CreateShipmentRequest.new({type: 'outbound'}) # CreateShipmentRequest |
259
259
 
260
260
  begin
261
261
  # Create shipment
@@ -9,7 +9,7 @@
9
9
  | **service_point_id** | **String** | Selected carrier service point identifier. | [optional] |
10
10
  | **parties** | [**Array<CreateShipmentRequestPartiesInner>**](CreateShipmentRequestPartiesInner.md) | Parties involved in the shipment. Optional when orderId is provided. | [optional] |
11
11
  | **type** | **String** | Direction of the shipment relative to the organization. | [optional] |
12
- | **carrier_settings** | [**CreateShipmentRequestCarrierSettings**](CreateShipmentRequestCarrierSettings.md) | | [optional] |
12
+ | **carrier_settings** | [**UpdateShipmentRequestCarrierSettings**](UpdateShipmentRequestCarrierSettings.md) | | [optional] |
13
13
  | **parcels** | [**Array<CreateShipmentRequestParcelsInner>**](CreateShipmentRequestParcelsInner.md) | Parcels to include. Optional when orderId is provided. | [optional] |
14
14
  | **pickup_details** | [**CreateShipmentRequestPickupDetails**](CreateShipmentRequestPickupDetails.md) | | [optional] |
15
15
  | **term_of_trade** | **String** | Incoterm governing the shipment. | [optional][default to 'DAP'] |
@@ -18,6 +18,7 @@
18
18
  | **label_printer_id** | **String** | Printer to assign for labels. | [optional] |
19
19
  | **document_printer_id** | **String** | Printer to assign for documents. | [optional] |
20
20
  | **shipping_rule_id** | **String** | Shipping rule to apply to the shipment. Pass null to clear. | [optional] |
21
+ | **droppoint** | [**UpdateShipmentRequestDroppoint**](UpdateShipmentRequestDroppoint.md) | | [optional] |
21
22
 
22
23
  ## Example
23
24
 
@@ -38,7 +39,8 @@ instance = Zippendo::UpdateShipmentRequest.new(
38
39
  order_id: ord_5e6f7a8b,
39
40
  label_printer_id: prn_label_01,
40
41
  document_printer_id: prn_doc_01,
41
- shipping_rule_id: rule_3c4d5e6f
42
+ shipping_rule_id: rule_3c4d5e6f,
43
+ droppoint: null
42
44
  )
43
45
  ```
44
46
 
@@ -0,0 +1,24 @@
1
+ # Zippendo::UpdateShipmentRequestCarrierSettings
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **carrier_id** | **String** | Identifier of the carrier to use. | |
8
+ | **product_id** | **String** | Identifier of the carrier product/service. | |
9
+ | **services** | **Array<String>** | Additional service codes requested from the carrier. | |
10
+ | **additional_parameters** | [**Hash<String, CreateShippingRuleRequestAdditionalParametersValue>**](CreateShippingRuleRequestAdditionalParametersValue.md) | Carrier-specific extra parameters as key/value pairs. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zippendo'
16
+
17
+ instance = Zippendo::UpdateShipmentRequestCarrierSettings.new(
18
+ carrier_id: car_pn_001,
19
+ product_id: prod_mypack_home,
20
+ services: ["A7"],
21
+ additional_parameters: {"notificationEmail":"anna@example.dk"}
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # Zippendo::UpdateShipmentRequestDroppoint
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Identifier of the selected service point. | |
8
+ | **name** | **String** | Display name of the service point. | |
9
+ | **address** | **String** | Formatted address of the service point. | |
10
+ | **coordinates** | [**Array<ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner>**](ListShippingRules200ResponseDataInnerAdditionalParametersValueAnyOfCoordinatesInner.md) | Latitude/longitude of the service point. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zippendo'
16
+
17
+ instance = Zippendo::UpdateShipmentRequestDroppoint.new(
18
+ id: sp_pn_4521,
19
+ name: Føtex Nørrebro,
20
+ address: Nørrebrogade 20, 2200 København N,
21
+ coordinates: [55.6987,12.5501]
22
+ )
23
+ ```
24
+
@@ -243,7 +243,7 @@ module Zippendo
243
243
  end
244
244
 
245
245
  # Create shipment
246
- # Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
246
+ # Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
247
247
  # @param org_id [String] Organization ID
248
248
  # @param create_shipment_request [CreateShipmentRequest]
249
249
  # @param [Hash] opts the optional parameters
@@ -254,7 +254,7 @@ module Zippendo
254
254
  end
255
255
 
256
256
  # Create shipment
257
- # Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order.
257
+ # Create a new shipment for an organization. When orderId is provided, parties and parcels are derived from the order. When shippingRuleId is provided, carrier settings and the sender address derive from the rule.
258
258
  # @param org_id [String] Organization ID
259
259
  # @param create_shipment_request [CreateShipmentRequest]
260
260
  # @param [Hash] opts the optional parameters
@@ -18,13 +18,13 @@ module Zippendo
18
18
  # The shipment this result refers to.
19
19
  attr_accessor :shipment_id
20
20
 
21
- # Whether this shipment was successfully booked with its carrier.
21
+ # `sent` when the carrier booked it, `failed` when the carrier or Zippendo rejected it, and `skipped` when the batch ran out of time before reaching it. A `skipped` shipment was never sent to the carrier and is safe to submit again.
22
22
  attr_accessor :status
23
23
 
24
- # Canonical machine-readable error code, present when `status` is `failed`.
24
+ # Canonical machine-readable error code, present when `status` is `failed` or `skipped`.
25
25
  attr_accessor :code
26
26
 
27
- # Human-readable failure detail, present when `status` is `failed`.
27
+ # Human-readable detail, present when `status` is `failed` or `skipped`.
28
28
  attr_accessor :message
29
29
 
30
30
  # Carrier-specific errors, present when the carrier rejected the booking.
@@ -155,9 +155,9 @@ module Zippendo
155
155
  warn '[DEPRECATED] the `valid?` method is obsolete'
156
156
  return false if @shipment_id.nil?
157
157
  return false if @status.nil?
158
- status_validator = EnumAttributeValidator.new('String', ["sent", "failed"])
158
+ status_validator = EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
159
159
  return false unless status_validator.valid?(@status)
160
- code_validator = EnumAttributeValidator.new('String', ["INTERNAL_ERROR", "BAD_REQUEST", "VALIDATION_FAILED", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "RATE_LIMITED", "PAYLOAD_TOO_LARGE", "IMAGE_DIMENSIONS_EXCEEDED", "NOT_IMPLEMENTED", "AUTH_INVALID_CREDENTIALS", "AUTH_TOKEN_INVALID", "AUTH_TOKEN_EXPIRED", "AUTH_EMAIL_NOT_VERIFIED", "AUTH_EMAIL_EXISTS", "AUTH_OAUTH_FAILED", "AUTH_SIGNUP_NOT_ALLOWED", "AUTH_VERIFICATION_FAILED", "AUTH_RESET_TOKEN_INVALID", "AUTH_MFA_REQUIRED", "AUTH_MFA_INVALID_CODE", "AUTH_MFA_ALREADY_ENABLED", "AUTH_MFA_NOT_ENABLED", "SESSION_REQUIRED", "ORG_NOT_FOUND", "ORG_ACCESS_DENIED", "ORG_DISABLED", "ORG_SLUG_EXISTS", "BRAND_NOT_FOUND", "BRAND_ACCESS_DENIED", "BRAND_SLUG_EXISTS", "BRAND_HAS_RECORDS", "USER_NOT_FOUND", "USER_EXISTS", "TERMS_NOT_ACCEPTED", "MEMBER_NOT_FOUND", "MEMBER_SELF_BRAND_RESTRICTION", "ROLE_NOT_FOUND", "ROLE_NAME_EXISTS", "ROLE_IN_USE", "MEMBER_EXISTS", "INVITATION_NOT_FOUND", "INVITATION_EXPIRED", "INVITATION_ALREADY_SENT", "INVITATION_EMAIL_FAILED", "TOKEN_NOT_FOUND", "BILLING_PAYMENT_FAILED", "BILLING_NO_SUBSCRIPTION", "BILLING_TAX_ID_INVALID", "BILLING_PLAN_INVALID", "BILLING_OPERATION_FAILED", "FEATURE_NOT_AVAILABLE", "RESOURCE_LIMIT_REACHED", "PLAN_LIMITS_EXCEEDED", "NO_SUBSCRIPTION", "SUBSCRIPTION_INACTIVE", "BILLING_MANAGED_BY_SHOPIFY", "BILLING_CHECKOUT_REQUIRED", "ZIPPY_ADDON_REQUIRED", "SHIPMENT_NOT_FOUND", "SHIPMENT_DOCUMENT_NOT_FOUND", "SHIPMENT_ALREADY_SENT", "SHIPMENT_INVALID_STATE", "PARCEL_NOT_FOUND", "PARCEL_INVALID_SPLIT", "PICKUP_NOT_FOUND", "PICKUP_FAILED", "CARRIER_ERROR", "CARRIER_AUTH_FAILED", "CARRIER_NOT_FOUND", "CARRIER_PRODUCT_NOT_FOUND", "CARRIER_CONFIG_INVALID", "CARRIER_PARAMETER_INVALID", "CARRIER_SERVER_UNAVAILABLE", "CARRIER_GLS_WRONG_ADDRESS", "CARRIER_DAO_INVALID_POSTAL_CODE", "CARRIER_POSTNORD_BOOKING_FAILED", "CARRIER_FEDEX_BOOKING_FAILED", "CARRIER_DHL_EXPRESS_BOOKING_FAILED", "CARRIER_UPS_BOOKING_FAILED", "CARRIER_MATKAHUOLTO_BOOKING_FAILED", "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED", "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT", "CARRIER_CUSTOMS_INCOMPLETE", "CARRIER_REQUEST_NOT_FOUND", "CARRIER_REQUEST_LOCKED", "CARRIER_REQUEST_DISPATCH_FAILED", "SHIPPING_RULE_NOT_FOUND", "SHIPPING_RULE_INVALID", "ADDRESS_NOT_FOUND", "ORDER_NOT_FOUND", "ORDER_CHANNEL_NOT_FOUND", "ORDER_CHANNEL_CONFIG_INVALID", "INTEGRATION_NOT_CONFIGURED", "INSTALLATION_NOT_FOUND", "WEBHOOK_SIGNATURE_INVALID", "WEBHOOK_PAYLOAD_INVALID", "SHOPIFY_PENDING_INSTALL_NOT_FOUND", "SHOPIFY_PENDING_INSTALL_EXPIRED", "SHOP_ALREADY_CONNECTED", "SHOP_CLAIMED_BY_ANOTHER_ORG", "WOOCOMMERCE_CONNECT_FAILED", "WOOCOMMERCE_AUTH_STATE_INVALID", "CHECKOUT_TOKEN_INVALID", "ORDER_CHANNEL_TYPE_UNSUPPORTED", "PRINTER_NOT_FOUND", "PRINTER_OFFLINE", "PRINTER_AUTH_TIMEOUT", "PRINTER_JOB_NOT_FOUND", "ORG_INTEGRATION_NOT_FOUND", "ORG_WEBHOOK_NOT_FOUND", "AUTOMATION_NOT_FOUND", "AUTOMATION_INVALID", "ZIPPY_DISABLED", "CONVERSATION_NOT_FOUND", "ADMIN_FORBIDDEN", "JOB_HANDLER_NOT_REGISTERED", "JOB_QUEUE_NOT_CONFIGURED", "JOB_ENQUEUE_FAILED", "JOB_PAYLOAD_INVALID", "EMAIL_SEND_FAILED", "INTEGRATION_DELIVERY_FAILED", "WEBHOOK_DELIVERY_FAILED", "DOCUMENT_GENERATION_FAILED", "AI_UNAVAILABLE", "MIGRATION_PROVIDER_UNKNOWN", "MIGRATION_SOURCE_TOKEN_INVALID", "MIGRATION_SOURCE_UNREACHABLE", "MIGRATION_NOT_FOUND", "MIGRATION_IN_PROGRESS", "DATA_EXPORT_NOT_FOUND", "DATA_EXPORT_IN_PROGRESS", "DATA_EXPORT_NOT_READY", "DATA_EXPORT_EXPIRED", "DATA_EXPORT_FAILED"])
160
+ code_validator = EnumAttributeValidator.new('String', ["INTERNAL_ERROR", "BAD_REQUEST", "VALIDATION_FAILED", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "RATE_LIMITED", "PAYLOAD_TOO_LARGE", "IMAGE_DIMENSIONS_EXCEEDED", "NOT_IMPLEMENTED", "AUTH_INVALID_CREDENTIALS", "AUTH_TOKEN_INVALID", "AUTH_TOKEN_EXPIRED", "AUTH_EMAIL_NOT_VERIFIED", "AUTH_EMAIL_EXISTS", "AUTH_OAUTH_FAILED", "AUTH_SIGNUP_NOT_ALLOWED", "AUTH_VERIFICATION_FAILED", "AUTH_RESET_TOKEN_INVALID", "AUTH_MFA_REQUIRED", "AUTH_MFA_INVALID_CODE", "AUTH_MFA_ALREADY_ENABLED", "AUTH_MFA_NOT_ENABLED", "SESSION_REQUIRED", "ORG_NOT_FOUND", "ORG_ACCESS_DENIED", "ORG_DISABLED", "ORG_SLUG_EXISTS", "BRAND_NOT_FOUND", "BRAND_ACCESS_DENIED", "BRAND_SLUG_EXISTS", "BRAND_HAS_RECORDS", "USER_NOT_FOUND", "USER_EXISTS", "TERMS_NOT_ACCEPTED", "MEMBER_NOT_FOUND", "MEMBER_SELF_BRAND_RESTRICTION", "ROLE_NOT_FOUND", "ROLE_NAME_EXISTS", "ROLE_IN_USE", "MEMBER_EXISTS", "INVITATION_NOT_FOUND", "INVITATION_EXPIRED", "INVITATION_ALREADY_SENT", "INVITATION_EMAIL_FAILED", "TOKEN_NOT_FOUND", "BILLING_PAYMENT_FAILED", "BILLING_NO_SUBSCRIPTION", "BILLING_TAX_ID_INVALID", "BILLING_PLAN_INVALID", "BILLING_OPERATION_FAILED", "FEATURE_NOT_AVAILABLE", "RESOURCE_LIMIT_REACHED", "PLAN_LIMITS_EXCEEDED", "NO_SUBSCRIPTION", "SUBSCRIPTION_INACTIVE", "BILLING_MANAGED_BY_SHOPIFY", "BILLING_CHECKOUT_REQUIRED", "ZIPPY_ADDON_REQUIRED", "SHIPMENT_NOT_FOUND", "SHIPMENT_DOCUMENT_NOT_FOUND", "SHIPMENT_ALREADY_SENT", "SHIPMENT_INVALID_STATE", "SHIPMENT_SERVICE_POINT_REQUIRED", "SHIPMENT_SEND_NOT_ATTEMPTED", "PARCEL_NOT_FOUND", "PARCEL_INVALID_SPLIT", "PICKUP_NOT_FOUND", "PICKUP_FAILED", "CARRIER_ERROR", "CARRIER_AUTH_FAILED", "CARRIER_NOT_FOUND", "CARRIER_PRODUCT_NOT_FOUND", "CARRIER_CONFIG_INVALID", "CARRIER_PARAMETER_INVALID", "CARRIER_SERVER_UNAVAILABLE", "CARRIER_GLS_WRONG_ADDRESS", "CARRIER_DAO_INVALID_POSTAL_CODE", "CARRIER_POSTNORD_BOOKING_FAILED", "CARRIER_FEDEX_BOOKING_FAILED", "CARRIER_DHL_EXPRESS_BOOKING_FAILED", "CARRIER_UPS_BOOKING_FAILED", "CARRIER_MATKAHUOLTO_BOOKING_FAILED", "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED", "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT", "CARRIER_CUSTOMS_INCOMPLETE", "CARRIER_REQUEST_NOT_FOUND", "CARRIER_REQUEST_LOCKED", "CARRIER_REQUEST_DISPATCH_FAILED", "SHIPPING_RULE_NOT_FOUND", "SHIPPING_RULE_INVALID", "ADDRESS_NOT_FOUND", "ORDER_NOT_FOUND", "ORDER_CHANNEL_NOT_FOUND", "ORDER_CHANNEL_CONFIG_INVALID", "INTEGRATION_NOT_CONFIGURED", "INSTALLATION_NOT_FOUND", "WEBHOOK_SIGNATURE_INVALID", "WEBHOOK_PAYLOAD_INVALID", "SHOPIFY_PENDING_INSTALL_NOT_FOUND", "SHOPIFY_PENDING_INSTALL_EXPIRED", "SHOP_ALREADY_CONNECTED", "SHOP_CLAIMED_BY_ANOTHER_ORG", "WOOCOMMERCE_CONNECT_FAILED", "WOOCOMMERCE_AUTH_STATE_INVALID", "CHECKOUT_TOKEN_INVALID", "ORDER_CHANNEL_TYPE_UNSUPPORTED", "PRINTER_NOT_FOUND", "PRINTER_OFFLINE", "PRINTER_AUTH_TIMEOUT", "PRINTER_JOB_NOT_FOUND", "ORG_INTEGRATION_NOT_FOUND", "ORG_WEBHOOK_NOT_FOUND", "AUTOMATION_NOT_FOUND", "AUTOMATION_INVALID", "ZIPPY_DISABLED", "CONVERSATION_NOT_FOUND", "ADMIN_FORBIDDEN", "JOB_HANDLER_NOT_REGISTERED", "JOB_QUEUE_NOT_CONFIGURED", "JOB_ENQUEUE_FAILED", "JOB_PAYLOAD_INVALID", "EMAIL_SEND_FAILED", "INTEGRATION_DELIVERY_FAILED", "WEBHOOK_DELIVERY_FAILED", "DOCUMENT_GENERATION_FAILED", "AI_UNAVAILABLE", "MIGRATION_PROVIDER_UNKNOWN", "MIGRATION_SOURCE_TOKEN_INVALID", "MIGRATION_SOURCE_UNREACHABLE", "MIGRATION_NOT_FOUND", "MIGRATION_IN_PROGRESS", "DATA_EXPORT_NOT_FOUND", "DATA_EXPORT_IN_PROGRESS", "DATA_EXPORT_NOT_READY", "DATA_EXPORT_EXPIRED", "DATA_EXPORT_FAILED"])
161
161
  return false unless code_validator.valid?(@code)
162
162
  true
163
163
  end
@@ -175,7 +175,7 @@ module Zippendo
175
175
  # Custom attribute writer method checking allowed values (enum).
176
176
  # @param [Object] status Object to be assigned
177
177
  def status=(status)
178
- validator = EnumAttributeValidator.new('String', ["sent", "failed"])
178
+ validator = EnumAttributeValidator.new('String', ["sent", "failed", "skipped"])
179
179
  unless validator.valid?(status)
180
180
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
181
181
  end
@@ -185,7 +185,7 @@ module Zippendo
185
185
  # Custom attribute writer method checking allowed values (enum).
186
186
  # @param [Object] code Object to be assigned
187
187
  def code=(code)
188
- validator = EnumAttributeValidator.new('String', ["INTERNAL_ERROR", "BAD_REQUEST", "VALIDATION_FAILED", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "RATE_LIMITED", "PAYLOAD_TOO_LARGE", "IMAGE_DIMENSIONS_EXCEEDED", "NOT_IMPLEMENTED", "AUTH_INVALID_CREDENTIALS", "AUTH_TOKEN_INVALID", "AUTH_TOKEN_EXPIRED", "AUTH_EMAIL_NOT_VERIFIED", "AUTH_EMAIL_EXISTS", "AUTH_OAUTH_FAILED", "AUTH_SIGNUP_NOT_ALLOWED", "AUTH_VERIFICATION_FAILED", "AUTH_RESET_TOKEN_INVALID", "AUTH_MFA_REQUIRED", "AUTH_MFA_INVALID_CODE", "AUTH_MFA_ALREADY_ENABLED", "AUTH_MFA_NOT_ENABLED", "SESSION_REQUIRED", "ORG_NOT_FOUND", "ORG_ACCESS_DENIED", "ORG_DISABLED", "ORG_SLUG_EXISTS", "BRAND_NOT_FOUND", "BRAND_ACCESS_DENIED", "BRAND_SLUG_EXISTS", "BRAND_HAS_RECORDS", "USER_NOT_FOUND", "USER_EXISTS", "TERMS_NOT_ACCEPTED", "MEMBER_NOT_FOUND", "MEMBER_SELF_BRAND_RESTRICTION", "ROLE_NOT_FOUND", "ROLE_NAME_EXISTS", "ROLE_IN_USE", "MEMBER_EXISTS", "INVITATION_NOT_FOUND", "INVITATION_EXPIRED", "INVITATION_ALREADY_SENT", "INVITATION_EMAIL_FAILED", "TOKEN_NOT_FOUND", "BILLING_PAYMENT_FAILED", "BILLING_NO_SUBSCRIPTION", "BILLING_TAX_ID_INVALID", "BILLING_PLAN_INVALID", "BILLING_OPERATION_FAILED", "FEATURE_NOT_AVAILABLE", "RESOURCE_LIMIT_REACHED", "PLAN_LIMITS_EXCEEDED", "NO_SUBSCRIPTION", "SUBSCRIPTION_INACTIVE", "BILLING_MANAGED_BY_SHOPIFY", "BILLING_CHECKOUT_REQUIRED", "ZIPPY_ADDON_REQUIRED", "SHIPMENT_NOT_FOUND", "SHIPMENT_DOCUMENT_NOT_FOUND", "SHIPMENT_ALREADY_SENT", "SHIPMENT_INVALID_STATE", "PARCEL_NOT_FOUND", "PARCEL_INVALID_SPLIT", "PICKUP_NOT_FOUND", "PICKUP_FAILED", "CARRIER_ERROR", "CARRIER_AUTH_FAILED", "CARRIER_NOT_FOUND", "CARRIER_PRODUCT_NOT_FOUND", "CARRIER_CONFIG_INVALID", "CARRIER_PARAMETER_INVALID", "CARRIER_SERVER_UNAVAILABLE", "CARRIER_GLS_WRONG_ADDRESS", "CARRIER_DAO_INVALID_POSTAL_CODE", "CARRIER_POSTNORD_BOOKING_FAILED", "CARRIER_FEDEX_BOOKING_FAILED", "CARRIER_DHL_EXPRESS_BOOKING_FAILED", "CARRIER_UPS_BOOKING_FAILED", "CARRIER_MATKAHUOLTO_BOOKING_FAILED", "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED", "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT", "CARRIER_CUSTOMS_INCOMPLETE", "CARRIER_REQUEST_NOT_FOUND", "CARRIER_REQUEST_LOCKED", "CARRIER_REQUEST_DISPATCH_FAILED", "SHIPPING_RULE_NOT_FOUND", "SHIPPING_RULE_INVALID", "ADDRESS_NOT_FOUND", "ORDER_NOT_FOUND", "ORDER_CHANNEL_NOT_FOUND", "ORDER_CHANNEL_CONFIG_INVALID", "INTEGRATION_NOT_CONFIGURED", "INSTALLATION_NOT_FOUND", "WEBHOOK_SIGNATURE_INVALID", "WEBHOOK_PAYLOAD_INVALID", "SHOPIFY_PENDING_INSTALL_NOT_FOUND", "SHOPIFY_PENDING_INSTALL_EXPIRED", "SHOP_ALREADY_CONNECTED", "SHOP_CLAIMED_BY_ANOTHER_ORG", "WOOCOMMERCE_CONNECT_FAILED", "WOOCOMMERCE_AUTH_STATE_INVALID", "CHECKOUT_TOKEN_INVALID", "ORDER_CHANNEL_TYPE_UNSUPPORTED", "PRINTER_NOT_FOUND", "PRINTER_OFFLINE", "PRINTER_AUTH_TIMEOUT", "PRINTER_JOB_NOT_FOUND", "ORG_INTEGRATION_NOT_FOUND", "ORG_WEBHOOK_NOT_FOUND", "AUTOMATION_NOT_FOUND", "AUTOMATION_INVALID", "ZIPPY_DISABLED", "CONVERSATION_NOT_FOUND", "ADMIN_FORBIDDEN", "JOB_HANDLER_NOT_REGISTERED", "JOB_QUEUE_NOT_CONFIGURED", "JOB_ENQUEUE_FAILED", "JOB_PAYLOAD_INVALID", "EMAIL_SEND_FAILED", "INTEGRATION_DELIVERY_FAILED", "WEBHOOK_DELIVERY_FAILED", "DOCUMENT_GENERATION_FAILED", "AI_UNAVAILABLE", "MIGRATION_PROVIDER_UNKNOWN", "MIGRATION_SOURCE_TOKEN_INVALID", "MIGRATION_SOURCE_UNREACHABLE", "MIGRATION_NOT_FOUND", "MIGRATION_IN_PROGRESS", "DATA_EXPORT_NOT_FOUND", "DATA_EXPORT_IN_PROGRESS", "DATA_EXPORT_NOT_READY", "DATA_EXPORT_EXPIRED", "DATA_EXPORT_FAILED"])
188
+ validator = EnumAttributeValidator.new('String', ["INTERNAL_ERROR", "BAD_REQUEST", "VALIDATION_FAILED", "UNAUTHORIZED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "RATE_LIMITED", "PAYLOAD_TOO_LARGE", "IMAGE_DIMENSIONS_EXCEEDED", "NOT_IMPLEMENTED", "AUTH_INVALID_CREDENTIALS", "AUTH_TOKEN_INVALID", "AUTH_TOKEN_EXPIRED", "AUTH_EMAIL_NOT_VERIFIED", "AUTH_EMAIL_EXISTS", "AUTH_OAUTH_FAILED", "AUTH_SIGNUP_NOT_ALLOWED", "AUTH_VERIFICATION_FAILED", "AUTH_RESET_TOKEN_INVALID", "AUTH_MFA_REQUIRED", "AUTH_MFA_INVALID_CODE", "AUTH_MFA_ALREADY_ENABLED", "AUTH_MFA_NOT_ENABLED", "SESSION_REQUIRED", "ORG_NOT_FOUND", "ORG_ACCESS_DENIED", "ORG_DISABLED", "ORG_SLUG_EXISTS", "BRAND_NOT_FOUND", "BRAND_ACCESS_DENIED", "BRAND_SLUG_EXISTS", "BRAND_HAS_RECORDS", "USER_NOT_FOUND", "USER_EXISTS", "TERMS_NOT_ACCEPTED", "MEMBER_NOT_FOUND", "MEMBER_SELF_BRAND_RESTRICTION", "ROLE_NOT_FOUND", "ROLE_NAME_EXISTS", "ROLE_IN_USE", "MEMBER_EXISTS", "INVITATION_NOT_FOUND", "INVITATION_EXPIRED", "INVITATION_ALREADY_SENT", "INVITATION_EMAIL_FAILED", "TOKEN_NOT_FOUND", "BILLING_PAYMENT_FAILED", "BILLING_NO_SUBSCRIPTION", "BILLING_TAX_ID_INVALID", "BILLING_PLAN_INVALID", "BILLING_OPERATION_FAILED", "FEATURE_NOT_AVAILABLE", "RESOURCE_LIMIT_REACHED", "PLAN_LIMITS_EXCEEDED", "NO_SUBSCRIPTION", "SUBSCRIPTION_INACTIVE", "BILLING_MANAGED_BY_SHOPIFY", "BILLING_CHECKOUT_REQUIRED", "ZIPPY_ADDON_REQUIRED", "SHIPMENT_NOT_FOUND", "SHIPMENT_DOCUMENT_NOT_FOUND", "SHIPMENT_ALREADY_SENT", "SHIPMENT_INVALID_STATE", "SHIPMENT_SERVICE_POINT_REQUIRED", "SHIPMENT_SEND_NOT_ATTEMPTED", "PARCEL_NOT_FOUND", "PARCEL_INVALID_SPLIT", "PICKUP_NOT_FOUND", "PICKUP_FAILED", "CARRIER_ERROR", "CARRIER_AUTH_FAILED", "CARRIER_NOT_FOUND", "CARRIER_PRODUCT_NOT_FOUND", "CARRIER_CONFIG_INVALID", "CARRIER_PARAMETER_INVALID", "CARRIER_SERVER_UNAVAILABLE", "CARRIER_GLS_WRONG_ADDRESS", "CARRIER_DAO_INVALID_POSTAL_CODE", "CARRIER_POSTNORD_BOOKING_FAILED", "CARRIER_FEDEX_BOOKING_FAILED", "CARRIER_DHL_EXPRESS_BOOKING_FAILED", "CARRIER_UPS_BOOKING_FAILED", "CARRIER_MATKAHUOLTO_BOOKING_FAILED", "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED", "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT", "CARRIER_CUSTOMS_INCOMPLETE", "CARRIER_REQUEST_NOT_FOUND", "CARRIER_REQUEST_LOCKED", "CARRIER_REQUEST_DISPATCH_FAILED", "SHIPPING_RULE_NOT_FOUND", "SHIPPING_RULE_INVALID", "ADDRESS_NOT_FOUND", "ORDER_NOT_FOUND", "ORDER_CHANNEL_NOT_FOUND", "ORDER_CHANNEL_CONFIG_INVALID", "INTEGRATION_NOT_CONFIGURED", "INSTALLATION_NOT_FOUND", "WEBHOOK_SIGNATURE_INVALID", "WEBHOOK_PAYLOAD_INVALID", "SHOPIFY_PENDING_INSTALL_NOT_FOUND", "SHOPIFY_PENDING_INSTALL_EXPIRED", "SHOP_ALREADY_CONNECTED", "SHOP_CLAIMED_BY_ANOTHER_ORG", "WOOCOMMERCE_CONNECT_FAILED", "WOOCOMMERCE_AUTH_STATE_INVALID", "CHECKOUT_TOKEN_INVALID", "ORDER_CHANNEL_TYPE_UNSUPPORTED", "PRINTER_NOT_FOUND", "PRINTER_OFFLINE", "PRINTER_AUTH_TIMEOUT", "PRINTER_JOB_NOT_FOUND", "ORG_INTEGRATION_NOT_FOUND", "ORG_WEBHOOK_NOT_FOUND", "AUTOMATION_NOT_FOUND", "AUTOMATION_INVALID", "ZIPPY_DISABLED", "CONVERSATION_NOT_FOUND", "ADMIN_FORBIDDEN", "JOB_HANDLER_NOT_REGISTERED", "JOB_QUEUE_NOT_CONFIGURED", "JOB_ENQUEUE_FAILED", "JOB_PAYLOAD_INVALID", "EMAIL_SEND_FAILED", "INTEGRATION_DELIVERY_FAILED", "WEBHOOK_DELIVERY_FAILED", "DOCUMENT_GENERATION_FAILED", "AI_UNAVAILABLE", "MIGRATION_PROVIDER_UNKNOWN", "MIGRATION_SOURCE_TOKEN_INVALID", "MIGRATION_SOURCE_UNREACHABLE", "MIGRATION_NOT_FOUND", "MIGRATION_IN_PROGRESS", "DATA_EXPORT_NOT_FOUND", "DATA_EXPORT_IN_PROGRESS", "DATA_EXPORT_NOT_READY", "DATA_EXPORT_EXPIRED", "DATA_EXPORT_FAILED"])
189
189
  unless validator.valid?(code)
190
190
  fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
191
191
  end
@@ -16,21 +16,25 @@ require 'time'
16
16
  module Zippendo
17
17
  # Aggregate counts for the batch.
18
18
  class BatchSendShipments200ResponseSummary < ApiModelBase
19
- # Number of unique shipments processed.
19
+ # Number of unique shipments requested.
20
20
  attr_accessor :total
21
21
 
22
22
  # How many were successfully booked.
23
23
  attr_accessor :sent
24
24
 
25
- # How many failed.
25
+ # How many the carrier or Zippendo rejected.
26
26
  attr_accessor :failed
27
27
 
28
+ # How many the batch ran out of time to attempt. Submit these again.
29
+ attr_accessor :skipped
30
+
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
31
34
  :'total' => :'total',
32
35
  :'sent' => :'sent',
33
- :'failed' => :'failed'
36
+ :'failed' => :'failed',
37
+ :'skipped' => :'skipped'
34
38
  }
35
39
  end
36
40
 
@@ -49,7 +53,8 @@ module Zippendo
49
53
  {
50
54
  :'total' => :'Integer',
51
55
  :'sent' => :'Integer',
52
- :'failed' => :'Integer'
56
+ :'failed' => :'Integer',
57
+ :'skipped' => :'Integer'
53
58
  }
54
59
  end
55
60
 
@@ -92,6 +97,12 @@ module Zippendo
92
97
  else
93
98
  self.failed = nil
94
99
  end
100
+
101
+ if attributes.key?(:'skipped')
102
+ self.skipped = attributes[:'skipped']
103
+ else
104
+ self.skipped = nil
105
+ end
95
106
  end
96
107
 
97
108
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -135,6 +146,18 @@ module Zippendo
135
146
  invalid_properties.push('invalid value for "failed", must be greater than or equal to -9007199254740991.')
136
147
  end
137
148
 
149
+ if @skipped.nil?
150
+ invalid_properties.push('invalid value for "skipped", skipped cannot be nil.')
151
+ end
152
+
153
+ if @skipped > 9007199254740991
154
+ invalid_properties.push('invalid value for "skipped", must be smaller than or equal to 9007199254740991.')
155
+ end
156
+
157
+ if @skipped < -9007199254740991
158
+ invalid_properties.push('invalid value for "skipped", must be greater than or equal to -9007199254740991.')
159
+ end
160
+
138
161
  invalid_properties
139
162
  end
140
163
 
@@ -151,6 +174,9 @@ module Zippendo
151
174
  return false if @failed.nil?
152
175
  return false if @failed > 9007199254740991
153
176
  return false if @failed < -9007199254740991
177
+ return false if @skipped.nil?
178
+ return false if @skipped > 9007199254740991
179
+ return false if @skipped < -9007199254740991
154
180
  true
155
181
  end
156
182
 
@@ -208,6 +234,24 @@ module Zippendo
208
234
  @failed = failed
209
235
  end
210
236
 
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] skipped Value to be assigned
239
+ def skipped=(skipped)
240
+ if skipped.nil?
241
+ fail ArgumentError, 'skipped cannot be nil'
242
+ end
243
+
244
+ if skipped > 9007199254740991
245
+ fail ArgumentError, 'invalid value for "skipped", must be smaller than or equal to 9007199254740991.'
246
+ end
247
+
248
+ if skipped < -9007199254740991
249
+ fail ArgumentError, 'invalid value for "skipped", must be greater than or equal to -9007199254740991.'
250
+ end
251
+
252
+ @skipped = skipped
253
+ end
254
+
211
255
  # Checks equality by comparing each attribute.
212
256
  # @param [Object] Object to be compared
213
257
  def ==(o)
@@ -215,7 +259,8 @@ module Zippendo
215
259
  self.class == o.class &&
216
260
  total == o.total &&
217
261
  sent == o.sent &&
218
- failed == o.failed
262
+ failed == o.failed &&
263
+ skipped == o.skipped
219
264
  end
220
265
 
221
266
  # @see the `==` method
@@ -227,7 +272,7 @@ module Zippendo
227
272
  # Calculates hash code according to all attributes.
228
273
  # @return [Integer] Hash code
229
274
  def hash
230
- [total, sent, failed].hash
275
+ [total, sent, failed, skipped].hash
231
276
  end
232
277
 
233
278
  # Builds the object from hash
@@ -18,7 +18,7 @@ module Zippendo
18
18
  # Unique order line identifier.
19
19
  attr_accessor :id
20
20
 
21
- # Stock keeping unit of the product.
21
+ # Stock keeping unit of the product. Optional — not every webshop assigns SKUs.
22
22
  attr_accessor :sku
23
23
 
24
24
  # Number of units in this order line.
@@ -90,6 +90,7 @@ module Zippendo
90
90
  # List of attributes with nullable: true
91
91
  def self.openapi_nullable
92
92
  Set.new([
93
+ :'sku',
93
94
  :'description',
94
95
  :'unit_price',
95
96
  :'currency',
@@ -121,8 +122,6 @@ module Zippendo
121
122
 
122
123
  if attributes.key?(:'sku')
123
124
  self.sku = attributes[:'sku']
124
- else
125
- self.sku = nil
126
125
  end
127
126
 
128
127
  if attributes.key?(:'quantity')
@@ -165,11 +164,7 @@ module Zippendo
165
164
  def list_invalid_properties
166
165
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
167
166
  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
167
+ if !@sku.nil? && @sku.to_s.length < 1
173
168
  invalid_properties.push('invalid value for "sku", the character length must be greater than or equal to 1.')
174
169
  end
175
170
 
@@ -220,8 +215,7 @@ module Zippendo
220
215
  # @return true if the model is valid
221
216
  def valid?
222
217
  warn '[DEPRECATED] the `valid?` method is obsolete'
223
- return false if @sku.nil?
224
- return false if @sku.to_s.length < 1
218
+ return false if !@sku.nil? && @sku.to_s.length < 1
225
219
  return false if @quantity.nil?
226
220
  return false if @quantity > 9007199254740991
227
221
  return false if @quantity < 1
@@ -238,11 +232,7 @@ module Zippendo
238
232
  # Custom attribute writer method with validation
239
233
  # @param [Object] sku Value to be assigned
240
234
  def sku=(sku)
241
- if sku.nil?
242
- fail ArgumentError, 'sku cannot be nil'
243
- end
244
-
245
- if sku.to_s.length < 1
235
+ if !sku.nil? && sku.to_s.length < 1
246
236
  fail ArgumentError, 'invalid value for "sku", the character length must be greater than or equal to 1.'
247
237
  end
248
238
 
@@ -52,6 +52,11 @@ module Zippendo
52
52
  # Printer to assign for documents.
53
53
  attr_accessor :document_printer_id
54
54
 
55
+ # Create the shipment from this shipping rule: carrier settings and the sender address derive from the rule (explicit carrierSettings and addressId are then ignored).
56
+ attr_accessor :shipping_rule_id
57
+
58
+ attr_accessor :droppoint
59
+
55
60
  class EnumAttributeValidator
56
61
  attr_reader :datatype
57
62
  attr_reader :allowable_values
@@ -89,7 +94,9 @@ module Zippendo
89
94
  :'status' => :'status',
90
95
  :'order_id' => :'orderId',
91
96
  :'label_printer_id' => :'labelPrinterId',
92
- :'document_printer_id' => :'documentPrinterId'
97
+ :'document_printer_id' => :'documentPrinterId',
98
+ :'shipping_rule_id' => :'shippingRuleId',
99
+ :'droppoint' => :'droppoint'
93
100
  }
94
101
  end
95
102
 
@@ -118,7 +125,9 @@ module Zippendo
118
125
  :'status' => :'String',
119
126
  :'order_id' => :'String',
120
127
  :'label_printer_id' => :'String',
121
- :'document_printer_id' => :'String'
128
+ :'document_printer_id' => :'String',
129
+ :'shipping_rule_id' => :'String',
130
+ :'droppoint' => :'CreateShipmentRequestDroppoint'
122
131
  }
123
132
  end
124
133
 
@@ -130,7 +139,7 @@ module Zippendo
130
139
  :'pickup_details',
131
140
  :'order_id',
132
141
  :'label_printer_id',
133
- :'document_printer_id'
142
+ :'document_printer_id',
134
143
  ])
135
144
  end
136
145
 
@@ -176,8 +185,6 @@ module Zippendo
176
185
 
177
186
  if attributes.key?(:'carrier_settings')
178
187
  self.carrier_settings = attributes[:'carrier_settings']
179
- else
180
- self.carrier_settings = nil
181
188
  end
182
189
 
183
190
  if attributes.key?(:'parcels')
@@ -213,6 +220,14 @@ module Zippendo
213
220
  if attributes.key?(:'document_printer_id')
214
221
  self.document_printer_id = attributes[:'document_printer_id']
215
222
  end
223
+
224
+ if attributes.key?(:'shipping_rule_id')
225
+ self.shipping_rule_id = attributes[:'shipping_rule_id']
226
+ end
227
+
228
+ if attributes.key?(:'droppoint')
229
+ self.droppoint = attributes[:'droppoint']
230
+ end
216
231
  end
217
232
 
218
233
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -232,10 +247,6 @@ module Zippendo
232
247
  invalid_properties.push('invalid value for "type", type cannot be nil.')
233
248
  end
234
249
 
235
- if @carrier_settings.nil?
236
- invalid_properties.push('invalid value for "carrier_settings", carrier_settings cannot be nil.')
237
- end
238
-
239
250
  if !@parcels.nil? && @parcels.length < 1
240
251
  invalid_properties.push('invalid value for "parcels", number of items must be greater than or equal to 1.')
241
252
  end
@@ -252,7 +263,6 @@ module Zippendo
252
263
  return false if @type.nil?
253
264
  type_validator = EnumAttributeValidator.new('String', ["outbound", "inbound"])
254
265
  return false unless type_validator.valid?(@type)
255
- return false if @carrier_settings.nil?
256
266
  return false if !@parcels.nil? && @parcels.length < 1
257
267
  status_validator = EnumAttributeValidator.new('String', ["draft", "pending", "processing", "dispatched", "partly_dispatched", "error", "cancelled", "on_hold"])
258
268
  return false unless status_validator.valid?(@status)
@@ -297,16 +307,6 @@ module Zippendo
297
307
  @type = type
298
308
  end
299
309
 
300
- # Custom attribute writer method with validation
301
- # @param [Object] carrier_settings Value to be assigned
302
- def carrier_settings=(carrier_settings)
303
- if carrier_settings.nil?
304
- fail ArgumentError, 'carrier_settings cannot be nil'
305
- end
306
-
307
- @carrier_settings = carrier_settings
308
- end
309
-
310
310
  # Custom attribute writer method with validation
311
311
  # @param [Object] parcels Value to be assigned
312
312
  def parcels=(parcels)
@@ -348,7 +348,9 @@ module Zippendo
348
348
  status == o.status &&
349
349
  order_id == o.order_id &&
350
350
  label_printer_id == o.label_printer_id &&
351
- document_printer_id == o.document_printer_id
351
+ document_printer_id == o.document_printer_id &&
352
+ shipping_rule_id == o.shipping_rule_id &&
353
+ droppoint == o.droppoint
352
354
  end
353
355
 
354
356
  # @see the `==` method
@@ -360,7 +362,7 @@ module Zippendo
360
362
  # Calculates hash code according to all attributes.
361
363
  # @return [Integer] Hash code
362
364
  def hash
363
- [reference, address_id, service_point_id, parties, type, carrier_settings, parcels, pickup_details, term_of_trade, status, order_id, label_printer_id, document_printer_id].hash
365
+ [reference, address_id, service_point_id, parties, type, carrier_settings, parcels, pickup_details, term_of_trade, status, order_id, label_printer_id, document_printer_id, shipping_rule_id, droppoint].hash
364
366
  end
365
367
 
366
368
  # Builds the object from hash