content_v2: force regenerate (#692)

This commit is contained in:
Matt Whisenhunt 2018-07-04 10:49:57 -07:00 committed by Daniel Azuma
parent 10e21ebfae
commit 6aa83a4165
4 changed files with 234 additions and 8 deletions

View File

@ -26,7 +26,7 @@ module Google
# @see https://developers.google.com/shopping-content
module ContentV2
VERSION = 'V2'
REVISION = '20180608'
REVISION = ''
# Manage your product listings and accounts for Google Shopping
AUTH_CONTENT = 'https://www.googleapis.com/auth/content'

View File

@ -634,8 +634,7 @@ module Google
# @return [Google::Apis::ContentV2::Account]
attr_accessor :account
# The ID of the targeted account. Only defined if the method is get, delete or
# claimwebsite.
# The ID of the targeted account. Only defined if the method is not insert.
# Corresponds to the JSON property `accountId`
# @return [Fixnum]
attr_accessor :account_id
@ -652,12 +651,17 @@ module Google
attr_accessor :force
alias_method :force?, :force
# Details about the link request.
# Corresponds to the JSON property `linkRequest`
# @return [Google::Apis::ContentV2::AccountsCustomBatchRequestEntryLinkRequest]
attr_accessor :link_request
# The ID of the managing account.
# Corresponds to the JSON property `merchantId`
# @return [Fixnum]
attr_accessor :merchant_id
#
# The method of the batch entry.
# Corresponds to the JSON property `method`
# @return [String]
attr_accessor :request_method
@ -679,12 +683,44 @@ module Google
@account_id = args[:account_id] if args.key?(:account_id)
@batch_id = args[:batch_id] if args.key?(:batch_id)
@force = args[:force] if args.key?(:force)
@link_request = args[:link_request] if args.key?(:link_request)
@merchant_id = args[:merchant_id] if args.key?(:merchant_id)
@request_method = args[:request_method] if args.key?(:request_method)
@overwrite = args[:overwrite] if args.key?(:overwrite)
end
end
#
class AccountsCustomBatchRequestEntryLinkRequest
include Google::Apis::Core::Hashable
# Action to perform for this link.
# Corresponds to the JSON property `action`
# @return [String]
attr_accessor :action
# Type of the link between the two accounts.
# Corresponds to the JSON property `linkType`
# @return [String]
attr_accessor :link_type
# The ID of the linked account.
# Corresponds to the JSON property `linkedAccountId`
# @return [String]
attr_accessor :linked_account_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@action = args[:action] if args.key?(:action)
@link_type = args[:link_type] if args.key?(:link_type)
@linked_account_id = args[:linked_account_id] if args.key?(:linked_account_id)
end
end
#
class BatchAccountsResponse
include Google::Apis::Core::Hashable
@ -736,6 +772,11 @@ module Google
# @return [String]
attr_accessor :kind
# The status of the updated link. Only defined if the method is link.
# Corresponds to the JSON property `linkStatus`
# @return [String]
attr_accessor :link_status
def initialize(**args)
update!(**args)
end
@ -746,6 +787,64 @@ module Google
@batch_id = args[:batch_id] if args.key?(:batch_id)
@errors = args[:errors] if args.key?(:errors)
@kind = args[:kind] if args.key?(:kind)
@link_status = args[:link_status] if args.key?(:link_status)
end
end
#
class AccountsLinkRequest
include Google::Apis::Core::Hashable
# Action to perform for this link.
# Corresponds to the JSON property `action`
# @return [String]
attr_accessor :action
# Type of the link between the two accounts.
# Corresponds to the JSON property `linkType`
# @return [String]
attr_accessor :link_type
# The ID of the linked account.
# Corresponds to the JSON property `linkedAccountId`
# @return [String]
attr_accessor :linked_account_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@action = args[:action] if args.key?(:action)
@link_type = args[:link_type] if args.key?(:link_type)
@linked_account_id = args[:linked_account_id] if args.key?(:linked_account_id)
end
end
#
class AccountsLinkResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "content#
# accountsLinkResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Current status of the requested link.
# Corresponds to the JSON property `linkStatus`
# @return [String]
attr_accessor :link_status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
@link_status = args[:link_status] if args.key?(:link_status)
end
end
@ -4334,7 +4433,7 @@ module Google
attr_accessor :creation_date
# Date on which the shipment has been delivered, in ISO 8601 format. Present
# only if status is delievered
# only if status is delivered
# Corresponds to the JSON property `deliveryDate`
# @return [String]
attr_accessor :delivery_date
@ -4491,14 +4590,14 @@ module Google
# @return [String]
attr_accessor :operation_id
# Option to create a refund-only invoice. Exactly one of refund_option and
# return_option must be provided.
# Option to create a refund-only invoice. Exactly one of refundOnlyOption or
# returnOption must be provided.
# Corresponds to the JSON property `refundOnlyOption`
# @return [Google::Apis::ContentV2::OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption]
attr_accessor :refund_only_option
# Option to create an invoice for a refund and mark all items within the invoice
# as returned. Exactly one of refund_option and return_option must be provided.
# as returned. Exactly one of refundOnlyOption or returnOption must be provided.
# Corresponds to the JSON property `returnOption`
# @return [Google::Apis::ContentV2::OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption]
attr_accessor :return_option
@ -5710,6 +5809,12 @@ module Google
# @return [String]
attr_accessor :carrier
# Date on which the shipment has been delivered, in ISO 8601 format. Optional
# and can be provided only if
# Corresponds to the JSON property `deliveryDate`
# @return [String]
attr_accessor :delivery_date
# The ID of the shipment.
# Corresponds to the JSON property `shipmentId`
# @return [String]
@ -5732,6 +5837,7 @@ module Google
# Update properties of this object
def update!(**args)
@carrier = args[:carrier] if args.key?(:carrier)
@delivery_date = args[:delivery_date] if args.key?(:delivery_date)
@shipment_id = args[:shipment_id] if args.key?(:shipment_id)
@status = args[:status] if args.key?(:status)
@tracking_id = args[:tracking_id] if args.key?(:tracking_id)
@ -6583,6 +6689,12 @@ module Google
# @return [String]
attr_accessor :carrier
# Date on which the shipment has been delivered, in ISO 8601 format. Optional
# and can be provided only if
# Corresponds to the JSON property `deliveryDate`
# @return [String]
attr_accessor :delivery_date
# The ID of the operation. Unique across all operations for a given order.
# Corresponds to the JSON property `operationId`
# @return [String]
@ -6610,6 +6722,7 @@ module Google
# Update properties of this object
def update!(**args)
@carrier = args[:carrier] if args.key?(:carrier)
@delivery_date = args[:delivery_date] if args.key?(:delivery_date)
@operation_id = args[:operation_id] if args.key?(:operation_id)
@shipment_id = args[:shipment_id] if args.key?(:shipment_id)
@status = args[:status] if args.key?(:status)
@ -7504,6 +7617,11 @@ module Google
# @return [String]
attr_accessor :content_language
# Cost of goods sold. Used for gross profit reporting.
# Corresponds to the JSON property `costOfGoodsSold`
# @return [Google::Apis::ContentV2::Price]
attr_accessor :cost_of_goods_sold
# A list of custom (merchant-provided) attributes. It can also be used for
# submitting any attribute of the feed specification in its generic form (e.g., `
# "name": "size type", "type": "text", "value": "regular" `). This is useful
@ -7664,11 +7782,21 @@ module Google
# @return [String]
attr_accessor :material
# The energy efficiency class as defined in EU directive 2010/30/EU.
# Corresponds to the JSON property `maxEnergyEfficiencyClass`
# @return [String]
attr_accessor :max_energy_efficiency_class
# Maximal product handling time (in business days).
# Corresponds to the JSON property `maxHandlingTime`
# @return [Fixnum]
attr_accessor :max_handling_time
# The energy efficiency class as defined in EU directive 2010/30/EU.
# Corresponds to the JSON property `minEnergyEfficiencyClass`
# @return [String]
attr_accessor :min_energy_efficiency_class
# Minimal product handling time (in business days).
# Corresponds to the JSON property `minHandlingTime`
# @return [Fixnum]
@ -7842,6 +7970,7 @@ module Google
@color = args[:color] if args.key?(:color)
@condition = args[:condition] if args.key?(:condition)
@content_language = args[:content_language] if args.key?(:content_language)
@cost_of_goods_sold = args[:cost_of_goods_sold] if args.key?(:cost_of_goods_sold)
@custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes)
@custom_groups = args[:custom_groups] if args.key?(:custom_groups)
@custom_label0 = args[:custom_label0] if args.key?(:custom_label0)
@ -7871,7 +8000,9 @@ module Google
@link = args[:link] if args.key?(:link)
@loyalty_points = args[:loyalty_points] if args.key?(:loyalty_points)
@material = args[:material] if args.key?(:material)
@max_energy_efficiency_class = args[:max_energy_efficiency_class] if args.key?(:max_energy_efficiency_class)
@max_handling_time = args[:max_handling_time] if args.key?(:max_handling_time)
@min_energy_efficiency_class = args[:min_energy_efficiency_class] if args.key?(:min_energy_efficiency_class)
@min_handling_time = args[:min_handling_time] if args.key?(:min_handling_time)
@mobile_link = args[:mobile_link] if args.key?(:mobile_link)
@mpn = args[:mpn] if args.key?(:mpn)

