Class: Google::Apis::ContentV2_1::DeliveryAreaPostalCodeRange
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::DeliveryAreaPostalCodeRange
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Overview
A range of postal codes that defines the delivery area. Only set
firstPostalCode
when specifying a single postal code.
Instance Attribute Summary collapse
-
#first_postal_code ⇒ String
Required.
-
#last_postal_code ⇒ String
A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area (for example [070* - 078*] results in the range [07000 - 07899]).
Instance Method Summary collapse
-
#initialize(**args) ⇒ DeliveryAreaPostalCodeRange
constructor
A new instance of DeliveryAreaPostalCodeRange.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DeliveryAreaPostalCodeRange
Returns a new instance of DeliveryAreaPostalCodeRange.
4550 4551 4552 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4550 def initialize(**args) update!(**args) end |
Instance Attribute Details
#first_postal_code ⇒ String
Required. A postal code or a pattern of the form prefix* denoting the
inclusive lower bound of the range defining the area. Examples values: "94108"
, "9410*"
, "9*"
.
Corresponds to the JSON property firstPostalCode
4537 4538 4539 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4537 def first_postal_code @first_postal_code end |
#last_postal_code ⇒ String
A postal code or a pattern of the form prefix* denoting the inclusive upper
bound of the range defining the area (for example [070* - 078*] results in the
range [07000 - 07899]). It must have the same length as firstPostalCode
: if
firstPostalCode
is a postal code then lastPostalCode
must be a postal code
too; if firstPostalCode is a pattern then lastPostalCode
must be a pattern
with the same prefix length. Ignored if not set, then the area is defined as
being all the postal codes matching firstPostalCode
.
Corresponds to the JSON property lastPostalCode
4548 4549 4550 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4548 def last_postal_code @last_postal_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4555 4556 4557 4558 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4555 def update!(**args) @first_postal_code = args[:first_postal_code] if args.key?(:first_postal_code) @last_postal_code = args[:last_postal_code] if args.key?(:last_postal_code) end |