Skip to content

Commit 79d049e

Browse files
authored
Merge pull request #229 from lob/feature/AV-4626-transient-id
AV-4626 feat(us_verification): adding transient id field to us verification a…
2 parents 0214dc5 + 8972b00 commit 79d049e

11 files changed

+97
-47
lines changed

docs/MultipleComponents.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lob::MultipleComponents
1+
# OpenapiClient::MultipleComponents
22

33
## Properties
44

@@ -11,20 +11,22 @@
1111
| **city** | **String** | | [optional] |
1212
| **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] |
1313
| **zip_code** | **String** | Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`). | [optional] |
14+
| **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] |
1415

1516
## Example
1617

1718
```ruby
1819
require 'openapi_client'
1920

20-
instance = Lob::MultipleComponents.new(
21+
instance = OpenapiClient::MultipleComponents.new(
2122
recipient: null,
2223
primary_line: null,
2324
secondary_line: null,
2425
urbanization: null,
2526
city: null,
2627
state: null,
27-
zip_code: null
28+
zip_code: null,
29+
transient_id: null
2830
)
2931
```
3032

docs/UsVerification.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lob::UsVerification
1+
# OpenapiClient::UsVerification
22

33
## Properties
44

@@ -11,28 +11,32 @@
1111
| **urbanization** | **String** | Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification. | [optional] |
1212
| **last_line** | **String** | Combination of the following applicable `components`: * City (`city`) * State (`state`) * ZIP code (`zip_code`) * ZIP+4 (`zip_code_plus_4`) | [optional] |
1313
| **deliverability** | **String** | Summarizes the deliverability of the `us_verification` object. For full details, see the `deliverability_analysis` field. Possible values are: * `deliverable` – The address is deliverable by the USPS. * `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary. * `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient. * `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient. * `undeliverable` – The address is not deliverable according to the USPS. | [optional] |
14+
| **valid_address** | **Boolean** | This field indicates whether an address was found in a more comprehensive address dataset that includes sources from the USPS, open source mapping data, and our proprietary mail delivery data. This field can be interpreted as a representation of whether an address is a real location or not. Additionally a valid address may contradict the deliverability field since an address can be a real valid location but the USPS may not deliver to that address. | [optional] |
1415
| **components** | [**UsComponents**](UsComponents.md) | | [optional] |
1516
| **deliverability_analysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional] |
1617
| **lob_confidence_score** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional] |
1718
| **object** | **String** | | [optional][default to 'us_verification'] |
19+
| **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] |
1820

1921
## Example
2022

2123
```ruby
2224
require 'openapi_client'
2325

24-
instance = Lob::UsVerification.new(
26+
instance = OpenapiClient::UsVerification.new(
2527
id: null,
2628
recipient: null,
2729
primary_line: null,
2830
secondary_line: null,
2931
urbanization: null,
3032
last_line: null,
3133
deliverability: null,
34+
valid_address: null,
3235
components: null,
3336
deliverability_analysis: null,
3437
lob_confidence_score: null,
35-
object: null
38+
object: null,
39+
transient_id: null
3640
)
3741
```
3842

docs/UsVerificationOrError.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lob::UsVerificationOrError
1+
# OpenapiClient::UsVerificationOrError
22

33
## Properties
44

@@ -15,14 +15,15 @@
1515
| **deliverability_analysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional] |
1616
| **lob_confidence_score** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional] |
1717
| **object** | **String** | | [optional][default to 'us_verification'] |
18+
| **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] |
1819
| **error** | [**BulkError**](BulkError.md) | | [optional] |
1920

2021
## Example
2122

2223
```ruby
2324
require 'openapi_client'
2425

25-
instance = Lob::UsVerificationOrError.new(
26+
instance = OpenapiClient::UsVerificationOrError.new(
2627
id: null,
2728
recipient: null,
2829
primary_line: null,
@@ -34,6 +35,7 @@ instance = Lob::UsVerificationOrError.new(
3435
deliverability_analysis: null,
3536
lob_confidence_score: null,
3637
object: null,
38+
transient_id: null,
3739
error: null
3840
)
3941
```

