Google Shopping Merchant Accounts V1beta Client - Class OnlineReturnPolicy (0.1.0)

Reference documentation and code samples for the Google Shopping Merchant Accounts V1beta Client class OnlineReturnPolicy.

Online return policy object. This is currently used to represent return policies for ads and free listings programs.

Generated from protobuf message google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy

Namespace

Google \ Shopping \ Merchant \ Accounts \ V1beta

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Identifier. The name of the OnlineReturnPolicy resource. Format: accounts/{account}/onlineReturnPolicies/{return_policy}

↳ return_policy_id string

Output only. Return policy ID generated by Google.

↳ label string

This field represents the unique user-defined label of the return policy. It is important to note that the same label cannot be used in different return policies for the same country. Unless a product specifies a specific label attribute, policies will be automatically labeled as 'default'. To assign a custom return policy to certain product groups, follow the instructions provided in the Return policy label. The label can contain up to 50 characters.

↳ countries array

The countries of sale where the return policy applies. The values must be a valid 2 letter ISO 3166 code.

↳ policy Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\Policy

The return policy.

↳ restocking_fee Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\RestockingFee

The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set.

↳ return_methods array

The return methods of how customers can return an item. This value is required to not be empty unless the type of return policy is noReturns.

↳ item_conditions array

The item conditions accepted for returns must not be empty unless the type of return policy is 'noReturns'.

↳ return_shipping_fee Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\ReturnShippingFee

The return shipping fee. Should be set only when customer need to download and print the return label.

↳ return_policy_uri string

The return policy uri. This can used by Google to do a sanity check for the policy. It must be a valid URL.

↳ accept_defective_only bool

This field specifies if merchant only accepts defective products for returns, and this field is required.

↳ process_refund_days int

The field specifies the number of days it takes for merchants to process refunds, field is optional.

↳ accept_exchange bool

This field specifies if merchant allows customers to exchange products, this field is required.

getName

Identifier. The name of the OnlineReturnPolicy resource.

Format: accounts/{account}/onlineReturnPolicies/{return_policy}

Returns
Type Description
string

setName

Identifier. The name of the OnlineReturnPolicy resource.

Format: accounts/{account}/onlineReturnPolicies/{return_policy}

Parameter
Name Description
var string
Returns
Type Description
$this

getReturnPolicyId

Output only. Return policy ID generated by Google.

Returns
Type Description
string

setReturnPolicyId

Output only. Return policy ID generated by Google.

Parameter
Name Description
var string
Returns
Type Description
$this

getLabel

This field represents the unique user-defined label of the return policy.

It is important to note that the same label cannot be used in different return policies for the same country. Unless a product specifies a specific label attribute, policies will be automatically labeled as 'default'. To assign a custom return policy to certain product groups, follow the instructions provided in the Return policy label. The label can contain up to 50 characters.

Returns
Type Description
string

setLabel

This field represents the unique user-defined label of the return policy.

It is important to note that the same label cannot be used in different return policies for the same country. Unless a product specifies a specific label attribute, policies will be automatically labeled as 'default'. To assign a custom return policy to certain product groups, follow the instructions provided in the Return policy label. The label can contain up to 50 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getCountries

The countries of sale where the return policy applies. The values must be a valid 2 letter ISO 3166 code.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setCountries

The countries of sale where the return policy applies. The values must be a valid 2 letter ISO 3166 code.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getPolicy

The return policy.

Returns
Type Description
Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\Policy|null

hasPolicy

clearPolicy

setPolicy

The return policy.

Parameter
Name Description
var Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\Policy
Returns
Type Description
$this

getRestockingFee

The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set.

Returns
Type Description
Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\RestockingFee|null

hasRestockingFee

clearRestockingFee

setRestockingFee

The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set.

Parameter
Name Description
var Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\RestockingFee
Returns
Type Description
$this

getReturnMethods

The return methods of how customers can return an item. This value is required to not be empty unless the type of return policy is noReturns.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setReturnMethods

The return methods of how customers can return an item. This value is required to not be empty unless the type of return policy is noReturns.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getItemConditions

The item conditions accepted for returns must not be empty unless the type of return policy is 'noReturns'.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setItemConditions

The item conditions accepted for returns must not be empty unless the type of return policy is 'noReturns'.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getReturnShippingFee

The return shipping fee. Should be set only when customer need to download and print the return label.

Returns
Type Description
Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\ReturnShippingFee|null

hasReturnShippingFee

clearReturnShippingFee

setReturnShippingFee

The return shipping fee. Should be set only when customer need to download and print the return label.

Parameter
Name Description
var Google\Shopping\Merchant\Accounts\V1beta\OnlineReturnPolicy\ReturnShippingFee
Returns
Type Description
$this

getReturnPolicyUri

The return policy uri. This can used by Google to do a sanity check for the policy. It must be a valid URL.

Returns
Type Description
string

setReturnPolicyUri

The return policy uri. This can used by Google to do a sanity check for the policy. It must be a valid URL.

Parameter
Name Description
var string
Returns
Type Description
$this

getAcceptDefectiveOnly

This field specifies if merchant only accepts defective products for returns, and this field is required.

Returns
Type Description
bool

hasAcceptDefectiveOnly

clearAcceptDefectiveOnly

setAcceptDefectiveOnly

This field specifies if merchant only accepts defective products for returns, and this field is required.

Parameter
Name Description
var bool
Returns
Type Description
$this

getProcessRefundDays

The field specifies the number of days it takes for merchants to process refunds, field is optional.

Returns
Type Description
int

hasProcessRefundDays

clearProcessRefundDays

setProcessRefundDays

The field specifies the number of days it takes for merchants to process refunds, field is optional.

Parameter
Name Description
var int
Returns
Type Description
$this

getAcceptExchange

This field specifies if merchant allows customers to exchange products, this field is required.

Returns
Type Description
bool

hasAcceptExchange

clearAcceptExchange

setAcceptExchange

This field specifies if merchant allows customers to exchange products, this field is required.

Parameter
Name Description
var bool
Returns
Type Description
$this