Class Index | File Index

Classes


Class KiiUserBuilder

Represents a KiiUser builder
Defined in: KiiSDK.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Build KiiUser object.
<static>  
KiiUserBuilder.builderWithEmailAddress(emailAddress, password)
Create KiiUser builder with email address

Create a KiiUser builder with email address.
<static>  
KiiUserBuilder.builderWithGlobalPhoneNumber(phoneNumber, password)
Create KiiUser builder with global phone number

Create a KiiUser builder with global phone number.
<static>  
KiiUserBuilder.builderWithIdentifier(identifier, password)
Create a KiiUser builder with identifier.
<static>  
KiiUserBuilder.builderWithLocalPhoneNumber(phoneNumber, country, password)
Create KiiUser builder with local phone number

Create a KiiUser builder with local phone number.
<static>  
KiiUserBuilder.builderWithUsername(username, password)
Create KiiUser builder with user name

Create a KiiUser builder with user name.
 
setEmailAddress(emailAddress)
Set email address.
 
setGlobalPhoneNumber(phoneNumber)
Set global phone number.
 
setLocalPhoneNumber(phoneNumber, country)
Set local phone number.
 
setUsername(username)
Set user name.
Class Detail
KiiUserBuilder()
Method Detail
{KiiUser} build()
Build KiiUser object.

Build KiiUser object. This method verify set values.
Returns:
{KiiUser} a working KiiUser object.

<static> {KiiUserBuilder} KiiUserBuilder.builderWithEmailAddress(emailAddress, password)
Create KiiUser builder with email address

Create a KiiUser builder with email address.
Parameters:
{String} emailAddress
email address.
{String} password
for the user. Must be string. Must not be null or undefined.
Throws:
{InvalidEmailException}
If the email address is not in the proper format
{InvalidPasswordException}
If the password is not in the proper format
Returns:
{KiiUserBuilder} KiiUser object builder.

<static> {KiiUserBuilder} KiiUserBuilder.builderWithGlobalPhoneNumber(phoneNumber, password)
Create KiiUser builder with global phone number

Create a KiiUser builder with global phone number.
Parameters:
{String} phoneNumber
global phone number.
password
Throws:
{InvalidPhoneNumberException}
If the phone number is not in the proper format
Returns:
{KiiUserBuilder} KiiUser object builder.

<static> {KiiUserBuilder} KiiUserBuilder.builderWithIdentifier(identifier, password)
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.
Parameters:
{String} identifier
The user's user name, email address or phone number. Must be string. Must not be null or undefined.
{String} password
for the user. Must be string. Must not be null or undefined.
Throws:
{InvalidArgumentException}
If Identifier is not user name, email address or phone number.
{InvalidPasswordException}
If the password is not in the proper format
Returns:
{KiiUserBuilder} KiiUser object builder.

<static> {KiiUserBuilder} KiiUserBuilder.builderWithLocalPhoneNumber(phoneNumber, country, password)
Create KiiUser builder with local phone number

Create a KiiUser builder with local phone number.
Parameters:
{String} phoneNumber
local phone number.
{String} country
country code
{String} password
for the user. Must be string. Must not be null or undefined.
Throws:
{InvalidPhoneNumberException}
If the phone number is not in the proper format
{InvalidCountryException}
If the country code is not a valid format
{InvalidPasswordException}
If the password is not in the proper format
Returns:
{KiiUserBuilder} KiiUser object builder.

<static> {KiiUserBuilder} KiiUserBuilder.builderWithUsername(username, password)
Create KiiUser builder with user name

Create a KiiUser builder with user name.
Parameters:
{String} username
user name.
{String} password
for the user. Must be string. Must not be null or undefined.
Throws:
{InvalidUsernameException}
If the username is not in the proper format
{InvalidPasswordException}
If the password is not in the proper format
Returns:
{KiiUserBuilder} KiiUser object builder.

{KiiUserBuilder} setEmailAddress(emailAddress)
Set email address.

Set email address. If null or undefined is passed. It is ignored. Previous email address is remained.
Parameters:
{String} emailAddress
email address.
Throws:
{InvalidEmailException}
If the email address is not in the proper format
Returns:
{KiiUserBuilder} this builder object.

{KiiUserBuilder} setGlobalPhoneNumber(phoneNumber)
Set global phone number.

Set global phone number. If null or undefined is passed. It is ignored. Previous phone number is remained.
Parameters:
{String} phoneNumber
global phone number.
Throws:
{InvalidPhoneNumberException}
If the phone number is not in the proper format
Returns:
{KiiUserBuilder} this builder object.

{KiiUserBuilder} setLocalPhoneNumber(phoneNumber, country)
Set local phone number.

Set local phone number. If null or undefined is passed. It is ignored. Previous phone number is remained.
Parameters:
{String} phoneNumber
local phone number.
{String} country
country code
Throws:
{InvalidPhoneNumberException}
If the phone number is not in the proper format
{InvalidCountryException}
If the country code is not a valid format
Returns:
{KiiUserBuilder} this builder object.

{KiiUserBuilder} setUsername(username)
Set user name.

Set user name. If null or undefined is passed. It is ignored. Previous user name is remained.
Parameters:
{String} username
user name.
Throws:
{InvalidUsernameException}
If the username is not in the proper format
Returns:
{KiiUserBuilder} this builder object.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Sep 15 2021 05:31:34 GMT-0000 (UTC)