-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings to the Prosper marketplace API -- @package prosper @version 0.1.1 module Prosper.User -- | User info for Prosper data data User User :: !ByteString -> !ByteString -> User -- | Username for Prosper username :: User -> !ByteString -- | Password for Prosper password :: User -> !ByteString instance Show User instance Eq User module Prosper.Internal.Request apiUrl :: ByteString issueRequest :: User -> ByteString -> Method -> ContentType -> (Response -> InputStream ByteString -> IO a) -> [(ByteString, ByteString)] -> IO a module Prosper.Money type Money = Double module Prosper.Internal.CSV -- | Make a GET request to Prosper's CSV api, return the raw CSV data csvGet :: User -> ByteString -> IO ByteString -- | Make a GET request to Prosper's CSV api, return the raw CSV data csvGetStream :: User -> ByteString -> (InputStream ByteString -> IO a) -> IO a module Prosper.Listing data Listing Listing :: !Int -> !Status -> !Rating -> !(Maybe Int) -> !Category -> !Money -> !Offer -> !Credit -> Listing listingId :: Listing -> !Int status :: Listing -> !Status -- | Letter score assigned by Prosper rating :: Listing -> !Rating -- | Prosper score score :: Listing -> !(Maybe Int) -- | The reason for the loan (e.g. Auto, Student, etc) category :: Listing -> !Category amountRemaining :: Listing -> !Money -- | Contract data offer :: Listing -> !Offer -- | Credit data credit :: Listing -> !Credit -- | Data related to the listing's offer and contract terms data Offer Offer :: !Money -> !Double -> !Int -> !Double -> !Double -> !Double -> Offer requestAmount :: Offer -> !Money -- | Interest rate for the borrower rate :: Offer -> !Double -- | Integer number of months termInMonths :: Offer -> !Int yield :: Offer -> !Double effectiveYield :: Offer -> !Double -- | APR for the borrower apr :: Offer -> !Double -- | Data related to the credibility of the listing data Credit Credit :: !Int -> !Double -> !Bool -> !Double -> !(Maybe Int) -> !(Maybe Int) -> !(Maybe Money) -> !(Maybe Int) -> !(Maybe Int) -> !(Maybe Money) -> !(Maybe Int) -> !(Maybe (Money, Money)) -> !(Maybe Money) -> !(Maybe Int) -> !(Maybe Int) -> !(Maybe Int) -> Credit fico :: Credit -> !Int bankcardUtilization :: Credit -> !Double isHomeowner :: Credit -> !Bool debtToIncome :: Credit -> !Double monthsEmployed :: Credit -> !(Maybe Int) currentDelinquencies :: Credit -> !(Maybe Int) amountDelinquent :: Credit -> !(Maybe Money) openCreditLines :: Credit -> !(Maybe Int) totOpenRevolvingAccts :: Credit -> !(Maybe Int) revolvingBalance :: Credit -> !(Maybe Money) -- | Percent revolvingAvailableCredit :: Credit -> !(Maybe Int) -- | It is possible that they're unemployed, that's Nothing incomeRange :: Credit -> !(Maybe (Money, Money)) statedMonthlyIncome :: Credit -> !(Maybe Money) currentCreditLines :: Credit -> !(Maybe Int) nowDelinquentDerog :: Credit -> !(Maybe Int) wasDelinquentDerog :: Credit -> !(Maybe Int) -- | Prosper ratings, AA is the most credible. HR is the -- least credible. data Rating HR :: Rating E :: Rating D :: Rating C :: Rating B :: Rating A :: Rating AA :: Rating -- | The Category of a loan is the type of loan. This is basically -- copied verbatim from the Prosper API. data Category NotAvailable :: Category DebtConsolidation :: Category HomeImprovement :: Category Business :: Category PersonalLoan :: Category StudentUse :: Category Auto :: Category Other :: Category BabyAdoptionLoans :: Category Boat :: Category CosmeticProcedures :: Category EngagementRingFinancing :: Category GreenLoans :: Category HouseholdExpenses :: Category LargePurchases :: Category MedicalDental :: Category Motorcycle :: Category RV :: Category Taxes :: Category Vacation :: Category WeddingLoans :: Category data Status Active :: Status Withdrawn :: Status Expired :: Status ListingCompleted :: Status ListingCancelled :: Status Pending :: Status instance Typeable Rating instance Typeable Category instance Typeable Status instance Show Offer instance Show Credit instance Eq FICO instance Eq IncomeRange instance Show Rating instance Eq Rating instance Ord Rating instance Generic Rating instance Read Rating instance Enum Rating instance Show Category instance Eq Category instance Generic Category instance Read Category instance Show Status instance Eq Status instance Generic Status instance Show Listing instance Datatype D1Rating instance Constructor C1_0Rating instance Constructor C1_1Rating instance Constructor C1_2Rating instance Constructor C1_3Rating instance Constructor C1_4Rating instance Constructor C1_5Rating instance Constructor C1_6Rating instance Datatype D1Category instance Constructor C1_0Category instance Constructor C1_1Category instance Constructor C1_2Category instance Constructor C1_3Category instance Constructor C1_4Category instance Constructor C1_5Category instance Constructor C1_6Category instance Constructor C1_7Category instance Constructor C1_8Category instance Constructor C1_9Category instance Constructor C1_10Category instance Constructor C1_11Category instance Constructor C1_12Category instance Constructor C1_13Category instance Constructor C1_14Category instance Constructor C1_15Category instance Constructor C1_16Category instance Constructor C1_17Category instance Constructor C1_18Category instance Constructor C1_19Category instance Constructor C1_20Category instance Datatype D1Status instance Constructor C1_0Status instance Constructor C1_1Status instance Constructor C1_2Status instance Constructor C1_3Status instance Constructor C1_4Status instance Constructor C1_5Status instance FromJSON Status instance FromJSON Category instance ToJSON Rating instance FromJSON Rating instance FromJSON IncomeRange instance Show IncomeRange instance FromJSON FICO instance Show FICO instance FromJSON Listing instance Eq Listing module Prosper.Note data NoteStatus OriginationDelayed :: NoteStatus Current :: NoteStatus ChargeOff :: NoteStatus Defaulted :: NoteStatus NoteCompleted :: NoteStatus FinalPaymentInProgress :: NoteStatus NoteCancelled :: NoteStatus data NoteDefaultReason Delinquency :: NoteDefaultReason Bankruptcy :: NoteDefaultReason Deceased :: NoteDefaultReason Repurchased :: NoteDefaultReason PaidInFull :: NoteDefaultReason SettledInFull :: NoteDefaultReason data Note Note :: Text -> Int -> Money -> Money -> Double -> Rating -> Int -> Int -> Int -> Money -> Money -> Money -> Money -> Money -> Money -> NoteStatus -> Maybe NoteDefaultReason -> Bool -> Note loanNoteId :: Note -> Text listingNumber :: Note -> Int amountParticipation :: Note -> Money totalAmountBorrowed :: Note -> Money borrowerRate :: Note -> Double noteRating :: Note -> Rating term :: Note -> Int ageInMonths :: Note -> Int daysPastDue :: Note -> Int principalBalance :: Note -> Money principalRepaid :: Note -> Money interestPaid :: Note -> Money serviceFees :: Note -> Money prosperFees :: Note -> Money lateFees :: Note -> Money noteStatus :: Note -> NoteStatus noteDefaultReason :: Note -> Maybe NoteDefaultReason isSold :: Note -> Bool instance Show NoteStatus instance Eq NoteStatus instance Show NoteDefaultReason instance Eq NoteDefaultReason instance Show Note instance Eq Note instance Generic Note instance Datatype D1Note instance Constructor C1_0Note instance Selector S1_0_0Note instance Selector S1_0_1Note instance Selector S1_0_2Note instance Selector S1_0_3Note instance Selector S1_0_4Note instance Selector S1_0_5Note instance Selector S1_0_6Note instance Selector S1_0_7Note instance Selector S1_0_8Note instance Selector S1_0_9Note instance Selector S1_0_10Note instance Selector S1_0_11Note instance Selector S1_0_12Note instance Selector S1_0_13Note instance Selector S1_0_14Note instance Selector S1_0_15Note instance Selector S1_0_16Note instance Selector S1_0_17Note instance ToJSON Note instance FromJSON Note instance FromJSON NoteDefaultReason instance ToJSON NoteDefaultReason instance FromJSON NoteStatus instance ToJSON NoteStatus module Prosper.Invest -- | Status of an invest request data InvestStatus Success :: InvestStatus Failed :: InvestStatus Error :: InvestStatus PartialSuccess :: InvestStatus -- | Message associated with an error data InvestMessage NoError :: InvestMessage InternalError :: InvestMessage InvestedAmountLessThanRequested :: InvestMessage ListingNotAvailable :: InvestMessage ListingNotFound :: InvestMessage InsufficientFunds :: InvestMessage ListingClosedBeforeBidPlaced :: InvestMessage ServerBusy :: InvestMessage SuitabilityRequirementsNotMet :: InvestMessage InvestedAmountLessThanMinimumRequired :: InvestMessage -- | Not in the prosper docs, this is a catch all OtherError :: InvestMessage -- | JSON response to an invest request data InvestResponse InvestResponse :: InvestStatus -> Money -> Int -> InvestMessage -> Money -> InvestResponse investStatus :: InvestResponse -> InvestStatus requestedAmount :: InvestResponse -> Money investListingId :: InvestResponse -> Int investMessage :: InvestResponse -> InvestMessage amountInvested :: InvestResponse -> Money instance Show InvestStatus instance Eq InvestStatus instance Read InvestStatus instance Generic InvestStatus instance Show InvestMessage instance Eq InvestMessage instance Read InvestMessage instance Generic InvestMessage instance Show InvestResponse instance Generic InvestResponse instance Eq Money' instance Generic Money' instance Datatype D1InvestStatus instance Constructor C1_0InvestStatus instance Constructor C1_1InvestStatus instance Constructor C1_2InvestStatus instance Constructor C1_3InvestStatus instance Datatype D1InvestMessage instance Constructor C1_0InvestMessage instance Constructor C1_1InvestMessage instance Constructor C1_2InvestMessage instance Constructor C1_3InvestMessage instance Constructor C1_4InvestMessage instance Constructor C1_5InvestMessage instance Constructor C1_6InvestMessage instance Constructor C1_7InvestMessage instance Constructor C1_8InvestMessage instance Constructor C1_9InvestMessage instance Constructor C1_10InvestMessage instance Datatype D1InvestResponse instance Constructor C1_0InvestResponse instance Selector S1_0_0InvestResponse instance Selector S1_0_1InvestResponse instance Selector S1_0_2InvestResponse instance Selector S1_0_3InvestResponse instance Selector S1_0_4InvestResponse instance Datatype D1Money' instance Constructor C1_0Money' instance Selector S1_0_0Money' instance Serialize InvestResponse instance FromJSON InvestResponse instance FromJSON Money' instance Show Money' instance Serialize InvestMessage instance FromJSON InvestMessage instance Serialize InvestStatus instance FromJSON InvestStatus module Prosper.Internal.JSON -- | Make a GET request to Prosper's JSON api, return the parsed JSON data jsonGet :: FromJSON a => User -> ByteString -> IO a jsonGetHandler :: FromJSON a => User -> ByteString -> (Response -> InputStream ByteString -> IO a) -> IO a investRequest :: User -> Int -> Money -> IO InvestResponse module Prosper.Account -- | A data structure for holding account information for Prosper data Account Account :: !Money -> !Money -> !Money -> !Money -> !Money -> !Money -> !Money -> !Money -> Account -- | Available cash for investing availableCash :: Account -> !Money -- | Amount of money invested that is pending origination pendingInvestments :: Account -> !Money -- | Total principal payments received on active notes totPrincipalRecvdOnActiveNotes :: Account -> !Money -- | Total amount invested totalInvestedOnActiveNotes :: Account -> !Money -- | Total principal outstanding on active notes outstandingPrincipalActiveNotes :: Account -> !Money -- | Total dollars held in investible cash, pending orders in the market, -- outstanding principal totalAccountValue :: Account -> !Money -- | Investments on Folio pendingInvestmentsSecondaryMkt :: Account -> !Money -- | Prosper Quick Invests pendingQuickInvestOrders :: Account -> !Money -- | An empty account. All values are zero. emptyAccount :: Account instance Show Account instance Eq Account instance FromJSON Account module Prosper.Commands -- | An investment request. This requires a User, an amount of -- Money, and a Listing. invest :: User -> Money -> Listing -> IO InvestResponse -- | Request Account information from Prosper account :: User -> IO Account -- | Send a request to the Listings end-point at Prosper allListings :: User -> IO (Vector Listing) -- | Request notes for a Prosper user notes :: User -> IO (Vector Note) -- | Given a Note, look up the associated Listing by the -- ListingId listingFromNote :: User -> Note -> IO (Maybe Listing) -- | Request a particular Listing via the CSV endpoint listingCSV :: User -> Listing -> (InputStream ByteString -> IO a) -> IO a -- | Used as a hack around the 500 Critical Exception error data AccountException AccountException :: ByteString -> AccountException instance Typeable AccountException instance Show AccountException instance Exception AccountException -- | These are bindings to the Prosper marketplace API. The documentation -- for the API can be seen at https://api.prosper.com/. module Prosper -- | An investment request. This requires a User, an amount of -- Money, and a Listing. invest :: User -> Money -> Listing -> IO InvestResponse -- | Request Account information from Prosper account :: User -> IO Account -- | Send a request to the Listings end-point at Prosper allListings :: User -> IO (Vector Listing) -- | Request notes for a Prosper user notes :: User -> IO (Vector Note) -- | Given a Note, look up the associated Listing by the -- ListingId listingFromNote :: User -> Note -> IO (Maybe Listing) -- | Used as a hack around the 500 Critical Exception error data AccountException AccountException :: ByteString -> AccountException -- | User info for Prosper data data User User :: !ByteString -> !ByteString -> User -- | Username for Prosper username :: User -> !ByteString -- | Password for Prosper password :: User -> !ByteString -- | A data structure for holding account information for Prosper data Account Account :: !Money -> !Money -> !Money -> !Money -> !Money -> !Money -> !Money -> !Money -> Account -- | Available cash for investing availableCash :: Account -> !Money -- | Amount of money invested that is pending origination pendingInvestments :: Account -> !Money -- | Total principal payments received on active notes totPrincipalRecvdOnActiveNotes :: Account -> !Money -- | Total amount invested totalInvestedOnActiveNotes :: Account -> !Money -- | Total principal outstanding on active notes outstandingPrincipalActiveNotes :: Account -> !Money -- | Total dollars held in investible cash, pending orders in the market, -- outstanding principal totalAccountValue :: Account -> !Money -- | Investments on Folio pendingInvestmentsSecondaryMkt :: Account -> !Money -- | Prosper Quick Invests pendingQuickInvestOrders :: Account -> !Money -- | An empty account. All values are zero. emptyAccount :: Account data Listing Listing :: !Int -> !Status -> !Rating -> !(Maybe Int) -> !Category -> !Money -> !Offer -> !Credit -> Listing listingId :: Listing -> !Int status :: Listing -> !Status -- | Letter score assigned by Prosper rating :: Listing -> !Rating -- | Prosper score score :: Listing -> !(Maybe Int) -- | The reason for the loan (e.g. Auto, Student, etc) category :: Listing -> !Category amountRemaining :: Listing -> !Money -- | Contract data offer :: Listing -> !Offer -- | Credit data credit :: Listing -> !Credit -- | Data related to the listing's offer and contract terms data Offer Offer :: !Money -> !Double -> !Int -> !Double -> !Double -> !Double -> Offer requestAmount :: Offer -> !Money -- | Interest rate for the borrower rate :: Offer -> !Double -- | Integer number of months termInMonths :: Offer -> !Int yield :: Offer -> !Double effectiveYield :: Offer -> !Double -- | APR for the borrower apr :: Offer -> !Double -- | Data related to the credibility of the listing data Credit Credit :: !Int -> !Double -> !Bool -> !Double -> !(Maybe Int) -> !(Maybe Int) -> !(Maybe Money) -> !(Maybe Int) -> !(Maybe Int) -> !(Maybe Money) -> !(Maybe Int) -> !(Maybe (Money, Money)) -> !(Maybe Money) -> !(Maybe Int) -> !(Maybe Int) -> !(Maybe Int) -> Credit fico :: Credit -> !Int bankcardUtilization :: Credit -> !Double isHomeowner :: Credit -> !Bool debtToIncome :: Credit -> !Double monthsEmployed :: Credit -> !(Maybe Int) currentDelinquencies :: Credit -> !(Maybe Int) amountDelinquent :: Credit -> !(Maybe Money) openCreditLines :: Credit -> !(Maybe Int) totOpenRevolvingAccts :: Credit -> !(Maybe Int) revolvingBalance :: Credit -> !(Maybe Money) -- | Percent revolvingAvailableCredit :: Credit -> !(Maybe Int) -- | It is possible that they're unemployed, that's Nothing incomeRange :: Credit -> !(Maybe (Money, Money)) statedMonthlyIncome :: Credit -> !(Maybe Money) currentCreditLines :: Credit -> !(Maybe Int) nowDelinquentDerog :: Credit -> !(Maybe Int) wasDelinquentDerog :: Credit -> !(Maybe Int) -- | Prosper ratings, AA is the most credible. HR is the -- least credible. data Rating HR :: Rating E :: Rating D :: Rating C :: Rating B :: Rating A :: Rating AA :: Rating -- | The Category of a loan is the type of loan. This is basically -- copied verbatim from the Prosper API. data Category NotAvailable :: Category DebtConsolidation :: Category HomeImprovement :: Category Business :: Category PersonalLoan :: Category StudentUse :: Category Auto :: Category Other :: Category BabyAdoptionLoans :: Category Boat :: Category CosmeticProcedures :: Category EngagementRingFinancing :: Category GreenLoans :: Category HouseholdExpenses :: Category LargePurchases :: Category MedicalDental :: Category Motorcycle :: Category RV :: Category Taxes :: Category Vacation :: Category WeddingLoans :: Category data Status Active :: Status Withdrawn :: Status Expired :: Status ListingCompleted :: Status ListingCancelled :: Status Pending :: Status data NoteStatus OriginationDelayed :: NoteStatus Current :: NoteStatus ChargeOff :: NoteStatus Defaulted :: NoteStatus NoteCompleted :: NoteStatus FinalPaymentInProgress :: NoteStatus NoteCancelled :: NoteStatus data NoteDefaultReason Delinquency :: NoteDefaultReason Bankruptcy :: NoteDefaultReason Deceased :: NoteDefaultReason Repurchased :: NoteDefaultReason PaidInFull :: NoteDefaultReason SettledInFull :: NoteDefaultReason data Note Note :: Text -> Int -> Money -> Money -> Double -> Rating -> Int -> Int -> Int -> Money -> Money -> Money -> Money -> Money -> Money -> NoteStatus -> Maybe NoteDefaultReason -> Bool -> Note loanNoteId :: Note -> Text listingNumber :: Note -> Int amountParticipation :: Note -> Money totalAmountBorrowed :: Note -> Money borrowerRate :: Note -> Double noteRating :: Note -> Rating term :: Note -> Int ageInMonths :: Note -> Int daysPastDue :: Note -> Int principalBalance :: Note -> Money principalRepaid :: Note -> Money interestPaid :: Note -> Money serviceFees :: Note -> Money prosperFees :: Note -> Money lateFees :: Note -> Money noteStatus :: Note -> NoteStatus noteDefaultReason :: Note -> Maybe NoteDefaultReason isSold :: Note -> Bool -- | Status of an invest request data InvestStatus Success :: InvestStatus Failed :: InvestStatus Error :: InvestStatus PartialSuccess :: InvestStatus -- | Message associated with an error data InvestMessage NoError :: InvestMessage InternalError :: InvestMessage InvestedAmountLessThanRequested :: InvestMessage ListingNotAvailable :: InvestMessage ListingNotFound :: InvestMessage InsufficientFunds :: InvestMessage ListingClosedBeforeBidPlaced :: InvestMessage ServerBusy :: InvestMessage SuitabilityRequirementsNotMet :: InvestMessage InvestedAmountLessThanMinimumRequired :: InvestMessage -- | Not in the prosper docs, this is a catch all OtherError :: InvestMessage -- | JSON response to an invest request data InvestResponse InvestResponse :: InvestStatus -> Money -> Int -> InvestMessage -> Money -> InvestResponse investStatus :: InvestResponse -> InvestStatus requestedAmount :: InvestResponse -> Money investListingId :: InvestResponse -> Int investMessage :: InvestResponse -> InvestMessage amountInvested :: InvestResponse -> Money type Money = Double