Class: Google::Apis::ContentV2::Inventory
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2::Inventory
- 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
-
#availability ⇒ String
The availability of the product.
-
#installment ⇒ Google::Apis::ContentV2::Installment
Number and amount of installments to pay for an item.
-
#kind ⇒ String
Identifies what kind of resource this is.
-
#loyalty_points ⇒ Google::Apis::ContentV2::LoyaltyPoints
Loyalty points that users receive after purchasing the item.
-
#pickup ⇒ Google::Apis::ContentV2::InventoryPickup
Store pickup information.
-
#price ⇒ Google::Apis::ContentV2::Price
The price of the product.
-
#quantity ⇒ Fixnum
The quantity of the product.
-
#sale_price ⇒ Google::Apis::ContentV2::Price
The sale price of the product.
-
#sale_price_effective_date ⇒ String
A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash.
-
#sell_on_google_quantity ⇒ Fixnum
The quantity of the product that is reserved for sell-on-google ads.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Inventory
constructor
A new instance of Inventory.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ Inventory
Returns a new instance of Inventory
2068 2069 2070 |
# File 'generated/google/apis/content_v2/classes.rb', line 2068 def initialize(**args) update!(**args) end |
Instance Attribute Details
#availability ⇒ String
The availability of the product.
Corresponds to the JSON property availability
2013 2014 2015 |
# File 'generated/google/apis/content_v2/classes.rb', line 2013 def availability @availability end |
#installment ⇒ Google::Apis::ContentV2::Installment
Number and amount of installments to pay for an item. Brazil only.
Corresponds to the JSON property installment
2018 2019 2020 |
# File 'generated/google/apis/content_v2/classes.rb', line 2018 def installment @installment end |
#kind ⇒ String
Identifies what kind of resource this is. Value: the fixed string "content#
inventory".
Corresponds to the JSON property kind
2024 2025 2026 |
# File 'generated/google/apis/content_v2/classes.rb', line 2024 def kind @kind end |
#loyalty_points ⇒ Google::Apis::ContentV2::LoyaltyPoints
Loyalty points that users receive after purchasing the item. Japan only.
Corresponds to the JSON property loyaltyPoints
2029 2030 2031 |
# File 'generated/google/apis/content_v2/classes.rb', line 2029 def loyalty_points @loyalty_points end |
#pickup ⇒ Google::Apis::ContentV2::InventoryPickup
Store pickup information. Only supported for local inventory. Not setting
pickup means "don't update" while setting it to the empty value (`in JSON)
means "delete". Otherwise, pickupMethod and pickupSla must be set together,
unless pickupMethod is "not supported".
Corresponds to the JSON propertypickup`
2037 2038 2039 |
# File 'generated/google/apis/content_v2/classes.rb', line 2037 def pickup @pickup end |
#price ⇒ Google::Apis::ContentV2::Price
The price of the product.
Corresponds to the JSON property price
2042 2043 2044 |
# File 'generated/google/apis/content_v2/classes.rb', line 2042 def price @price end |
#quantity ⇒ Fixnum
The quantity of the product. Must be equal to or greater than zero. Supported
only for local products.
Corresponds to the JSON property quantity
2048 2049 2050 |
# File 'generated/google/apis/content_v2/classes.rb', line 2048 def quantity @quantity end |
#sale_price ⇒ Google::Apis::ContentV2::Price
The sale price of the product. Mandatory if sale_price_effective_date is
defined.
Corresponds to the JSON property salePrice
2054 2055 2056 |
# File 'generated/google/apis/content_v2/classes.rb', line 2054 def sale_price @sale_price end |
#sale_price_effective_date ⇒ String
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
2060 2061 2062 |
# File 'generated/google/apis/content_v2/classes.rb', line 2060 def sale_price_effective_date @sale_price_effective_date end |
#sell_on_google_quantity ⇒ Fixnum
The quantity of the product that is reserved for sell-on-google ads. Supported
only for online products.
Corresponds to the JSON property sellOnGoogleQuantity
2066 2067 2068 |
# File 'generated/google/apis/content_v2/classes.rb', line 2066 def sell_on_google_quantity @sell_on_google_quantity end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 |
# File 'generated/google/apis/content_v2/classes.rb', line 2073 def update!(**args) @availability = args[:availability] if args.key?(:availability) @installment = args[:installment] if args.key?(:installment) @kind = args[:kind] if args.key?(:kind) @loyalty_points = args[:loyalty_points] if args.key?(:loyalty_points) @pickup = args[:pickup] if args.key?(:pickup) @price = args[:price] if args.key?(:price) @quantity = args[:quantity] if args.key?(:quantity) @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) @sell_on_google_quantity = args[:sell_on_google_quantity] if args.key?(:sell_on_google_quantity) end |