Class OnlineReturnPolicy (0.9.0)

public final class OnlineReturnPolicy extends GeneratedMessageV3 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 Fields

ACCEPT_DEFECTIVE_ONLY_FIELD_NUMBER

public static final int ACCEPT_DEFECTIVE_ONLY_FIELD_NUMBER
Field Value
Type Description
int

ACCEPT_EXCHANGE_FIELD_NUMBER

public static final int ACCEPT_EXCHANGE_FIELD_NUMBER
Field Value
Type Description
int

COUNTRIES_FIELD_NUMBER

public static final int COUNTRIES_FIELD_NUMBER
Field Value
Type Description
int

ITEM_CONDITIONS_FIELD_NUMBER

public static final int ITEM_CONDITIONS_FIELD_NUMBER
Field Value
Type Description
int

LABEL_FIELD_NUMBER

public static final int LABEL_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

POLICY_FIELD_NUMBER

public static final int POLICY_FIELD_NUMBER
Field Value
Type Description
int

PROCESS_REFUND_DAYS_FIELD_NUMBER

public static final int PROCESS_REFUND_DAYS_FIELD_NUMBER
Field Value
Type Description
int

RESTOCKING_FEE_FIELD_NUMBER

public static final int RESTOCKING_FEE_FIELD_NUMBER
Field Value
Type Description
int

RETURN_METHODS_FIELD_NUMBER

public static final int RETURN_METHODS_FIELD_NUMBER
Field Value
Type Description
int

RETURN_POLICY_ID_FIELD_NUMBER

public static final int RETURN_POLICY_ID_FIELD_NUMBER
Field Value
Type Description
int

RETURN_POLICY_URI_FIELD_NUMBER

public static final int RETURN_POLICY_URI_FIELD_NUMBER
Field Value
Type Description
int

RETURN_SHIPPING_FEE_FIELD_NUMBER

public static final int RETURN_SHIPPING_FEE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OnlineReturnPolicy getDefaultInstance()
Returns
Type Description
OnlineReturnPolicy

getDescriptor()

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

newBuilder()

public static OnlineReturnPolicy.Builder newBuilder()
Returns
Type Description
OnlineReturnPolicy.Builder

newBuilder(OnlineReturnPolicy prototype)

public static OnlineReturnPolicy.Builder newBuilder(OnlineReturnPolicy prototype)
Parameter
Name Description
prototype OnlineReturnPolicy
Returns
Type Description
OnlineReturnPolicy.Builder

parseDelimitedFrom(InputStream input)

public static OnlineReturnPolicy parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OnlineReturnPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static OnlineReturnPolicy parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OnlineReturnPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OnlineReturnPolicy parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OnlineReturnPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OnlineReturnPolicy parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OnlineReturnPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static OnlineReturnPolicy parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OnlineReturnPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static OnlineReturnPolicy parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OnlineReturnPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OnlineReturnPolicy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<OnlineReturnPolicy> parser()
Returns
Type Description
Parser<OnlineReturnPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

getParserForType()

public Parser<OnlineReturnPolicy> getParserForType()
Returns
Type Description
Parser<OnlineReturnPolicy>
Overrides

getPolicy()

public OnlineReturnPolicy.Policy getPolicy()

The return policy.

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

Returns
Type Description
OnlineReturnPolicy.Policy

The policy.

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.

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OnlineReturnPolicy.Builder newBuilderForType()
Returns
Type Description
OnlineReturnPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OnlineReturnPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
OnlineReturnPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public OnlineReturnPolicy.Builder toBuilder()
Returns
Type Description
OnlineReturnPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException