Class OnlineReturnPolicy.Builder (0.2.0)

public static final class OnlineReturnPolicy.Builder extends GeneratedMessageV3.Builder<OnlineReturnPolicy.Builder> implements OnlineReturnPolicyOrBuilder

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

Protobuf type google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllCountries(Iterable<String> values)

public OnlineReturnPolicy.Builder addAllCountries(Iterable<String> values)

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

repeated string countries = 4;

Parameter
Name Description
values Iterable<String>

The countries to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addAllItemConditions(Iterable<? extends OnlineReturnPolicy.ItemCondition> values)

public OnlineReturnPolicy.Builder addAllItemConditions(Iterable<? extends OnlineReturnPolicy.ItemCondition> values)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameter
Name Description
values Iterable<? extends com.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition>

The itemConditions to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addAllItemConditionsValue(Iterable<Integer> values)

public OnlineReturnPolicy.Builder addAllItemConditionsValue(Iterable<Integer> values)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for itemConditions to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addAllReturnMethods(Iterable<? extends OnlineReturnPolicy.ReturnMethod> values)

public OnlineReturnPolicy.Builder addAllReturnMethods(Iterable<? extends OnlineReturnPolicy.ReturnMethod> values)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameter
Name Description
values Iterable<? extends com.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod>

The returnMethods to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addAllReturnMethodsValue(Iterable<Integer> values)

public OnlineReturnPolicy.Builder addAllReturnMethodsValue(Iterable<Integer> values)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for returnMethods to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addCountries(String value)

public OnlineReturnPolicy.Builder addCountries(String value)

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

repeated string countries = 4;

Parameter
Name Description
value String

The countries to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addCountriesBytes(ByteString value)

public OnlineReturnPolicy.Builder addCountriesBytes(ByteString value)

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

repeated string countries = 4;

Parameter
Name Description
value ByteString

The bytes of the countries to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addItemConditions(OnlineReturnPolicy.ItemCondition value)

public OnlineReturnPolicy.Builder addItemConditions(OnlineReturnPolicy.ItemCondition value)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameter
Name Description
value OnlineReturnPolicy.ItemCondition

The itemConditions to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addItemConditionsValue(int value)

public OnlineReturnPolicy.Builder addItemConditionsValue(int value)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameter
Name Description
value int

The enum numeric value on the wire for itemConditions to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OnlineReturnPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

addReturnMethods(OnlineReturnPolicy.ReturnMethod value)

public OnlineReturnPolicy.Builder addReturnMethods(OnlineReturnPolicy.ReturnMethod value)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameter
Name Description
value OnlineReturnPolicy.ReturnMethod

The returnMethods to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

addReturnMethodsValue(int value)

public OnlineReturnPolicy.Builder addReturnMethodsValue(int value)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameter
Name Description
value int

The enum numeric value on the wire for returnMethods to add.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

build()

public OnlineReturnPolicy build()
Returns
Type Description
OnlineReturnPolicy

buildPartial()

public OnlineReturnPolicy buildPartial()
Returns
Type Description
OnlineReturnPolicy

clear()

public OnlineReturnPolicy.Builder clear()
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

clearAcceptDefectiveOnly()

public OnlineReturnPolicy.Builder clearAcceptDefectiveOnly()

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

optional bool accept_defective_only = 11;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearAcceptExchange()

public OnlineReturnPolicy.Builder clearAcceptExchange()

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

optional bool accept_exchange = 13;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearCountries()

public OnlineReturnPolicy.Builder clearCountries()

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

repeated string countries = 4;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public OnlineReturnPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

clearItemConditions()

public OnlineReturnPolicy.Builder clearItemConditions()

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearLabel()

public OnlineReturnPolicy.Builder clearLabel()

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.

string label = 3;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearName()

public OnlineReturnPolicy.Builder clearName()

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

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public OnlineReturnPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

clearPolicy()

public OnlineReturnPolicy.Builder clearPolicy()

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Returns
Type Description
OnlineReturnPolicy.Builder

clearProcessRefundDays()

public OnlineReturnPolicy.Builder clearProcessRefundDays()

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

optional int32 process_refund_days = 12;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearRestockingFee()

public OnlineReturnPolicy.Builder clearRestockingFee()

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Returns
Type Description
OnlineReturnPolicy.Builder

clearReturnMethods()

public OnlineReturnPolicy.Builder clearReturnMethods()

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearReturnPolicyId()

public OnlineReturnPolicy.Builder clearReturnPolicyId()

Output only. Return policy ID generated by Google.

string return_policy_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearReturnPolicyUri()

