TaxResults Class

Contains a list of setter methods to populate the data returned from a tax callout. The data is passed back to Salesforce Billing from the tax connector.

Namespace 

blng

TaxResults Methods 

The following are methods for TaxResults.

  • getId()

    Returns the ID of the entity where tax was calculated.

  • getRate()

    Returns the tax rate.

  • getSummary()

    Returns the summary that contains the error message.

  • getTax()

    Returns the tax amount.

  • isSuccess

    Returns true if tax calculation was successful or false if tax calculation fails.

  • setRate(rate)

    Sets the tax rate to the percentage specified by the parameter.

  • setTax(tax)

    Sets the tax amount.

  • setIsSuccess(isSuccess)

    Sets isSuccess to true if tax calculation was successful, otherwise sets isSuccess to false.

  • setId(id)

    Sets the ID of the entity where tax was calculated.

  • setSummary(summary)

    If tax isn’t calculated successfully, assign error message to the summary.

getId() 

Returns the ID of the entity where tax was calculated.

Signature 

global static void getId()

Parameters 

id: Type: String

Return Value 

Type: void

getRate() 

Returns the tax rate.

Signature 

global static void getRate()

Parameters 

rate: Type: Decimal

Return Value 

Type: void

getSummary() 

Returns the summary that contains the error message.

Signature 

global static void getSummary()

Parameters 

summary: Type: String

Return Value 

Type: void

getTax() 

Returns the tax amount.

Signature 

global static void getTax()

Parameters 

tax: Type: Decimal

Return Value 

Type: void

isSuccess 

Returns true if tax calculation was successful or false if tax calculation fails.

Signature 

global static void isSuccess()

Parameters 

isSuccess: Type: Boolean

Return Value 

Type: void

setRate(rate) 

Sets the tax rate to the percentage specified by the parameter.

Signature 

global static void setRate(Decimal rate)

Parameters 

rate: Type: Decimal

Return Value 

Type: void

setTax(tax) 

Sets the tax amount.

Signature 

global static void setTax(Decimal tax)

Parameters 

tax: Type: Decimal Assigns tax.

Return Value 

Type: void

setIsSuccess(isSuccess) 

Sets isSuccess to true if tax calculation was successful, otherwise sets isSuccess to false.

Signature 

global static void setIsSuccess(Boolean isSuccess)

Parameters 

isSuccess: Type: Boolean

Return Value 

Type: void

setId(id) 

Sets the ID of the entity where tax was calculated.

Signature 

global static void setId(String id)

Parameters 

id: Type: String

1In case of GET Tax Call: Assign Invoiceline/Orderproduct Id
2In case of Post/Cancel Tax Call: Assign Invoice Id

Return Value 

Type: void

setSummary(summary) 

If tax isn’t calculated successfully, assign error message to the summary.

Signature 

global static void setSummary(String summary)

Parameters 

summary: Type: String

Return Value 

Type: void