View File

@ -118,6 +118,12 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AccountsCustomBatchRequestEntryLinkRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class BatchAccountsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -130,6 +136,18 @@ module Google
include Google::Apis::Core::JsonObjectSupport
end
class AccountsLinkRequest
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class AccountsLinkResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end
class ListAccountsResponse
class Representation < Google::Apis::Core::JsonRepresentation; end
@ -1624,12 +1642,23 @@ module Google
property :account_id, :numeric_string => true, as: 'accountId'
property :batch_id, as: 'batchId'
property :force, as: 'force'
property :link_request, as: 'linkRequest', class: Google::Apis::ContentV2::AccountsCustomBatchRequestEntryLinkRequest, decorator: Google::Apis::ContentV2::AccountsCustomBatchRequestEntryLinkRequest::Representation
property :merchant_id, :numeric_string => true, as: 'merchantId'
property :request_method, as: 'method'
property :overwrite, as: 'overwrite'
end
end
class AccountsCustomBatchRequestEntryLinkRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action'
property :link_type, as: 'linkType'
property :linked_account_id, as: 'linkedAccountId'
end
end
class BatchAccountsResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
@ -1648,6 +1677,24 @@ module Google
property :errors, as: 'errors', class: Google::Apis::ContentV2::Errors, decorator: Google::Apis::ContentV2::Errors::Representation
property :kind, as: 'kind'
property :link_status, as: 'linkStatus'
end
end
class AccountsLinkRequest
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :action, as: 'action'
property :link_type, as: 'linkType'
property :linked_account_id, as: 'linkedAccountId'
end
end
class AccountsLinkResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :kind, as: 'kind'
property :link_status, as: 'linkStatus'
end
end
@ -3066,6 +3113,7 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :carrier, as: 'carrier'
property :delivery_date, as: 'deliveryDate'
property :shipment_id, as: 'shipmentId'
property :status, as: 'status'
property :tracking_id, as: 'trackingId'
@ -3314,6 +3362,7 @@ module Google
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :carrier, as: 'carrier'
property :delivery_date, as: 'deliveryDate'
property :operation_id, as: 'operationId'
property :shipment_id, as: 'shipmentId'
property :status, as: 'status'
@ -3557,6 +3606,8 @@ module Google
property :color, as: 'color'
property :condition, as: 'condition'
property :content_language, as: 'contentLanguage'
property :cost_of_goods_sold, as: 'costOfGoodsSold', class: Google::Apis::ContentV2::Price, decorator: Google::Apis::ContentV2::Price::Representation
collection :custom_attributes, as: 'customAttributes', class: Google::Apis::ContentV2::ProductCustomAttribute, decorator: Google::Apis::ContentV2::ProductCustomAttribute::Representation
collection :custom_groups, as: 'customGroups', class: Google::Apis::ContentV2::ProductCustomGroup, decorator: Google::Apis::ContentV2::ProductCustomGroup::Representation
@ -3591,7 +3642,9 @@ module Google
property :loyalty_points, as: 'loyaltyPoints', class: Google::Apis::ContentV2::LoyaltyPoints, decorator: Google::Apis::ContentV2::LoyaltyPoints::Representation
property :material, as: 'material'
property :max_energy_efficiency_class, as: 'maxEnergyEfficiencyClass'
property :max_handling_time, :numeric_string => true, as: 'maxHandlingTime'
property :min_energy_efficiency_class, as: 'minEnergyEfficiencyClass'
property :min_handling_time, :numeric_string => true, as: 'minHandlingTime'
property :mobile_link, as: 'mobileLink'
property :mpn, as: 'mpn'

View File

@ -280,6 +280,48 @@ module Google
execute_or_queue_command(command, &block)
end
# Performs an action on a link between a Merchant Center account and another
# account.
# @param [Fixnum] merchant_id
# The ID of the managing account. If this parameter is not the same as accountId,
# then this account must be a multi-client account and accountId must be the ID
# of a sub-account of this account.
# @param [Fixnum] account_id
# The ID of the account that should be linked.
# @param [Google::Apis::ContentV2::AccountsLinkRequest] accounts_link_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::ContentV2::AccountsLinkResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::ContentV2::AccountsLinkResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def link_account(merchant_id, account_id, accounts_link_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, '{merchantId}/accounts/{accountId}/link', options)
command.request_representation = Google::Apis::ContentV2::AccountsLinkRequest::Representation
command.request_object = accounts_link_request_object
command.response_representation = Google::Apis::ContentV2::AccountsLinkResponse::Representation
command.response_class = Google::Apis::ContentV2::AccountsLinkResponse
command.params['merchantId'] = merchant_id unless merchant_id.nil?
command.params['accountId'] = account_id unless account_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists the sub-accounts in your Merchant Center account.
# @param [Fixnum] merchant_id
# The ID of the managing account. This must be a multi-client account.