Class: Google::Apis::ContentV2_1::Region

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

Overview

Represents a geographic region that you can use as a target with both the RegionalInventory and ShippingSettings services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Region

Returns a new instance of Region.



10626
10627
10628
# File 'generated/google/apis/content_v2_1/classes.rb', line 10626

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

Instance Attribute Details

#display_nameString

The display name of the region. Corresponds to the JSON property displayName

Returns:

  • (String)


10588
10589
10590
# File 'generated/google/apis/content_v2_1/classes.rb', line 10588

def display_name
  @display_name
end

#geotarget_areaGoogle::Apis::ContentV2_1::RegionGeoTargetArea

A list of geotargets that defines the region area. Corresponds to the JSON property geotargetArea



10593
10594
10595
# File 'generated/google/apis/content_v2_1/classes.rb', line 10593

def geotarget_area
  @geotarget_area
end

#merchant_idFixnum

Output only. Immutable. Merchant that owns the region. Corresponds to the JSON property merchantId

Returns:

  • (Fixnum)


10598
10599
10600
# File 'generated/google/apis/content_v2_1/classes.rb', line 10598

def merchant_id
  @merchant_id
end

#postal_code_areaGoogle::Apis::ContentV2_1::RegionPostalCodeArea

A list of postal codes that defines the region area. Note: All regions defined using postal codes are accessible via the account's ShippingSettings. postalCodeGroups resource. Corresponds to the JSON property postalCodeArea



10605
10606
10607
# File 'generated/google/apis/content_v2_1/classes.rb', line 10605

def postal_code_area
  @postal_code_area
end

#region_idString

Output only. Immutable. The ID uniquely identifying each region. Corresponds to the JSON property regionId

Returns:

  • (String)


10610
10611
10612
# File 'generated/google/apis/content_v2_1/classes.rb', line 10610

def region_id
  @region_id
end

#regional_inventory_eligibleBoolean Also known as: regional_inventory_eligible?

Output only. Indicates if the region is eligible to use in the Regional Inventory configuration. Corresponds to the JSON property regionalInventoryEligible

Returns:

  • (Boolean)


10616
10617
10618
# File 'generated/google/apis/content_v2_1/classes.rb', line 10616

def regional_inventory_eligible
  @regional_inventory_eligible
end

#shipping_eligibleBoolean Also known as: shipping_eligible?

Output only. Indicates if the region is eligible to use in the Shipping Services configuration. Corresponds to the JSON property shippingEligible

Returns:

  • (Boolean)


10623
10624
10625
# File 'generated/google/apis/content_v2_1/classes.rb', line 10623

def shipping_eligible
  @shipping_eligible
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10631
10632
10633
10634
10635
10636
10637
10638
10639
# File 'generated/google/apis/content_v2_1/classes.rb', line 10631

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @geotarget_area = args[:geotarget_area] if args.key?(:geotarget_area)
  @merchant_id = args[:merchant_id] if args.key?(:merchant_id)
  @postal_code_area = args[:postal_code_area] if args.key?(:postal_code_area)
  @region_id = args[:region_id] if args.key?(:region_id)
  @regional_inventory_eligible = args[:regional_inventory_eligible] if args.key?(:regional_inventory_eligible)
  @shipping_eligible = args[:shipping_eligible] if args.key?(:shipping_eligible)
end