Interface Payer
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, Temporal
A Payer represents the payer of the bills. A Payer
links a payment type to a paying contact Resource .
-
Method Summary
Modifier and TypeMethodDescriptionGets the bank account number.Gets the bank routing number.Gets the credit card security code.Gets the credit card expiration date.Gets the credit card number.Gets the customer.Gets the customerId.getPayerRecord(Type payerRecordType) Gets the payer record corresponding to the givenPayerrecordType.This method is used to retrieve an object implementing the requested record.Gets the resource.Gets the resourceIdrepresenting the billing contact.booleanTests if this payer pays by bank account IfhasBankAccount()is true, thenusesActivity(),usesCash(),hasCreditCard(), andhasCreditCard()must befalse.booleanTests if this payer pays by credit card.booleanTests if this payer is linked directly to a customer account.booleanTests if this payer uses the customer financial activity for payments.booleanusesCash()Tests if this payer uses cash for payments.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.Methods inherited from interface Temporal
getEndDate, getStartDate, isEffectiveModifier and TypeMethodDescriptionGets the end date.Gets the start date.booleanTests if the current date is within the start end end dates inclusive.
-
Method Details
-
getResourceId
Id getResourceId()Gets the resourceIdrepresenting the billing contact.- Returns:
- the resource
Id - Compliance:
mandatory- This method must be implemented.
-
getResource
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:
trueif this payer is linked to a customer,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getCustomerId
Id getCustomerId()Gets the customerId.- Returns:
- the customer
Id - Throws:
IllegalStateException-hasCustomer()isfalse- Compliance:
mandatory- This method must be implemented.
-
getCustomer
Gets the customer.- Returns:
- the customer
- Throws:
IllegalStateException-hasCustomer()isfalseOperationFailedException- 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. IfusesActivity()is true, thenusesCash(),hasCreditCard(), andhasBankAccount()must befalse.- Returns:
trueif this payer uses the customer activity,falseotherwise- Throws:
IllegalStateException-hasCustomer()isfalse- Compliance:
mandatory- This method must be implemented.
-
usesCash
boolean usesCash()Tests if this payer uses cash for payments.- Returns:
trueif this payer uses the cash,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
hasCreditCard
boolean hasCreditCard()Tests if this payer pays by credit card. IfhasCreditCard()is true, thenusesActivity(),usesCash(),hasCreditCard(), andhasBankAccount()must befalse.- Returns:
trueif this payer pays by credit card,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getCreditCardNumber
String getCreditCardNumber()Gets the credit card number.- Returns:
- the credit card number
- Throws:
IllegalStateException-hasCreditCard()isfalse- Compliance:
mandatory- This method must be implemented.
-
getCreditCardExpiration
DateTime getCreditCardExpiration()Gets the credit card expiration date.- Returns:
- the expiration date
- Throws:
IllegalStateException-hasCreditCard()isfalse- 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
hasBankAccount
boolean hasBankAccount()Tests if this payer pays by bank account IfhasBankAccount()is true, thenusesActivity(),usesCash(),hasCreditCard(), andhasCreditCard()must befalse.- Returns:
trueif this payer pays by bank account,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getBankRoutingNumber
String getBankRoutingNumber()Gets the bank routing number.- Returns:
- the bank routing number number
- Throws:
IllegalStateException-hasBankAccount()isfalse- Compliance:
mandatory- This method must be implemented.
-
getBankAccountNumber
String getBankAccountNumber()Gets the bank account number.- Returns:
- the bank account number
- Throws:
IllegalStateException-hasBankAccount()isfalse- Compliance:
mandatory- This method must be implemented.
-
getPayerRecord
Gets the payer record corresponding to the givenPayerrecordType.This method is used to retrieve an object implementing the requested record. ThepayerRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(payerRecordType)istrue.- Parameters:
payerRecordType- the type of payer record to retrieve- Returns:
- the payer record
- Throws:
NullArgumentException-payerRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(payerRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-