File

src/app/models/template.model.ts

Implements

TemplateUpdate

Index

Properties
Accessors

Constructor

constructor(name?: string, contact?: string, secret?: string, memo?: string, contactType?: ContactType, id?: string)
Parameters :
Name Type Optional
name string yes
contact string yes
secret string yes
memo string yes
contactType ContactType yes
id string yes

Properties

accounts
accounts: string
Type : string
customerMessages
customerMessages: CustomerMessage[]
Type : CustomerMessage[]
defaultContactMethod
defaultContactMethod: string
Type : string
firstCharOfName
firstCharOfName: string
Type : string
formattedPhoneNumber
formattedPhoneNumber: string
Type : string
id
id: string
Type : string
isSecretRequired
isSecretRequired:
Default value : true
memo
memo: string
Type : string
name
name: string
Type : string
p2PPayToEmailAddress
p2PPayToEmailAddress: string
Type : string
p2PPayToPhoneNumber
p2PPayToPhoneNumber: string
Type : string
payFromBankAccount
payFromBankAccount: BankAccount
Type : BankAccount
secret
secret: string
Type : string
selected
selected:
Default value : false
selectedAccount
selectedAccount: string
Type : string

Accessors

payFromAccountNumber
getpayFromAccountNumber()
payFromRoutingNumber
getpayFromRoutingNumber()
payToName
getpayToName()
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;
  }
}

results matching ""

    No results matching ""