Class: Google::Apis::ContentV2_1::DeliveryAreaPostalCodeRange

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DeliveryAreaPostalCodeRange

Returns a new instance of DeliveryAreaPostalCodeRange.



4598
4599
4600
# File 'lib/google/apis/content_v2_1/classes.rb', line 4598

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#first_postal_codeString

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

Returns:

  • (String)


4585
4586
4587
# File 'lib/google/apis/content_v2_1/classes.rb', line 4585

def first_postal_code
  @first_postal_code
end

#last_postal_codeString

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

Returns:

  • (String)


4596
4597
4598
# File 'lib/google/apis/content_v2_1/classes.rb', line 4596

def last_postal_code
  @last_postal_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4603
4604
4605
4606
# File 'lib/google/apis/content_v2_1/classes.rb', line 4603

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