Address Reference
Constructor
A new instance of the user Address class can be initialized using a TheM.user.newTempAddress
or TheM.user.getNewTempAddress(given)
call. Can be used to push new Address instances onto the TheM.user.addresses array like so: TheM.user.addresses.push(TheM.user.getNewTempAddress(given));
Example
TheM.user.getNewTempAddress({AFiUserAddressId: 'new123', AFiUserId: 'testaurlx8wfimcrw', addressLine1: '123 New Str.', addressLine2: null, city: 'Harrisburg', countryCode: 'US', dtsModified: 'Mon Jun 10 2024 07:37:53 GMT-0400 (Eastern Daylight Time)', isMain: false, postalCode: '12345', state: 'PA', isSyncedToServer: false});
Properties
Property table for Address
Property | Description | Required | Schema |
---|---|---|---|
AFiUserAddressId | Gets (returns) the AFiUserAddressId. | No | { "title": "AFiUserAddressId", "type": "string", "description": "Gets (returns) the AFiUserAddressId.", "examples": [ "new" ], "default": "new" } |
addressLine1 | Gets (returns) or sets the addressLine1 of the address. | Yes | { "title": "addressLine1", "type": "string", "description": "Gets (returns) or sets the addressLine1 of the address.", "examples": [ "123 Main Str." ], "nullable": false } |
addressLine2 | Gets (returns) or sets the addressLine2 of the address. | No | { "title": "addressLine2", "type": "string", "description": "Gets (returns) or sets the addressLine2 of the address.", "examples": [ "Apt. 123" ], "nullable": true } |
city | Gets (returns) or sets the city of the address. | Yes | { "title": "city", "type": "string", "description": "Gets (returns) or sets the city of the address.", "examples": [ "Harrisburg" ], "nullable": false } |
state | Gets (returns) or sets the state of the address. | Yes | { "title": "state", "type": "string", "description": "Gets (returns) or sets the state of the address.", "examples": [ "PA" ], "nullable": false } |
postalCode | Gets (returns) or sets the postalCode of the address. | Yes | { "title": "postalCode", "type": "string", "description": "Gets (returns) or sets the postalCode of the address.", "examples": [ "12345" ], "nullable": false } |
countryCode | Gets (returns) or sets the countryCode of the address. | No | { "title": "countryCode", "type": "string", "examples": [ "US" ], "description": "Gets (returns) or sets the countryCode of the address.", "default": "US" } |
dtsModified | Gets (returns) the most recent modification date of the address. | No | { "title": "dtsModified", "type": "date", "examples": [ "Mon Jun 10 2024 14:26:31 GMT-0400 (Eastern Daylight Time)" ], "description": "Gets (returns) the most recent modification date of the address.", "default": "1978-10-15T04:00:00.000Z" } |
isMain | Gets (returns) or sets true if the address is the user's main account. | No | { "title": "isMain", "type": "boolean", "examples": [ true, false ], "description": "Gets (returns) or sets true if the address is the user's main account.", "default": false } |
isValid | Gets (returns) true if the address appears to be a valid address. | Yes | { "title": "isValid", "type": "boolean", "examples": [ true, false ], "description": "Gets (returns) true if the address appears to be a valid address.", "nullable": false } |
validationMessage | Gets (returns) a validation message specifying if any of the fields for this address appear to be missing or invalid. | No | { "title": "validationMessage", "type": "string", "examples": [ "", "enter address line 1", "enter city", "enter state", "enter valid postal code", "enter country" ], "description": "Gets (returns) a validation message specifying if any of the fields for this address appear to be missing or invalid.", "default": "" } |
isSyncedToServer | Gets (returns) or sets true if the address is synced to the server. | No | { "title": "isSyncedToServer", "type": "boolean", "examples": [ true, false ], "description": "Gets (returns) or sets true if the address is synced to the server.", "default": false } |
toJSON | Gets (returns) the address as a JSON formatted object. | Yes | { "title": "toJSON", "type": "object", "examples": [ { "AFiUserAddressId": "testzrctagoggontpgzkusmmfbjmxrzumwvpiftrlosz ", "addressLine1": "123 Main St.", "addressLine2": "Apt. 2", "city": "Harrisburg", "state": "PA", "postalCode": "12345", "countryCode": "US", "dtsModified": "Mon Jun 10 2024 14:26:31 GMT-0400 (Eastern Daylight Time)" } ], "description": "Gets (returns) the address as a JSON formatted object.", "nullable": false } |