Class TaxRule.Builder (0.5.0)

public static final class TaxRule.Builder extends GeneratedMessageV3.Builder<TaxRule.Builder> implements TaxRuleOrBuilder

Primary type convension

percent micro : 100% = 1 000 000 and 1% = 10 000 cannot be negative.

Information about tax nexus and related parameters applicable to orders delivered to the area covered by a single tax admin. Nexus is created when a merchant is doing business in an area administered by tax admin (only US states are supported for nexus configuration). If merchant has nexus in a US state, merchant needs to pay tax to all tax authorities associated with the shipping destination. Next Id : 8

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

Implements

TaxRuleOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TaxRule build()
Returns
Type Description
TaxRule

buildPartial()

public TaxRule buildPartial()
Returns
Type Description
TaxRule

clear()

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

clearEffectiveTimePeriod()

public TaxRule.Builder clearEffectiveTimePeriod()

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TaxRule.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLocation()

public TaxRule.Builder clearLocation()
Returns
Type Description
TaxRule.Builder

clearLocationId()

public TaxRule.Builder clearLocationId()

The admin_id or criteria_id of the region in which this rule is applicable.

int64 location_id = 2;

Returns
Type Description
TaxRule.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPostCodeRange()

public TaxRule.Builder clearPostCodeRange()

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Returns
Type Description
TaxRule.Builder

clearRateCalculation()

public TaxRule.Builder clearRateCalculation()
Returns
Type Description
TaxRule.Builder

clearRegionCode()

public TaxRule.Builder clearRegionCode()

Region code in which this rule is applicable

string region_code = 1;

Returns
Type Description
TaxRule.Builder

This builder for chaining.

clearSelfSpecifiedRateMicros()

public TaxRule.Builder clearSelfSpecifiedRateMicros()

A fixed rate specified in micros, where 100% = 1_000_000. Suitable for origin-based states.

int64 self_specified_rate_micros = 5;

Returns
Type Description
TaxRule.Builder

This builder for chaining.

clearShippingTaxed()

public TaxRule.Builder clearShippingTaxed()

If set, shipping charge is taxed (at the same rate as product) when delivering to this admin's area. Can only be set on US states without category.

bool shipping_taxed = 6;

Returns
Type Description
TaxRule.Builder

This builder for chaining.

clearUseGoogleRate()

public TaxRule.Builder clearUseGoogleRate()

Rate that depends on delivery location: if merchant has a nexus in corresponding US state, rates from authorities with jurisdiction over delivery area are added up.

bool use_google_rate = 4;

Returns
Type Description
TaxRule.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public TaxRule getDefaultInstanceForType()
Returns
Type Description
TaxRule

getDescriptorForType()

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

getEffectiveTimePeriod()

public Interval getEffectiveTimePeriod()

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Interval

The effectiveTimePeriod.

getEffectiveTimePeriodBuilder()

public Interval.Builder getEffectiveTimePeriodBuilder()

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Interval.Builder

getEffectiveTimePeriodOrBuilder()

public IntervalOrBuilder getEffectiveTimePeriodOrBuilder()

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.IntervalOrBuilder

getLocationCase()

public TaxRule.LocationCase getLocationCase()
Returns
Type Description
TaxRule.LocationCase

getLocationId()

public long getLocationId()

The admin_id or criteria_id of the region in which this rule is applicable.

int64 location_id = 2;

Returns
Type Description
long

The locationId.

getPostCodeRange()

public TaxRule.TaxPostalCodeRange getPostCodeRange()

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Returns
Type Description
TaxRule.TaxPostalCodeRange

The postCodeRange.

getPostCodeRangeBuilder()

public TaxRule.TaxPostalCodeRange.Builder getPostCodeRangeBuilder()

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Returns
Type Description
TaxRule.TaxPostalCodeRange.Builder

getPostCodeRangeOrBuilder()

public TaxRule.TaxPostalCodeRangeOrBuilder getPostCodeRangeOrBuilder()

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Returns
Type Description
TaxRule.TaxPostalCodeRangeOrBuilder

getRateCalculationCase()

public TaxRule.RateCalculationCase getRateCalculationCase()
Returns
Type Description
TaxRule.RateCalculationCase

getRegionCode()

public String getRegionCode()

Region code in which this rule is applicable

string region_code = 1;

Returns
Type Description
String

The regionCode.

getRegionCodeBytes()

public ByteString getRegionCodeBytes()

Region code in which this rule is applicable

string region_code = 1;

Returns
Type Description
ByteString

The bytes for regionCode.

getSelfSpecifiedRateMicros()

public long getSelfSpecifiedRateMicros()

A fixed rate specified in micros, where 100% = 1_000_000. Suitable for origin-based states.

int64 self_specified_rate_micros = 5;

Returns
Type Description
long

The selfSpecifiedRateMicros.

getShippingTaxed()

public boolean getShippingTaxed()

If set, shipping charge is taxed (at the same rate as product) when delivering to this admin's area. Can only be set on US states without category.

bool shipping_taxed = 6;

Returns
Type Description
boolean

The shippingTaxed.

getUseGoogleRate()

public boolean getUseGoogleRate()

