zippendo 1.3.3 → 1.3.4
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 +4 -4
- data/docs/AddressesApi.md +3 -3
- data/docs/CreateAddressRequest.md +6 -4
- data/docs/ListAddresses200ResponseDataInner.md +5 -3
- data/docs/ListShipments200ResponseDataInnerAddress.md +5 -3
- data/docs/UpdateAddressRequest.md +7 -5
- data/lib/zippendo/api/addresses_api.rb +2 -2
- data/lib/zippendo/models/create_address_request.rb +17 -29
- data/lib/zippendo/models/list_addresses200_response_data_inner.rb +17 -18
- data/lib/zippendo/models/list_shipments200_response_data_inner_address.rb +17 -18
- data/lib/zippendo/models/update_address_request.rb +19 -43
- data/lib/zippendo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7825133ea5d500bef50dc716f1da9ed2034f887fd272ea52cf8c0f88dc085439
|
|
4
|
+
data.tar.gz: 517134dbd610c9681a5f116c8efece3ad4d12c742ce6b821199cc1bd9fce51c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4a5b4781a8c10b658573035414681408b3bffb59ffbce010c1a6176da5a013ee561c2d4c8bea55df46d197fef51bd9d699f2ade54542ee1fa6b4f317b4fc8bf
|
|
7
|
+
data.tar.gz: 48183e018ec785bca9b9e0cc245d779e4b81ca93de7dcd3f9c467618bae20097df97d5159201fde60f134a5bb2e1fe60dee58e43262a347f4b88c229cce72081
|
data/docs/AddressesApi.md
CHANGED
|
@@ -32,7 +32,7 @@ end
|
|
|
32
32
|
|
|
33
33
|
api_instance = Zippendo::AddressesApi.new
|
|
34
34
|
org_id = 'org_01HZX9K2QF' # String | Organization ID
|
|
35
|
-
create_address_request = Zippendo::CreateAddressRequest.new({name: '
|
|
35
|
+
create_address_request = Zippendo::CreateAddressRequest.new({name: 'Zippendo ApS', address1: 'Vesterbrogade 1', zipcode: '1620', city: 'København', phone: '+4533123456', country_code: 'DK', email: 'lager@example.dk'}) # CreateAddressRequest |
|
|
36
36
|
|
|
37
37
|
begin
|
|
38
38
|
# Create address
|
|
@@ -250,7 +250,7 @@ opts = {
|
|
|
250
250
|
limit: 20, # Integer | Items per page (max 100)
|
|
251
251
|
type: 'sender', # String | Filter by address type (sender, pickup, return)
|
|
252
252
|
country_code: 'DK', # String | Filter by ISO 3166-1 alpha-2 country code.
|
|
253
|
-
search: 'Copenhagen', # String | Search by
|
|
253
|
+
search: 'Copenhagen', # String | Search by company name, description, contact or city.
|
|
254
254
|
brand_id: 'brnd_8f3kd92ld0', # String | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand.
|
|
255
255
|
brand_scope: 'own' # String | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context.
|
|
256
256
|
}
|
|
@@ -291,7 +291,7 @@ end
|
|
|
291
291
|
| **limit** | **Integer** | Items per page (max 100) | [optional][default to 20] |
|
|
292
292
|
| **type** | **String** | Filter by address type (sender, pickup, return) | [optional] |
|
|
293
293
|
| **country_code** | **String** | Filter by ISO 3166-1 alpha-2 country code. | [optional] |
|
|
294
|
-
| **search** | **String** | Search by
|
|
294
|
+
| **search** | **String** | Search by company name, description, contact or city. | [optional] |
|
|
295
295
|
| **brand_id** | **String** | Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand. | [optional] |
|
|
296
296
|
| **brand_scope** | **String** | How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context. | [optional] |
|
|
297
297
|
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **name** | **String** |
|
|
8
|
-
| **
|
|
7
|
+
| **name** | **String** | Company or person the parcel is sent from, printed on labels | |
|
|
8
|
+
| **description** | **String** | Internal label for this address; never printed or sent to a carrier | [optional] |
|
|
9
|
+
| **att_contact** | **String** | Contact person at this address, printed as the att. line | [optional] |
|
|
9
10
|
| **address1** | **String** | Address line 1 | |
|
|
10
11
|
| **address2** | **String** | Address line 2 | [optional] |
|
|
11
12
|
| **zipcode** | **String** | Postal/ZIP code | |
|
|
@@ -24,7 +25,8 @@
|
|
|
24
25
|
require 'zippendo'
|
|
25
26
|
|
|
26
27
|
instance = Zippendo::CreateAddressRequest.new(
|
|
27
|
-
name:
|
|
28
|
+
name: Zippendo ApS,
|
|
29
|
+
description: Main warehouse, Copenhagen,
|
|
28
30
|
att_contact: Mette Hansen,
|
|
29
31
|
address1: Vesterbrogade 1,
|
|
30
32
|
address2: 2. sal,
|
|
@@ -32,7 +34,7 @@ instance = Zippendo::CreateAddressRequest.new(
|
|
|
32
34
|
city: København,
|
|
33
35
|
phone: +4533123456,
|
|
34
36
|
country_code: DK,
|
|
35
|
-
state: ,
|
|
37
|
+
state: Hovedstaden,
|
|
36
38
|
email: lager@example.dk,
|
|
37
39
|
customs: {"eori":"DK12345678"},
|
|
38
40
|
address_types: ["sender"],
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | Unique address identifier | |
|
|
8
|
-
| **name** | **String** |
|
|
9
|
-
| **
|
|
8
|
+
| **name** | **String** | Company or person the parcel is sent from, printed on labels | |
|
|
9
|
+
| **description** | **String** | Internal label for this address; never printed or sent to a carrier | |
|
|
10
|
+
| **att_contact** | **String** | Contact person at this address, printed as the att. line | |
|
|
10
11
|
| **address1** | **String** | Address line 1 | |
|
|
11
12
|
| **address2** | **String** | Address line 2 | |
|
|
12
13
|
| **zipcode** | **String** | Postal/ZIP code | |
|
|
@@ -29,7 +30,8 @@ require 'zippendo'
|
|
|
29
30
|
|
|
30
31
|
instance = Zippendo::ListAddresses200ResponseDataInner.new(
|
|
31
32
|
id: addr_01HZX9K2QF,
|
|
32
|
-
name:
|
|
33
|
+
name: Zippendo ApS,
|
|
34
|
+
description: Main warehouse, Copenhagen,
|
|
33
35
|
att_contact: Mette Hansen,
|
|
34
36
|
address1: Vesterbrogade 1,
|
|
35
37
|
address2: 2. sal,
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | Unique address identifier | |
|
|
8
|
-
| **name** | **String** |
|
|
9
|
-
| **
|
|
8
|
+
| **name** | **String** | Company or person the parcel is sent from, printed on labels | |
|
|
9
|
+
| **description** | **String** | Internal label for this address; never printed or sent to a carrier | |
|
|
10
|
+
| **att_contact** | **String** | Contact person at this address, printed as the att. line | |
|
|
10
11
|
| **address1** | **String** | Address line 1 | |
|
|
11
12
|
| **address2** | **String** | Address line 2 | |
|
|
12
13
|
| **zipcode** | **String** | Postal/ZIP code | |
|
|
@@ -29,7 +30,8 @@ require 'zippendo'
|
|
|
29
30
|
|
|
30
31
|
instance = Zippendo::ListShipments200ResponseDataInnerAddress.new(
|
|
31
32
|
id: addr_01HZX9K2QF,
|
|
32
|
-
name:
|
|
33
|
+
name: Zippendo ApS,
|
|
34
|
+
description: Main warehouse, Copenhagen,
|
|
33
35
|
att_contact: Mette Hansen,
|
|
34
36
|
address1: Vesterbrogade 1,
|
|
35
37
|
address2: 2. sal,
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **name** | **String** |
|
|
8
|
-
| **
|
|
7
|
+
| **name** | **String** | Company or person the parcel is sent from, printed on labels | [optional] |
|
|
8
|
+
| **description** | **String** | Internal label for this address; send null or an empty string to clear it | [optional] |
|
|
9
|
+
| **att_contact** | **String** | Contact person at this address; send null or an empty string to clear it | [optional] |
|
|
9
10
|
| **address1** | **String** | Address line 1 | [optional] |
|
|
10
|
-
| **address2** | **String** | Address line 2 | [optional] |
|
|
11
|
+
| **address2** | **String** | Address line 2; send null or an empty string to clear it | [optional] |
|
|
11
12
|
| **zipcode** | **String** | Postal/ZIP code | [optional] |
|
|
12
13
|
| **city** | **String** | City | [optional] |
|
|
13
14
|
| **phone** | **String** | Phone number | [optional] |
|
|
14
15
|
| **country_code** | **String** | ISO country code | [optional] |
|
|
15
|
-
| **state** | **String** | State/Province | [optional] |
|
|
16
|
+
| **state** | **String** | State/Province; send null or an empty string to clear it | [optional] |
|
|
16
17
|
| **email** | **String** | Email address | [optional] |
|
|
17
18
|
| **customs** | **Hash<String, String>** | Customs identifiers | [optional] |
|
|
18
19
|
| **address_types** | **Array<String>** | Address types (sender, pickup, return) | [optional] |
|
|
@@ -24,7 +25,8 @@
|
|
|
24
25
|
require 'zippendo'
|
|
25
26
|
|
|
26
27
|
instance = Zippendo::UpdateAddressRequest.new(
|
|
27
|
-
name:
|
|
28
|
+
name: Zippendo ApS,
|
|
29
|
+
description: Main warehouse, Copenhagen,
|
|
28
30
|
att_contact: Mette Hansen,
|
|
29
31
|
address1: Vesterbrogade 1,
|
|
30
32
|
address2: 2. sal,
|
|
@@ -239,7 +239,7 @@ module Zippendo
|
|
|
239
239
|
# @option opts [Integer] :limit Items per page (max 100) (default to 20)
|
|
240
240
|
# @option opts [String] :type Filter by address type (sender, pickup, return)
|
|
241
241
|
# @option opts [String] :country_code Filter by ISO 3166-1 alpha-2 country code.
|
|
242
|
-
# @option opts [String] :search Search by
|
|
242
|
+
# @option opts [String] :search Search by company name, description, contact or city.
|
|
243
243
|
# @option opts [String] :brand_id Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand.
|
|
244
244
|
# @option opts [String] :brand_scope How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context.
|
|
245
245
|
# @return [ListAddresses200Response]
|
|
@@ -256,7 +256,7 @@ module Zippendo
|
|
|
256
256
|
# @option opts [Integer] :limit Items per page (max 100) (default to 20)
|
|
257
257
|
# @option opts [String] :type Filter by address type (sender, pickup, return)
|
|
258
258
|
# @option opts [String] :country_code Filter by ISO 3166-1 alpha-2 country code.
|
|
259
|
-
# @option opts [String] :search Search by
|
|
259
|
+
# @option opts [String] :search Search by company name, description, contact or city.
|
|
260
260
|
# @option opts [String] :brand_id Filter by brand. Pass a brand ID, or \"none\" for records not assigned to any brand.
|
|
261
261
|
# @option opts [String] :brand_scope How the brand context narrows this list: \"own\" returns only rows assigned to the current brand (requires a brand session, a brand-bound token, or the X-Zippendo-Brand header), \"shared\" returns only unassigned organization-wide rows, \"both\" (default) returns both. The X-Zippendo-Brand-Scope header supplies a default when the parameter is omitted. For strictly brand-owned records (orders, shipments), a brand-scoped request combined with \"shared\" returns no rows, since those records are never visible organization-wide from within a brand context.
|
|
262
262
|
# @return [Array<(ListAddresses200Response, Integer, Hash)>] ListAddresses200Response data, response status code and response headers
|
|
@@ -15,10 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zippendo
|
|
17
17
|
class CreateAddressRequest < ApiModelBase
|
|
18
|
-
#
|
|
18
|
+
# Company or person the parcel is sent from, printed on labels
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# Internal label for this address; never printed or sent to a carrier
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
# Contact person at this address, printed as the att. line
|
|
22
25
|
attr_accessor :att_contact
|
|
23
26
|
|
|
24
27
|
# Address line 1
|
|
@@ -80,6 +83,7 @@ module Zippendo
|
|
|
80
83
|
def self.attribute_map
|
|
81
84
|
{
|
|
82
85
|
:'name' => :'name',
|
|
86
|
+
:'description' => :'description',
|
|
83
87
|
:'att_contact' => :'attContact',
|
|
84
88
|
:'address1' => :'address1',
|
|
85
89
|
:'address2' => :'address2',
|
|
@@ -109,6 +113,7 @@ module Zippendo
|
|
|
109
113
|
def self.openapi_types
|
|
110
114
|
{
|
|
111
115
|
:'name' => :'String',
|
|
116
|
+
:'description' => :'String',
|
|
112
117
|
:'att_contact' => :'String',
|
|
113
118
|
:'address1' => :'String',
|
|
114
119
|
:'address2' => :'String',
|
|
@@ -127,6 +132,10 @@ module Zippendo
|
|
|
127
132
|
# List of attributes with nullable: true
|
|
128
133
|
def self.openapi_nullable
|
|
129
134
|
Set.new([
|
|
135
|
+
:'description',
|
|
136
|
+
:'att_contact',
|
|
137
|
+
:'address2',
|
|
138
|
+
:'state',
|
|
130
139
|
:'brand_id'
|
|
131
140
|
])
|
|
132
141
|
end
|
|
@@ -153,10 +162,12 @@ module Zippendo
|
|
|
153
162
|
self.name = nil
|
|
154
163
|
end
|
|
155
164
|
|
|
165
|
+
if attributes.key?(:'description')
|
|
166
|
+
self.description = attributes[:'description']
|
|
167
|
+
end
|
|
168
|
+
|
|
156
169
|
if attributes.key?(:'att_contact')
|
|
157
170
|
self.att_contact = attributes[:'att_contact']
|
|
158
|
-
else
|
|
159
|
-
self.att_contact = nil
|
|
160
171
|
end
|
|
161
172
|
|
|
162
173
|
if attributes.key?(:'address1')
|
|
@@ -233,14 +244,6 @@ module Zippendo
|
|
|
233
244
|
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
234
245
|
end
|
|
235
246
|
|
|
236
|
-
if @att_contact.nil?
|
|
237
|
-
invalid_properties.push('invalid value for "att_contact", att_contact cannot be nil.')
|
|
238
|
-
end
|
|
239
|
-
|
|
240
|
-
if @att_contact.to_s.length < 1
|
|
241
|
-
invalid_properties.push('invalid value for "att_contact", the character length must be greater than or equal to 1.')
|
|
242
|
-
end
|
|
243
|
-
|
|
244
247
|
if @address1.nil?
|
|
245
248
|
invalid_properties.push('invalid value for "address1", address1 cannot be nil.')
|
|
246
249
|
end
|
|
@@ -311,8 +314,6 @@ module Zippendo
|
|
|
311
314
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
312
315
|
return false if @name.nil?
|
|
313
316
|
return false if @name.to_s.length < 1
|
|
314
|
-
return false if @att_contact.nil?
|
|
315
|
-
return false if @att_contact.to_s.length < 1
|
|
316
317
|
return false if @address1.nil?
|
|
317
318
|
return false if @address1.to_s.length < 1
|
|
318
319
|
return false if @zipcode.nil?
|
|
@@ -345,20 +346,6 @@ module Zippendo
|
|
|
345
346
|
@name = name
|
|
346
347
|
end
|
|
347
348
|
|
|
348
|
-
# Custom attribute writer method with validation
|
|
349
|
-
# @param [Object] att_contact Value to be assigned
|
|
350
|
-
def att_contact=(att_contact)
|
|
351
|
-
if att_contact.nil?
|
|
352
|
-
fail ArgumentError, 'att_contact cannot be nil'
|
|
353
|
-
end
|
|
354
|
-
|
|
355
|
-
if att_contact.to_s.length < 1
|
|
356
|
-
fail ArgumentError, 'invalid value for "att_contact", the character length must be greater than or equal to 1.'
|
|
357
|
-
end
|
|
358
|
-
|
|
359
|
-
@att_contact = att_contact
|
|
360
|
-
end
|
|
361
|
-
|
|
362
349
|
# Custom attribute writer method with validation
|
|
363
350
|
# @param [Object] address1 Value to be assigned
|
|
364
351
|
def address1=(address1)
|
|
@@ -464,6 +451,7 @@ module Zippendo
|
|
|
464
451
|
return true if self.equal?(o)
|
|
465
452
|
self.class == o.class &&
|
|
466
453
|
name == o.name &&
|
|
454
|
+
description == o.description &&
|
|
467
455
|
att_contact == o.att_contact &&
|
|
468
456
|
address1 == o.address1 &&
|
|
469
457
|
address2 == o.address2 &&
|
|
@@ -487,7 +475,7 @@ module Zippendo
|
|
|
487
475
|
# Calculates hash code according to all attributes.
|
|
488
476
|
# @return [Integer] Hash code
|
|
489
477
|
def hash
|
|
490
|
-
[name, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, brand_id].hash
|
|
478
|
+
[name, description, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, brand_id].hash
|
|
491
479
|
end
|
|
492
480
|
|
|
493
481
|
# Builds the object from hash
|
|
@@ -18,10 +18,13 @@ module Zippendo
|
|
|
18
18
|
# Unique address identifier
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# Company or person the parcel is sent from, printed on labels
|
|
22
22
|
attr_accessor :name
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Internal label for this address; never printed or sent to a carrier
|
|
25
|
+
attr_accessor :description
|
|
26
|
+
|
|
27
|
+
# Contact person at this address, printed as the att. line
|
|
25
28
|
attr_accessor :att_contact
|
|
26
29
|
|
|
27
30
|
# Address line 1
|
|
@@ -93,6 +96,7 @@ module Zippendo
|
|
|
93
96
|
{
|
|
94
97
|
:'id' => :'id',
|
|
95
98
|
:'name' => :'name',
|
|
99
|
+
:'description' => :'description',
|
|
96
100
|
:'att_contact' => :'attContact',
|
|
97
101
|
:'address1' => :'address1',
|
|
98
102
|
:'address2' => :'address2',
|
|
@@ -126,6 +130,7 @@ module Zippendo
|
|
|
126
130
|
{
|
|
127
131
|
:'id' => :'String',
|
|
128
132
|
:'name' => :'String',
|
|
133
|
+
:'description' => :'String',
|
|
129
134
|
:'att_contact' => :'String',
|
|
130
135
|
:'address1' => :'String',
|
|
131
136
|
:'address2' => :'String',
|
|
@@ -147,6 +152,8 @@ module Zippendo
|
|
|
147
152
|
# List of attributes with nullable: true
|
|
148
153
|
def self.openapi_nullable
|
|
149
154
|
Set.new([
|
|
155
|
+
:'description',
|
|
156
|
+
:'att_contact',
|
|
150
157
|
:'address2',
|
|
151
158
|
:'state',
|
|
152
159
|
:'customs',
|
|
@@ -182,6 +189,12 @@ module Zippendo
|
|
|
182
189
|
self.name = nil
|
|
183
190
|
end
|
|
184
191
|
|
|
192
|
+
if attributes.key?(:'description')
|
|
193
|
+
self.description = attributes[:'description']
|
|
194
|
+
else
|
|
195
|
+
self.description = nil
|
|
196
|
+
end
|
|
197
|
+
|
|
185
198
|
if attributes.key?(:'att_contact')
|
|
186
199
|
self.att_contact = attributes[:'att_contact']
|
|
187
200
|
else
|
|
@@ -288,10 +301,6 @@ module Zippendo
|
|
|
288
301
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
289
302
|
end
|
|
290
303
|
|
|
291
|
-
if @att_contact.nil?
|
|
292
|
-
invalid_properties.push('invalid value for "att_contact", att_contact cannot be nil.')
|
|
293
|
-
end
|
|
294
|
-
|
|
295
304
|
if @address1.nil?
|
|
296
305
|
invalid_properties.push('invalid value for "address1", address1 cannot be nil.')
|
|
297
306
|
end
|
|
@@ -346,7 +355,6 @@ module Zippendo
|
|
|
346
355
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
347
356
|
return false if @id.nil?
|
|
348
357
|
return false if @name.nil?
|
|
349
|
-
return false if @att_contact.nil?
|
|
350
358
|
return false if @address1.nil?
|
|
351
359
|
return false if @zipcode.nil?
|
|
352
360
|
return false if @city.nil?
|
|
@@ -381,16 +389,6 @@ module Zippendo
|
|
|
381
389
|
@name = name
|
|
382
390
|
end
|
|
383
391
|
|
|
384
|
-
# Custom attribute writer method with validation
|
|
385
|
-
# @param [Object] att_contact Value to be assigned
|
|
386
|
-
def att_contact=(att_contact)
|
|
387
|
-
if att_contact.nil?
|
|
388
|
-
fail ArgumentError, 'att_contact cannot be nil'
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
@att_contact = att_contact
|
|
392
|
-
end
|
|
393
|
-
|
|
394
392
|
# Custom attribute writer method with validation
|
|
395
393
|
# @param [Object] address1 Value to be assigned
|
|
396
394
|
def address1=(address1)
|
|
@@ -493,6 +491,7 @@ module Zippendo
|
|
|
493
491
|
self.class == o.class &&
|
|
494
492
|
id == o.id &&
|
|
495
493
|
name == o.name &&
|
|
494
|
+
description == o.description &&
|
|
496
495
|
att_contact == o.att_contact &&
|
|
497
496
|
address1 == o.address1 &&
|
|
498
497
|
address2 == o.address2 &&
|
|
@@ -519,7 +518,7 @@ module Zippendo
|
|
|
519
518
|
# Calculates hash code according to all attributes.
|
|
520
519
|
# @return [Integer] Hash code
|
|
521
520
|
def hash
|
|
522
|
-
[id, name, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, org_id, brand_id, created_at, updated_at].hash
|
|
521
|
+
[id, name, description, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, org_id, brand_id, created_at, updated_at].hash
|
|
523
522
|
end
|
|
524
523
|
|
|
525
524
|
# Builds the object from hash
|
|
@@ -18,10 +18,13 @@ module Zippendo
|
|
|
18
18
|
# Unique address identifier
|
|
19
19
|
attr_accessor :id
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# Company or person the parcel is sent from, printed on labels
|
|
22
22
|
attr_accessor :name
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Internal label for this address; never printed or sent to a carrier
|
|
25
|
+
attr_accessor :description
|
|
26
|
+
|
|
27
|
+
# Contact person at this address, printed as the att. line
|
|
25
28
|
attr_accessor :att_contact
|
|
26
29
|
|
|
27
30
|
# Address line 1
|
|
@@ -93,6 +96,7 @@ module Zippendo
|
|
|
93
96
|
{
|
|
94
97
|
:'id' => :'id',
|
|
95
98
|
:'name' => :'name',
|
|
99
|
+
:'description' => :'description',
|
|
96
100
|
:'att_contact' => :'attContact',
|
|
97
101
|
:'address1' => :'address1',
|
|
98
102
|
:'address2' => :'address2',
|
|
@@ -126,6 +130,7 @@ module Zippendo
|
|
|
126
130
|
{
|
|
127
131
|
:'id' => :'String',
|
|
128
132
|
:'name' => :'String',
|
|
133
|
+
:'description' => :'String',
|
|
129
134
|
:'att_contact' => :'String',
|
|
130
135
|
:'address1' => :'String',
|
|
131
136
|
:'address2' => :'String',
|
|
@@ -147,6 +152,8 @@ module Zippendo
|
|
|
147
152
|
# List of attributes with nullable: true
|
|
148
153
|
def self.openapi_nullable
|
|
149
154
|
Set.new([
|
|
155
|
+
:'description',
|
|
156
|
+
:'att_contact',
|
|
150
157
|
:'address2',
|
|
151
158
|
:'state',
|
|
152
159
|
:'customs',
|
|
@@ -182,6 +189,12 @@ module Zippendo
|
|
|
182
189
|
self.name = nil
|
|
183
190
|
end
|
|
184
191
|
|
|
192
|
+
if attributes.key?(:'description')
|
|
193
|
+
self.description = attributes[:'description']
|
|
194
|
+
else
|
|
195
|
+
self.description = nil
|
|
196
|
+
end
|
|
197
|
+
|
|
185
198
|
if attributes.key?(:'att_contact')
|
|
186
199
|
self.att_contact = attributes[:'att_contact']
|
|
187
200
|
else
|
|
@@ -288,10 +301,6 @@ module Zippendo
|
|
|
288
301
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
289
302
|
end
|
|
290
303
|
|
|
291
|
-
if @att_contact.nil?
|
|
292
|
-
invalid_properties.push('invalid value for "att_contact", att_contact cannot be nil.')
|
|
293
|
-
end
|
|
294
|
-
|
|
295
304
|
if @address1.nil?
|
|
296
305
|
invalid_properties.push('invalid value for "address1", address1 cannot be nil.')
|
|
297
306
|
end
|
|
@@ -346,7 +355,6 @@ module Zippendo
|
|
|
346
355
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
347
356
|
return false if @id.nil?
|
|
348
357
|
return false if @name.nil?
|
|
349
|
-
return false if @att_contact.nil?
|
|
350
358
|
return false if @address1.nil?
|
|
351
359
|
return false if @zipcode.nil?
|
|
352
360
|
return false if @city.nil?
|
|
@@ -381,16 +389,6 @@ module Zippendo
|
|
|
381
389
|
@name = name
|
|
382
390
|
end
|
|
383
391
|
|
|
384
|
-
# Custom attribute writer method with validation
|
|
385
|
-
# @param [Object] att_contact Value to be assigned
|
|
386
|
-
def att_contact=(att_contact)
|
|
387
|
-
if att_contact.nil?
|
|
388
|
-
fail ArgumentError, 'att_contact cannot be nil'
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
@att_contact = att_contact
|
|
392
|
-
end
|
|
393
|
-
|
|
394
392
|
# Custom attribute writer method with validation
|
|
395
393
|
# @param [Object] address1 Value to be assigned
|
|
396
394
|
def address1=(address1)
|
|
@@ -493,6 +491,7 @@ module Zippendo
|
|
|
493
491
|
self.class == o.class &&
|
|
494
492
|
id == o.id &&
|
|
495
493
|
name == o.name &&
|
|
494
|
+
description == o.description &&
|
|
496
495
|
att_contact == o.att_contact &&
|
|
497
496
|
address1 == o.address1 &&
|
|
498
497
|
address2 == o.address2 &&
|
|
@@ -519,7 +518,7 @@ module Zippendo
|
|
|
519
518
|
# Calculates hash code according to all attributes.
|
|
520
519
|
# @return [Integer] Hash code
|
|
521
520
|
def hash
|
|
522
|
-
[id, name, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, org_id, brand_id, created_at, updated_at].hash
|
|
521
|
+
[id, name, description, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, org_id, brand_id, created_at, updated_at].hash
|
|
523
522
|
end
|
|
524
523
|
|
|
525
524
|
# Builds the object from hash
|
|
@@ -15,16 +15,19 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zippendo
|
|
17
17
|
class UpdateAddressRequest < ApiModelBase
|
|
18
|
-
#
|
|
18
|
+
# Company or person the parcel is sent from, printed on labels
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
# Internal label for this address; send null or an empty string to clear it
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
# Contact person at this address; send null or an empty string to clear it
|
|
22
25
|
attr_accessor :att_contact
|
|
23
26
|
|
|
24
27
|
# Address line 1
|
|
25
28
|
attr_accessor :address1
|
|
26
29
|
|
|
27
|
-
# Address line 2
|
|
30
|
+
# Address line 2; send null or an empty string to clear it
|
|
28
31
|
attr_accessor :address2
|
|
29
32
|
|
|
30
33
|
# Postal/ZIP code
|
|
@@ -39,7 +42,7 @@ module Zippendo
|
|
|
39
42
|
# ISO country code
|
|
40
43
|
attr_accessor :country_code
|
|
41
44
|
|
|
42
|
-
# State/Province
|
|
45
|
+
# State/Province; send null or an empty string to clear it
|
|
43
46
|
attr_accessor :state
|
|
44
47
|
|
|
45
48
|
# Email address
|
|
@@ -80,6 +83,7 @@ module Zippendo
|
|
|
80
83
|
def self.attribute_map
|
|
81
84
|
{
|
|
82
85
|
:'name' => :'name',
|
|
86
|
+
:'description' => :'description',
|
|
83
87
|
:'att_contact' => :'attContact',
|
|
84
88
|
:'address1' => :'address1',
|
|
85
89
|
:'address2' => :'address2',
|
|
@@ -109,6 +113,7 @@ module Zippendo
|
|
|
109
113
|
def self.openapi_types
|
|
110
114
|
{
|
|
111
115
|
:'name' => :'String',
|
|
116
|
+
:'description' => :'String',
|
|
112
117
|
:'att_contact' => :'String',
|
|
113
118
|
:'address1' => :'String',
|
|
114
119
|
:'address2' => :'String',
|
|
@@ -127,6 +132,10 @@ module Zippendo
|
|
|
127
132
|
# List of attributes with nullable: true
|
|
128
133
|
def self.openapi_nullable
|
|
129
134
|
Set.new([
|
|
135
|
+
:'description',
|
|
136
|
+
:'att_contact',
|
|
137
|
+
:'address2',
|
|
138
|
+
:'state',
|
|
130
139
|
:'brand_id'
|
|
131
140
|
])
|
|
132
141
|
end
|
|
@@ -151,6 +160,10 @@ module Zippendo
|
|
|
151
160
|
self.name = attributes[:'name']
|
|
152
161
|
end
|
|
153
162
|
|
|
163
|
+
if attributes.key?(:'description')
|
|
164
|
+
self.description = attributes[:'description']
|
|
165
|
+
end
|
|
166
|
+
|
|
154
167
|
if attributes.key?(:'att_contact')
|
|
155
168
|
self.att_contact = attributes[:'att_contact']
|
|
156
169
|
end
|
|
@@ -213,10 +226,6 @@ module Zippendo
|
|
|
213
226
|
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
214
227
|
end
|
|
215
228
|
|
|
216
|
-
if !@att_contact.nil? && @att_contact.to_s.length < 1
|
|
217
|
-
invalid_properties.push('invalid value for "att_contact", the character length must be greater than or equal to 1.')
|
|
218
|
-
end
|
|
219
|
-
|
|
220
229
|
if !@address1.nil? && @address1.to_s.length < 1
|
|
221
230
|
invalid_properties.push('invalid value for "address1", the character length must be greater than or equal to 1.')
|
|
222
231
|
end
|
|
@@ -241,10 +250,6 @@ module Zippendo
|
|
|
241
250
|
invalid_properties.push('invalid value for "country_code", the character length must be greater than or equal to 2.')
|
|
242
251
|
end
|
|
243
252
|
|
|
244
|
-
if !@state.nil? && @state.to_s.length < 1
|
|
245
|
-
invalid_properties.push('invalid value for "state", the character length must be greater than or equal to 1.')
|
|
246
|
-
end
|
|
247
|
-
|
|
248
253
|
pattern = Regexp.new(/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/)
|
|
249
254
|
if !@email.nil? && @email !~ pattern
|
|
250
255
|
invalid_properties.push("invalid value for \"email\", must conform to the pattern #{pattern}.")
|
|
@@ -266,14 +271,12 @@ module Zippendo
|
|
|
266
271
|
def valid?
|
|
267
272
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
268
273
|
return false if !@name.nil? && @name.to_s.length < 1
|
|
269
|
-
return false if !@att_contact.nil? && @att_contact.to_s.length < 1
|
|
270
274
|
return false if !@address1.nil? && @address1.to_s.length < 1
|
|
271
275
|
return false if !@zipcode.nil? && @zipcode.to_s.length < 1
|
|
272
276
|
return false if !@city.nil? && @city.to_s.length < 1
|
|
273
277
|
return false if !@phone.nil? && @phone.to_s.length < 1
|
|
274
278
|
return false if !@country_code.nil? && @country_code.to_s.length > 3
|
|
275
279
|
return false if !@country_code.nil? && @country_code.to_s.length < 2
|
|
276
|
-
return false if !@state.nil? && @state.to_s.length < 1
|
|
277
280
|
return false if !@email.nil? && @email !~ Regexp.new(/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/)
|
|
278
281
|
return false if !@address_types.nil? && @address_types.length < 1
|
|
279
282
|
return false if !@brand_id.nil? && @brand_id.to_s.length < 1
|
|
@@ -294,20 +297,6 @@ module Zippendo
|
|
|
294
297
|
@name = name
|
|
295
298
|
end
|
|
296
299
|
|
|
297
|
-
# Custom attribute writer method with validation
|
|
298
|
-
# @param [Object] att_contact Value to be assigned
|
|
299
|
-
def att_contact=(att_contact)
|
|
300
|
-
if att_contact.nil?
|
|
301
|
-
fail ArgumentError, 'att_contact cannot be nil'
|
|
302
|
-
end
|
|
303
|
-
|
|
304
|
-
if att_contact.to_s.length < 1
|
|
305
|
-
fail ArgumentError, 'invalid value for "att_contact", the character length must be greater than or equal to 1.'
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
@att_contact = att_contact
|
|
309
|
-
end
|
|
310
|
-
|
|
311
300
|
# Custom attribute writer method with validation
|
|
312
301
|
# @param [Object] address1 Value to be assigned
|
|
313
302
|
def address1=(address1)
|
|
@@ -382,20 +371,6 @@ module Zippendo
|
|
|
382
371
|
@country_code = country_code
|
|
383
372
|
end
|
|
384
373
|
|
|
385
|
-
# Custom attribute writer method with validation
|
|
386
|
-
# @param [Object] state Value to be assigned
|
|
387
|
-
def state=(state)
|
|
388
|
-
if state.nil?
|
|
389
|
-
fail ArgumentError, 'state cannot be nil'
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
if state.to_s.length < 1
|
|
393
|
-
fail ArgumentError, 'invalid value for "state", the character length must be greater than or equal to 1.'
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
@state = state
|
|
397
|
-
end
|
|
398
|
-
|
|
399
374
|
# Custom attribute writer method with validation
|
|
400
375
|
# @param [Object] email Value to be assigned
|
|
401
376
|
def email=(email)
|
|
@@ -427,6 +402,7 @@ module Zippendo
|
|
|
427
402
|
return true if self.equal?(o)
|
|
428
403
|
self.class == o.class &&
|
|
429
404
|
name == o.name &&
|
|
405
|
+
description == o.description &&
|
|
430
406
|
att_contact == o.att_contact &&
|
|
431
407
|
address1 == o.address1 &&
|
|
432
408
|
address2 == o.address2 &&
|
|
@@ -450,7 +426,7 @@ module Zippendo
|
|
|
450
426
|
# Calculates hash code according to all attributes.
|
|
451
427
|
# @return [Integer] Hash code
|
|
452
428
|
def hash
|
|
453
|
-
[name, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, brand_id].hash
|
|
429
|
+
[name, description, att_contact, address1, address2, zipcode, city, phone, country_code, state, email, customs, address_types, brand_id].hash
|
|
454
430
|
end
|
|
455
431
|
|
|
456
432
|
# Builds the object from hash
|
data/lib/zippendo/version.rb
CHANGED