Class: Google::Apis::MerchantapiNotificationsV1beta::ProductStatusChangeMessage

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

Overview

The message that the merchant will receive to notify about product status change event

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ProductStatusChangeMessage

Returns a new instance of ProductStatusChangeMessage.



205
206
207
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 205

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

Instance Attribute Details

#accountString

The target account that owns the entity that changed. Format : accounts/ merchant_id` Corresponds to the JSON propertyaccount`

Returns:

  • (String)


164
165
166
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 164

def 
  @account
end

#attributeString

The attribute in the resource that changed, in this case it will be always Status. Corresponds to the JSON property attribute

Returns:

  • (String)


170
171
172
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 170

def attribute
  @attribute
end

#changesArray<Google::Apis::MerchantapiNotificationsV1beta::ProductChange>

A message to describe the change that happened to the product Corresponds to the JSON property changes



175
176
177
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 175

def changes
  @changes
end

#expiration_timeString

The product expiration time. This field will not bet set if the notification is sent for a product deletion event. Corresponds to the JSON property expirationTime

Returns:

  • (String)


181
182
183
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 181

def expiration_time
  @expiration_time
end

#managing_accountString

The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : accounts/service_provider_id` Corresponds to the JSON propertymanagingAccount`

Returns:

  • (String)


187
188
189
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 187

def 
  @managing_account
end

#resourceString

The product name. Format: product.name=accounts/`account`/products/`product Corresponds to the JSON propertyresource`

Returns:

  • (String)


193
194
195
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 193

def resource
  @resource
end

#resource_idString

The product id. Corresponds to the JSON property resourceId

Returns:

  • (String)


198
199
200
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 198

def resource_id
  @resource_id
end

#resource_typeString

The resource that changed, in this case it will always be Product. Corresponds to the JSON property resourceType

Returns:

  • (String)


203
204
205
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 203

def resource_type
  @resource_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



210
211
212
213
214
215
216
217
218
219
# File 'lib/google/apis/merchantapi_notifications_v1beta/classes.rb', line 210

def update!(**args)
  @account = args[:account] if args.key?(:account)
  @attribute = args[:attribute] if args.key?(:attribute)
  @changes = args[:changes] if args.key?(:changes)
  @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
  @managing_account = args[:managing_account] if args.key?(:managing_account)
  @resource = args[:resource] if args.key?(:resource)
  @resource_id = args[:resource_id] if args.key?(:resource_id)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
end