docs/UsVerifications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lob::UsVerifications
1+
# OpenapiClient::UsVerifications
22

33
## Properties
44

@@ -12,7 +12,7 @@
1212
```ruby
1313
require 'openapi_client'
1414

15-
instance = Lob::UsVerifications.new(
15+
instance = OpenapiClient::UsVerifications.new(
1616
addresses: null,
1717
errors: null
1818
)

docs/UsVerificationsWritable.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lob::UsVerificationsWritable
1+
# OpenapiClient::UsVerificationsWritable
22

33
## Properties
44

@@ -12,21 +12,23 @@
1212
| **city** | **String** | | [optional] |
1313
| **state** | **String** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] |
1414
| **zip_code** | **String** | Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`). | [optional] |
15+
| **transient_id** | **String** | ID that is returned in the response body for the verification | [optional] |
1516

1617
## Example
1718

1819
```ruby
1920
require 'openapi_client'
2021

21-
instance = Lob::UsVerificationsWritable.new(
22+
instance = OpenapiClient::UsVerificationsWritable.new(
2223
address: null,
2324
recipient: null,
2425
primary_line: null,
2526
secondary_line: null,
2627
urbanization: null,
2728
city: null,
2829
state: null,
29-
zip_code: null
30+
zip_code: null,
31+
transient_id: null
3032
)
3133
```
3234

lib/openapi_client/models/multiple_components.rb

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
require 'date'
1414
require 'time'
1515

16-
module Lob
16+
module OpenapiClient
1717
class MultipleComponents
1818
# The intended recipient, typically a person's or firm's name.
1919
attr_accessor :recipient
@@ -35,6 +35,9 @@ class MultipleComponents
3535
# Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`).
3636
attr_accessor :zip_code
3737

38+
# ID that is returned in the response body for the verification
39+
attr_accessor :transient_id
40+
3841
# Attribute mapping from ruby-style variable name to JSON key.
3942
def self.attribute_map
4043
{
@@ -44,7 +47,8 @@ def self.attribute_map
4447
:'urbanization' => :'urbanization',
4548
:'city' => :'city',
4649
:'state' => :'state',
47-
:'zip_code' => :'zip_code'
50+
:'zip_code' => :'zip_code',
51+
:'transient_id' => :'transient_id'
4852
}
4953
end
5054

@@ -62,7 +66,8 @@ def self.openapi_types
6266
:'urbanization' => :'String',
6367
:'city' => :'String',
6468
:'state' => :'String',
65-
:'zip_code' => :'String'
69+
:'zip_code' => :'String',
70+
:'transient_id' => :'String'
6671
}
6772
end
6873

@@ -77,13 +82,13 @@ def self.openapi_nullable
7782
# @param [Hash] attributes Model attributes in the form of hash
7883
def initialize(attributes = {})
7984
if (!attributes.is_a?(Hash))
80-
fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::MultipleComponents` initialize method"
85+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::MultipleComponents` initialize method"
8186
end
8287

8388
# check to see if the attribute exists and convert string to symbol for hash key
8489
attributes = attributes.each_with_object({}) { |(k, v), h|
8590
if (!self.class.attribute_map.key?(k.to_sym))
86-
fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::MultipleComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::MultipleComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
8792
end
8893
h[k.to_sym] = v
8994
}
@@ -115,6 +120,10 @@ def initialize(attributes = {})
115120
if attributes.key?(:'zip_code')
116121
self.zip_code = attributes[:'zip_code']
117122
end
123+
124+
if attributes.key?(:'transient_id')
125+
self.transient_id = attributes[:'transient_id']
126+
end
118127
end
119128

120129
# Show invalid properties with the reasons. Usually used together with valid?
@@ -257,7 +266,8 @@ def ==(o)
257266
urbanization == o.urbanization &&
258267
city == o.city &&
259268
state == o.state &&
260-
zip_code == o.zip_code
269+
zip_code == o.zip_code &&
270+
transient_id == o.transient_id
261271
end
262272

