Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KiiUserBuilder

Represents a KiiUser object

Hierarchy

  • KiiUserBuilder

Index

Methods

  • Build KiiUserBuilder object.

    Build KiiUserBuilder object. This method verify set values.

    Returns KiiUser

    a working KiiUser object.

  • Set email address.

    Set email address. If null or undefined is passed. It is ignored. Previous email address is remained.

    throws

    {InvalidEmailException} If the email address is not in the proper format

    Parameters

    • email: string

    Returns KiiUserBuilder

    this builder object.

  • Set global phone number.

    Set global phone number. If null or undefined is passed. It is ignored. Previous phone number is remained.

    throws

    {InvalidPhoneNumberException} If the phone number is not in the proper format

    Parameters

    • phone: string

    Returns KiiUserBuilder

    this builder object.

  • Set local phone number.

    Set local phone number. If null or undefined is passed. It is ignored. Previous phone number is remained.

    throws

    {InvalidPhoneNumberException} If the phone number is not in the proper format

    throws

    {InvalidCountryException} If the country code is not a valid format

    Parameters

    • phone: string
    • country: string

      country code

    Returns KiiUserBuilder

    this builder object.

  • Set user name.

    Set user name. If null or undefined is passed. It is ignored. Previous user name is remained.

    throws

    {InvalidUsernameException} If the username is not in the proper format

    Parameters

    • username: string

      user name.

    Returns KiiUserBuilder

    this builder object.

  • Create KiiUser builder with email address



    Create a KiiUser builder with email address.

    throws

    {InvalidEmailException} If the email address is not in the proper format

    throws

    {InvalidPasswordException} If the password is not in the proper format

    Parameters

    • emailAddress: string

      email address.

    • password: string

      for the user. Must be string. Must not be null or undefined.

    • app: KiiApplication = KiiApplication.globalApp

      KiiApplication instance. When omitted, KiiApplication.globalApp is used.

    Returns KiiUserBuilder

    KiiUser object builder.

  • Create KiiUser builder with global phone number

    Create a KiiUser builder with global phone number.

    throws

    {InvalidPhoneNumberException} If the phone number is not in the proper format

    Parameters

    Returns KiiUserBuilder

    KiiUser object builder.

  • Create a KiiUser builder with identifier.



    Create a KiiUser builder. This constructor is received identifier. The identifier is one of user name, email address or phone number. This constructor automatically identity What is identifier and build proper KiiUser object on build method.



    Some strings can be accepted as both user name and phone number. If such string is passed to this constructor as identifier, then phone number is prior to user name. String of email address is in different class against user name and phone number. So Email address is always identified correctly.

    throws

    {InvalidArgumentException} If Identifier is not user name, email address or phone number.

    throws

    {InvalidPasswordException} If the password is not in the proper format

    Parameters

    • userIdentifier: string
    • password: string

      for the user. Must be string. Must not be null or undefined.

    • app: KiiApplication = KiiApplication.globalApp

      KiiApplication instance. When omitted, KiiApplication.globalApp is used.

    Returns KiiUserBuilder

    KiiUser object builder.

  • Create KiiUser builder with local phone number

    Create a KiiUser builder with local phone number.

    throws

    {InvalidPhoneNumberException} If the phone number is not in the proper format

    throws

    {InvalidCountryException} If the country code is not a valid format

    throws

    {InvalidPasswordException} If the password is not in the proper format

    Parameters

    • phoneNumber: string

      local phone number.

    • country: string

      country code

    • password: string

      for the user. Must be string. Must not be null or undefined.

    • app: KiiApplication = KiiApplication.globalApp

      KiiApplication instance. When omitted, KiiApplication.globalApp is used.

    Returns KiiUserBuilder

    KiiUser object builder.

  • Create KiiUser builder with user name

    Create a KiiUser builder with user name.

    throws

    {InvalidUsernameException} If the username is not in the proper format

    throws

    {InvalidPasswordException} If the password is not in the proper format

    Parameters

    • username: string

      user name.

    • password: string

      for the user. Must be string. Must not be null or undefined.

    • app: KiiApplication = KiiApplication.globalApp

      KiiApplication instance. When omitted, KiiApplication.globalApp is used.

    Returns KiiUserBuilder

    KiiUser object builder.

Generated using TypeDoc