Interface Payer

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, Temporal

public interface Payer extends OsidObject, Temporal

A Payer represents the payer of the bills. A Payer links a payment type to a paying contact Resource .

  • Method Details

    • getResourceId

      Id getResourceId()
      Gets the resource Id representing the billing contact.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getResource

      Resource getResource() throws OperationFailedException
      Gets the resource.
      Returns:
      the resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasCustomer

      boolean hasCustomer()
      Tests if this payer is linked directly to a customer account.
      Returns:
      true if this payer is linked to a customer, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCustomerId

      Id getCustomerId()
      Gets the customer Id .
      Returns:
      the customer Id
      Throws:
      IllegalStateException - hasCustomer() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCustomer

      Customer getCustomer() throws OperationFailedException
      Gets the customer.
      Returns:
      the customer
      Throws:
      IllegalStateException - hasCustomer() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • usesActivity

      boolean usesActivity()
      Tests if this payer uses the customer financial activity for payments. If usesActivity() is true, then usesCash() , hasCreditCard() , and hasBankAccount() must be false .
      Returns:
      true if this payer uses the customer activity, false otherwise
      Throws:
      IllegalStateException - hasCustomer() is false
      Compliance:
      mandatory - This method must be implemented.
    • usesCash

      boolean usesCash()
      Tests if this payer uses cash for payments.
      Returns:
      true if this payer uses the cash, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • hasCreditCard

      boolean hasCreditCard()
      Tests if this payer pays by credit card. If hasCreditCard() is true, then usesActivity() , usesCash() , hasCreditCard() , and hasBankAccount() must be false .
      Returns:
      true if this payer pays by credit card, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCreditCardNumber

      String getCreditCardNumber()
      Gets the credit card number.
      Returns:
      the credit card number
      Throws:
      IllegalStateException - hasCreditCard() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCreditCardExpiration

      DateTime getCreditCardExpiration()
      Gets the credit card expiration date.
      Returns:
      the expiration date
      Throws:
      IllegalStateException - hasCreditCard() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCreditCardCode

      String getCreditCardCode()
      Gets the credit card security code.
      Returns:
      the credit card security code
      Throws:
      IllegalStateException - hasCreditCard() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasBankAccount

      boolean hasBankAccount()
      Tests if this payer pays by bank account If hasBankAccount() is true, then usesActivity() , usesCash() , hasCreditCard() , and hasCreditCard() must be false .
      Returns:
      true if this payer pays by bank account, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getBankRoutingNumber

      String getBankRoutingNumber()
      Gets the bank routing number.
      Returns:
      the bank routing number number
      Throws:
      IllegalStateException - hasBankAccount() is false
      Compliance:
      mandatory - This method must be implemented.
    • getBankAccountNumber

      String getBankAccountNumber()
      Gets the bank account number.
      Returns:
      the bank account number
      Throws:
      IllegalStateException - hasBankAccount() is false
      Compliance:
      mandatory - This method must be implemented.
    • getPayerRecord

      PayerRecord getPayerRecord(Type payerRecordType) throws OperationFailedException
      Gets the payer record corresponding to the given Payer record Type .This method is used to retrieve an object implementing the requested record. The payerRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(payerRecordType) is true .
      Parameters:
      payerRecordType - the type of payer record to retrieve
      Returns:
      the payer record
      Throws:
      NullArgumentException - payerRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(payerRecordType) is false
      Compliance:
      mandatory - This method must be implemented.