zippendo 1.3.15 → 1.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 670db3793bb9714bfe422eb04ca28b82233e983276d7c6ac7fabec52159d80df
4
- data.tar.gz: 0e0b25ca04111fcafadef96eb7d7136fc7408b96e94c036b4854015326988eeb
3
+ metadata.gz: 42ce3c982bab1b8f6de2c679a872659a9fd9b3fe00e0d5311b08136cbbc14743
4
+ data.tar.gz: 03d29dd6e4a7a50071fd7df87c94be3d1b25ed30e5b9ddcf9a53c351f7a49186
5
5
  SHA512:
6
- metadata.gz: ac772e6c3feb779d07995620816a92d01e224891cf4a7c342fd22d463466748f40d9165bbcf6841dead565a4663592471cbb63aa1a386483f66ae4c28c3ae7bd
7
- data.tar.gz: 4258a3c8b07218771a0c66496be31d516539b5f700882269bb14d2ae094ec6b2d027922aaeda4128f5196e39bf75897c147355a79af1c64fb8469328b51807aa
6
+ metadata.gz: e726f978a818be726c91893d66bb5058ef3983429498d28012b6f8ee2617dac9ab38f3105a3844ce7eaccb876dee288ec1e970ab3fa862d0545352efa390bc6f
7
+ data.tar.gz: 0d1b0629b83316bbeae8e1b9b091a132fdc78d962a1e489703aaf08d54d413072aabfed61c1e4c252df050762f95c92cba8d556c4ca7b49b2692bf14fed2fb25
data/context7.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://context7.com/schema/context7.json",
3
+ "projectTitle": "Zippendo Ruby SDK",
4
+ "description": "Official Ruby SDK for the Zippendo shipping API: book shipments, print labels and track parcels with PostNord, GLS, DAO, Bring, DHL, DPD, UPS and more.",
5
+ "folders": [
6
+ "docs"
7
+ ],
8
+ "rules": [
9
+ "Authenticate with an API token created in the Zippendo dashboard under Settings → API tokens. It is a Bearer token prefixed with zipp_; load it from configuration or an environment variable such as ZIPPENDO_API_TOKEN, never hard-code it.",
10
+ "The base URL defaults to https://api.zippendo.com; set it only to reach another environment.",
11
+ "Every call takes the organization ID explicitly. One API token can be granted access to several organizations, and that argument selects which one the request acts on.",
12
+ "The API is split into one client class per resource (shipments, orders, carriers, addresses, rules, webhooks, tokens and more); there is no single client object that covers everything.",
13
+ "To act inside one brand, set the X-Zippendo-Brand header (the brand's ID or slug) as a default header on the client; it is not a method parameter. Without it a request covers the whole organization.",
14
+ "List operations are paginated with page (1-based) and limit, and the response carries the total and the page count; fetch every page instead of assuming the first holds all rows.",
15
+ "Error responses carry the JSON body { code, error, message }. Branch on the machine-readable code, such as SHIPMENT_NOT_FOUND, never on the message text.",
16
+ "Product concepts such as shipping rules, carrier products and service points are explained in the Zippendo documentation at https://www.zippendo.com/docs."
17
+ ],
18
+ "url": "https://context7.com/zippendo/zippendo-ruby",
19
+ "public_key": "pk_Tl3mMRFEoyX7MNPYwdtOX"
20
+ }
@@ -7,6 +7,7 @@
7
7
  | **id** | **String** | Unique shipping rule identifier | |
8
8
  | **name** | **String** | Shipping rule name | |
9
9
  | **description** | **String** | Optional description | |
10
+ | **translations** | [**Hash<String, ListShippingRules200ResponseDataInnerTranslationsValue>**](ListShippingRules200ResponseDataInnerTranslationsValue.md) | Checkout name and description per language | |
10
11
  | **direction** | **String** | Whether this rule is for outbound or inbound (return) shipments | [default to 'outbound'] |
11
12
  | **carrier_id** | **String** | Carrier ID | |
12
13
  | **product_id** | **String** | Product ID from carrier | |
