Class: Google::Apis::ContentV2_1::OrderLineItemProduct

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

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

Returns a new instance of OrderLineItemProduct.



4713
4714
4715
# File 'generated/google/apis/content_v2_1/classes.rb', line 4713

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

Instance Attribute Details

#brandString

Brand of the item. Corresponds to the JSON property brand

Returns:

  • (String)


4635
4636
4637
# File 'generated/google/apis/content_v2_1/classes.rb', line 4635

def brand
  @brand
end

#conditionString

Condition or state of the item. Acceptable values are:

  • "new"
  • "refurbished"
  • "used" Corresponds to the JSON property condition

Returns:

  • (String)


4644
4645
4646
# File 'generated/google/apis/content_v2_1/classes.rb', line 4644

def condition
  @condition
end

#content_languageString

The two-letter ISO 639-1 language code for the item. Corresponds to the JSON property contentLanguage

Returns:

  • (String)


4649
4650
4651
# File 'generated/google/apis/content_v2_1/classes.rb', line 4649

def content_language
  @content_language
end

#feesArray<Google::Apis::ContentV2_1::OrderLineItemProductFee>

Associated fees at order creation time. Corresponds to the JSON property fees



4654
4655
4656
# File 'generated/google/apis/content_v2_1/classes.rb', line 4654

def fees
  @fees
end

#gtinString

Global Trade Item Number (GTIN) of the item. Corresponds to the JSON property gtin

Returns:

  • (String)


4659
4660
4661
# File 'generated/google/apis/content_v2_1/classes.rb', line 4659

def gtin
  @gtin
end

#idString

The REST ID of the product. Corresponds to the JSON property id

Returns:

  • (String)


4664
4665
4666
# File 'generated/google/apis/content_v2_1/classes.rb', line 4664

def id
  @id
end

URL of an image of the item. Corresponds to the JSON property imageLink

Returns:

  • (String)


4669
4670
4671
# File 'generated/google/apis/content_v2_1/classes.rb', line 4669

def image_link
  @image_link
end

#item_group_idString

Shared identifier for all variants of the same product. Corresponds to the JSON property itemGroupId

Returns:

  • (String)


4674
4675
4676
# File 'generated/google/apis/content_v2_1/classes.rb', line 4674

def item_group_id
  @item_group_id
end

#mpnString

Manufacturer Part Number (MPN) of the item. Corresponds to the JSON property mpn

Returns:

  • (String)


4679
4680
4681
# File 'generated/google/apis/content_v2_1/classes.rb', line 4679

def mpn
  @mpn
end

#offer_idString

An identifier of the item. Corresponds to the JSON property offerId

Returns:

  • (String)


4684
4685
4686
# File 'generated/google/apis/content_v2_1/classes.rb', line 4684

def offer_id
  @offer_id
end

#priceGoogle::Apis::ContentV2_1::Price

Price of the item. Corresponds to the JSON property price



4689
4690
4691
# File 'generated/google/apis/content_v2_1/classes.rb', line 4689

def price
  @price
end

#shown_imageString

URL to the cached image shown to the user when order was placed. Corresponds to the JSON property shownImage

Returns:

  • (String)


4694
4695
4696
# File 'generated/google/apis/content_v2_1/classes.rb', line 4694

def shown_image
  @shown_image
end

#target_countryString

The CLDR territory code of the target country of the product. Corresponds to the JSON property targetCountry

Returns:

  • (String)


4699
4700
4701
# File 'generated/google/apis/content_v2_1/classes.rb', line 4699

def target_country
  @target_country
end

#titleString

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

Returns:

  • (String)


4704
4705
4706
# File 'generated/google/apis/content_v2_1/classes.rb', line 4704

def title
  @title
end

#variant_attributesArray<Google::Apis::ContentV2_1::OrderLineItemProductVariantAttribute>

Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here. Corresponds to the JSON property variantAttributes



4711
4712
4713
# File 'generated/google/apis/content_v2_1/classes.rb', line 4711

def variant_attributes
  @variant_attributes
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
# File 'generated/google/apis/content_v2_1/classes.rb', line 4718

def update!(**args)
  @brand = args[:brand] if args.key?(:brand)
  @condition = args[:condition] if args.key?(:condition)
  @content_language = args[:content_language] if args.key?(:content_language)
  @fees = args[:fees] if args.key?(:fees)
  @gtin = args[:gtin] if args.key?(:gtin)
  @id = args[:id] if args.key?(:id)
  @image_link = args[:image_link] if args.key?(:image_link)
  @item_group_id = args[:item_group_id] if args.key?(:item_group_id)
  @mpn = args[:mpn] if args.key?(:mpn)
  @offer_id = args[:offer_id] if args.key?(:offer_id)
  @price = args[:price] if args.key?(:price)
  @shown_image = args[:shown_image] if args.key?(:shown_image)
  @target_country = args[:target_country] if args.key?(:target_country)
  @title = args[:title] if args.key?(:title)
  @variant_attributes = args[:variant_attributes] if args.key?(:variant_attributes)
end