public OnlineReturnPolicy.Builder clearReturnPolicyUri()

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

string return_policy_uri = 10;

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

clearReturnShippingFee()

public OnlineReturnPolicy.Builder clearReturnShippingFee()

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Returns
Type Description
OnlineReturnPolicy.Builder

clone()

public OnlineReturnPolicy.Builder clone()
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

getAcceptDefectiveOnly()

public boolean getAcceptDefectiveOnly()

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

optional bool accept_defective_only = 11;

Returns
Type Description
boolean

The acceptDefectiveOnly.

getAcceptExchange()

public boolean getAcceptExchange()

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

optional bool accept_exchange = 13;

Returns
Type Description
boolean

The acceptExchange.

getCountries(int index)

public String getCountries(int index)

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

repeated string countries = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The countries at the given index.

getCountriesBytes(int index)

public ByteString getCountriesBytes(int index)

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

repeated string countries = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the countries at the given index.

getCountriesCount()

public int getCountriesCount()

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

repeated string countries = 4;

Returns
Type Description
int

The count of countries.

getCountriesList()

public ProtocolStringList getCountriesList()

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

repeated string countries = 4;

Returns
Type Description
ProtocolStringList

A list containing the countries.

getDefaultInstanceForType()

public OnlineReturnPolicy getDefaultInstanceForType()
Returns
Type Description
OnlineReturnPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getItemConditions(int index)

public OnlineReturnPolicy.ItemCondition getItemConditions(int index)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
OnlineReturnPolicy.ItemCondition

The itemConditions at the given index.

getItemConditionsCount()

public int getItemConditionsCount()

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Returns
Type Description
int

The count of itemConditions.

getItemConditionsList()

public List<OnlineReturnPolicy.ItemCondition> getItemConditionsList()

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Returns
Type Description
List<ItemCondition>

A list containing the itemConditions.

getItemConditionsValue(int index)

public int getItemConditionsValue(int index)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of itemConditions at the given index.

getItemConditionsValueList()

public List<Integer> getItemConditionsValueList()

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for itemConditions.

getLabel()

public String 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.

string label = 3;

Returns
Type Description
String

The label.

getLabelBytes()

public ByteString getLabelBytes()

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.

string label = 3;

Returns
Type Description
ByteString

The bytes for label.

getName()

public String getName()

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

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getPolicy()

public OnlineReturnPolicy.Policy getPolicy()

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Returns
Type Description
OnlineReturnPolicy.Policy

The policy.

getPolicyBuilder()

public OnlineReturnPolicy.Policy.Builder getPolicyBuilder()

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Returns
Type Description
OnlineReturnPolicy.Policy.Builder

getPolicyOrBuilder()

public OnlineReturnPolicy.PolicyOrBuilder getPolicyOrBuilder()

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Returns
Type Description
OnlineReturnPolicy.PolicyOrBuilder

getProcessRefundDays()

public int getProcessRefundDays()

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

optional int32 process_refund_days = 12;

Returns
Type Description
int

The processRefundDays.

getRestockingFee()

public OnlineReturnPolicy.RestockingFee 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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Returns
Type Description
OnlineReturnPolicy.RestockingFee

The restockingFee.

getRestockingFeeBuilder()

public OnlineReturnPolicy.RestockingFee.Builder getRestockingFeeBuilder()

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Returns
Type Description
OnlineReturnPolicy.RestockingFee.Builder

getRestockingFeeOrBuilder()

public OnlineReturnPolicy.RestockingFeeOrBuilder getRestockingFeeOrBuilder()

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Returns
Type Description
OnlineReturnPolicy.RestockingFeeOrBuilder

getReturnMethods(int index)

public OnlineReturnPolicy.ReturnMethod getReturnMethods(int index)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
OnlineReturnPolicy.ReturnMethod

The returnMethods at the given index.

getReturnMethodsCount()

public int getReturnMethodsCount()

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Returns
Type Description
int

The count of returnMethods.

getReturnMethodsList()

public List<OnlineReturnPolicy.ReturnMethod> getReturnMethodsList()

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Returns
Type Description
List<ReturnMethod>

A list containing the returnMethods.

getReturnMethodsValue(int index)

public int getReturnMethodsValue(int index)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of returnMethods at the given index.

getReturnMethodsValueList()

public List<Integer> getReturnMethodsValueList()

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for returnMethods.

getReturnPolicyId()

public String getReturnPolicyId()

Output only. Return policy ID generated by Google.

string return_policy_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The returnPolicyId.

getReturnPolicyIdBytes()

public ByteString getReturnPolicyIdBytes()

Output only. Return policy ID generated by Google.