@@ -44,6 +45,7 @@ instance = Zippendo::CreateShippingRule201Response.new(
44
45
  id: rule_01HZX9K2QF,
45
46
  name: Standard DK,
46
47
  description: Standard levering i Danmark,
48
+ translations: {"da":{"name":"Levering til døren","description":"Leveres inden for 1-2 hverdage"},"de":{"name":"Lieferung bis zur Haustür"}},
47
49
  direction: outbound,
48
50
  carrier_id: carr_01HZX9K2QF,
49
51
  product_id: PNL13,
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | Shipping rule name | |
8
8
  | **description** | **String** | Optional description | [optional] |
9
+ | **translations** | [**Hash<String, CreateShippingRuleRequestTranslationsValue>**](CreateShippingRuleRequestTranslationsValue.md) | Checkout name and description per language; a blank field falls back to the rule's own text | [optional] |
9
10
  | **direction** | **String** | Whether this rule is for outbound or inbound (return) shipments | [optional][default to 'outbound'] |
10
11
  | **carrier_id** | **String** | Carrier ID | |
11
12
  | **product_id** | **String** | Product ID from carrier | |
@@ -39,6 +40,7 @@ require 'zippendo'
39
40
  instance = Zippendo::CreateShippingRuleRequest.new(
40
41
  name: Standard DK,
41
42
  description: Standard levering i Danmark,
43
+ translations: {"da":{"name":"Levering til døren","description":"Leveres inden for 1-2 hverdage"},"de":{"name":"Lieferung bis zur Haustür"}},
42
44
  direction: outbound,
43
45
  carrier_id: carr_01HZX9K2QF,
44
46
  product_id: PNL13,
@@ -0,0 +1,20 @@
1
+ # Zippendo::CreateShippingRuleRequestTranslationsValue
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Checkout name in this language; blank keeps the rule's own name. | [optional] |
8
+ | **description** | **String** | Checkout description in this language; blank keeps the rule's own description. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zippendo'
14
+
15
+ instance = Zippendo::CreateShippingRuleRequestTranslationsValue.new(
16
+ name: Pakkeshop,
17
+ description: Levering til en pakkeshop nær dig
18
+ )
19
+ ```
20
+
@@ -7,6 +7,7 @@
7
7
  | **id** | **String** | Unique shipping rule identifier | |
8
8
  | **name** | **String** | Shipping rule name | |
9
9
  | **description** | **String** | Optional description | |
10
+ | **translations** | [**Hash<String, ListShippingRules200ResponseDataInnerTranslationsValue>**](ListShippingRules200ResponseDataInnerTranslationsValue.md) | Checkout name and description per language | |
10
11
  | **direction** | **String** | Whether this rule is for outbound or inbound (return) shipments | [default to 'outbound'] |
11
12
  | **carrier_id** | **String** | Carrier ID | |
12
13
  | **product_id** | **String** | Product ID from carrier | |
@@ -49,6 +50,7 @@ instance = Zippendo::ListShippingRules200ResponseDataInner.new(
49
50
  id: rule_01HZX9K2QF,
50
51
  name: Standard DK,
51
52
  description: Standard levering i Danmark,
53
+ translations: {"da":{"name":"Levering til døren","description":"Leveres inden for 1-2 hverdage"},"de":{"name":"Lieferung bis zur Haustür"}},
52
54
  direction: outbound,
53
55
  carrier_id: carr_01HZX9K2QF,
54
56
  product_id: PNL13,
@@ -0,0 +1,20 @@
1
+ # Zippendo::ListShippingRules200ResponseDataInnerTranslationsValue
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Rate name in this language | [optional] |
8
+ | **description** | **String** | Rate description in this language | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zippendo'
14
+
15
+ instance = Zippendo::ListShippingRules200ResponseDataInnerTranslationsValue.new(
16
+ name: Levering til døren,
17
+ description: Leveres inden for 1-2 hverdage
18
+ )
19
+ ```
20
+
data/docs/ShipmentsApi.md CHANGED
@@ -978,7 +978,7 @@ end
978
978
 
979
979
  Update shipment
980
980
 
981
- Update an existing shipment. Only draft, pending or error shipments can be updated; an applied shipping rule overrides carrier settings and sender party.
981
+ Update a draft, pending or error shipment; fields left out keep their stored values. A draft becomes pending when the update sets its carrier settings or service point and it has a carrier, or applies a shipping rule, which overrides carrier settings and sender party.
982
982
 
983
983
  ### Examples
984
984
 
@@ -4,19 +4,19 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **use_webhooks** | **Boolean** | Use webhooks for real-time order sync. | [optional][default to true] |
7
+ | **use_webhooks** | **Boolean** | Use webhooks for real-time order sync. | [optional] |
8
8
  | **site_url** | **String** | WooCommerce store URL. | [optional] |
9
9
  | **auto_fulfill** | **Boolean** | Push tracking back to the platform when a shipment is dispatched. Enabled by default (opt-out) — set to false to disable write-back; an unset value still syncs. | [optional] |
10
- | **auto_sync** | **Boolean** | Periodically poll the channel for new orders. | [optional][default to false] |
11
- | **sync_interval_minutes** | **Integer** | Polling interval in minutes (5-1440). | [optional][default to 15] |
12
- | **auto_ship_on_create** | **Boolean** | Create a shipment automatically when an order arrives. | [optional][default to false] |
10
+ | **auto_sync** | **Boolean** | Periodically poll the channel for new orders. | [optional] |
11
+ | **sync_interval_minutes** | **Integer** | Polling interval in minutes (5-1440). | [optional] |
12
+ | **auto_ship_on_create** | **Boolean** | Create a shipment automatically when an order arrives. | [optional] |
13
13
  | **default_carrier_id** | **String** | Default carrier ID for auto-shipping. | [optional] |
14
14
  | **default_product_id** | **String** | Default carrier product ID for auto-shipping. | [optional] |
15
15
  | **default_address_id** | **String** | Default sender address ID for auto-shipping. | [optional] |
16
16
  | **shipping_method_mappings** | [**Array<CreateOrderChannelRequestSettingsShippingMethodMappingsInner>**](CreateOrderChannelRequestSettingsShippingMethodMappingsInner.md) | Map imported shipping-method titles to shipping rules, for channels without checkout rate integration. | [optional] |
17
- | **sync_only_unfulfilled** | **Boolean** | Only import orders that are not yet fulfilled. | [optional][default to true] |
17
+ | **sync_only_unfulfilled** | **Boolean** | Only import orders that are not yet fulfilled. | [optional] |
18
18
  | **sync_orders_since** | **Time** | Only sync orders placed at or after this timestamp. | [optional] |
19
- | **service_point_count** | **Integer** | Number of service points to show at checkout (1-20). | [optional][default to 6] |
19
+ | **service_point_count** | **Integer** | Number of service points to show at checkout (1-20). | [optional] |
20
20
 
21
21
  ## Example
22
22
 
@@ -12,8 +12,8 @@
12
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
- | **term_of_trade** | **String** | Incoterm governing the shipment. | [optional][default to 'DAP'] |
16
- | **status** | **String** | Lifecycle status of the shipment. | [optional][default to 'pending'] |
15
+ | **term_of_trade** | **String** | Incoterm governing the shipment. | [optional] |
16
+ | **status** | **String** | Lifecycle status of the shipment. | [optional] |
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] |
@@ -6,29 +6,30 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **name** | **String** | Shipping rule name | [optional] |
8
8
  | **description** | **String** | Optional description | [optional] |
9
- | **direction** | **String** | Whether this rule is for outbound or inbound (return) shipments | [optional][default to 'outbound'] |
9
+ | **translations** | [**Hash<String, CreateShippingRuleRequestTranslationsValue>**](CreateShippingRuleRequestTranslationsValue.md) | Checkout name and description per language; a blank field falls back to the rule's own text | [optional] |
10
+ | **direction** | **String** | Whether this rule is for outbound or inbound (return) shipments | [optional] |
10
11
  | **carrier_id** | **String** | Carrier ID | [optional] |
11
12
  | **product_id** | **String** | Product ID from carrier | [optional] |
12
13
  | **services** | **Array<String>** | List of selected services | [optional] |
13
14
  | **additional_parameters** | [**Hash<String, CreateShippingRuleRequestAdditionalParametersValue>**](CreateShippingRuleRequestAdditionalParametersValue.md) | Carrier-specific extra parameters, keyed by the carrier parameter `key` from the product's `additionalParameters[].key`. Omit to leave the rule's parameters unchanged. | [optional] |
14
15
  | **address_id** | **String** | Sender address ID | [optional] |
15
16
  | **receiving_countries** | **Array<String>** | List of supported country codes | [optional] |
16
- | **email_notification** | **Boolean** | Send an email notification to the receiver | [optional][default to false] |
17
- | **phone_notification** | **Boolean** | Send an SMS notification to the receiver | [optional][default to false] |
17
+ | **email_notification** | **Boolean** | Send an email notification to the receiver | [optional] |
18
+ | **phone_notification** | **Boolean** | Send an SMS notification to the receiver | [optional] |
18
19
  | **min_weight** | **Float** | Minimum required weight in kg | [optional] |
19
20
  | **max_weight** | **Float** | Maximum allowed weight in kg | [optional] |
20
21
  | **min_order_value** | **Float** | Minimum required order value in currency units | [optional] |
21
22
  | **max_order_value** | **Float** | Maximum allowed order value in currency units | [optional] |
22
23
  | **conditions** | [**Array<CreateShippingRuleRequestConditionsInner>**](CreateShippingRuleRequestConditionsInner.md) | Rule conditions (weight/price/quantity) | [optional] |
23
- | **generate_proforma_invoice** | **Boolean** | Generate proforma invoice for shipments | [optional][default to false] |
24
- | **generate_commercial_invoice** | **Boolean** | Generate commercial invoice for international shipments | [optional][default to false] |
25
- | **generate_packing_list** | **Boolean** | Generate a packing slip with parcel and item details | [optional][default to false] |
26
- | **auto_print_labels** | **Boolean** | Automatically print labels when shipment is sent | [optional][default to false] |
27
- | **auto_print_documents** | **Boolean** | Automatically print documents when shipment is sent | [optional][default to false] |
24
+ | **generate_proforma_invoice** | **Boolean** | Generate proforma invoice for shipments | [optional] |
25
+ | **generate_commercial_invoice** | **Boolean** | Generate commercial invoice for international shipments | [optional] |
26
+ | **generate_packing_list** | **Boolean** | Generate a packing slip with parcel and item details | [optional] |
27
+ | **auto_print_labels** | **Boolean** | Automatically print labels when shipment is sent | [optional] |
28
+ | **auto_print_documents** | **Boolean** | Automatically print documents when shipment is sent | [optional] |
28
29
  | **label_printer_id** | **String** | ID of the label printer | [optional] |
29
30
  | **document_printer_id** | **String** | ID of the document printer | [optional] |
30
31
  | **return_shipping_rule_id** | **String** | ID of the return shipping rule | [optional] |
31
- | **auto_create_return_shipment** | **Boolean** | Automatically create and send a return shipment on dispatch | [optional][default to false] |
32
+ | **auto_create_return_shipment** | **Boolean** | Automatically create and send a return shipment on dispatch | [optional] |
32
33
  | **brand_id** | **String** | Brand this record is assigned to; null (or omitted outside a brand session) keeps it organization-wide | [optional] |
33
34
 
34
35
  ## Example
@@ -39,6 +40,7 @@ require 'zippendo'
39
40
  instance = Zippendo::UpdateShippingRuleRequest.new(
40
41
  name: Standard DK,
41
42
  description: Standard levering i Danmark,
43
+ translations: {"da":{"name":"Levering til døren","description":"Leveres inden for 1-2 hverdage"},"de":{"name":"Lieferung bis zur Haustür"}},
42
44
  direction: outbound,
43
45
  carrier_id: carr_01HZX9K2QF,
44
46
  product_id: PNL13,
@@ -1024,7 +1024,7 @@ module Zippendo
1024
1024
  end
1025
1025
 
1026
1026
  # Update shipment
1027
- # Update an existing shipment. Only draft, pending or error shipments can be updated; an applied shipping rule overrides carrier settings and sender party.
1027
+ # Update a draft, pending or error shipment; fields left out keep their stored values. A draft becomes pending when the update sets its carrier settings or service point and it has a carrier, or applies a shipping rule, which overrides carrier settings and sender party.
1028
1028
  # @param org_id [String] Organization identifier.
1029
1029
  # @param shipment_id [String] Shipment identifier.
1030
1030
  # @param update_shipment_request [UpdateShipmentRequest]
@@ -1036,7 +1036,7 @@ module Zippendo
1036
1036
  end
1037
1037
 
1038
1038
  # Update shipment
1039
- # Update an existing shipment. Only draft, pending or error shipments can be updated; an applied shipping rule overrides carrier settings and sender party.
1039
+ # Update a draft, pending or error shipment; fields left out keep their stored values. A draft becomes pending when the update sets its carrier settings or service point and it has a carrier, or applies a shipping rule, which overrides carrier settings and sender party.
1040
1040
  # @param org_id [String] Organization identifier.
1041
1041
  # @param shipment_id [String] Shipment identifier.
1042
1042
  # @param update_shipment_request [UpdateShipmentRequest]
@@ -24,6 +24,9 @@ module Zippendo
24
24
  # Optional description
25
25
  attr_accessor :description
26
26
 
27
+ # Checkout name and description per language
28
+ attr_accessor :translations
29
+
27
30
  # Whether this rule is for outbound or inbound (return) shipments
28
31
  attr_accessor :direction
29
32
 
@@ -133,6 +136,7 @@ module Zippendo
133
136
  :'id' => :'id',
134
137
  :'name' => :'name',
135
138
  :'description' => :'description',
139
+ :'translations' => :'translations',
136
140
  :'direction' => :'direction',
137
141
  :'carrier_id' => :'carrierId',
138
142
  :'product_id' => :'productId',
@@ -179,6 +183,7 @@ module Zippendo
179
183
  :'id' => :'String',
180
184
  :'name' => :'String',
181
185
  :'description' => :'String',
186
+ :'translations' => :'Hash<String, ListShippingRules200ResponseDataInnerTranslationsValue>',
182
187
  :'direction' => :'String',
183
188
  :'carrier_id' => :'String',
184
189
  :'product_id' => :'String',
@@ -258,6 +263,14 @@ module Zippendo
258
263
  self.description = nil
259
264
  end
260
265
 
266
+ if attributes.key?(:'translations')
267
+ if (value = attributes[:'translations']).is_a?(Hash)
268
+ self.translations = value
269
+ end
270
+ else
271
+ self.translations = nil
272
+ end
273
+
261
274
  if attributes.key?(:'direction')
262
275
  self.direction = attributes[:'direction']
263
276
  else
@@ -446,6 +459,10 @@ module Zippendo
446
459
  invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
447
460
  end
448
461
 
462
+ if @translations.nil?
463
+ invalid_properties.push('invalid value for "translations", translations cannot be nil.')
464
+ end
465
+
449
466
  if @direction.nil?
450
467
  invalid_properties.push('invalid value for "direction", direction cannot be nil.')
451
468
  end
@@ -548,6 +565,7 @@ module Zippendo
548
565
  return false if @id.nil?
549
566
  return false if @name.nil?
550
567
  return false if @name.to_s.length < 1
568
+ return false if @translations.nil?
551
569
  return false if @direction.nil?
552
570
  direction_validator = EnumAttributeValidator.new('String', ["outbound", "inbound"])
553
571
  return false unless direction_validator.valid?(@direction)
@@ -600,6 +618,16 @@ module Zippendo
600
618
  @name = name
601
619
  end
602
620
 
621
+ # Custom attribute writer method with validation
622
+ # @param [Object] translations Value to be assigned
623
+ def translations=(translations)
624
+ if translations.nil?
625
+ fail ArgumentError, 'translations cannot be nil'
626
+ end
627
+
628
+ @translations = translations
629
+ end
630
+
603
631
  # Custom attribute writer method checking allowed values (enum).
604
632
  # @param [Object] direction Object to be assigned
605
633
  def direction=(direction)
@@ -838,6 +866,7 @@ module Zippendo
838
866
  id == o.id &&
839
867
  name == o.name &&
840
868
  description == o.description &&
869
+ translations == o.translations &&
841
870
  direction == o.direction &&
842
871
  carrier_id == o.carrier_id &&
843
872
  product_id == o.product_id &&
@@ -876,7 +905,7 @@ module Zippendo
876
905
  # Calculates hash code according to all attributes.
877
906
  # @return [Integer] Hash code
878
907
  def hash
879
- [id, name, description, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, org_id, brand_id, created_at, updated_at].hash
908
+ [id, name, description, translations, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, org_id, brand_id, created_at, updated_at].hash
880
909
  end
881
910
 
882
911
  # Builds the object from hash
@@ -21,6 +21,9 @@ module Zippendo
21
21
  # Optional description
22
22
  attr_accessor :description
23
23
 
24
+ # Checkout name and description per language; a blank field falls back to the rule's own text
25
+ attr_accessor :translations
26
+
24
27
  # Whether this rule is for outbound or inbound (return) shipments
25
28
  attr_accessor :direction
26
29
 
@@ -120,6 +123,7 @@ module Zippendo
120
123
  {
121
124
  :'name' => :'name',
122
125
  :'description' => :'description',
126
+ :'translations' => :'translations',
123
127
  :'direction' => :'direction',
124
128
  :'carrier_id' => :'carrierId',
125
129
  :'product_id' => :'productId',
@@ -162,6 +166,7 @@ module Zippendo
162
166
  {
163
167
  :'name' => :'String',
164
168
  :'description' => :'String',
169
+ :'translations' => :'Hash<String, CreateShippingRuleRequestTranslationsValue>',
165
170
  :'direction' => :'String',
166
171
  :'carrier_id' => :'String',
167
172
  :'product_id' => :'String',
@@ -229,6 +234,12 @@ module Zippendo
229
234
  self.description = attributes[:'description']
230
235
  end
231
236
 
237
+ if attributes.key?(:'translations')
238
+ if (value = attributes[:'translations']).is_a?(Hash)
239
+ self.translations = value
240
+ end
241
+ end
242
+
232
243
  if attributes.key?(:'direction')
233
244
  self.direction = attributes[:'direction']
234
245
  else
@@ -587,6 +598,7 @@ module Zippendo
587
598
  self.class == o.class &&
588
599
  name == o.name &&
589
600
  description == o.description &&
601
+ translations == o.translations &&
590
602
  direction == o.direction &&
591
603
  carrier_id == o.carrier_id &&
592
604
  product_id == o.product_id &&
@@ -622,7 +634,7 @@ module Zippendo
622
634
  # Calculates hash code according to all attributes.
623
635
  # @return [Integer] Hash code
624
636
  def hash
625
- [name, description, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, brand_id].hash
637
+ [name, description, translations, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, brand_id].hash
626
638
  end
627
639
 
628
640
  # Builds the object from hash
@@ -0,0 +1,196 @@
1
+ =begin
2
+ #Zippendo Public API
3
+
4
+ #Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand's team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand's id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan's limit returns `403`.
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 CreateShippingRuleRequestTranslationsValue < ApiModelBase
18
+ # Checkout name in this language; blank keeps the rule's own name.
19
+ attr_accessor :name
20
+
21
+ # Checkout description in this language; blank keeps the rule's own description.
22
+ attr_accessor :description
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'description' => :'description'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'name' => :'String',
46
+ :'description' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::CreateShippingRuleRequestTranslationsValue` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::CreateShippingRuleRequestTranslationsValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'name')
73
+ self.name = attributes[:'name']
74
+ end
75
+
76
+ if attributes.key?(:'description')
77
+ self.description = attributes[:'description']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ if !@name.nil? && @name.to_s.length > 200
87
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
88
+ end
89
+
90
+ if !@description.nil? && @description.to_s.length > 200
91
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 200.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ return false if !@name.nil? && @name.to_s.length > 200
102
+ return false if !@description.nil? && @description.to_s.length > 200
103
+ true
104
+ end
105
+
106
+ # Custom attribute writer method with validation
107
+ # @param [Object] name Value to be assigned
108
+ def name=(name)
109
+ if name.nil?
110
+ fail ArgumentError, 'name cannot be nil'
111
+ end
112
+
113
+ if name.to_s.length > 200
114
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
115
+ end
116
+
117
+ @name = name
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] description Value to be assigned
122
+ def description=(description)
123
+ if description.nil?
124
+ fail ArgumentError, 'description cannot be nil'
125
+ end
126
+
127
+ if description.to_s.length > 200
128
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 200.'
129
+ end
130
+
131
+ @description = description
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ name == o.name &&
140
+ description == o.description
141
+ end
142
+
143
+ # @see the `==` method
144
+ # @param [Object] Object to be compared
145
+ def eql?(o)
146
+ self == o
147
+ end
148
+
149
+ # Calculates hash code according to all attributes.
150
+ # @return [Integer] Hash code
151
+ def hash
152
+ [name, description].hash
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def self.build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ attributes = attributes.transform_keys(&:to_sym)
161
+ transformed_hash = {}
162
+ openapi_types.each_pair do |key, type|
163
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
164
+ transformed_hash["#{key}"] = nil
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[attribute_map[key]].is_a?(Array)
169
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
170
+ end
171
+ elsif !attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
173
+ end
174
+ end
175
+ new(transformed_hash)
176
+ end
177
+
178
+ # Returns the object in the form of hash
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_hash
181
+ hash = {}
182
+ self.class.attribute_map.each_pair do |attr, param|
183
+ value = self.send(attr)
184
+ if value.nil?
185
+ is_nullable = self.class.openapi_nullable.include?(attr)
186
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
187
+ end
188
+
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ end
195
+
196
+ end
@@ -24,6 +24,9 @@ module Zippendo
24
24
  # Optional description
25
25
  attr_accessor :description
26
26
 
27
+ # Checkout name and description per language
28
+ attr_accessor :translations
29
+
27
30
  # Whether this rule is for outbound or inbound (return) shipments
28
31
  attr_accessor :direction
29
32
 
@@ -143,6 +146,7 @@ module Zippendo
143
146
  :'id' => :'id',
144
147
  :'name' => :'name',
145
148
  :'description' => :'description',
149
+ :'translations' => :'translations',
146
150
  :'direction' => :'direction',
147
151
  :'carrier_id' => :'carrierId',
148
152
  :'product_id' => :'productId',
@@ -194,6 +198,7 @@ module Zippendo
194
198
  :'id' => :'String',
195
199
  :'name' => :'String',
196
200
  :'description' => :'String',
201
+ :'translations' => :'Hash<String, ListShippingRules200ResponseDataInnerTranslationsValue>',
197
202
  :'direction' => :'String',
198
203
  :'carrier_id' => :'String',
199
204
  :'product_id' => :'String',
@@ -281,6 +286,14 @@ module Zippendo
281
286
  self.description = nil
282
287
  end
283
288
 
289
+ if attributes.key?(:'translations')
290
+ if (value = attributes[:'translations']).is_a?(Hash)
291
+ self.translations = value
292
+ end
293
+ else
294
+ self.translations = nil
295
+ end
296
+
284
297
  if attributes.key?(:'direction')
285
298
  self.direction = attributes[:'direction']
286
299
  else
@@ -493,6 +506,10 @@ module Zippendo
493
506
  invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
494
507
  end
495
508
 
509
+ if @translations.nil?
510
+ invalid_properties.push('invalid value for "translations", translations cannot be nil.')
511
+ end
512
+
496
513
  if @direction.nil?
497
514
  invalid_properties.push('invalid value for "direction", direction cannot be nil.')
498
515
  end
@@ -603,6 +620,7 @@ module Zippendo
603
620
  return false if @id.nil?
604
621
  return false if @name.nil?
605
622
  return false if @name.to_s.length < 1
623
+ return false if @translations.nil?
606
624
  return false if @direction.nil?
607
625
  direction_validator = EnumAttributeValidator.new('String', ["outbound", "inbound"])
608
626
  return false unless direction_validator.valid?(@direction)
@@ -657,6 +675,16 @@ module Zippendo
657
675
  @name = name
658
676
  end
659
677
 
678
+ # Custom attribute writer method with validation
679
+ # @param [Object] translations Value to be assigned
680
+ def translations=(translations)
681
+ if translations.nil?
682
+ fail ArgumentError, 'translations cannot be nil'
683
+ end
684
+
685
+ @translations = translations
686
+ end
687
+
660
688
  # Custom attribute writer method checking allowed values (enum).
661
689
  # @param [Object] direction Object to be assigned
662
690
  def direction=(direction)
@@ -915,6 +943,7 @@ module Zippendo
915
943
  id == o.id &&
916
944
  name == o.name &&
917
945
  description == o.description &&
946
+ translations == o.translations &&
918
947
  direction == o.direction &&
919
948
  carrier_id == o.carrier_id &&
920
949
  product_id == o.product_id &&
@@ -958,7 +987,7 @@ module Zippendo
958
987
  # Calculates hash code according to all attributes.
959
988
  # @return [Integer] Hash code
960
989
  def hash
961
- [id, name, description, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, org_id, brand_id, created_at, updated_at, carrier, address, label_printer, document_printer, return_shipping_rule].hash
990
+ [id, name, description, translations, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, org_id, brand_id, created_at, updated_at, carrier, address, label_printer, document_printer, return_shipping_rule].hash
962
991
  end
963
992
 
964
993
  # Builds the object from hash
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Zippendo Public API
3
+
4
+ #Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand's team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand's id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan's limit returns `403`.
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 ListShippingRules200ResponseDataInnerTranslationsValue < ApiModelBase
18
+ # Rate name in this language
19
+ attr_accessor :name
20
+
21
+ # Rate description in this language
22
+ attr_accessor :description
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'description' => :'description'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'name' => :'String',
46
+ :'description' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::ListShippingRules200ResponseDataInnerTranslationsValue` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ acceptable_attribute_map = self.class.acceptable_attribute_map
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!acceptable_attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::ListShippingRules200ResponseDataInnerTranslationsValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'name')
73
+ self.name = attributes[:'name']
74
+ end
75
+
76
+ if attributes.key?(:'description')
77
+ self.description = attributes[:'description']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ name == o.name &&
102
+ description == o.description
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [name, description].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -131,8 +131,6 @@ module Zippendo
131
131
 
132
132
  if attributes.key?(:'use_webhooks')
133
133
  self.use_webhooks = attributes[:'use_webhooks']
134
- else
135
- self.use_webhooks = true
136
134
  end
137
135
 
138
136
  if attributes.key?(:'site_url')
@@ -145,20 +143,14 @@ module Zippendo
145
143
 
146
144
  if attributes.key?(:'auto_sync')
147
145
  self.auto_sync = attributes[:'auto_sync']
148
- else
149
- self.auto_sync = false
150
146
  end
151
147
 
152
148
  if attributes.key?(:'sync_interval_minutes')
153
149
  self.sync_interval_minutes = attributes[:'sync_interval_minutes']
154
- else
155
- self.sync_interval_minutes = 15
156
150
  end
157
151
 
158
152
  if attributes.key?(:'auto_ship_on_create')
159
153
  self.auto_ship_on_create = attributes[:'auto_ship_on_create']
160
- else
161
- self.auto_ship_on_create = false
162
154
  end
163
155
 
164
156
  if attributes.key?(:'default_carrier_id')
@@ -181,8 +173,6 @@ module Zippendo
181
173
 
182
174
  if attributes.key?(:'sync_only_unfulfilled')
183
175
  self.sync_only_unfulfilled = attributes[:'sync_only_unfulfilled']
184
- else
185
- self.sync_only_unfulfilled = true
186
176
  end
187
177
 
188
178
  if attributes.key?(:'sync_orders_since')
@@ -191,8 +181,6 @@ module Zippendo
191
181
 
192
182
  if attributes.key?(:'service_point_count')
193
183
  self.service_point_count = attributes[:'service_point_count']
194
- else
195
- self.service_point_count = 6
196
184
  end
197
185
  end
198
186
 
@@ -198,14 +198,10 @@ module Zippendo
198
198
 
199
199
  if attributes.key?(:'term_of_trade')
200
200
  self.term_of_trade = attributes[:'term_of_trade']
201
- else
202
- self.term_of_trade = 'DAP'
203
201
  end
204
202
 
205
203
  if attributes.key?(:'status')
206
204
  self.status = attributes[:'status']
207
- else
208
- self.status = 'pending'
209
205
  end
210
206
 
211
207
  if attributes.key?(:'order_id')
@@ -21,6 +21,9 @@ module Zippendo
21
21
  # Optional description
22
22
  attr_accessor :description
23
23
 
24
+ # Checkout name and description per language; a blank field falls back to the rule's own text
25
+ attr_accessor :translations
26
+
24
27
  # Whether this rule is for outbound or inbound (return) shipments
25
28
  attr_accessor :direction
26
29
 
@@ -120,6 +123,7 @@ module Zippendo
120
123
  {
121
124
  :'name' => :'name',
122
125
  :'description' => :'description',
126
+ :'translations' => :'translations',
123
127
  :'direction' => :'direction',
124
128
  :'carrier_id' => :'carrierId',
125
129
  :'product_id' => :'productId',
@@ -162,6 +166,7 @@ module Zippendo
162
166
  {
163
167
  :'name' => :'String',
164
168
  :'description' => :'String',
169
+ :'translations' => :'Hash<String, CreateShippingRuleRequestTranslationsValue>',
165
170
  :'direction' => :'String',
166
171
  :'carrier_id' => :'String',
167
172
  :'product_id' => :'String',
@@ -227,10 +232,14 @@ module Zippendo
227
232
  self.description = attributes[:'description']
228
233
  end
229
234
 
235
+ if attributes.key?(:'translations')
236
+ if (value = attributes[:'translations']).is_a?(Hash)
237
+ self.translations = value
238
+ end
239
+ end
240
+
230
241
  if attributes.key?(:'direction')
231
242
  self.direction = attributes[:'direction']
232
- else
233
- self.direction = 'outbound'
234
243
  end
235
244
 
236
245
  if attributes.key?(:'carrier_id')
@@ -265,14 +274,10 @@ module Zippendo
265
274
 
266
275
  if attributes.key?(:'email_notification')
267
276
  self.email_notification = attributes[:'email_notification']
268
- else
269
- self.email_notification = false
270
277
  end
271
278
 
272
279
  if attributes.key?(:'phone_notification')
273
280
  self.phone_notification = attributes[:'phone_notification']
274
- else
275
- self.phone_notification = false
276
281
  end
277
282
 
278
283
  if attributes.key?(:'min_weight')
@@ -299,32 +304,22 @@ module Zippendo
299
304
 
300
305
  if attributes.key?(:'generate_proforma_invoice')
301
306
  self.generate_proforma_invoice = attributes[:'generate_proforma_invoice']
302
- else
303
- self.generate_proforma_invoice = false
304
307
  end
305
308
 
306
309
  if attributes.key?(:'generate_commercial_invoice')
307
310
  self.generate_commercial_invoice = attributes[:'generate_commercial_invoice']
308
- else
309
- self.generate_commercial_invoice = false
310
311
  end
311
312
 
312
313
  if attributes.key?(:'generate_packing_list')
313
314
  self.generate_packing_list = attributes[:'generate_packing_list']
314
- else
315
- self.generate_packing_list = false
316
315
  end
317
316
 
318
317
  if attributes.key?(:'auto_print_labels')
319
318
  self.auto_print_labels = attributes[:'auto_print_labels']
320
- else
321
- self.auto_print_labels = false
322
319
  end
323
320
 
324
321
  if attributes.key?(:'auto_print_documents')
325
322
  self.auto_print_documents = attributes[:'auto_print_documents']
326
- else
327
- self.auto_print_documents = false
328
323
  end
329
324
 
330
325
  if attributes.key?(:'label_printer_id')
@@ -341,8 +336,6 @@ module Zippendo
341
336
 
342
337
  if attributes.key?(:'auto_create_return_shipment')
343
338
  self.auto_create_return_shipment = attributes[:'auto_create_return_shipment']
344
- else
345
- self.auto_create_return_shipment = false
346
339
  end
347
340
 
348
341
  if attributes.key?(:'brand_id')
@@ -478,6 +471,7 @@ module Zippendo
478
471
  self.class == o.class &&
479
472
  name == o.name &&
480
473
  description == o.description &&
474
+ translations == o.translations &&
481
475
  direction == o.direction &&
482
476
  carrier_id == o.carrier_id &&
483
477
  product_id == o.product_id &&
@@ -513,7 +507,7 @@ module Zippendo
513
507
  # Calculates hash code according to all attributes.
514
508
  # @return [Integer] Hash code
515
509
  def hash
516
- [name, description, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, brand_id].hash
510
+ [name, description, translations, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, brand_id].hash
517
511
  end
518
512
 
519
513
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.24.0
11
11
  =end
12
12
 
13
13
  module Zippendo
14
- VERSION = '1.3.15'
14
+ VERSION = '1.3.17'
15
15
  end
data/lib/zippendo.rb CHANGED
@@ -83,6 +83,7 @@ require 'zippendo/models/create_shipping_rule_request_conditions_inner_one_of1'
83
83
  require 'zippendo/models/create_shipping_rule_request_conditions_inner_one_of2'
84
84
  require 'zippendo/models/create_shipping_rule_request_conditions_inner_one_of3'
85
85
  require 'zippendo/models/create_shipping_rule_request_conditions_inner_one_of4'
86
+ require 'zippendo/models/create_shipping_rule_request_translations_value'
86
87
  require 'zippendo/models/delete_org_webhook200_response'
87
88
  require 'zippendo/models/delete_shipping_rule200_response'
88
89
  require 'zippendo/models/get_billing_usage200_response'
@@ -154,6 +155,7 @@ require 'zippendo/models/list_shipping_rules200_response_data_inner_conditions_i
154
155
  require 'zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of4'
155
156
  require 'zippendo/models/list_shipping_rules200_response_data_inner_label_printer'
156
157
  require 'zippendo/models/list_shipping_rules200_response_data_inner_return_shipping_rule'
158
+ require 'zippendo/models/list_shipping_rules200_response_data_inner_translations_value'
157
159
  require 'zippendo/models/revoke_api_token200_response'
158
160
  require 'zippendo/models/revoke_order_channel_webhook_secret200_response'
159
161
  require 'zippendo/models/send_shipment422_response'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zippendo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.15
4
+ version: 1.3.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zippendo
@@ -62,6 +62,7 @@ files:
62
62
  - README.md
63
63
  - Rakefile
64
64
  - SECURITY.md
65
+ - context7.json
65
66
  - docs/AddressesApi.md
66
67
  - docs/BatchSendShipments200Response.md
67
68
  - docs/BatchSendShipments200ResponseResultsInner.md
@@ -132,6 +133,7 @@ files:
132
133
  - docs/CreateShippingRuleRequestConditionsInnerOneOf2.md
133
134
  - docs/CreateShippingRuleRequestConditionsInnerOneOf3.md
134
135
  - docs/CreateShippingRuleRequestConditionsInnerOneOf4.md
136
+ - docs/CreateShippingRuleRequestTranslationsValue.md
135
137
  - docs/DeleteOrgWebhook200Response.md
136
138
  - docs/DeleteShippingRule200Response.md
137
139
  - docs/GetBillingUsage200Response.md
@@ -203,6 +205,7 @@ files:
203
205
  - docs/ListShippingRules200ResponseDataInnerConditionsInnerOneOf4.md
204
206
  - docs/ListShippingRules200ResponseDataInnerLabelPrinter.md
205
207
  - docs/ListShippingRules200ResponseDataInnerReturnShippingRule.md
208
+ - docs/ListShippingRules200ResponseDataInnerTranslationsValue.md
206
209
  - docs/OrderChannelsApi.md
207
210
  - docs/OrdersApi.md
208
211
  - docs/OrgsApi.md
@@ -325,6 +328,7 @@ files:
325
328
  - lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of2.rb
326
329
  - lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of3.rb
327
330
  - lib/zippendo/models/create_shipping_rule_request_conditions_inner_one_of4.rb
331
+ - lib/zippendo/models/create_shipping_rule_request_translations_value.rb
328
332
  - lib/zippendo/models/delete_org_webhook200_response.rb
329
333
  - lib/zippendo/models/delete_shipping_rule200_response.rb
330
334
  - lib/zippendo/models/get_billing_usage200_response.rb
@@ -396,6 +400,7 @@ files:
396
400
  - lib/zippendo/models/list_shipping_rules200_response_data_inner_conditions_inner_one_of4.rb
397
401
  - lib/zippendo/models/list_shipping_rules200_response_data_inner_label_printer.rb
398
402
  - lib/zippendo/models/list_shipping_rules200_response_data_inner_return_shipping_rule.rb
403
+ - lib/zippendo/models/list_shipping_rules200_response_data_inner_translations_value.rb
399
404
  - lib/zippendo/models/revoke_api_token200_response.rb
400
405
  - lib/zippendo/models/revoke_order_channel_webhook_secret200_response.rb
401
406
  - lib/zippendo/models/send_shipment422_response.rb