Class: Google::Apis::MerchantapiProductsV1beta::ProductChange

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

Overview

The change that happened to the product including old value, new value, country code as the region code and reporting context.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductChange

Returns a new instance of ProductChange.



1410
1411
1412
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1410

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

Instance Attribute Details

#new_valueString

The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (approved, pending , disapproved, `) Corresponds to the JSON propertynewValue`

Returns:

  • (String)


1386
1387
1388
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1386

def new_value
  @new_value
end

#old_valueString

The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (approved, pending , disapproved, `) Corresponds to the JSON propertyoldValue`

Returns:

  • (String)


1393
1394
1395
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1393

def old_value
  @old_value
end

#region_codeString

Countries that have the change (if applicable). Represented in the ISO 3166 format. Corresponds to the JSON property regionCode

Returns:

  • (String)


1399
1400
1401
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1399

def region_code
  @region_code
end

#reporting_contextString

Reporting contexts that have the change (if applicable). Currently this field supports only (SHOPPING_ADS, LOCAL_INVENTORY_ADS, YOUTUBE_SHOPPING, YOUTUBE_CHECKOUT, YOUTUBE_AFFILIATE) from the enum value ReportingContextEnum Corresponds to the JSON property reportingContext

Returns:

  • (String)


1408
1409
1410
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1408

def reporting_context
  @reporting_context
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1415
1416
1417
1418
1419
1420
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 1415

def update!(**args)
  @new_value = args[:new_value] if args.key?(:new_value)
  @old_value = args[:old_value] if args.key?(:old_value)
  @region_code = args[:region_code] if args.key?(:region_code)
  @reporting_context = args[:reporting_context] if args.key?(:reporting_context)
end