Class: Google::Apis::DatamanagerV1::CartData

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

Overview

The cart data associated with the event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CartData

Returns a new instance of CartData.



283
284
285
# File 'lib/google/apis/datamanager_v1/classes.rb', line 283

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

Instance Attribute Details

#coupon_codesArray<String>

Optional. The list of coupon codes that were applied to the cart. Cart-level and item-level coupon codes are independent. If the event is for a Google Analytics destination, only provide a single coupon code. Google Analytics ignores additional coupon codes. Corresponds to the JSON property couponCodes

Returns:

  • (Array<String>)


255
256
257
# File 'lib/google/apis/datamanager_v1/classes.rb', line 255

def coupon_codes
  @coupon_codes
end

#itemsArray<Google::Apis::DatamanagerV1::Item>

Optional. The list of items associated with the event. Corresponds to the JSON property items



260
261
262
# File 'lib/google/apis/datamanager_v1/classes.rb', line 260

def items
  @items
end

#merchant_feed_labelString

Optional. The Merchant Center feed label associated with the feed of the items. Corresponds to the JSON property merchantFeedLabel

Returns:

  • (String)


265
266
267
# File 'lib/google/apis/datamanager_v1/classes.rb', line 265

def merchant_feed_label
  @merchant_feed_label
end

#merchant_feed_language_codeString

Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded. Corresponds to the JSON property merchantFeedLanguageCode

Returns:

  • (String)


271
272
273
# File 'lib/google/apis/datamanager_v1/classes.rb', line 271

def merchant_feed_language_code
  @merchant_feed_language_code
end

#merchant_idString

Optional. The Merchant Center ID associated with the items. Corresponds to the JSON property merchantId

Returns:

  • (String)


276
277
278
# File 'lib/google/apis/datamanager_v1/classes.rb', line 276

def merchant_id
  @merchant_id
end

#transaction_discountFloat

Optional. The sum of all discounts associated with the transaction. Corresponds to the JSON property transactionDiscount

Returns:

  • (Float)


281
282
283
# File 'lib/google/apis/datamanager_v1/classes.rb', line 281

def transaction_discount
  @transaction_discount
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



288
289
290
291
292
293
294
295
# File 'lib/google/apis/datamanager_v1/classes.rb', line 288

def update!(**args)
  @coupon_codes = args[:coupon_codes] if args.key?(:coupon_codes)
  @items = args[:items] if args.key?(:items)
  @merchant_feed_label = args[:merchant_feed_label] if args.key?(:merchant_feed_label)
  @merchant_feed_language_code = args[:merchant_feed_language_code] if args.key?(:merchant_feed_language_code)
  @merchant_id = args[:merchant_id] if args.key?(:merchant_id)
  @transaction_discount = args[:transaction_discount] if args.key?(:transaction_discount)
end