Rate that depends on delivery location: if merchant has a nexus in corresponding US state, rates from authorities with jurisdiction over delivery area are added up.

bool use_google_rate = 4;

Returns
Type Description
boolean

The useGoogleRate.

hasEffectiveTimePeriod()

public boolean hasEffectiveTimePeriod()

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the effectiveTimePeriod field is set.

hasLocationId()

public boolean hasLocationId()

The admin_id or criteria_id of the region in which this rule is applicable.

int64 location_id = 2;

Returns
Type Description
boolean

Whether the locationId field is set.

hasPostCodeRange()

public boolean hasPostCodeRange()

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Returns
Type Description
boolean

Whether the postCodeRange field is set.

hasSelfSpecifiedRateMicros()

public boolean hasSelfSpecifiedRateMicros()

A fixed rate specified in micros, where 100% = 1_000_000. Suitable for origin-based states.

int64 self_specified_rate_micros = 5;

Returns
Type Description
boolean

Whether the selfSpecifiedRateMicros field is set.

hasUseGoogleRate()

public boolean hasUseGoogleRate()

Rate that depends on delivery location: if merchant has a nexus in corresponding US state, rates from authorities with jurisdiction over delivery area are added up.

bool use_google_rate = 4;

Returns
Type Description
boolean

Whether the useGoogleRate field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEffectiveTimePeriod(Interval value)

public TaxRule.Builder mergeEffectiveTimePeriod(Interval value)

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
TaxRule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(TaxRule other)

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

mergePostCodeRange(TaxRule.TaxPostalCodeRange value)

public TaxRule.Builder mergePostCodeRange(TaxRule.TaxPostalCodeRange value)

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Parameter
Name Description
value TaxRule.TaxPostalCodeRange
Returns
Type Description
TaxRule.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setEffectiveTimePeriod(Interval value)

public TaxRule.Builder setEffectiveTimePeriod(Interval value)

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
TaxRule.Builder

setEffectiveTimePeriod(Interval.Builder builderForValue)

public TaxRule.Builder setEffectiveTimePeriod(Interval.Builder builderForValue)

Required. Time period when this rule is effective. If the duration is missing from effective_time listed, then it is open ended to the future. The start of this time period is inclusive, and the end is exclusive.

.google.type.Interval effective_time_period = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.type.Interval.Builder
Returns
Type Description
TaxRule.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setLocationId(long value)

public TaxRule.Builder setLocationId(long value)

The admin_id or criteria_id of the region in which this rule is applicable.

int64 location_id = 2;

Parameter
Name Description
value long

The locationId to set.

Returns
Type Description
TaxRule.Builder

This builder for chaining.

setPostCodeRange(TaxRule.TaxPostalCodeRange value)

public TaxRule.Builder setPostCodeRange(TaxRule.TaxPostalCodeRange value)

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Parameter
Name Description
value TaxRule.TaxPostalCodeRange
Returns
Type Description
TaxRule.Builder

setPostCodeRange(TaxRule.TaxPostalCodeRange.Builder builderForValue)

public TaxRule.Builder setPostCodeRange(TaxRule.TaxPostalCodeRange.Builder builderForValue)

The range of postal codes in which this rule is applicable.

.google.shopping.merchant.accounts.v1beta.TaxRule.TaxPostalCodeRange post_code_range = 3;

Parameter
Name Description
builderForValue TaxRule.TaxPostalCodeRange.Builder
Returns
Type Description
TaxRule.Builder

setRegionCode(String value)

public TaxRule.Builder setRegionCode(String value)

Region code in which this rule is applicable

string region_code = 1;

Parameter
Name Description
value String

The regionCode to set.

Returns
Type Description
TaxRule.Builder

This builder for chaining.

setRegionCodeBytes(ByteString value)

public TaxRule.Builder setRegionCodeBytes(ByteString value)

Region code in which this rule is applicable

string region_code = 1;

Parameter
Name Description
value ByteString

The bytes for regionCode to set.

Returns
Type Description
TaxRule.Builder

This builder for chaining.

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

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

setSelfSpecifiedRateMicros(long value)

public TaxRule.Builder setSelfSpecifiedRateMicros(long value)

A fixed rate specified in micros, where 100% = 1_000_000. Suitable for origin-based states.

int64 self_specified_rate_micros = 5;

Parameter
Name Description
value long

The selfSpecifiedRateMicros to set.

Returns
Type Description
TaxRule.Builder

This builder for chaining.

setShippingTaxed(boolean value)

public TaxRule.Builder setShippingTaxed(boolean value)

If set, shipping charge is taxed (at the same rate as product) when delivering to this admin's area. Can only be set on US states without category.

bool shipping_taxed = 6;

Parameter
Name Description
value boolean

The shippingTaxed to set.

Returns
Type Description
TaxRule.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUseGoogleRate(boolean value)

public TaxRule.Builder setUseGoogleRate(boolean value)

Rate that depends on delivery location: if merchant has a nexus in corresponding US state, rates from authorities with jurisdiction over delivery area are added up.

bool use_google_rate = 4;

Parameter
Name Description
value boolean

The useGoogleRate to set.

Returns
Type Description
TaxRule.Builder

This builder for chaining.