263273
# @see the `==` method
@@ -269,7 +279,7 @@ def eql?(o)
269279
# Calculates hash code according to all attributes.
270280
# @return [Integer] Hash code
271281
def hash
272-
[recipient, primary_line, secondary_line, urbanization, city, state, zip_code].hash
282+
[recipient, primary_line, secondary_line, urbanization, city, state, zip_code, transient_id].hash
273283
end
274284

275285

@@ -349,7 +359,7 @@ def _deserialize(type, value)
349359
end
350360
else # model
351361
# models (e.g. Pet) or oneOf
352-
klass = Lob.const_get(type)
362+
klass = OpenapiClient.const_get(type)
353363
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
354364
end
355365
end

lib/openapi_client/models/us_verification.rb

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
require 'date'
1414
require 'time'
1515

16-
module Lob
16+
module OpenapiClient
1717
class UsVerification
1818
# Unique identifier prefixed with `us_ver_`.
1919
attr_accessor :id
@@ -47,6 +47,9 @@ class UsVerification
4747

4848
attr_accessor :object
4949

50+
# ID that is returned in the response body for the verification
51+
attr_accessor :transient_id
52+
5053
class EnumAttributeValidator
5154
attr_reader :datatype
5255
attr_reader :allowable_values
@@ -83,7 +86,8 @@ def self.attribute_map
8386
:'components' => :'components',
8487
:'deliverability_analysis' => :'deliverability_analysis',
8588
:'lob_confidence_score' => :'lob_confidence_score',
86-
:'object' => :'object'
89+
:'object' => :'object',
90+
:'transient_id' => :'transient_id'
8791
}
8892
end
8993

@@ -106,7 +110,8 @@ def self.openapi_types
106110
:'components' => :'UsComponents',
107111
:'deliverability_analysis' => :'DeliverabilityAnalysis',
108112
:'lob_confidence_score' => :'LobConfidenceScore',
109-
:'object' => :'String'
113+
:'object' => :'String',
114+
:'transient_id' => :'String'
110115
}
111116
end
112117

@@ -121,13 +126,13 @@ def self.openapi_nullable
121126
# @param [Hash] attributes Model attributes in the form of hash
122127
def initialize(attributes = {})
123128
if (!attributes.is_a?(Hash))
124-
fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsVerification` initialize method"
129+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsVerification` initialize method"
125130
end
126131

127132
# check to see if the attribute exists and convert string to symbol for hash key
128133
attributes = attributes.each_with_object({}) { |(k, v), h|
129134
if (!self.class.attribute_map.key?(k.to_sym))
130-
fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
135+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsVerification`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
131136
end
132137
h[k.to_sym] = v
133138
}
@@ -181,6 +186,10 @@ def initialize(attributes = {})
181186
else
182187
self.object = 'us_verification'
183188
end
189+
190+
if attributes.key?(:'transient_id')
191+
self.transient_id = attributes[:'transient_id']
192+
end
184193
end
185194

186195
# Show invalid properties with the reasons. Usually used together with valid?
@@ -313,7 +322,8 @@ def ==(o)
313322
components == o.components &&
314323
deliverability_analysis == o.deliverability_analysis &&
315324
lob_confidence_score == o.lob_confidence_score &&
316-
object == o.object
325+
object == o.object &&
326+
transient_id == o.transient_id
317327
end
318328

319329
# @see the `==` method
@@ -325,7 +335,7 @@ def eql?(o)
325335
# Calculates hash code according to all attributes.
326336
# @return [Integer] Hash code
327337
def hash
328-
[id, recipient, primary_line, secondary_line, urbanization, last_line, deliverability, valid_address, components, deliverability_analysis, lob_confidence_score, object].hash
338+
[id, recipient, primary_line, secondary_line, urbanization, last_line, deliverability, valid_address, components, deliverability_analysis, lob_confidence_score, object, transient_id].hash
329339
end
330340

331341

@@ -405,7 +415,7 @@ def _deserialize(type, value)
405415
end
406416
else # model
407417
# models (e.g. Pet) or oneOf
408-
klass = Lob.const_get(type)
418+
klass = OpenapiClient.const_get(type)
409419
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
410420
end
411421
end

0 commit comments

Comments
 (0)