Skip to content

Commit

Permalink
feat(us_verification): adding transient id field to us verification a…
Browse files Browse the repository at this point in the history
…nd bulk verification
  • Loading branch information
mrkaspa committed Feb 1, 2024
1 parent 86a2614 commit 5a0a221
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 11 deletions.
3 changes: 2 additions & 1 deletion docs/MultipleComponents.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Recipient** | **string** | The intended recipient, typically a person's or firm's name. | [optional]
**PrimaryLine** | **string** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | [optional]
**PrimaryLine** | **string** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` |
**SecondaryLine** | **string** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional]
**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]
**City** | **string** | | [optional]
**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]
**ZipCode** | **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]
**TransientId** | **string** | ID that is returned in the response body for the verification | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

2 changes: 2 additions & 0 deletions docs/UsVerification.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ Name | Type | Description | Notes
**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]
**LastLine** | **string** | Combination of the following applicable `components`: * City (`city`) * State (`state`) * ZIP code (`zip_code`) * ZIP+4 (`zip_code_plus_4`) | [optional]
**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]
**ValidAddress** | **bool** | 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]
**Components** | [**UsComponents**](UsComponents.md) | | [optional]
**DeliverabilityAnalysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional]
**LobConfidenceScore** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional]
**Object** | **string** | | [optional] [default to ObjectEnum.UsVerification]
**TransientId** | **string** | ID that is returned in the response body for the verification | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

1 change: 1 addition & 0 deletions docs/UsVerificationOrError.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**DeliverabilityAnalysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional]
**LobConfidenceScore** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional]
**Object** | **string** | | [optional] [default to ObjectEnum.UsVerification]
**TransientId** | **string** | ID that is returned in the response body for the verification | [optional]
**Error** | [**BulkError**](BulkError.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/UsVerifications.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Addresses** | [**List<UsVerificationOrError>**](UsVerificationOrError.md) | | [optional]
**Errors** | **bool** | Indicates whether any errors occurred during the verification process. | [optional]
**Addresses** | [**List<UsVerificationOrError>**](UsVerificationOrError.md) | |
**Errors** | **bool** | Indicates whether any errors occurred during the verification process. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

3 changes: 2 additions & 1 deletion docs/UsVerificationsWritable.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Address** | **string** | The entire address in one string (e.g., \"210 King Street 94107\"). _Does not support a recipient and will error when other payload parameters are provided._ | [optional]
**Address** | **string** | The entire address in one string (e.g., \"2261 Market Street 94114\"). _Does not support a recipient and will error when other payload parameters are provided._ | [optional]
**Recipient** | **string** | The intended recipient, typically a person's or firm's name. | [optional]
**PrimaryLine** | **string** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | [optional]
**SecondaryLine** | **string** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | [optional]
**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]
**City** | **string** | | [optional]
**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]
**ZipCode** | **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]
**TransientId** | **string** | ID that is returned in the response body for the verification | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

21 changes: 20 additions & 1 deletion src/lob.dotnet/Model/MultipleComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ protected MultipleComponents() { }
/// <param name="city">city.</param>
/// <param name="state">The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. &#x60;city&#x60; and &#x60;state&#x60; are required if no &#x60;zip_code&#x60; is passed..</param>
/// <param name="zipCode">Required if &#x60;city&#x60; and &#x60;state&#x60; are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. &#x60;94107&#x60;, &#x60;941072282&#x60;, &#x60;94107-2282&#x60;)..</param>
public MultipleComponents(string recipient = default(string), string primaryLine = default(string), string secondaryLine = default(string), string urbanization = default(string), string city = default(string), string state = default(string), string zipCode = default(string))
/// <param name="transientId">ID that is returned in the response body for the verification .</param>
public MultipleComponents(string recipient = default(string), string primaryLine = default(string), string secondaryLine = default(string), string urbanization = default(string), string city = default(string), string state = default(string), string zipCode = default(string), string transientId = default(string))
{
// to ensure "primaryLine" is required (not null)
if (primaryLine == null)
Expand All @@ -61,6 +62,7 @@ protected MultipleComponents() { }
this.City = city;
this.State = state;
this.ZipCode = zipCode;
this.TransientId = transientId;
}

/// <summary>
Expand Down Expand Up @@ -111,6 +113,13 @@ protected MultipleComponents() { }
[DataMember(Name = "zip_code", EmitDefaultValue = false)]
public string ZipCode { get; set; }

/// <summary>
/// ID that is returned in the response body for the verification
/// </summary>
/// <value>ID that is returned in the response body for the verification </value>
[DataMember(Name = "transient_id", EmitDefaultValue = false)]
public string TransientId { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -126,6 +135,7 @@ public override string ToString()
sb.Append(" City: ").Append(City).Append("\n");
sb.Append(" State: ").Append(State).Append("\n");
sb.Append(" ZipCode: ").Append(ZipCode).Append("\n");
sb.Append(" TransientId: ").Append(TransientId).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -195,6 +205,11 @@ public bool Equals(MultipleComponents input)
this.ZipCode == input.ZipCode ||
(this.ZipCode != null &&
this.ZipCode.Equals(input.ZipCode))
) &&
(
this.TransientId == input.TransientId ||
(this.TransientId != null &&
this.TransientId.Equals(input.TransientId))
);
}

Expand Down Expand Up @@ -235,6 +250,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.ZipCode.GetHashCode();
}
if (this.TransientId != null)
{
hashCode = (hashCode * 59) + this.TransientId.GetHashCode();
}
return hashCode;
}
}
Expand Down
21 changes: 20 additions & 1 deletion src/lob.dotnet/Model/UsVerification.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public enum ObjectEnum
/// <param name="deliverabilityAnalysis">deliverabilityAnalysis.</param>
/// <param name="lobConfidenceScore">lobConfidenceScore.</param>
/// <param name="_object">_object (default to ObjectEnum.UsVerification).</param>
public UsVerification(string id = default(string), string recipient = default(string), string primaryLine = default(string), string secondaryLine = default(string), string urbanization = default(string), string lastLine = default(string), DeliverabilityEnum? deliverability = default(DeliverabilityEnum?), bool validAddress = default(bool), UsComponents components = default(UsComponents), DeliverabilityAnalysis deliverabilityAnalysis = default(DeliverabilityAnalysis), LobConfidenceScore lobConfidenceScore = default(LobConfidenceScore), ObjectEnum? _object = ObjectEnum.UsVerification)
/// <param name="transientId">ID that is returned in the response body for the verification .</param>
public UsVerification(string id = default(string), string recipient = default(string), string primaryLine = default(string), string secondaryLine = default(string), string urbanization = default(string), string lastLine = default(string), DeliverabilityEnum? deliverability = default(DeliverabilityEnum?), bool validAddress = default(bool), UsComponents components = default(UsComponents), DeliverabilityAnalysis deliverabilityAnalysis = default(DeliverabilityAnalysis), LobConfidenceScore lobConfidenceScore = default(LobConfidenceScore), ObjectEnum? _object = ObjectEnum.UsVerification, string transientId = default(string))
{
this.Id = id;
this.Recipient = recipient;
Expand All @@ -133,6 +134,7 @@ public enum ObjectEnum
this.DeliverabilityAnalysis = deliverabilityAnalysis;
this.LobConfidenceScore = lobConfidenceScore;
this.Object = _object;
this.TransientId = transientId;
}

/// <summary>
Expand Down Expand Up @@ -202,6 +204,13 @@ public enum ObjectEnum
[DataMember(Name = "lob_confidence_score", EmitDefaultValue = false)]
public LobConfidenceScore LobConfidenceScore { get; set; }

/// <summary>
/// ID that is returned in the response body for the verification
/// </summary>
/// <value>ID that is returned in the response body for the verification </value>
[DataMember(Name = "transient_id", EmitDefaultValue = false)]
public string TransientId { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -222,6 +231,7 @@ public override string ToString()
sb.Append(" DeliverabilityAnalysis: ").Append(DeliverabilityAnalysis).Append("\n");
sb.Append(" LobConfidenceScore: ").Append(LobConfidenceScore).Append("\n");
sb.Append(" Object: ").Append(Object).Append("\n");
sb.Append(" TransientId: ").Append(TransientId).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -313,6 +323,11 @@ public bool Equals(UsVerification input)
(
this.Object == input.Object ||
this.Object.Equals(input.Object)
) &&
(
this.TransientId == input.TransientId ||
(this.TransientId != null &&
this.TransientId.Equals(input.TransientId))
);
}

Expand Down Expand Up @@ -364,6 +379,10 @@ public override int GetHashCode()
hashCode = (hashCode * 59) + this.LobConfidenceScore.GetHashCode();
}
hashCode = (hashCode * 59) + this.Object.GetHashCode();
if (this.TransientId != null)
{
hashCode = (hashCode * 59) + this.TransientId.GetHashCode();
}
return hashCode;
}
}
Expand Down
Loading

0 comments on commit 5a0a221

Please sign in to comment.