string return_policy_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for returnPolicyId.

getReturnPolicyUri()

public String getReturnPolicyUri()

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

string return_policy_uri = 10;

Returns
Type Description
String

The returnPolicyUri.

getReturnPolicyUriBytes()

public ByteString getReturnPolicyUriBytes()

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

string return_policy_uri = 10;

Returns
Type Description
ByteString

The bytes for returnPolicyUri.

getReturnShippingFee()

public OnlineReturnPolicy.ReturnShippingFee getReturnShippingFee()

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Returns
Type Description
OnlineReturnPolicy.ReturnShippingFee

The returnShippingFee.

getReturnShippingFeeBuilder()

public OnlineReturnPolicy.ReturnShippingFee.Builder getReturnShippingFeeBuilder()

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Returns
Type Description
OnlineReturnPolicy.ReturnShippingFee.Builder

getReturnShippingFeeOrBuilder()

public OnlineReturnPolicy.ReturnShippingFeeOrBuilder getReturnShippingFeeOrBuilder()

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Returns
Type Description
OnlineReturnPolicy.ReturnShippingFeeOrBuilder

hasAcceptDefectiveOnly()

public boolean hasAcceptDefectiveOnly()

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

optional bool accept_defective_only = 11;

Returns
Type Description
boolean

Whether the acceptDefectiveOnly field is set.

hasAcceptExchange()

public boolean hasAcceptExchange()

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

optional bool accept_exchange = 13;

Returns
Type Description
boolean

Whether the acceptExchange field is set.

hasPolicy()

public boolean hasPolicy()

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Returns
Type Description
boolean

Whether the policy field is set.

hasProcessRefundDays()

public boolean hasProcessRefundDays()

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

optional int32 process_refund_days = 12;

Returns
Type Description
boolean

Whether the processRefundDays field is set.

hasRestockingFee()

public boolean hasRestockingFee()

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Returns
Type Description
boolean

Whether the restockingFee field is set.

hasReturnShippingFee()

public boolean hasReturnShippingFee()

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Returns
Type Description
boolean

Whether the returnShippingFee field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OnlineReturnPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public OnlineReturnPolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

mergeFrom(OnlineReturnPolicy other)

public OnlineReturnPolicy.Builder mergeFrom(OnlineReturnPolicy other)
Parameter
Name Description
other OnlineReturnPolicy
Returns
Type Description
OnlineReturnPolicy.Builder

mergePolicy(OnlineReturnPolicy.Policy value)

public OnlineReturnPolicy.Builder mergePolicy(OnlineReturnPolicy.Policy value)

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Parameter
Name Description
value OnlineReturnPolicy.Policy
Returns
Type Description
OnlineReturnPolicy.Builder

mergeRestockingFee(OnlineReturnPolicy.RestockingFee value)

public OnlineReturnPolicy.Builder mergeRestockingFee(OnlineReturnPolicy.RestockingFee value)

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Parameter
Name Description
value OnlineReturnPolicy.RestockingFee
Returns
Type Description
OnlineReturnPolicy.Builder

mergeReturnShippingFee(OnlineReturnPolicy.ReturnShippingFee value)

public OnlineReturnPolicy.Builder mergeReturnShippingFee(OnlineReturnPolicy.ReturnShippingFee value)

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Parameter
Name Description
value OnlineReturnPolicy.ReturnShippingFee
Returns
Type Description
OnlineReturnPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OnlineReturnPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

setAcceptDefectiveOnly(boolean value)

public OnlineReturnPolicy.Builder setAcceptDefectiveOnly(boolean value)

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

optional bool accept_defective_only = 11;

Parameter
Name Description
value boolean

The acceptDefectiveOnly to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setAcceptExchange(boolean value)

public OnlineReturnPolicy.Builder setAcceptExchange(boolean value)

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

optional bool accept_exchange = 13;

Parameter
Name Description
value boolean

The acceptExchange to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setCountries(int index, String value)

public OnlineReturnPolicy.Builder setCountries(int index, String value)

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

repeated string countries = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The countries to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public OnlineReturnPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

setItemConditions(int index, OnlineReturnPolicy.ItemCondition value)

public OnlineReturnPolicy.Builder setItemConditions(int index, OnlineReturnPolicy.ItemCondition value)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameters
Name Description
index int

The index to set the value at.

value OnlineReturnPolicy.ItemCondition

The itemConditions to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setItemConditionsValue(int index, int value)

public OnlineReturnPolicy.Builder setItemConditionsValue(int index, int value)

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

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ItemCondition item_conditions = 8;

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for itemConditions to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setLabel(String value)

