diff --git a/docs/DeliverabilityAnalysis.md b/docs/DeliverabilityAnalysis.md old mode 100755 new mode 100644 index 45d3e52..38be386 --- a/docs/DeliverabilityAnalysis.md +++ b/docs/DeliverabilityAnalysis.md @@ -1,4 +1,4 @@ -# Lob::DeliverabilityAnalysis +# OpenapiClient::DeliverabilityAnalysis ## Properties @@ -8,6 +8,12 @@ | **dpv_cmra** | **String** | indicates whether or not the address is [CMRA-authorized](https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency). Possible values are: * `Y` –– Address is CMRA-authorized. * `N` –– Address is not CMRA-authorized. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | | **dpv_vacant** | **String** | indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are: * `Y` –– Address is vacant. * `N` –– Address is not vacant. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | | **dpv_active** | **String** | Corresponds to the USPS field `dpv_no_stat`. Indicates that an address has been vacated in the recent past, and is no longer receiving deliveries. If it's been unoccupied for 90+ days, or temporarily vacant, this will be flagged. Possible values are: * `Y` –– Address is active. * `N` –– Address is not active. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | +| **dpv_inactive_reason** | **String** | Indicates the reason why an address is vacant or no longer receiving deliveries. Possible values are: * `01` –– Address does not receive mail from the USPS directly, but is serviced by a drop address. * `02` –– Address not yet deliverable. * `03` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). * `04` –– Address is a College, Military Zone, or other type. * `05` –– Address no longer receives deliveries. * `06` –– Address is missing required secondary information. * `''` –– A DPV match is not made or the address is active. | | +| **dpv_throwback** | **String** | Indicates a street address for which mail is delivered to a PO Box. Possible values are: * `Y` –– Address is a PO Box throwback delivery point. * `N` –– Address is not a PO Box throwback delivery point. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | +| **dpv_non_delivery_day_flag** | **String** | Indicates whether deliveries are not performed on one or more days of the week at an address. Possible values are: * `Y` –– Mail delivery does not occur on some days of the week. * `N` –– Mail delivery occurs every day of the week. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | +| **dpv_non_delivery_day_values** | **String** | Indicates days of the week (starting on Sunday) deliveries are not performed at an address. For example: * `YNNNNNN` –– Mail delivery does not occur on Sunday's. * `NYNNNYN` –– Mail delivery does not occur on Monday's or Friday's. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string) or address receives mail every day of the week (`deliverability_analysis[dpv_non_delivery_day_flag]` is `N` or an empty string). | | +| **dpv_no_secure_location** | **String** | Indicates packages to this address will not be left due to security concerns. Possible values are: * `Y` –– Address does not have a secure mailbox. * `N` –– Address has a secure mailbox. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | +| **dpv_door_not_accessible** | **String** | Indicates the door of the address is not accessible for mail delivery. Possible values are: * `Y` –– Door is not accessible. * `N` –– Door is accessible. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | | **dpv_footnotes** | [**Array<DpvFootnote>**](DpvFootnote.md) | An array of 2-character strings that gives more insight into how `deliverability_analysis[dpv_confirmation]` was determined. Will always include at least 1 string, and can include up to 3. For details, see [US Verification Details](#tag/US-Verification-Types). | | | **ews_match** | **Boolean** | indicates whether or not an address has been flagged in the [Early Warning System](https://docs.informatica.com/data-engineering/data-engineering-quality/10-4-0/address-validator-port-reference/postal-carrier-certification-data-ports/early-warning-system-return-code.html), meaning the address is under development and not yet ready to receive mail. However, it should become available in a few months. | | | **lacs_indicator** | **String** | indicates whether this address has been converted by [LACS<sup>Link</sup>](https://postalpro.usps.com/address-quality/lacslink). LACS<sup>Link</sup> corrects outdated addresses into their modern counterparts. Possible values are: * `Y` –– New address produced with a matching record in LACS<sup>Link</sup>. * `N` –– New address could not be produced with a matching record in LACS<sup>Link</sup>. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | | @@ -19,11 +25,17 @@ ```ruby require 'openapi_client' -instance = Lob::DeliverabilityAnalysis.new( +instance = OpenapiClient::DeliverabilityAnalysis.new( dpv_confirmation: null, dpv_cmra: null, dpv_vacant: null, dpv_active: null, + dpv_inactive_reason: null, + dpv_throwback: null, + dpv_non_delivery_day_flag: null, + dpv_non_delivery_day_values: null, + dpv_no_secure_location: null, + dpv_door_not_accessible: null, dpv_footnotes: null, ews_match: null, lacs_indicator: null, diff --git a/docs/DpvFootnote.md b/docs/DpvFootnote.md old mode 100755 new mode 100644 index 814a08b..5bbc6bd --- a/docs/DpvFootnote.md +++ b/docs/DpvFootnote.md @@ -1,4 +1,4 @@ -# Lob::DpvFootnote +# OpenapiClient::DpvFootnote ## Properties @@ -10,6 +10,6 @@ ```ruby require 'openapi_client' -instance = Lob::DpvFootnote.new() +instance = OpenapiClient::DpvFootnote.new() ``` diff --git a/docs/UsComponents.md b/docs/UsComponents.md old mode 100755 new mode 100644 index f33855c..af55581 --- a/docs/UsComponents.md +++ b/docs/UsComponents.md @@ -1,4 +1,4 @@ -# Lob::UsComponents +# OpenapiClient::UsComponents ## Properties @@ -28,6 +28,7 @@ | **county_fips** | **String** | A 5-digit [FIPS county code](https://en.wikipedia.org/wiki/FIPS_county_code) which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. | | | **carrier_route** | **String** | A 4-character code assigned to a mail delivery route within a ZIP code. | | | **carrier_route_type** | **String** | The type of `components[carrier_route]`. For more detailed information about each carrier route type, see [US Verification Details](#tag/US-Verification-Types). | | +| **po_box_only_flag** | **String** | Indicates the mailing facility for an address only supports PO Box deliveries and other forms of mail delivery are not available. | | | **latitude** | **Float** | A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be used with `longitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`). | [optional] | | **longitude** | **Float** | A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be used with `latitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`). | [optional] | @@ -36,7 +37,7 @@ ```ruby require 'openapi_client' -instance = Lob::UsComponents.new( +instance = OpenapiClient::UsComponents.new( primary_number: null, street_predirection: null, street_name: null, @@ -61,6 +62,7 @@ instance = Lob::UsComponents.new( county_fips: null, carrier_route: null, carrier_route_type: null, + po_box_only_flag: null, latitude: null, longitude: null ) diff --git a/lib/openapi_client/models/deliverability_analysis.rb b/lib/openapi_client/models/deliverability_analysis.rb old mode 100755 new mode 100644 index f934d16..b95282a --- a/lib/openapi_client/models/deliverability_analysis.rb +++ b/lib/openapi_client/models/deliverability_analysis.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module Lob +module OpenapiClient # A nested object containing a breakdown of the deliverability of an address. class DeliverabilityAnalysis # Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are: * `Y` –– The address is deliverable by the USPS. * `S` –– The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary. * `D` –– The address is deliverable to the building's default address but is missing a secondary unit designator and/or number. There is a chance the mail will not reach the intended recipient. * `N` –– The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code). * `''` –– This address is not deliverable. No matching street could be found within the city or ZIP code. @@ -28,6 +28,24 @@ class DeliverabilityAnalysis # Corresponds to the USPS field `dpv_no_stat`. Indicates that an address has been vacated in the recent past, and is no longer receiving deliveries. If it's been unoccupied for 90+ days, or temporarily vacant, this will be flagged. Possible values are: * `Y` –– Address is active. * `N` –– Address is not active. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). attr_accessor :dpv_active + # Indicates the reason why an address is vacant or no longer receiving deliveries. Possible values are: * `01` –– Address does not receive mail from the USPS directly, but is serviced by a drop address. * `02` –– Address not yet deliverable. * `03` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). * `04` –– Address is a College, Military Zone, or other type. * `05` –– Address no longer receives deliveries. * `06` –– Address is missing required secondary information. * `''` –– A DPV match is not made or the address is active. + attr_accessor :dpv_inactive_reason + + # Indicates a street address for which mail is delivered to a PO Box. Possible values are: * `Y` –– Address is a PO Box throwback delivery point. * `N` –– Address is not a PO Box throwback delivery point. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + attr_accessor :dpv_throwback + + # Indicates whether deliveries are not performed on one or more days of the week at an address. Possible values are: * `Y` –– Mail delivery does not occur on some days of the week. * `N` –– Mail delivery occurs every day of the week. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + attr_accessor :dpv_non_delivery_day_flag + + # Indicates days of the week (starting on Sunday) deliveries are not performed at an address. For example: * `YNNNNNN` –– Mail delivery does not occur on Sunday's. * `NYNNNYN` –– Mail delivery does not occur on Monday's or Friday's. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string) or address receives mail every day of the week (`deliverability_analysis[dpv_non_delivery_day_flag]` is `N` or an empty string). + attr_accessor :dpv_non_delivery_day_values + + # Indicates packages to this address will not be left due to security concerns. Possible values are: * `Y` –– Address does not have a secure mailbox. * `N` –– Address has a secure mailbox. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + attr_accessor :dpv_no_secure_location + + # Indicates the door of the address is not accessible for mail delivery. Possible values are: * `Y` –– Door is not accessible. * `N` –– Door is accessible. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). + attr_accessor :dpv_door_not_accessible + # An array of 2-character strings that gives more insight into how `deliverability_analysis[dpv_confirmation]` was determined. Will always include at least 1 string, and can include up to 3. For details, see [US Verification Details](#tag/US-Verification-Types). attr_accessor :dpv_footnotes @@ -72,6 +90,12 @@ def self.attribute_map :'dpv_cmra' => :'dpv_cmra', :'dpv_vacant' => :'dpv_vacant', :'dpv_active' => :'dpv_active', + :'dpv_inactive_reason' => :'dpv_inactive_reason', + :'dpv_throwback' => :'dpv_throwback', + :'dpv_non_delivery_day_flag' => :'dpv_non_delivery_day_flag', + :'dpv_non_delivery_day_values' => :'dpv_non_delivery_day_values', + :'dpv_no_secure_location' => :'dpv_no_secure_location', + :'dpv_door_not_accessible' => :'dpv_door_not_accessible', :'dpv_footnotes' => :'dpv_footnotes', :'ews_match' => :'ews_match', :'lacs_indicator' => :'lacs_indicator', @@ -92,6 +116,12 @@ def self.openapi_types :'dpv_cmra' => :'String', :'dpv_vacant' => :'String', :'dpv_active' => :'String', + :'dpv_inactive_reason' => :'String', + :'dpv_throwback' => :'String', + :'dpv_non_delivery_day_flag' => :'String', + :'dpv_non_delivery_day_values' => :'String', + :'dpv_no_secure_location' => :'String', + :'dpv_door_not_accessible' => :'String', :'dpv_footnotes' => :'Array', :'ews_match' => :'Boolean', :'lacs_indicator' => :'String', @@ -110,13 +140,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::DeliverabilityAnalysis` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::DeliverabilityAnalysis` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::DeliverabilityAnalysis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::DeliverabilityAnalysis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -137,6 +167,30 @@ def initialize(attributes = {}) self.dpv_active = attributes[:'dpv_active'] end + if attributes.key?(:'dpv_inactive_reason') + self.dpv_inactive_reason = attributes[:'dpv_inactive_reason'] + end + + if attributes.key?(:'dpv_throwback') + self.dpv_throwback = attributes[:'dpv_throwback'] + end + + if attributes.key?(:'dpv_non_delivery_day_flag') + self.dpv_non_delivery_day_flag = attributes[:'dpv_non_delivery_day_flag'] + end + + if attributes.key?(:'dpv_non_delivery_day_values') + self.dpv_non_delivery_day_values = attributes[:'dpv_non_delivery_day_values'] + end + + if attributes.key?(:'dpv_no_secure_location') + self.dpv_no_secure_location = attributes[:'dpv_no_secure_location'] + end + + if attributes.key?(:'dpv_door_not_accessible') + self.dpv_door_not_accessible = attributes[:'dpv_door_not_accessible'] + end + if attributes.key?(:'dpv_footnotes') if (value = attributes[:'dpv_footnotes']).is_a?(Array) self.dpv_footnotes = value @@ -180,6 +234,30 @@ def list_invalid_properties invalid_properties.push('invalid value for "dpv_active", dpv_active cannot be nil.') end + if @dpv_inactive_reason.nil? + invalid_properties.push('invalid value for "dpv_inactive_reason", dpv_inactive_reason cannot be nil.') + end + + if @dpv_throwback.nil? + invalid_properties.push('invalid value for "dpv_throwback", dpv_throwback cannot be nil.') + end + + if @dpv_non_delivery_day_flag.nil? + invalid_properties.push('invalid value for "dpv_non_delivery_day_flag", dpv_non_delivery_day_flag cannot be nil.') + end + + if @dpv_non_delivery_day_values.nil? + invalid_properties.push('invalid value for "dpv_non_delivery_day_values", dpv_non_delivery_day_values cannot be nil.') + end + + if @dpv_no_secure_location.nil? + invalid_properties.push('invalid value for "dpv_no_secure_location", dpv_no_secure_location cannot be nil.') + end + + if @dpv_door_not_accessible.nil? + invalid_properties.push('invalid value for "dpv_door_not_accessible", dpv_door_not_accessible cannot be nil.') + end + if @dpv_footnotes.nil? invalid_properties.push('invalid value for "dpv_footnotes", dpv_footnotes cannot be nil.') end @@ -218,6 +296,22 @@ def valid? return false if @dpv_active.nil? dpv_active_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) return false unless dpv_active_validator.valid?(@dpv_active) + return false if @dpv_inactive_reason.nil? + dpv_inactive_reason_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", ""]) + return false unless dpv_inactive_reason_validator.valid?(@dpv_inactive_reason) + return false if @dpv_throwback.nil? + dpv_throwback_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + return false unless dpv_throwback_validator.valid?(@dpv_throwback) + return false if @dpv_non_delivery_day_flag.nil? + dpv_non_delivery_day_flag_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + return false unless dpv_non_delivery_day_flag_validator.valid?(@dpv_non_delivery_day_flag) + return false if @dpv_non_delivery_day_values.nil? + return false if @dpv_no_secure_location.nil? + dpv_no_secure_location_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + return false unless dpv_no_secure_location_validator.valid?(@dpv_no_secure_location) + return false if @dpv_door_not_accessible.nil? + dpv_door_not_accessible_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + return false unless dpv_door_not_accessible_validator.valid?(@dpv_door_not_accessible) return false if @dpv_footnotes.nil? return false if @ews_match.nil? return false if @lacs_indicator.nil? @@ -270,6 +364,56 @@ def dpv_active=(dpv_active) @dpv_active = dpv_active end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] dpv_inactive_reason Object to be assigned + def dpv_inactive_reason=(dpv_inactive_reason) + validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", ""]) + unless validator.valid?(dpv_inactive_reason) + fail ArgumentError, "invalid value for \"dpv_inactive_reason\", must be one of #{validator.allowable_values}." + end + @dpv_inactive_reason = dpv_inactive_reason + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] dpv_throwback Object to be assigned + def dpv_throwback=(dpv_throwback) + validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + unless validator.valid?(dpv_throwback) + fail ArgumentError, "invalid value for \"dpv_throwback\", must be one of #{validator.allowable_values}." + end + @dpv_throwback = dpv_throwback + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] dpv_non_delivery_day_flag Object to be assigned + def dpv_non_delivery_day_flag=(dpv_non_delivery_day_flag) + validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + unless validator.valid?(dpv_non_delivery_day_flag) + fail ArgumentError, "invalid value for \"dpv_non_delivery_day_flag\", must be one of #{validator.allowable_values}." + end + @dpv_non_delivery_day_flag = dpv_non_delivery_day_flag + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] dpv_no_secure_location Object to be assigned + def dpv_no_secure_location=(dpv_no_secure_location) + validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + unless validator.valid?(dpv_no_secure_location) + fail ArgumentError, "invalid value for \"dpv_no_secure_location\", must be one of #{validator.allowable_values}." + end + @dpv_no_secure_location = dpv_no_secure_location + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] dpv_door_not_accessible Object to be assigned + def dpv_door_not_accessible=(dpv_door_not_accessible) + validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + unless validator.valid?(dpv_door_not_accessible) + fail ArgumentError, "invalid value for \"dpv_door_not_accessible\", must be one of #{validator.allowable_values}." + end + @dpv_door_not_accessible = dpv_door_not_accessible + end + # Custom attribute writer method checking allowed values (enum). # @param [Object] lacs_indicator Object to be assigned def lacs_indicator=(lacs_indicator) @@ -299,6 +443,12 @@ def ==(o) dpv_cmra == o.dpv_cmra && dpv_vacant == o.dpv_vacant && dpv_active == o.dpv_active && + dpv_inactive_reason == o.dpv_inactive_reason && + dpv_throwback == o.dpv_throwback && + dpv_non_delivery_day_flag == o.dpv_non_delivery_day_flag && + dpv_non_delivery_day_values == o.dpv_non_delivery_day_values && + dpv_no_secure_location == o.dpv_no_secure_location && + dpv_door_not_accessible == o.dpv_door_not_accessible && dpv_footnotes == o.dpv_footnotes && ews_match == o.ews_match && lacs_indicator == o.lacs_indicator && @@ -315,7 +465,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [dpv_confirmation, dpv_cmra, dpv_vacant, dpv_active, dpv_footnotes, ews_match, lacs_indicator, lacs_return_code, suite_return_code].hash + [dpv_confirmation, dpv_cmra, dpv_vacant, dpv_active, dpv_inactive_reason, dpv_throwback, dpv_non_delivery_day_flag, dpv_non_delivery_day_values, dpv_no_secure_location, dpv_door_not_accessible, dpv_footnotes, ews_match, lacs_indicator, lacs_return_code, suite_return_code].hash end @@ -395,7 +545,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = Lob.const_get(type) + klass = OpenapiClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/openapi_client/models/dpv_footnote.rb b/lib/openapi_client/models/dpv_footnote.rb old mode 100755 new mode 100644 index d2a69d7..7d96529 --- a/lib/openapi_client/models/dpv_footnote.rb +++ b/lib/openapi_client/models/dpv_footnote.rb @@ -13,23 +13,27 @@ require 'date' require 'time' -module Lob +module OpenapiClient class DpvFootnote AA = "AA".freeze A1 = "A1".freeze BB = "BB".freeze CC = "CC".freeze - N1 = "N1".freeze + C1 = "C1".freeze F1 = "F1".freeze G1 = "G1".freeze - U1 = "U1".freeze + IA = "IA".freeze M1 = "M1".freeze M3 = "M3".freeze + N1 = "N1".freeze + PB = "PB".freeze P1 = "P1".freeze P3 = "P3".freeze R1 = "R1".freeze R7 = "R7".freeze RR = "RR".freeze + TA = "TA".freeze + U1 = "U1".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/openapi_client/models/us_components.rb b/lib/openapi_client/models/us_components.rb old mode 100755 new mode 100644 index b032c82..564af51 --- a/lib/openapi_client/models/us_components.rb +++ b/lib/openapi_client/models/us_components.rb @@ -13,7 +13,7 @@ require 'date' require 'time' -module Lob +module OpenapiClient # A nested object containing a breakdown of each component of an address. class UsComponents # The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number. @@ -85,6 +85,9 @@ class UsComponents # The type of `components[carrier_route]`. For more detailed information about each carrier route type, see [US Verification Details](#tag/US-Verification-Types). attr_accessor :carrier_route_type + # Indicates the mailing facility for an address only supports PO Box deliveries and other forms of mail delivery are not available. + attr_accessor :po_box_only_flag + # A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be used with `longitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`). attr_accessor :latitude @@ -140,6 +143,7 @@ def self.attribute_map :'county_fips' => :'county_fips', :'carrier_route' => :'carrier_route', :'carrier_route_type' => :'carrier_route_type', + :'po_box_only_flag' => :'po_box_only_flag', :'latitude' => :'latitude', :'longitude' => :'longitude' } @@ -177,6 +181,7 @@ def self.openapi_types :'county_fips' => :'String', :'carrier_route' => :'String', :'carrier_route_type' => :'String', + :'po_box_only_flag' => :'String', :'latitude' => :'Float', :'longitude' => :'Float' } @@ -194,13 +199,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::UsComponents` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UsComponents` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Lob::UsComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UsComponents`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -301,6 +306,10 @@ def initialize(attributes = {}) self.carrier_route_type = attributes[:'carrier_route_type'] end + if attributes.key?(:'po_box_only_flag') + self.po_box_only_flag = attributes[:'po_box_only_flag'] + end + if attributes.key?(:'latitude') self.latitude = attributes[:'latitude'] end @@ -428,6 +437,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "carrier_route_type", carrier_route_type cannot be nil.') end + if @po_box_only_flag.nil? + invalid_properties.push('invalid value for "po_box_only_flag", po_box_only_flag cannot be nil.') + end + invalid_properties end @@ -472,6 +485,9 @@ def valid? return false if @carrier_route_type.nil? carrier_route_type_validator = EnumAttributeValidator.new('String', ["city_delivery", "rural_route", "highway_contract", "po_box", "general_delivery", ""]) return false unless carrier_route_type_validator.valid?(@carrier_route_type) + return false if @po_box_only_flag.nil? + po_box_only_flag_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + return false unless po_box_only_flag_validator.valid?(@po_box_only_flag) true end @@ -583,6 +599,16 @@ def carrier_route_type=(carrier_route_type) @carrier_route_type = carrier_route_type end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] po_box_only_flag Object to be assigned + def po_box_only_flag=(po_box_only_flag) + validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) + unless validator.valid?(po_box_only_flag) + fail ArgumentError, "invalid value for \"po_box_only_flag\", must be one of #{validator.allowable_values}." + end + @po_box_only_flag = po_box_only_flag + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -612,6 +638,7 @@ def ==(o) county_fips == o.county_fips && carrier_route == o.carrier_route && carrier_route_type == o.carrier_route_type && + po_box_only_flag == o.po_box_only_flag && latitude == o.latitude && longitude == o.longitude end @@ -625,7 +652,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [primary_number, street_predirection, street_name, street_suffix, street_postdirection, secondary_designator, secondary_number, pmb_designator, pmb_number, extra_secondary_designator, extra_secondary_number, city, state, zip_code, zip_code_plus_4, zip_code_type, delivery_point_barcode, address_type, record_type, default_building_address, county, county_fips, carrier_route, carrier_route_type, latitude, longitude].hash + [primary_number, street_predirection, street_name, street_suffix, street_postdirection, secondary_designator, secondary_number, pmb_designator, pmb_number, extra_secondary_designator, extra_secondary_number, city, state, zip_code, zip_code_plus_4, zip_code_type, delivery_point_barcode, address_type, record_type, default_building_address, county, county_fips, carrier_route, carrier_route_type, po_box_only_flag, latitude, longitude].hash end @@ -705,7 +732,7 @@ def _deserialize(type, value) end else # model # models (e.g. Pet) or oneOf - klass = Lob.const_get(type) + klass = OpenapiClient.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end