src/app/models/template.model.ts
Properties |
Accessors |
constructor(name?: string, contact?: string, secret?: string, memo?: string, contactType?: ContactType, id?: string)
|
Defined in src/app/models/template.model.ts:19
|
accounts |
accounts:
|
Type : string
|
Defined in src/app/models/template.model.ts:5
|
customerMessages |
customerMessages:
|
Type : CustomerMessage[]
|
Defined in src/app/models/template.model.ts:16
|
defaultContactMethod |
defaultContactMethod:
|
Type : string
|
Defined in src/app/models/template.model.ts:18
|
firstCharOfName |
firstCharOfName:
|
Type : string
|
Defined in src/app/models/template.model.ts:17
|
formattedPhoneNumber |
formattedPhoneNumber:
|
Type : string
|
Defined in src/app/models/template.model.ts:7
|
id |
id:
|
Type : string
|
Defined in src/app/models/template.model.ts:8
|
isSecretRequired |
isSecretRequired:
|
Default value : true
|
Defined in src/app/models/template.model.ts:13
|
memo |
memo:
|
Type : string
|
Defined in src/app/models/template.model.ts:14
|
name |
name:
|
Type : string
|
Defined in src/app/models/template.model.ts:9
|
p2PPayToEmailAddress |
p2PPayToEmailAddress:
|
Type : string
|
Defined in src/app/models/template.model.ts:10
|
p2PPayToPhoneNumber |
p2PPayToPhoneNumber:
|
Type : string
|
Defined in src/app/models/template.model.ts:11
|
payFromBankAccount |
payFromBankAccount:
|
Type : BankAccount
|
Defined in src/app/models/template.model.ts:15
|
secret |
secret:
|
Type : string
|
Defined in src/app/models/template.model.ts:12
|
selected |
selected:
|
Default value : false
|
Defined in src/app/models/template.model.ts:19
|
selectedAccount |
selectedAccount:
|
Type : string
|
Defined in src/app/models/template.model.ts:6
|
payFromAccountNumber |
getpayFromAccountNumber()
|
Defined in src/app/models/template.model.ts:37
|
payFromRoutingNumber |
getpayFromRoutingNumber()
|
Defined in src/app/models/template.model.ts:41
|
payToName |
getpayToName()
|
Defined in src/app/models/template.model.ts:45
|
import { ContactType } from '../enums/contact-type.enum';
import { BankAccount, CustomerMessage, TemplateUpdate } from './';
export class Template implements TemplateUpdate {
accounts: string;
selectedAccount: string;
formattedPhoneNumber: string;
id: string;
name: string;
p2PPayToEmailAddress: string;
p2PPayToPhoneNumber: string;
secret: string;
isSecretRequired = true;
memo: string;
payFromBankAccount: BankAccount;
customerMessages: CustomerMessage[];
firstCharOfName: string;
defaultContactMethod: string;
selected = false;
constructor(
name?: string,
contact?: string,
secret?: string,
memo?: string,
contactType?: ContactType,
id?: string
) {
this.name = name;
this.secret = secret;
this.memo = memo;
this.p2PPayToEmailAddress = contactType === ContactType.Email ? contact : null;
this.p2PPayToPhoneNumber = contactType === ContactType.Phone ? contact : null;
this.id = id;
}
get payFromAccountNumber(): string {
return this.payFromBankAccount.accountNumber;
}
get payFromRoutingNumber(): string {
return this.payFromBankAccount.routingNumber;
}
get payToName(): string {
return this.name;
}
}