Reference documentation and code samples for the Google Shopping Merchant Products V1 Client class RelatedProduct.
Specifies how other products are related to this product.
Generated from protobuf message google.shopping.merchant.products.v1.ProductAttributes.RelatedProduct
Namespace
Google \ Shopping \ Merchant \ Products \ V1 \ ProductAttributesMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ relationship_type |
int
Required. The type of the relationship between this product and the related product. |
↳ id_type |
int
Required. The type of the identifier of the related product. For example, GTIN or product ID. |
↳ id |
string
Required. The identifier of the related product. |
getRelationshipType
Required. The type of the relationship between this product and the related product.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type RelationshipType. |
setRelationshipType
Required. The type of the relationship between this product and the related product.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type RelationshipType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getIdType
Required. The type of the identifier of the related product.
For example, GTIN or product ID.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type IdType. |
setIdType
Required. The type of the identifier of the related product.
For example, GTIN or product ID.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type IdType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getId
Required. The identifier of the related product.
| Returns | |
|---|---|
| Type | Description |
string |
|
setId
Required. The identifier of the related product.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|