SignAccount
Mixin Extends:
Helper class representing a Consent Strategy.
Example:
// To get a list of eSign Accounts use clinical6.get
import { clinical6, SignAccount } from 'clinical6';
clinical6.get(SignAccount).then(c => console.log(c));
// To get a single SignAccount, you can also use clinical6
clinical6.get({ id: 5, type: 'adobe_sign__accounts'});
// To save or insert, you can either use the .save() capability or clinical6
mySignAccount.save(); // insert if no id, save if id
clinical6.insert(new SignAccount({...}));
clinical6.update(mySignAccount);
Constructor Summary
Public Constructor | ||
public |
constructor(json: Object) Constructor for helper class representing a Consent Strategy |
Method Summary
Public Methods | ||
public |
Deletes a SignAccount |
|
public |
async save(): Promise<SignAccount> Saves a sign account (insert if id doesn't exist, update if it does) |
Inherited Summary
From class SignAccountModel | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Public Constructors
public constructor(json: Object) source
Constructor for helper class representing a Consent Strategy
Override:
SignAccountModel#constructorParams:
Name | Type | Attribute | Description |
json | Object | json api response from server |
Public Methods
public delete(): Promise source
Deletes a SignAccount
Example:
import { SignAccount, Client } from 'clinical6';
// Removes signAccount from server and local storage
const signAccount = new SignAccount({...});
signAccount.delete();
// No longer in storage
Client.instance.storageUtility.has('adobe_sign__accounts', { id: 1 });
public async save(): Promise<SignAccount> source
Saves a sign account (insert if id doesn't exist, update if it does)
Example:
import { SignAccount, clinical6 } from 'clinical6';
// Inserts new signAccount (no existing id)
const signAccount = new SignAccount(
"type": "adobe_sign__accounts",
"attributes": {
"email": "account+email@parallel6.com",
"first_name": "CanBe",
"last_name": "Repeated"
"company_name": "RepeatableCompany"
});
signAccount.save();
// Updates existing signAccount(has existing id)
clinical6.get(SignAccount).then(signAccounts => signAccounts[0].save());