Class: Google::Apis::ContentV2_1::DeliveryArea
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::DeliveryArea
- 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 delivery area for the product. Only one of countryCode
or postalCodeRange
must be set.
Instance Attribute Summary collapse
-
#country_code ⇒ String
Required.
-
#postal_code_range ⇒ Google::Apis::ContentV2_1::DeliveryAreaPostalCodeRange
A range of postal codes that defines the delivery area.
-
#region_code ⇒ String
A state, territory, or prefecture.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DeliveryArea
constructor
A new instance of DeliveryArea.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ DeliveryArea
Returns a new instance of DeliveryArea.
4515 4516 4517 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4515 def initialize(**args) update!(**args) end |
Instance Attribute Details
#country_code ⇒ String
Required. The country that the product can be delivered to. Submit a unicode
CLDR region
such as US
or CH
.
Corresponds to the JSON property countryCode
4498 4499 4500 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4498 def country_code @country_code end |
#postal_code_range ⇒ Google::Apis::ContentV2_1::DeliveryAreaPostalCodeRange
A range of postal codes that defines the delivery area. Only set
firstPostalCode
when specifying a single postal code.
Corresponds to the JSON property postalCodeRange
4504 4505 4506 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4504 def postal_code_range @postal_code_range end |
#region_code ⇒ String
4513 4514 4515 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4513 def region_code @region_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4520 4521 4522 4523 4524 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 4520 def update!(**args) @country_code = args[:country_code] if args.key?(:country_code) @postal_code_range = args[:postal_code_range] if args.key?(:postal_code_range) @region_code = args[:region_code] if args.key?(:region_code) end |