Class: Google::Apis::MerchantapiAccountsV1beta::Region

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_accounts_v1beta/classes.rb,
lib/google/apis/merchantapi_accounts_v1beta/representations.rb,
lib/google/apis/merchantapi_accounts_v1beta/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, radius areas or, in some countries, using predefined geotargets. A region must be defined by specifying exactly one of postal_code_area, geotarget_area, or radius_area. For more information, see Set up regions for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Region

Returns a new instance of Region.



3598
3599
3600
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3598

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

Instance Attribute Details

#display_nameString

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

Returns:

  • (String)


3559
3560
3561
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3559

def display_name
  @display_name
end

#geotarget_areaGoogle::Apis::MerchantapiAccountsV1beta::GeoTargetArea

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



3564
3565
3566
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3564

def geotarget_area
  @geotarget_area
end

#nameString

Identifier. The resource name of the region. Format: accounts/account/ regions/region` Corresponds to the JSON propertyname`

Returns:

  • (String)


3570
3571
3572
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3570

def name
  @name
end

#postal_code_areaGoogle::Apis::MerchantapiAccountsV1beta::PostalCodeArea

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



3577
3578
3579
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3577

def postal_code_area
  @postal_code_area
end

#radius_areaGoogle::Apis::MerchantapiAccountsV1beta::RadiusArea

A radius area that defines the region area. Corresponds to the JSON property radiusArea



3582
3583
3584
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3582

def radius_area
  @radius_area
end

#regional_inventory_eligibleBoolean Also known as: regional_inventory_eligible?

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

Returns:

  • (Boolean)


3588
3589
3590
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3588

def regional_inventory_eligible
  @regional_inventory_eligible
end

#shipping_eligibleBoolean Also known as: shipping_eligible?

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

Returns:

  • (Boolean)


3595
3596
3597
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3595

def shipping_eligible
  @shipping_eligible
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3603
3604
3605
3606
3607
3608
3609
3610
3611
# File 'lib/google/apis/merchantapi_accounts_v1beta/classes.rb', line 3603

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