Class BillBuilder

java.lang.Object
com.avoka.tm.svc.BillBuilder

public class BillBuilder extends Object

Provides a Bill value object builder class.

Examples

Please find the Bill builder examples below.

Create a Bill record

This example shows how to create a TXN Bill record.

 import com.avoka.tm.svc.*
 import com.avoka.tm.vo.*

 Bill bill = new BillBuilder()
                 .setBillType("TXN")
                 .setClientCode("client")
                 .setSubmissionId(123)
                 .setFormCode("BillFORM")
                 .setFormVersion("1.0")
                 .setLicenseKey("LicenseKey")
                 .setBillingScore("1.5")
                 .build();
 

This example shows how to create a SVC Bill record.

 import com.avoka.tm.svc.*
 import com.avoka.tm.vo.*

 Bill bill = new BillBuilder()
                 .setBillType("SVC")
                 .setClientCode("TC")
                 .setSvcName("serviceName1")
                 .setSvcVersion("80")
                 .setLicenseKey("testLicenseKey")
                 .setBillingScore("1.2")
                 .build();
 
Since:
24.10.0
  • Constructor Details

  • Method Details

    • setBillType

      public BillBuilder setBillType(String billType)
      Sets the bill type.
      Parameters:
      billType - the type of the bill
      Returns:
      the current instance of BillBuilder
    • setBillingScore

      public BillBuilder setBillingScore(String billingScore)
      Sets the billing score.
      Parameters:
      billingScore - the billing score
      Returns:
      the current instance of BillBuilder
    • setClientCode

      public BillBuilder setClientCode(String clientCode)
      Sets the client code.
      Parameters:
      clientCode - the client code
      Returns:
      the current instance of BillBuilder
    • setComments

      public BillBuilder setComments(String comments)
      Sets the comments.
      Parameters:
      comments - any additional comments
      Returns:
      the current instance of BillBuilder
    • setFormCode

      public BillBuilder setFormCode(String formCode)
      Sets the form code.
      Parameters:
      formCode - the form code
      Returns:
      the current instance of BillBuilder
    • setFormVersion

      public BillBuilder setFormVersion(String formVersion)
      Sets the form version.
      Parameters:
      formVersion - the form version
      Returns:
      the current instance of BillBuilder
    • setJourneyId

      public BillBuilder setJourneyId(Number journeyId)
      Sets the journey ID.
      Parameters:
      journeyId - the journey ID
      Returns:
      the current instance of BillBuilder
    • setParam1

      public BillBuilder setParam1(String param1)
      Sets the first parameter.
      Parameters:
      param1 - the first parameter
      Returns:
      the current instance of BillBuilder
    • setParam2

      public BillBuilder setParam2(String param2)
      Sets the second parameter.
      Parameters:
      param2 - the second parameter
      Returns:
      the current instance of BillBuilder
    • setParam3

      public BillBuilder setParam3(String param3)
      Sets the third parameter.
      Parameters:
      param3 - the third parameter
      Returns:
      the current instance of BillBuilder
    • setParam4

      public BillBuilder setParam4(String param4)
      Sets the fourth parameter.
      Parameters:
      param4 - the fourth parameter
      Returns:
      the current instance of BillBuilder
    • setParam5

      public BillBuilder setParam5(String param5)
      Sets the fifth parameter.
      Parameters:
      param5 - the fifth parameter
      Returns:
      the current instance of BillBuilder
    • setSvcName

      public BillBuilder setSvcName(String svcName)
      Sets the service name.
      Parameters:
      svcName - the service name
      Returns:
      the current instance of BillBuilder
    • setSvcVersion

      public BillBuilder setSvcVersion(String svcVersion)
      Sets the service version.
      Parameters:
      svcVersion - the service version
      Returns:
      the current instance of BillBuilder
    • setSubmissionId

      public BillBuilder setSubmissionId(Number submissionId)
      Sets the submission ID.
      Parameters:
      submissionId - the submission ID
      Returns:
      the current instance of BillBuilder
    • setLicenseKey

      public BillBuilder setLicenseKey(String licenseKey)
      Sets the licenseKey.
      Parameters:
      licenseKey - the licenseKey
      Returns:
      the current instance of BillBuilder
    • build

      public Bill build()
      Create a bill record based on the specified parameter and return the new Bill value object.
      Returns:
      the newly created Bill value object