Class: Google::Apis::Searchads360V23::GoogleAdsSearchads360V23ServicesCartDataItem

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/searchads360_v23/classes.rb,
lib/google/apis/searchads360_v23/representations.rb,
lib/google/apis/searchads360_v23/representations.rb

Overview

Contains data of the items purchased.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAdsSearchads360V23ServicesCartDataItem

Returns a new instance of GoogleAdsSearchads360V23ServicesCartDataItem.



35423
35424
35425
# File 'lib/google/apis/searchads360_v23/classes.rb', line 35423

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

Instance Attribute Details

#product_idString

The shopping id of the item. Must be equal to the Merchant Center product identifier. Corresponds to the JSON property productId

Returns:

  • (String)


35410
35411
35412
# File 'lib/google/apis/searchads360_v23/classes.rb', line 35410

def product_id
  @product_id
end

#quantityFixnum

Number of items sold. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


35415
35416
35417
# File 'lib/google/apis/searchads360_v23/classes.rb', line 35415

def quantity
  @quantity
end

#unit_priceFloat

Unit price excluding tax, shipping, and any transaction level discounts. The currency code is the same as that in the ClickConversion message. Corresponds to the JSON property unitPrice

Returns:

  • (Float)


35421
35422
35423
# File 'lib/google/apis/searchads360_v23/classes.rb', line 35421

def unit_price
  @unit_price
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



35428
35429
35430
35431
35432
# File 'lib/google/apis/searchads360_v23/classes.rb', line 35428

def update!(**args)
  @product_id = args[:product_id] if args.key?(:product_id)
  @quantity = args[:quantity] if args.key?(:quantity)
  @unit_price = args[:unit_price] if args.key?(:unit_price)
end