Class: Lob::DeliverabilityAnalysis
- Inherits:
-
Object
- Object
- Lob::DeliverabilityAnalysis
- Defined in:
- lib/lob/models/deliverability_analysis.rb
Overview
A nested object containing a breakdown of the deliverability of an address.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#dpv_active ⇒ Object
Corresponds to the USPS field ‘dpv_no_stat`.
-
#dpv_cmra ⇒ Object
indicates whether or not the address is [CMRA-authorized](en.wikipedia.org/wiki/Commercial_mail_receiving_agency).
-
#dpv_confirmation ⇒ Object
Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS.
-
#dpv_door_not_accessible ⇒ Object
Indicates the door of the address is not accessible for mail delivery.
-
#dpv_footnotes ⇒ Object
An array of 2-character strings that gives more insight into how ‘deliverability_analysis` was determined.
-
#dpv_inactive_reason ⇒ Object
Indicates the reason why an address is vacant or no longer receiving deliveries.
-
#dpv_no_secure_location ⇒ Object
Indicates packages to this address will not be left due to security concerns.
-
#dpv_non_delivery_day_flag ⇒ Object
Indicates whether deliveries are not performed on one or more days of the week at an address.
-
#dpv_non_delivery_day_values ⇒ Object
Indicates days of the week (starting on Sunday) deliveries are not performed at an address.
-
#dpv_throwback ⇒ Object
Indicates a street address for which mail is delivered to a PO Box.
-
#dpv_vacant ⇒ Object
indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries.
-
#ews_match ⇒ Object
indicates whether or not an address has been flagged in the [Early Warning System](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.
-
#lacs_indicator ⇒ Object
indicates whether this address has been converted by [LACS<sup>Link</sup>](postalpro.usps.com/address-quality/lacslink).
-
#lacs_return_code ⇒ Object
A code indicating how ‘deliverability_analysis` was determined.
-
#suite_return_code ⇒ Object
A return code that indicates whether the address was matched and corrected by [Suite<sup>Link</sup>](postalpro.usps.com/address-quality-solutions/suitelink).
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DeliverabilityAnalysis
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ DeliverabilityAnalysis
Initializes the object
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/lob/models/deliverability_analysis.rb', line 141 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Lob::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 end h[k.to_sym] = v } if attributes.key?(:'dpv_confirmation') self.dpv_confirmation = attributes[:'dpv_confirmation'] end if attributes.key?(:'dpv_cmra') self.dpv_cmra = attributes[:'dpv_cmra'] end if attributes.key?(:'dpv_vacant') self.dpv_vacant = attributes[:'dpv_vacant'] end if attributes.key?(:'dpv_active') 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 end end if attributes.key?(:'ews_match') self.ews_match = attributes[:'ews_match'] end if attributes.key?(:'lacs_indicator') self.lacs_indicator = attributes[:'lacs_indicator'] end if attributes.key?(:'lacs_return_code') self.lacs_return_code = attributes[:'lacs_return_code'] end if attributes.key?(:'suite_return_code') self.suite_return_code = attributes[:'suite_return_code'] end end |
Instance Attribute Details
#dpv_active ⇒ Object
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` is `N` or an empty string).
29 30 31 |
# File 'lib/lob/models/deliverability_analysis.rb', line 29 def dpv_active @dpv_active end |
#dpv_cmra ⇒ Object
indicates whether or not the address is [CMRA-authorized](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` is `N` or an empty string).
23 24 25 |
# File 'lib/lob/models/deliverability_analysis.rb', line 23 def dpv_cmra @dpv_cmra end |
#dpv_confirmation ⇒ Object
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.
20 21 22 |
# File 'lib/lob/models/deliverability_analysis.rb', line 20 def dpv_confirmation @dpv_confirmation end |
#dpv_door_not_accessible ⇒ Object
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` is `N` or an empty string).
47 48 49 |
# File 'lib/lob/models/deliverability_analysis.rb', line 47 def dpv_door_not_accessible @dpv_door_not_accessible end |
#dpv_footnotes ⇒ Object
An array of 2-character strings that gives more insight into how ‘deliverability_analysis` 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).
50 51 52 |
# File 'lib/lob/models/deliverability_analysis.rb', line 50 def dpv_footnotes @dpv_footnotes end |
#dpv_inactive_reason ⇒ Object
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` 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.
32 33 34 |
# File 'lib/lob/models/deliverability_analysis.rb', line 32 def dpv_inactive_reason @dpv_inactive_reason end |
#dpv_no_secure_location ⇒ Object
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` is `N` or an empty string).
44 45 46 |
# File 'lib/lob/models/deliverability_analysis.rb', line 44 def dpv_no_secure_location @dpv_no_secure_location end |
#dpv_non_delivery_day_flag ⇒ Object
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` is `N` or an empty string).
38 39 40 |
# File 'lib/lob/models/deliverability_analysis.rb', line 38 def dpv_non_delivery_day_flag @dpv_non_delivery_day_flag end |
#dpv_non_delivery_day_values ⇒ Object
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` is `N` or an empty string) or address receives mail every day of the week (`deliverability_analysis` is `N` or an empty string).
41 42 43 |
# File 'lib/lob/models/deliverability_analysis.rb', line 41 def dpv_non_delivery_day_values @dpv_non_delivery_day_values end |
#dpv_throwback ⇒ Object
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` is `N` or an empty string).
35 36 37 |
# File 'lib/lob/models/deliverability_analysis.rb', line 35 def dpv_throwback @dpv_throwback end |
#dpv_vacant ⇒ Object
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` is `N` or an empty string).
26 27 28 |
# File 'lib/lob/models/deliverability_analysis.rb', line 26 def dpv_vacant @dpv_vacant end |
#ews_match ⇒ Object
indicates whether or not an address has been flagged in the [Early Warning System](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.
53 54 55 |
# File 'lib/lob/models/deliverability_analysis.rb', line 53 def ews_match @ews_match end |
#lacs_indicator ⇒ Object
indicates whether this address has been converted by [LACS<sup>Link</sup>](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` is `N` or an empty string).
56 57 58 |
# File 'lib/lob/models/deliverability_analysis.rb', line 56 def lacs_indicator @lacs_indicator end |
#lacs_return_code ⇒ Object
A code indicating how ‘deliverability_analysis` was determined. Possible values are: * `A` — A new address was produced because a match was found in LACS<sup>Link</sup>. * `92` — A LACS<sup>Link</sup> record was matched after dropping secondary information. * `14` — A match was found in LACS<sup>Link</sup>, but could not be converted to a deliverable address. * `00` — A match was not found in LACS<sup>Link</sup>, and no new address was produced. * `”` — LACS<sup>Link</sup> was not attempted.
59 60 61 |
# File 'lib/lob/models/deliverability_analysis.rb', line 59 def lacs_return_code @lacs_return_code end |
#suite_return_code ⇒ Object
A return code that indicates whether the address was matched and corrected by [Suite<sup>Link</sup>](postalpro.usps.com/address-quality-solutions/suitelink). Suite<sup>Link</sup> attempts to provide secondary information to business addresses. Possible values are: * ‘A` –– A Suite<sup>Link</sup> match was found and secondary information was added. * `00` –– A Suite<sup>Link</sup> match could not be found and no secondary information was added. * `”` –– Suite<sup>Link</sup> lookup was not attempted.
62 63 64 |
# File 'lib/lob/models/deliverability_analysis.rb', line 62 def suite_return_code @suite_return_code end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
108 109 110 |
# File 'lib/lob/models/deliverability_analysis.rb', line 108 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/lob/models/deliverability_analysis.rb', line 87 def self.attribute_map { :'dpv_confirmation' => :'dpv_confirmation', :'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', :'lacs_return_code' => :'lacs_return_code', :'suite_return_code' => :'suite_return_code' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
475 476 477 |
# File 'lib/lob/models/deliverability_analysis.rb', line 475 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
134 135 136 137 |
# File 'lib/lob/models/deliverability_analysis.rb', line 134 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/lob/models/deliverability_analysis.rb', line 113 def self.openapi_types { :'dpv_confirmation' => :'String', :'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<DpvFootnote>', :'ews_match' => :'Boolean', :'lacs_indicator' => :'String', :'lacs_return_code' => :'String', :'suite_return_code' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 |
# File 'lib/lob/models/deliverability_analysis.rb', line 439 def ==(o) return true if self.equal?(o) self.class == o.class && dpv_confirmation == o.dpv_confirmation && 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 && lacs_return_code == o.lacs_return_code && suite_return_code == o.suite_return_code end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 |
# File 'lib/lob/models/deliverability_analysis.rb', line 514 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Lob.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/lob/models/deliverability_analysis.rb', line 585 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/lob/models/deliverability_analysis.rb', line 482 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) # // guardrails-disable-line elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) # // guardrails-disable-line end elsif !attributes[self.class.attribute_map[key]].nil? && type.kind_of?(Array) for base_type in type do res = _deserialize(base_type, attributes[self.class.attribute_map[key]]) if !res.nil? self.send("#{key}=", res) # // guardrails-disable-line break end end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) # // guardrails-disable-line end end self end |
#eql?(o) ⇒ Boolean
461 462 463 |
# File 'lib/lob/models/deliverability_analysis.rb', line 461 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
467 468 469 |
# File 'lib/lob/models/deliverability_analysis.rb', line 467 def 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 |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/lob/models/deliverability_analysis.rb', line 219 def list_invalid_properties invalid_properties = Array.new if @dpv_confirmation.nil? invalid_properties.push('invalid value for "dpv_confirmation", dpv_confirmation cannot be nil.') end if @dpv_cmra.nil? invalid_properties.push('invalid value for "dpv_cmra", dpv_cmra cannot be nil.') end if @dpv_vacant.nil? invalid_properties.push('invalid value for "dpv_vacant", dpv_vacant cannot be nil.') end if @dpv_active.nil? 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 if @ews_match.nil? invalid_properties.push('invalid value for "ews_match", ews_match cannot be nil.') end if @lacs_indicator.nil? invalid_properties.push('invalid value for "lacs_indicator", lacs_indicator cannot be nil.') end if @lacs_return_code.nil? invalid_properties.push('invalid value for "lacs_return_code", lacs_return_code cannot be nil.') end if @suite_return_code.nil? invalid_properties.push('invalid value for "suite_return_code", suite_return_code cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
561 562 563 |
# File 'lib/lob/models/deliverability_analysis.rb', line 561 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
567 568 569 570 571 572 573 574 575 576 577 578 579 |
# File 'lib/lob/models/deliverability_analysis.rb', line 567 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) # // guardrails-disable-line if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
555 556 557 |
# File 'lib/lob/models/deliverability_analysis.rb', line 555 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/lob/models/deliverability_analysis.rb', line 286 def valid? return false if @dpv_confirmation.nil? dpv_confirmation_validator = EnumAttributeValidator.new('String', ["Y", "S", "D", "N", ""]) return false unless dpv_confirmation_validator.valid?(@dpv_confirmation) return false if @dpv_cmra.nil? dpv_cmra_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) return false unless dpv_cmra_validator.valid?(@dpv_cmra) return false if @dpv_vacant.nil? dpv_vacant_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) return false unless dpv_vacant_validator.valid?(@dpv_vacant) 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? lacs_indicator_validator = EnumAttributeValidator.new('String', ["Y", "N", ""]) return false unless lacs_indicator_validator.valid?(@lacs_indicator) return false if @lacs_return_code.nil? return false if @suite_return_code.nil? suite_return_code_validator = EnumAttributeValidator.new('String', ["A", "00", ""]) return false unless suite_return_code_validator.valid?(@suite_return_code) true end |