Class TaxRule (0.4.0)

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

EFFECTIVE_TIME_PERIOD_FIELD_NUMBER

public static final int EFFECTIVE_TIME_PERIOD_FIELD_NUMBER
Field Value
Type Description
int

LOCATION_ID_FIELD_NUMBER

public static final int LOCATION_ID_FIELD_NUMBER
Field Value
Type Description
int

POST_CODE_RANGE_FIELD_NUMBER

public static final int POST_CODE_RANGE_FIELD_NUMBER
Field Value
Type Description
int

REGION_CODE_FIELD_NUMBER

public static final int REGION_CODE_FIELD_NUMBER
Field Value
Type Description
int

SELF_SPECIFIED_RATE_MICROS_FIELD_NUMBER

public static final int SELF_SPECIFIED_RATE_MICROS_FIELD_NUMBER
Field Value
Type Description
int

SHIPPING_TAXED_FIELD_NUMBER

public static final int SHIPPING_TAXED_FIELD_NUMBER
Field Value
Type Description
int

USE_GOOGLE_RATE_FIELD_NUMBER

public static final int USE_GOOGLE_RATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TaxRule getDefaultInstance()
Returns
Type Description
TaxRule

getDescriptor()

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

newBuilder()

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

newBuilder(TaxRule prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public TaxRule getDefaultInstanceForType()
Returns
Type Description
TaxRule

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.

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.

getParserForType()

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

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.

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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 TaxRule.Builder newBuilderForType()
Returns
Type Description
TaxRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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