Class: Google::Apis::ContentV2::PostalCodeGroup

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PostalCodeGroup

Returns a new instance of PostalCodeGroup



7626
7627
7628
# File 'generated/google/apis/content_v2/classes.rb', line 7626

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

Instance Attribute Details

#countryString

The CLDR territory code of the country the postal code group applies to. Required. Corresponds to the JSON property country

Returns:

  • (String)


7614
7615
7616
# File 'generated/google/apis/content_v2/classes.rb', line 7614

def country
  @country
end

#nameString

The name of the postal code group, referred to in headers. Required. Corresponds to the JSON property name

Returns:

  • (String)


7619
7620
7621
# File 'generated/google/apis/content_v2/classes.rb', line 7619

def name
  @name
end

#postal_code_rangesArray<Google::Apis::ContentV2::PostalCodeRange>

A range of postal codes. Required. Corresponds to the JSON property postalCodeRanges



7624
7625
7626
# File 'generated/google/apis/content_v2/classes.rb', line 7624

def postal_code_ranges
  @postal_code_ranges
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7631
7632
7633
7634
7635
# File 'generated/google/apis/content_v2/classes.rb', line 7631

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @name = args[:name] if args.key?(:name)
  @postal_code_ranges = args[:postal_code_ranges] if args.key?(:postal_code_ranges)
end