Class: Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1Address
- Inherits:
-
Object
- Object
- Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1Address
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/addressvalidation_v1/classes.rb,
lib/google/apis/addressvalidation_v1/representations.rb,
lib/google/apis/addressvalidation_v1/representations.rb
Overview
Details of the post-processed address. Post-processing includes correcting misspelled parts of the address, replacing incorrect parts, and inferring missing parts.
Instance Attribute Summary collapse
-
#address_components ⇒ Array<Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1AddressComponent>
Unordered list.
-
#formatted_address ⇒ String
The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located.
-
#missing_component_types ⇒ Array<String>
The types of components that were expected to be present in a correctly formatted mailing address but were not found in the input AND could not be inferred.
-
#postal_address ⇒ Google::Apis::AddressvalidationV1::GoogleTypePostalAddress
Represents a postal address, e.g.
-
#unconfirmed_component_types ⇒ Array<String>
The types of the components that are present in the
address_components
but could not be confirmed to be correct. -
#unresolved_tokens ⇒ Array<String>
Any tokens in the input that could not be resolved.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsAddressvalidationV1Address
constructor
A new instance of GoogleMapsAddressvalidationV1Address.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsAddressvalidationV1Address
Returns a new instance of GoogleMapsAddressvalidationV1Address.
137 138 139 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 137 def initialize(**args) update!(**args) end |
Instance Attribute Details
#address_components ⇒ Array<Google::Apis::AddressvalidationV1::GoogleMapsAddressvalidationV1AddressComponent>
Unordered list. The individual address components of the formatted and
corrected address, along with validation information. This provides
information on the validation status of the individual components. Address
components are not ordered in a particular way. Do not make any assumptions on
the ordering of the address components in the list.
Corresponds to the JSON property addressComponents
84 85 86 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 84 def address_components @address_components end |
#formatted_address ⇒ String
The post-processed address, formatted as a single-line address following the
address formatting rules of the region where the address is located.
Corresponds to the JSON property formattedAddress
90 91 92 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 90 def formatted_address @formatted_address end |
#missing_component_types ⇒ Array<String>
The types of components that were expected to be present in a correctly
formatted mailing address but were not found in the input AND could not be
inferred. Components of this type are not present in formatted_address
,
postal_address
, or address_components
. An example might be ['street_number'
, 'route']
for an input like "Boulder, Colorado, 80301, USA". The list of
possible types can be found here.
Corresponds to the JSON property missingComponentTypes
101 102 103 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 101 def missing_component_types @missing_component_types end |
#postal_address ⇒ Google::Apis::AddressvalidationV1::GoogleTypePostalAddress
Represents a postal address, e.g. for postal delivery or payments addresses.
Given a postal address, a postal service can deliver items to a premise, P.O.
Box or similar. It is not intended to model geographical locations (roads,
towns, mountains). In typical usage an address would be created via user input
or from importing existing data, depending on the type of process. Advice on
address input / editing: - Use an internationalization-ready address widget
such as https://github.com/google/libaddressinput) - Users should not be
presented with UI elements for input or editing of fields outside countries
where that field is used. For more guidance on how to use this schema, please
see: https://support.google.com/business/answer/6397478
Corresponds to the JSON property postalAddress
115 116 117 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 115 def postal_address @postal_address end |
#unconfirmed_component_types ⇒ Array<String>
The types of the components that are present in the address_components
but
could not be confirmed to be correct. This field is provided for the sake of
convenience: its contents are equivalent to iterating through the
address_components
to find the types of all the components where the
confirmation_level is not CONFIRMED or the inferred flag is not set to true
.
The list of possible types can be found here.
Corresponds to the JSON property unconfirmedComponentTypes
126 127 128 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 126 def unconfirmed_component_types @unconfirmed_component_types end |
#unresolved_tokens ⇒ Array<String>
Any tokens in the input that could not be resolved. This might be an input
that was not recognized as a valid part of an address (for example in an input
like "123235253253 Main St, San Francisco, CA, 94105", the unresolved tokens
may look like ["123235253253"]
since that does not look like a valid street
number.
Corresponds to the JSON property unresolvedTokens
135 136 137 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 135 def unresolved_tokens @unresolved_tokens end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
142 143 144 145 146 147 148 149 |
# File 'lib/google/apis/addressvalidation_v1/classes.rb', line 142 def update!(**args) @address_components = args[:address_components] if args.key?(:address_components) @formatted_address = args[:formatted_address] if args.key?(:formatted_address) @missing_component_types = args[:missing_component_types] if args.key?(:missing_component_types) @postal_address = args[:postal_address] if args.key?(:postal_address) @unconfirmed_component_types = args[:unconfirmed_component_types] if args.key?(:unconfirmed_component_types) @unresolved_tokens = args[:unresolved_tokens] if args.key?(:unresolved_tokens) end |