Documentation ¶
Overview ¶
Go wrapper for the Lending Club API.
See https://www.lendingclub.com/developers/lc-api.action for more details on the API.
Index ¶
- type APIError
- type AccountsResource
- func (ar *AccountsResource) AddFunds(fundTransfer *FundsPayload) (*Deposit, error)
- func (ar *AccountsResource) AvailableCash() (*AvailableCash, error)
- func (ar *AccountsResource) CancelFunds(transferIds []int) (*CancellationResult, error)
- func (ar *AccountsResource) CreatePortfolio(name, description string) (*Portfolio, error)
- func (ar *AccountsResource) Notes() ([]Note, error)
- func (ar *AccountsResource) PendingFunds() ([]Transfer, error)
- func (ar *AccountsResource) Portfolios() ([]Portfolio, error)
- func (ar *AccountsResource) SubmitOrder(accountID int, orders []OrderSubmission) (*OrderInstruct, error)
- func (ar *AccountsResource) Summary() (*Summary, error)
- func (ar *AccountsResource) WithdrawFunds(amount decimal.Decimal) (*Withdrawal, error)
- type AvailableCash
- type Cancellation
- type CancellationResult
- type Client
- type Deposit
- type ErrorResponse
- type FundsPayload
- type Loan
- type Loans
- type LoansResource
- type Note
- type OrderConfirmation
- type OrderInstruct
- type OrderSubmission
- type Portfolio
- type Summary
- type Time
- type Transfer
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsResource ¶
type AccountsResource struct {
// contains filtered or unexported fields
}
func (*AccountsResource) AddFunds ¶
func (ar *AccountsResource) AddFunds(fundTransfer *FundsPayload) (*Deposit, error)
func (*AccountsResource) AvailableCash ¶
func (ar *AccountsResource) AvailableCash() (*AvailableCash, error)
func (*AccountsResource) CancelFunds ¶
func (ar *AccountsResource) CancelFunds(transferIds []int) (*CancellationResult, error)
func (*AccountsResource) CreatePortfolio ¶
func (ar *AccountsResource) CreatePortfolio(name, description string) (*Portfolio, error)
func (*AccountsResource) Notes ¶
func (ar *AccountsResource) Notes() ([]Note, error)
TODO: Detailed Notes Owned
func (*AccountsResource) PendingFunds ¶
func (ar *AccountsResource) PendingFunds() ([]Transfer, error)
func (*AccountsResource) Portfolios ¶
func (ar *AccountsResource) Portfolios() ([]Portfolio, error)
func (*AccountsResource) SubmitOrder ¶
func (ar *AccountsResource) SubmitOrder(accountID int, orders []OrderSubmission) (*OrderInstruct, error)
func (*AccountsResource) Summary ¶
func (ar *AccountsResource) Summary() (*Summary, error)
func (*AccountsResource) WithdrawFunds ¶
func (ar *AccountsResource) WithdrawFunds(amount decimal.Decimal) (*Withdrawal, error)
type AvailableCash ¶
type Cancellation ¶
type CancellationResult ¶
type CancellationResult struct { InvestorID int `json:"investorId"` Cancellations []Cancellation `json:"cancellationResults"` }
type Client ¶
func NewClient ¶
NewClient creates a new Client with the given auth token and an optional *http.Client. If the *http.Client is nil, http.DefaultClient will be used.
func (*Client) Accounts ¶
func (c *Client) Accounts(investorID int) *AccountsResource
func (*Client) Loans ¶
func (c *Client) Loans() *LoansResource
type Deposit ¶
type Deposit struct { FundsPayload InvestorID int `json:"investorId"` Frequency string `json:"frequency"` EstimatedFundsTransferDate Time `json:"estimatedFundsTransferDate"` }
type ErrorResponse ¶
type ErrorResponse struct {
Errors []APIError `json:"errors"`
}
type FundsPayload ¶
type Loan ¶
type Loan struct { ID int `json:"id"` MemberID int `json:"memberId"` Term int `json:"term"` InterestRate decimal.Decimal `json:"intRate"` ExpectedDefaultRate decimal.Decimal `json:"expDefaultRate"` ServiceFeeRate decimal.Decimal `json:"serviceFeeRate"` Installment decimal.Decimal `json:"installment"` Grade string `json:"grade"` SubGrade string `json:"subGrade"` EmploymentLength *int `json:"empLength"` HomeOwnership string `json:"homeOwnership"` AnnualIncome decimal.Decimal `json:"annualInc"` IsIncomeVerified string `json:"isIncV"` AcceptDate Time `json:"acceptD"` ExpireDate Time `json:"expD"` ListDate Time `json:"listD"` CreditPullDate Time `json:"creditPullD"` ReviewStatusDate *Time `json:"reviewStatusD"` ReviewStatus string `json:"reviewStatus"` Description string `json:"desc"` Purpose string `json:"purpose"` AddressZip string `json:"addrZip"` AddressState string `json:"addrState"` InvestorCount int `json:"investorCount"` InitialListStatusExpireDate *Time `json:"ilsExpD"` InitialListStatus string `json:"initialListStatus"` EmploymentTitle string `json:"empTitle"` AccountsNowDelinquent int `json:"accNowDelinq"` AccountsOpenPast24Months int `json:"accOpenPast24Mths"` BankcardsOpenToBuy int `json:"bcOpenToBuy"` PercentBankcardsGreaterThan75 decimal.Decimal `json:"percentBcGt75"` BankcardsUtilization decimal.Decimal `json:"bcUtil"` DebtToIncome decimal.Decimal `json:"dti"` DelinquenciesIn2Years int `json:"delinq2Yrs"` DelinquentAmount decimal.Decimal `json:"delinqAmnt"` EarliestCreditLine *Time `json:"earliestCrLine"` FICORangeLow int `json:"ficoRangeLow"` FICORangeHigh int `json:"ficoRangeHigh"` InquiriesLast6Months int `json:"incLast6Mths"` MonthsSinceLastDelinquency int `json:"mthsSinceLastDelinq"` MonthsSinceLastRecord int `json:"mthsSinceLastRecord"` MonthsSinceRecentInquiry int `json:"mthsSinceRecentInq"` MonthsSinceRecentRevolvingDelinquency int `json:"mthsSinceRecentRevolDelinq"` MonthsSinceRecentBankcard int `json:"mthsSinceRecentBc"` MortgageAccounts int `json:"mortAcc"` OpenAccounts int `json:"openAcc"` PublicRecords int `json:"pubRec"` TotalBalanceExcludingMortgage int `json:"totalBalExMort"` RevolvingBalance decimal.Decimal `json:"revolBal"` RevolvingUtilization decimal.Decimal `json:"revolUtil"` TotalBankcardLimit int `json:"totalBcLimit"` TotalAccounts int `json:"totalAcc"` TotalInstallmentHighCreditLimit int `json:"totalIHighCreditLimit"` RevolvingAccounts int `json:"numRevAccts"` MonthsSinceRecentBankcardDelinquency int `json:"mthsSinceRecentBcDlq"` PublicRecordBankruptcies int `json:"pubRecBankruptcies"` AccountsEver120DaysPastDue int `json:"numAcctsEver120Ppd"` ChargeoffWithin12Months int `json:"chargeoffWithin12Mths"` CollectionsIn12MonthsExcludingMedical int `json:"collections12MthsExMed"` TaxLiens int `json:"taxLiens"` MonthsSinceLastMajorDerogatoryMark int `json:"mthsSinceLastMajorDerog"` SatisfactoryAccounts int `json:"numSats"` AccountsOpenedInPast12Months int `json:"numTlOpPast12m"` MonthsSinceRecentAccountOpened int `json:"moSinRcntTl"` TotalHighCreditLimit int `json:"totHiCredLim"` TotalCurrentBalance int `json:"totCurBal"` AverageCurrentBalance int `json:"avgCurBal"` BankcardAccounts int `json:"numBcTl"` ActiveBankcardAccounts int `json:"numActvBctl"` SatisfactoryBankcardAccounts int `json:"numBcSats"` PercentTradesNeverDelinquent int `json:"pctTlNvrDlq"` Accounts90DaysPastDueIn24Months int `json:"numTl90gDpd24m"` Accounts30DaysPastDueIn2Months int `json:"numTl30dpd"` Accounts120DaysPastDueIn2Months int `json:"numTl120dpd2m"` InstallmentAccounts int `json:"numIlTl"` MonthsSinceOldestInstallmentAccount int `json:"moSinOldIlAcct"` ActiveRevolvingTrades int `json:"numActvRevTl"` MonthsSinceOldestRevolvingAccount int `json:"moSinOldRevTlOp"` MonthsSinceRecentRevolvingAccount int `json:"moSinRcntRevTlOp"` TotalRevolvingHighCreditLimit int `json:"totalRevHiLim"` RevolvingTradesWithPositiveBalance int `json:"numRevTlBalGt0"` OpenRevolvingAccounts int `json:"numOpRevTl"` TotalCollectionAmounts int `json:"totCollAmt"` FundedAmount decimal.Decimal `json:"fundedAmount"` LoanAmount decimal.Decimal `json:"loanAmount"` ApplicationType string `json:"applicationType"` JointAnnualIncome decimal.Decimal `json:"annualIncJoint"` JointDebtToIncome decimal.Decimal `json:"dtiJoint"` IsJointIncomeVerified string `json:"isIncVJoint"` OpenTradesInLast6Months int `json:"openAcc6m"` ActiveInstallmentsInLast6Months int `json:"openIl6m"` OpenedInstallmentsInLast12Months int `json:"openIl12m"` OpenedInstallmentsInLast24Months int `json:"openIl24m"` MonthsSinceRecentInstallments int `json:"mthsSinceRcntIl"` TotalInstallmentsBalance decimal.Decimal `json:"totalBalIl"` InstallmentsUtilization decimal.Decimal `json:"iLUtil"` OpenedRevolvingTradesInLast12Months int `json:"openRv12m"` OpenedRevolvingTradesInLast24Months int `json:"openRv24m"` MaximumCurrentBalanceOnRevolvingAccounts decimal.Decimal `json:"maxBalBc"` AllUtilization decimal.Decimal `json:"allUtil"` PersonalFinancialInquiries int `json:"inqFi"` CreditUnionTrades int `json:"totalCuTl"` CreditInquiriesInLast12Months int `json:"inqLast12m"` }
type LoansResource ¶
type LoansResource struct {
// contains filtered or unexported fields
}
func (*LoansResource) Listed ¶
func (lr *LoansResource) Listed() (*Loans, error)
type Note ¶
type Note struct { ID decimal.Decimal `json:"noteId"` Amount decimal.Decimal `json:"noteAmount"` LoanID decimal.Decimal `json:"loanId"` OrderID decimal.Decimal `json:"orderId"` InterestRate decimal.Decimal `json:"interestRate"` LoanStatus string `json:"loanStatus"` Grade string `json:"grade"` LoanAmount decimal.Decimal `json:"loanAmount"` LoanLength int `json:"loanLength"` OrderDate Time `json:"orderDate"` PaymentsReceived decimal.Decimal `json:"paymentsReceived"` // TODO: this may be nullable so Time should be a pointer IssueDate Time `json:"issueDate"` LoanStatusDate Time `json:"loanStatusDate"` }
type OrderConfirmation ¶
type OrderInstruct ¶
type OrderInstruct struct { ID int `json:"orderInstructId"` OrderConfirmations []OrderConfirmation `json:"orderConfirmations"` }
type OrderSubmission ¶
type Summary ¶
type Summary struct { AvailableCash decimal.Decimal InvestorID int AccruedInterest decimal.Decimal OutstandingPrincipal decimal.Decimal AccountTotal decimal.Decimal TotalNotes int TotalPortfolios int InFundingBalance decimal.Decimal ReceivedInterest decimal.Decimal ReceivedPrincipal decimal.Decimal ReceivedLateFees decimal.Decimal }
type Time ¶
Time wraps time.Time to provide un/marshaling JSON functionality for lendingclub's time format.
func (Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type Transfer ¶
type Transfer struct { TransferID int `json:"transferId"` TransferDate Time `json:"transferDate"` Amount decimal.Decimal `json:"amount"` SourceAccount string `json:"sourceAccount"` Status string `json:"status"` Frequency string `json:"frequency"` EndDate Time `json:"endDate"` Operation string `json:"operation"` Cancellable bool `json:"cancellable"` }
Click to show internal directories.
Click to hide internal directories.