File

src/app/models/payment.model.ts

Index

Properties

Properties

hash
hash: string
Type : string
key
key: string
Type : string
import { BankAccount } from './bank-account.model';

export class PaymentInFlightResponse {
  key: string;
  hash: string;
}

export class Payment {
  errors(errors: any): any {
    throw new Error('Method not implemented.');
  }

  id: string;
  customerId: string;
  payToName: string;
  status: string;
  amount: number;
  paymentDate: string;
  createOn: string;
  isElectronic: string;
  isPicturePayment: string;
  pictureId: string;
  isRecurring: string;
  templateType: string;
  checkNumber: string;
  paymentTemplateId: string;
  version: number;
  shardKey: string;
  financialInstitutionId: string;
  payToAccount: string;
  displayName: string;
  searchName: string;
  payFromAccount: string;
  expectedDeliveryDate: string;
  paymentType: string;
  hidePayment: string;
  confirmationNumber: number;
  collectionTime: string;
  canCancel: string;
  accountDisplayName: string;
  paymentCategory: string;
  invoiceData: string;
  isNoticeSent: string;
  settlementDate: string;
  collectionDate: string;
  networkSendDate: string;
  promiseDate: string;
  isBookmarked: string;
  isValidated: string;
  branchId: string;
  invoiceNumber: string;
  branchName: string;
  isRealTime: string;
  sentToNetworkOn: string;
  sentToNetworkName: string;
  sentToNetworkId: string;
  sentToNetworkResponse: string;
  sentToNetworkWasSuccessful: string;
  foreignPaymentId: string;
  foreignSystem: string;
  payFromEmail: string;
  payFromPhone: string;
  payFromBankAccountDescription: string;
  overrideCheckRoutingNumber: string;
  overrideCheckAccountNumber: string;
  collectionType: string;
  p2PPayToEmailAddress: string;
  p2PPayToPhoneNumber: string;
  secret: string;
  fundingSource: string;
  secOverride: string;
  memo: string;
  payFromRtn: string;
  p2PStatus: string;
  p2PExpiresOn: string;
  payFromBankAccount: string;
  payFromAccountNumberFormatted: string;
  amountFormatted: string;
  paymentDateFormatted: string;
  displayStatus: string;
  getPayFromBankAccountType: string;
  payFromBankAccountType: string;
  payFromBankAccountNumber: string;
  bankAccountType: string;
  defaultContactMethod: string;
  contactMethod: string;
  inFlightKey: string;
  error: string;
  hash: string;
  account: BankAccount;
  deliveryDate: string;

  constructor(payment?: Payment) {
    if (!payment) {
      return;
    }
    this.id = payment.id;
    this.customerId = payment.customerId;
    this.payToName = payment.payToName;
    this.status = payment.status;
    this.amount = payment.amount;
    this.paymentDate = payment.paymentDate;
    this.createOn = payment.createOn;
    this.isElectronic = payment.isElectronic;
    this.isPicturePayment = payment.isPicturePayment;
    this.pictureId = payment.pictureId;
    this.isRecurring = payment.isRecurring;
    this.templateType = payment.templateType;
    this.checkNumber = payment.checkNumber;
    this.paymentTemplateId = payment.paymentTemplateId;
    this.version = payment.version;
    this.shardKey = payment.shardKey;
    this.financialInstitutionId = payment.financialInstitutionId;
    this.payToAccount = payment.payToAccount;
    this.displayName = payment.displayName;
    this.searchName = payment.searchName;
    this.payFromAccount = payment.payFromAccount;
    this.expectedDeliveryDate = payment.expectedDeliveryDate;
    this.paymentType = payment.paymentType;
    this.hidePayment = payment.hidePayment;
    this.confirmationNumber = payment.confirmationNumber;
    this.collectionTime = payment.collectionTime;
    this.canCancel = payment.canCancel;
    this.accountDisplayName = payment.accountDisplayName;
    this.paymentCategory = payment.paymentCategory;
    this.invoiceData = payment.invoiceData;
    this.isNoticeSent = payment.isNoticeSent;
    this.settlementDate = payment.settlementDate;
    this.collectionDate = payment.collectionDate;
    this.networkSendDate = payment.networkSendDate;
    this.promiseDate = payment.promiseDate;
    this.isBookmarked = payment.isBookmarked;
    this.isValidated = payment.isValidated;
    this.branchId = payment.branchId;
    this.invoiceNumber = payment.invoiceNumber;
    this.branchName = payment.branchName;
    this.isRealTime = payment.isRealTime;
    this.sentToNetworkOn = payment.sentToNetworkOn;
    this.sentToNetworkName = payment.sentToNetworkName;
    this.sentToNetworkId = payment.sentToNetworkId;
    this.sentToNetworkResponse = payment.sentToNetworkResponse;
    this.sentToNetworkWasSuccessful = payment.sentToNetworkWasSuccessful;
    this.foreignPaymentId = payment.foreignPaymentId;
    this.foreignSystem = payment.foreignSystem;
    this.payFromEmail = payment.p2PPayToEmailAddress;
    this.payFromPhone = payment.p2PPayToPhoneNumber;
    this.payFromBankAccountDescription = payment.payFromBankAccountDescription;
    this.overrideCheckRoutingNumber = payment.overrideCheckRoutingNumber;
    this.overrideCheckAccountNumber = payment.overrideCheckAccountNumber;
    this.collectionType = payment.collectionType;
    this.secret = payment.secret;
    this.fundingSource = payment.fundingSource;
    this.secOverride = payment.secOverride;
    this.memo = payment.memo;
    this.payFromRtn = payment.payFromRtn;
    this.p2PStatus = payment.p2PStatus;
    this.p2PExpiresOn = payment.p2PExpiresOn;
    this.payFromBankAccount = payment.payFromBankAccount;
    this.payFromAccountNumberFormatted = payment.payFromAccountNumberFormatted;
    this.amountFormatted = payment.amountFormatted;
    this.paymentDateFormatted = payment.paymentDateFormatted;
    this.displayStatus = payment.displayStatus;
    this.payFromBankAccountNumber = payment.payFromAccount;
    this.p2PPayToEmailAddress = payment.p2PPayToEmailAddress;
    this.p2PPayToPhoneNumber = payment.p2PPayToPhoneNumber;
    this.defaultContactMethod = payment.defaultContactMethod;
    this.hash = payment.hash;
    this.error = payment.error;

    const phoneOrNull =
      this.p2PPayToPhoneNumber && this.p2PPayToPhoneNumber.length > 0 ? this.p2PPayToPhoneNumber : null;

    this.contactMethod =
      this.p2PPayToEmailAddress && this.p2PPayToEmailAddress.length > 0
        ? this.p2PPayToEmailAddress
        : phoneOrNull;

    const account = new BankAccount();
    account.accountNumber = payment.payFromAccount;
    account.accountType = payment.payFromBankAccountDescription;
    this.account = account;
  }
}

results matching ""

    No results matching ""