Class: Google::Apis::ContentV2_1::RegionalInventory

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

Regional inventory resource. contains the regional name and all attributes which are overridden for the specified region.

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) ⇒ RegionalInventory

Returns a new instance of RegionalInventory



8096
8097
8098
# File 'generated/google/apis/content_v2_1/classes.rb', line 8096

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

Instance Attribute Details

#availabilityString

The availability of the product. Corresponds to the JSON property availability

Returns:

  • (String)


8060
8061
8062
# File 'generated/google/apis/content_v2_1/classes.rb', line 8060

def availability
  @availability
end

#custom_attributesArray<Google::Apis::ContentV2_1::CustomAttribute>

A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the feed specification in its generic form. Corresponds to the JSON property customAttributes



8066
8067
8068
# File 'generated/google/apis/content_v2_1/classes.rb', line 8066

def custom_attributes
  @custom_attributes
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "content# regionalInventory". Corresponds to the JSON property kind

Returns:

  • (String)


8072
8073
8074
# File 'generated/google/apis/content_v2_1/classes.rb', line 8072

def kind
  @kind
end

#priceGoogle::Apis::ContentV2_1::Price

The price of the product. Corresponds to the JSON property price



8077
8078
8079
# File 'generated/google/apis/content_v2_1/classes.rb', line 8077

def price
  @price
end

#region_idString

The ID (name) of the region. Corresponds to the JSON property regionId

Returns:

  • (String)


8082
8083
8084
# File 'generated/google/apis/content_v2_1/classes.rb', line 8082

def region_id
  @region_id
end

#sale_priceGoogle::Apis::ContentV2_1::Price

The sale price of the product. Mandatory if sale_price_effective_date is defined. Corresponds to the JSON property salePrice



8088
8089
8090
# File 'generated/google/apis/content_v2_1/classes.rb', line 8088

def sale_price
  @sale_price
end

#sale_price_effective_dateString

A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates might be specified as 'null' if undecided. Corresponds to the JSON property salePriceEffectiveDate

Returns:

  • (String)


8094
8095
8096
# File 'generated/google/apis/content_v2_1/classes.rb', line 8094

def sale_price_effective_date
  @sale_price_effective_date
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8101
8102
8103
8104
8105
8106
8107
8108
8109
# File 'generated/google/apis/content_v2_1/classes.rb', line 8101

def update!(**args)
  @availability = args[:availability] if args.key?(:availability)
  @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes)
  @kind = args[:kind] if args.key?(:kind)
  @price = args[:price] if args.key?(:price)
  @region_id = args[:region_id] if args.key?(:region_id)
  @sale_price = args[:sale_price] if args.key?(:sale_price)
  @sale_price_effective_date = args[:sale_price_effective_date] if args.key?(:sale_price_effective_date)
end