diff --git a/ShoppingMerchantAccounts/metadata/V1Beta/OnlineReturnPolicy.php b/ShoppingMerchantAccounts/metadata/V1Beta/OnlineReturnPolicy.php
index 6508f9edcb01..6e7ff0b9a9fe 100644
Binary files a/ShoppingMerchantAccounts/metadata/V1Beta/OnlineReturnPolicy.php and b/ShoppingMerchantAccounts/metadata/V1Beta/OnlineReturnPolicy.php differ
diff --git a/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/create_online_return_policy.php b/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/create_online_return_policy.php
index 2d86cd099825..391a10ee662c 100644
--- a/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/create_online_return_policy.php
+++ b/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/create_online_return_policy.php
@@ -31,7 +31,7 @@
/**
* Creates a new return policy for a given merchant.
*
- * @param string $formattedParent The merchant account for which to create a return policy.
+ * @param string $formattedParent The merchant account for which the return policy will be created.
* Format: `accounts/{account}`
* Please see {@see OnlineReturnPolicyServiceClient::accountName()} for help formatting this field.
* @param string $onlineReturnPolicyLabel Immutable. This field represents the unique user-defined label of
diff --git a/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/delete_online_return_policy.php b/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/delete_online_return_policy.php
index d6d95101ae9b..835771527d77 100644
--- a/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/delete_online_return_policy.php
+++ b/ShoppingMerchantAccounts/samples/V1beta/OnlineReturnPolicyServiceClient/delete_online_return_policy.php
@@ -28,7 +28,7 @@
use Google\Shopping\Merchant\Accounts\V1beta\DeleteOnlineReturnPolicyRequest;
/**
- * Deletes an existing return policy for a given merchant.
+ * Deletes an existing return policy.
*
* @param string $formattedName The name of the return policy to delete.
* Format: `accounts/{account}/onlineReturnPolicies/{return_policy}`
diff --git a/ShoppingMerchantAccounts/src/V1beta/Client/OnlineReturnPolicyServiceClient.php b/ShoppingMerchantAccounts/src/V1beta/Client/OnlineReturnPolicyServiceClient.php
index f56f2147e5c7..9b4348aede16 100644
--- a/ShoppingMerchantAccounts/src/V1beta/Client/OnlineReturnPolicyServiceClient.php
+++ b/ShoppingMerchantAccounts/src/V1beta/Client/OnlineReturnPolicyServiceClient.php
@@ -291,7 +291,7 @@ public function createOnlineReturnPolicy(
}
/**
- * Deletes an existing return policy for a given merchant.
+ * Deletes an existing return policy.
*
* The async variant is
* {@see OnlineReturnPolicyServiceClient::deleteOnlineReturnPolicyAsync()} .
diff --git a/ShoppingMerchantAccounts/src/V1beta/CreateOnlineReturnPolicyRequest.php b/ShoppingMerchantAccounts/src/V1beta/CreateOnlineReturnPolicyRequest.php
index bb822f348f4a..9f836e9e4d59 100644
--- a/ShoppingMerchantAccounts/src/V1beta/CreateOnlineReturnPolicyRequest.php
+++ b/ShoppingMerchantAccounts/src/V1beta/CreateOnlineReturnPolicyRequest.php
@@ -16,21 +16,21 @@
class CreateOnlineReturnPolicyRequest extends \Google\Protobuf\Internal\Message
{
/**
- * Required. The merchant account for which to create a return policy.
+ * Required. The merchant account for which the return policy will be created.
* Format: `accounts/{account}`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
protected $parent = '';
/**
- * Required. The return policy to create.
+ * Required. The return policy object to create.
*
* Generated from protobuf field .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy online_return_policy = 2 [(.google.api.field_behavior) = REQUIRED];
*/
protected $online_return_policy = null;
/**
- * @param string $parent Required. The merchant account for which to create a return policy.
+ * @param string $parent Required. The merchant account for which the return policy will be created.
* Format: `accounts/{account}`
* Please see {@see OnlineReturnPolicyServiceClient::accountName()} for help formatting this field.
*
@@ -44,6 +44,23 @@ public static function build(string $parent): self
->setParent($parent);
}
+ /**
+ * @param string $parent Required. The merchant account for which the return policy will be created.
+ * Format: `accounts/{account}`
+ * Please see {@see OnlineReturnPolicyServiceClient::accountName()} for help formatting this field.
+ * @param \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $onlineReturnPolicy Required. The return policy object to create.
+ *
+ * @return \Google\Shopping\Merchant\Accounts\V1beta\CreateOnlineReturnPolicyRequest
+ *
+ * @experimental
+ */
+ public static function buildFromParentOnlineReturnPolicy(string $parent, \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $onlineReturnPolicy): self
+ {
+ return (new self())
+ ->setParent($parent)
+ ->setOnlineReturnPolicy($onlineReturnPolicy);
+ }
+
/**
* Constructor.
*
@@ -51,10 +68,10 @@ public static function build(string $parent): self
* Optional. Data for populating the Message object.
*
* @type string $parent
- * Required. The merchant account for which to create a return policy.
+ * Required. The merchant account for which the return policy will be created.
* Format: `accounts/{account}`
* @type \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $online_return_policy
- * Required. The return policy to create.
+ * Required. The return policy object to create.
* }
*/
public function __construct($data = NULL) {
@@ -63,7 +80,7 @@ public function __construct($data = NULL) {
}
/**
- * Required. The merchant account for which to create a return policy.
+ * Required. The merchant account for which the return policy will be created.
* Format: `accounts/{account}`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
@@ -75,7 +92,7 @@ public function getParent()
}
/**
- * Required. The merchant account for which to create a return policy.
+ * Required. The merchant account for which the return policy will be created.
* Format: `accounts/{account}`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
@@ -91,7 +108,7 @@ public function setParent($var)
}
/**
- * Required. The return policy to create.
+ * Required. The return policy object to create.
*
* Generated from protobuf field .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy online_return_policy = 2 [(.google.api.field_behavior) = REQUIRED];
* @return \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy|null
@@ -112,7 +129,7 @@ public function clearOnlineReturnPolicy()
}
/**
- * Required. The return policy to create.
+ * Required. The return policy object to create.
*
* Generated from protobuf field .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy online_return_policy = 2 [(.google.api.field_behavior) = REQUIRED];
* @param \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $var
diff --git a/ShoppingMerchantAccounts/src/V1beta/OnlineReturnPolicy.php b/ShoppingMerchantAccounts/src/V1beta/OnlineReturnPolicy.php
index 59da2f49c1e6..4c78ab0415bd 100644
--- a/ShoppingMerchantAccounts/src/V1beta/OnlineReturnPolicy.php
+++ b/ShoppingMerchantAccounts/src/V1beta/OnlineReturnPolicy.php
@@ -100,31 +100,31 @@ class OnlineReturnPolicy extends \Google\Protobuf\Internal\Message
*/
protected $return_policy_uri = '';
/**
- * This field specifies if merchant only accepts defective products for
- * returns, and this field is required.
+ * Optional. This field specifies if merchant
+ * only accepts defective products for returns.
*
- * Generated from protobuf field optional bool accept_defective_only = 11;
+ * Generated from protobuf field optional bool accept_defective_only = 11 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $accept_defective_only = null;
/**
- * The field specifies the number of days it takes for merchants to process
- * refunds, field is optional.
+ * Optional. The field specifies the number of
+ * days it takes for merchants to process refunds.
*
- * Generated from protobuf field optional int32 process_refund_days = 12;
+ * Generated from protobuf field optional int32 process_refund_days = 12 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $process_refund_days = null;
/**
- * This field specifies if merchant allows customers to exchange products,
- * this field is required.
+ * Optional. This field specifies if merchant
+ * allows customers to exchange products.
*
- * Generated from protobuf field optional bool accept_exchange = 13;
+ * Generated from protobuf field optional bool accept_exchange = 13 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $accept_exchange = null;
/**
- * The field specifies the return label source. This field is required when
- * return method is BY_MAIL.
+ * Optional. The field specifies the return
+ * label source.
*
- * Generated from protobuf field optional .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSource return_label_source = 15;
+ * Generated from protobuf field optional .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSource return_label_source = 15 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $return_label_source = null;
@@ -173,17 +173,17 @@ class OnlineReturnPolicy extends \Google\Protobuf\Internal\Message
* Required. The return policy uri. This can used by Google to do a sanity
* check for the policy. It must be a valid URL.
* @type bool $accept_defective_only
- * This field specifies if merchant only accepts defective products for
- * returns, and this field is required.
+ * Optional. This field specifies if merchant
+ * only accepts defective products for returns.
* @type int $process_refund_days
- * The field specifies the number of days it takes for merchants to process
- * refunds, field is optional.
+ * Optional. The field specifies the number of
+ * days it takes for merchants to process refunds.
* @type bool $accept_exchange
- * This field specifies if merchant allows customers to exchange products,
- * this field is required.
+ * Optional. This field specifies if merchant
+ * allows customers to exchange products.
* @type int $return_label_source
- * The field specifies the return label source. This field is required when
- * return method is BY_MAIL.
+ * Optional. The field specifies the return
+ * label source.
* }
*/
public function __construct($data = NULL) {
@@ -540,10 +540,10 @@ public function setReturnPolicyUri($var)
}
/**
- * This field specifies if merchant only accepts defective products for
- * returns, and this field is required.
+ * Optional. This field specifies if merchant
+ * only accepts defective products for returns.
*
- * Generated from protobuf field optional bool accept_defective_only = 11;
+ * Generated from protobuf field optional bool accept_defective_only = 11 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getAcceptDefectiveOnly()
@@ -562,10 +562,10 @@ public function clearAcceptDefectiveOnly()
}
/**
- * This field specifies if merchant only accepts defective products for
- * returns, and this field is required.
+ * Optional. This field specifies if merchant
+ * only accepts defective products for returns.
*
- * Generated from protobuf field optional bool accept_defective_only = 11;
+ * Generated from protobuf field optional bool accept_defective_only = 11 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
@@ -578,10 +578,10 @@ public function setAcceptDefectiveOnly($var)
}
/**
- * The field specifies the number of days it takes for merchants to process
- * refunds, field is optional.
+ * Optional. The field specifies the number of
+ * days it takes for merchants to process refunds.
*
- * Generated from protobuf field optional int32 process_refund_days = 12;
+ * Generated from protobuf field optional int32 process_refund_days = 12 [(.google.api.field_behavior) = OPTIONAL];
* @return int
*/
public function getProcessRefundDays()
@@ -600,10 +600,10 @@ public function clearProcessRefundDays()
}
/**
- * The field specifies the number of days it takes for merchants to process
- * refunds, field is optional.
+ * Optional. The field specifies the number of
+ * days it takes for merchants to process refunds.
*
- * Generated from protobuf field optional int32 process_refund_days = 12;
+ * Generated from protobuf field optional int32 process_refund_days = 12 [(.google.api.field_behavior) = OPTIONAL];
* @param int $var
* @return $this
*/
@@ -616,10 +616,10 @@ public function setProcessRefundDays($var)
}
/**
- * This field specifies if merchant allows customers to exchange products,
- * this field is required.
+ * Optional. This field specifies if merchant
+ * allows customers to exchange products.
*
- * Generated from protobuf field optional bool accept_exchange = 13;
+ * Generated from protobuf field optional bool accept_exchange = 13 [(.google.api.field_behavior) = OPTIONAL];
* @return bool
*/
public function getAcceptExchange()
@@ -638,10 +638,10 @@ public function clearAcceptExchange()
}
/**
- * This field specifies if merchant allows customers to exchange products,
- * this field is required.
+ * Optional. This field specifies if merchant
+ * allows customers to exchange products.
*
- * Generated from protobuf field optional bool accept_exchange = 13;
+ * Generated from protobuf field optional bool accept_exchange = 13 [(.google.api.field_behavior) = OPTIONAL];
* @param bool $var
* @return $this
*/
@@ -654,10 +654,10 @@ public function setAcceptExchange($var)
}
/**
- * The field specifies the return label source. This field is required when
- * return method is BY_MAIL.
+ * Optional. The field specifies the return
+ * label source.
*
- * Generated from protobuf field optional .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSource return_label_source = 15;
+ * Generated from protobuf field optional .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSource return_label_source = 15 [(.google.api.field_behavior) = OPTIONAL];
* @return int
*/
public function getReturnLabelSource()
@@ -676,10 +676,10 @@ public function clearReturnLabelSource()
}
/**
- * The field specifies the return label source. This field is required when
- * return method is BY_MAIL.
+ * Optional. The field specifies the return
+ * label source.
*
- * Generated from protobuf field optional .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSource return_label_source = 15;
+ * Generated from protobuf field optional .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnLabelSource return_label_source = 15 [(.google.api.field_behavior) = OPTIONAL];
* @param int $var
* @return $this
*/
diff --git a/ShoppingMerchantAccounts/src/V1beta/UpdateOnlineReturnPolicyRequest.php b/ShoppingMerchantAccounts/src/V1beta/UpdateOnlineReturnPolicyRequest.php
index 2e523ae7f973..8683c93cd519 100644
--- a/ShoppingMerchantAccounts/src/V1beta/UpdateOnlineReturnPolicyRequest.php
+++ b/ShoppingMerchantAccounts/src/V1beta/UpdateOnlineReturnPolicyRequest.php
@@ -9,26 +9,58 @@
use Google\Protobuf\Internal\GPBUtil;
/**
- * Request message for the `UpdateOnlineReturnPolicy` method.
+ * Request message for the `UpdateOnlineReturnPolicy` method. The method
+ * supports field masks and when the mask is provided, only the fields specified
+ * in the mask are updated.
*
* Generated from protobuf message google.shopping.merchant.accounts.v1beta.UpdateOnlineReturnPolicyRequest
*/
class UpdateOnlineReturnPolicyRequest extends \Google\Protobuf\Internal\Message
{
/**
- * Required. The return policy to update.
+ * Required. The online return policy to update.
+ * The online return policy's `name` field is used to identify the
+ * online return policy to be updated.
*
* Generated from protobuf field .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy online_return_policy = 1 [(.google.api.field_behavior) = REQUIRED];
*/
protected $online_return_policy = null;
/**
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
+ * Optional. List of fields being updated.
+ * The following fields are supported (in both `snake_case` and
+ * `lowerCamelCase`):
+ * - `accept_defective_only`
+ * - `accept_exchange`
+ * - `item_conditions`
+ * - `policy`
+ * - `process_refund_days`
+ * - `restocking_fee`
+ * - `return_methods`
+ * - `return_policy_uri`
+ * - `return_shipping_fee`
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
protected $update_mask = null;
/**
- * @param \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $onlineReturnPolicy Required. The return policy to update.
- * @param \Google\Protobuf\FieldMask $updateMask
+ * @param \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $onlineReturnPolicy Required. The online return policy to update.
+ * The online return policy's `name` field is used to identify the
+ * online return policy to be updated.
+ * @param \Google\Protobuf\FieldMask $updateMask Optional. List of fields being updated.
+ *
+ * The following fields are supported (in both `snake_case` and
+ * `lowerCamelCase`):
+ *
+ * - `accept_defective_only`
+ * - `accept_exchange`
+ * - `item_conditions`
+ * - `policy`
+ * - `process_refund_days`
+ * - `restocking_fee`
+ * - `return_methods`
+ * - `return_policy_uri`
+ * - `return_shipping_fee`
*
* @return \Google\Shopping\Merchant\Accounts\V1beta\UpdateOnlineReturnPolicyRequest
*
@@ -48,8 +80,22 @@ public static function build(\Google\Shopping\Merchant\Accounts\V1beta\OnlineRet
* Optional. Data for populating the Message object.
*
* @type \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $online_return_policy
- * Required. The return policy to update.
+ * Required. The online return policy to update.
+ * The online return policy's `name` field is used to identify the
+ * online return policy to be updated.
* @type \Google\Protobuf\FieldMask $update_mask
+ * Optional. List of fields being updated.
+ * The following fields are supported (in both `snake_case` and
+ * `lowerCamelCase`):
+ * - `accept_defective_only`
+ * - `accept_exchange`
+ * - `item_conditions`
+ * - `policy`
+ * - `process_refund_days`
+ * - `restocking_fee`
+ * - `return_methods`
+ * - `return_policy_uri`
+ * - `return_shipping_fee`
* }
*/
public function __construct($data = NULL) {
@@ -58,7 +104,9 @@ public function __construct($data = NULL) {
}
/**
- * Required. The return policy to update.
+ * Required. The online return policy to update.
+ * The online return policy's `name` field is used to identify the
+ * online return policy to be updated.
*
* Generated from protobuf field .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy online_return_policy = 1 [(.google.api.field_behavior) = REQUIRED];
* @return \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy|null
@@ -79,7 +127,9 @@ public function clearOnlineReturnPolicy()
}
/**
- * Required. The return policy to update.
+ * Required. The online return policy to update.
+ * The online return policy's `name` field is used to identify the
+ * online return policy to be updated.
*
* Generated from protobuf field .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy online_return_policy = 1 [(.google.api.field_behavior) = REQUIRED];
* @param \Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy $var
@@ -94,7 +144,20 @@ public function setOnlineReturnPolicy($var)
}
/**
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
+ * Optional. List of fields being updated.
+ * The following fields are supported (in both `snake_case` and
+ * `lowerCamelCase`):
+ * - `accept_defective_only`
+ * - `accept_exchange`
+ * - `item_conditions`
+ * - `policy`
+ * - `process_refund_days`
+ * - `restocking_fee`
+ * - `return_methods`
+ * - `return_policy_uri`
+ * - `return_shipping_fee`
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
* @return \Google\Protobuf\FieldMask|null
*/
public function getUpdateMask()
@@ -113,7 +176,20 @@ public function clearUpdateMask()
}
/**
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
+ * Optional. List of fields being updated.
+ * The following fields are supported (in both `snake_case` and
+ * `lowerCamelCase`):
+ * - `accept_defective_only`
+ * - `accept_exchange`
+ * - `item_conditions`
+ * - `policy`
+ * - `process_refund_days`
+ * - `restocking_fee`
+ * - `return_methods`
+ * - `return_policy_uri`
+ * - `return_shipping_fee`
+ *
+ * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];
* @param \Google\Protobuf\FieldMask $var
* @return $this
*/