Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaMerchantCenterLink

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

Overview

Represents a link between a Merchant Center account and a branch. Once a link is established, products from the linked merchant center account will be streamed to the linked branch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaMerchantCenterLink

Returns a new instance of GoogleCloudRetailV2alphaMerchantCenterLink.



1843
1844
1845
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1843

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

Instance Attribute Details

#branch_idString

The branch id (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch id can only have one linked merchant center account id. Corresponds to the JSON property branchId

Returns:

  • (String)


1825
1826
1827
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1825

def branch_id
  @branch_id
end

#destinationsArray<String>

String representing the destination to import for, all if left empty. List of possible values can be found here. [https://support.google.com/merchants/ answer/7501026] List of allowed string values: "shopping-ads", "buy-on-google- listings", "display-ads", "local-inventory -ads", "free-listings", "free-local- listings" NOTE: The string values are case sensitive. Corresponds to the JSON property destinations

Returns:

  • (Array<String>)


1834
1835
1836
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1834

def destinations
  @destinations
end

#merchant_center_account_idFixnum

Required. The linked Merchant center account id. The account must be a standalone account or a sub-account of a MCA. Corresponds to the JSON property merchantCenterAccountId

Returns:

  • (Fixnum)


1841
1842
1843
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1841

def 
  @merchant_center_account_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1848
1849
1850
1851
1852
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1848

def update!(**args)
  @branch_id = args[:branch_id] if args.key?(:branch_id)
  @destinations = args[:destinations] if args.key?(:destinations)
  @merchant_center_account_id = args[:merchant_center_account_id] if args.key?(:merchant_center_account_id)
end