public OnlineReturnPolicy.Builder setLabel(String value)

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.

string label = 3;

Parameter
Name Description
value String

The label to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setLabelBytes(ByteString value)

public OnlineReturnPolicy.Builder setLabelBytes(ByteString value)

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.

string label = 3;

Parameter
Name Description
value ByteString

The bytes for label to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setName(String value)

public OnlineReturnPolicy.Builder setName(String value)

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

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setNameBytes(ByteString value)

public OnlineReturnPolicy.Builder setNameBytes(ByteString value)

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

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setPolicy(OnlineReturnPolicy.Policy value)

public OnlineReturnPolicy.Builder setPolicy(OnlineReturnPolicy.Policy value)

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Parameter
Name Description
value OnlineReturnPolicy.Policy
Returns
Type Description
OnlineReturnPolicy.Builder

setPolicy(OnlineReturnPolicy.Policy.Builder builderForValue)

public OnlineReturnPolicy.Builder setPolicy(OnlineReturnPolicy.Policy.Builder builderForValue)

The return policy.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.Policy policy = 5;

Parameter
Name Description
builderForValue OnlineReturnPolicy.Policy.Builder
Returns
Type Description
OnlineReturnPolicy.Builder

setProcessRefundDays(int value)

public OnlineReturnPolicy.Builder setProcessRefundDays(int value)

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

optional int32 process_refund_days = 12;

Parameter
Name Description
value int

The processRefundDays to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public OnlineReturnPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

setRestockingFee(OnlineReturnPolicy.RestockingFee value)

public OnlineReturnPolicy.Builder setRestockingFee(OnlineReturnPolicy.RestockingFee value)

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Parameter
Name Description
value OnlineReturnPolicy.RestockingFee
Returns
Type Description
OnlineReturnPolicy.Builder

setRestockingFee(OnlineReturnPolicy.RestockingFee.Builder builderForValue)

public OnlineReturnPolicy.Builder setRestockingFee(OnlineReturnPolicy.RestockingFee.Builder builderForValue)

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.

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.RestockingFee restocking_fee = 6;

Parameter
Name Description
builderForValue OnlineReturnPolicy.RestockingFee.Builder
Returns
Type Description
OnlineReturnPolicy.Builder

setReturnMethods(int index, OnlineReturnPolicy.ReturnMethod value)

public OnlineReturnPolicy.Builder setReturnMethods(int index, OnlineReturnPolicy.ReturnMethod value)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameters
Name Description
index int

The index to set the value at.

value OnlineReturnPolicy.ReturnMethod

The returnMethods to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setReturnMethodsValue(int index, int value)

public OnlineReturnPolicy.Builder setReturnMethodsValue(int index, int value)

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.

repeated .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnMethod return_methods = 7;

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for returnMethods to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setReturnPolicyId(String value)

public OnlineReturnPolicy.Builder setReturnPolicyId(String value)

Output only. Return policy ID generated by Google.

string return_policy_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The returnPolicyId to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setReturnPolicyIdBytes(ByteString value)

public OnlineReturnPolicy.Builder setReturnPolicyIdBytes(ByteString value)

Output only. Return policy ID generated by Google.

string return_policy_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for returnPolicyId to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setReturnPolicyUri(String value)

public OnlineReturnPolicy.Builder setReturnPolicyUri(String value)

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

string return_policy_uri = 10;

Parameter
Name Description
value String

The returnPolicyUri to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setReturnPolicyUriBytes(ByteString value)

public OnlineReturnPolicy.Builder setReturnPolicyUriBytes(ByteString value)

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

string return_policy_uri = 10;

Parameter
Name Description
value ByteString

The bytes for returnPolicyUri to set.

Returns
Type Description
OnlineReturnPolicy.Builder

This builder for chaining.

setReturnShippingFee(OnlineReturnPolicy.ReturnShippingFee value)

public OnlineReturnPolicy.Builder setReturnShippingFee(OnlineReturnPolicy.ReturnShippingFee value)

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Parameter
Name Description
value OnlineReturnPolicy.ReturnShippingFee
Returns
Type Description
OnlineReturnPolicy.Builder

setReturnShippingFee(OnlineReturnPolicy.ReturnShippingFee.Builder builderForValue)

public OnlineReturnPolicy.Builder setReturnShippingFee(OnlineReturnPolicy.ReturnShippingFee.Builder builderForValue)

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

.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy.ReturnShippingFee return_shipping_fee = 9;

Parameter
Name Description
builderForValue OnlineReturnPolicy.ReturnShippingFee.Builder
Returns
Type Description
OnlineReturnPolicy.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final OnlineReturnPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides