SaUtrGenerator

uk.gov.hmrc.domain.SaUtrGenerator
See theSaUtrGenerator companion object
case class SaUtrGenerator(random: Random) extends Modulus11Check

A generator that should be used Only for Testing!

Rules for the SaUtr: https://design.tax.service.gov.uk/hmrc-design-patterns/unique-taxpayer-reference/

Generates an SaUtr from a random seed. You can use a specific seed to generate an SaUtr so it is going to be more predictable.

Attributes

Example

SaUtrGenerator(seed).nextSaUtr.utr

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Modulus11Check
trait ModulusCheck
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def nextSaUtr: SaUtr

Inherited methods

protected def calculateCheckCharacter(utr: String): Char

Attributes

Inherited from:
ModulusCheck
protected def isCheckCorrect(utr: String, checkPosition: Int): Boolean

Attributes

Inherited from:
ModulusCheck
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Inherited fields

override protected val checkString: String

Attributes

Inherited from:
Modulus11Check
override protected val mod: Int

Attributes

Inherited from:
Modulus11Check
override protected val weights: List[Int]

Attributes

Inherited from:
Modulus11Check