haven

package module
v0.0.0-...-60a2553 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for haven

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./haven"

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
DefaultApi CreateAccessToken Post /v1/tokens
DefaultApi CreateWebhook Post /v1/webhooks
DefaultApi DeleteAccount Delete /v1/accounts/{AccountId}
DefaultApi DeleteForUser Delete /v1/users/{EndUserId}
DefaultApi DeleteTransaction Delete /v1/transactions/{TransactionId}
DefaultApi DeleteWebhook Delete /v1/webhooks/{WebhookId}
DefaultApi GetAccountsForUser Get /v1/accounts/user/{EndUserId}
DefaultApi GetMerchant Get /v1/merchants/{MerchantId}
DefaultApi GetTransactions Get /v1/transactions/{EndUserId}
DefaultApi GetWebhooks Get /v1/webhooks
DefaultApi UpsertAccount Put /v1/accounts
DefaultApi UpsertBatchTransactions Post /v1/transactions/batch
DefaultApi UpsertOneTransaction Post /v1/transactions/online
DefaultApi UpsertUserAnnotation Post /v1/annotations/{TransactionId}

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	DefaultApi *DefaultApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Haven Money API API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AccountRequestWrapper

type AccountRequestWrapper struct {
	Account AccountUpdate `json:"account"`
}

type AccountSubType

type AccountSubType string
const (
	AUTO                             AccountSubType = "AUTO"
	BROKERAGE_UNSPECIFIED            AccountSubType = "BROKERAGE"
	CASH_ISA                         AccountSubType = "CASH_ISA"
	CASH_MANAGEMENT                  AccountSubType = "CASH_MANAGEMENT"
	CD                               AccountSubType = "CD"
	CHECKING                         AccountSubType = "CHECKING"
	COMMERCIAL                       AccountSubType = "COMMERCIAL"
	CONSTRUCTION                     AccountSubType = "CONSTRUCTION"
	CONSUMER                         AccountSubType = "CONSUMER"
	CREDIT_UNSPECIFIED               AccountSubType = "CREDIT"
	CREDIT_CARD_UNSPECIFIED          AccountSubType = "CREDIT_CARD"
	DEPOSITORY_UNSPECIFIED           AccountSubType = "DEPOSITORY"
	EDUCATION_SAVINGS_ACCOUNT        AccountSubType = "EDUCATION_SAVINGS_ACCOUNT"
	GIC                              AccountSubType = "GIC"
	HEALTH_REIMBURSEMENT_ARRANGEMENT AccountSubType = "HEALTH_REIMBURSEMENT_ARRANGEMENT"
	HOME                             AccountSubType = "HOME"
	HOME_EQUITY                      AccountSubType = "HOME_EQUITY"
	HSA                              AccountSubType = "HSA"
	IRA                              AccountSubType = "IRA"
	ISA                              AccountSubType = "ISA"
	KEOGH                            AccountSubType = "KEOGH"
	LIF                              AccountSubType = "LIF"
	LINE_OF_CREDIT                   AccountSubType = "LINE_OF_CREDIT"
	LIRA                             AccountSubType = "LIRA"
	LOAN_UNSPECIFIED                 AccountSubType = "LOAN"
	LRIF                             AccountSubType = "LRIF"
	LRSP                             AccountSubType = "LRSP"
	MONEY_MARKET                     AccountSubType = "MONEY_MARKET"
	MORTGAGE_UNSPECIFIED             AccountSubType = "MORTGAGE"
	MUTUAL_FUND                      AccountSubType = "MUTUAL_FUND"
	NON_TAXABLE_BROKERAGE_ACCOUNT    AccountSubType = "NON_TAXABLE_BROKERAGE_ACCOUNT"
	OTHER_UNSPECIFIED                AccountSubType = "OTHER"
	OVERDRAFT                        AccountSubType = "OVERDRAFT"
	PAYPAL                           AccountSubType = "PAYPAL"
	PENSION                          AccountSubType = "PENSION"
	PREPAID                          AccountSubType = "PREPAID"
	PRIF                             AccountSubType = "PRIF"
	PROFIT_SHARING_PLAN              AccountSubType = "PROFIT_SHARING_PLAN"
	RDSP                             AccountSubType = "RDSP"
	RECURRING                        AccountSubType = "RECURRING"
	RESP                             AccountSubType = "RESP"
	RETIREMENT                       AccountSubType = "RETIREMENT"
	REWARDS                          AccountSubType = "REWARDS"
	RLIF                             AccountSubType = "RLIF"
	ROTH                             AccountSubType = "ROTH"
	ROTH_401_K                       AccountSubType = "ROTH_401K"
	RRIF                             AccountSubType = "RRIF"
	RRSP                             AccountSubType = "RRSP"
	SAFE_DEPOSIT                     AccountSubType = "SAFE_DEPOSIT"
	SARSEP                           AccountSubType = "SARSEP"
	SAVINGS                          AccountSubType = "SAVINGS"
	SEP_IRA                          AccountSubType = "SEP_IRA"
	SIMPLE_IRA                       AccountSubType = "SIMPLE_IRA"
	SIPP                             AccountSubType = "SIPP"
	STOCK_PLAN                       AccountSubType = "STOCK_PLAN"
	STUDENT                          AccountSubType = "STUDENT"
	TFSA                             AccountSubType = "TFSA"
	THRIFT_SAVINGS_PLAN              AccountSubType = "THRIFT_SAVINGS_PLAN"
	T_401_A                          AccountSubType = "T_401A"
	T_401_K                          AccountSubType = "T_401K"
	T_403_B                          AccountSubType = "T_403B"
	T_457_B                          AccountSubType = "T_457B"
	T_529                            AccountSubType = "T_529"
	UGMA                             AccountSubType = "UGMA"
	UTMA                             AccountSubType = "UTMA"
	VARIABLE_ANNUITY                 AccountSubType = "VARIABLE_ANNUITY"
)

List of AccountSubType

type AccountType

type AccountType string
const (
	BROKERAGE  AccountType = "BROKERAGE"
	CREDIT     AccountType = "CREDIT"
	DEPOSITORY AccountType = "DEPOSITORY"
	LOAN       AccountType = "LOAN"
	OTHER      AccountType = "OTHER"
)

List of AccountType

type AccountUpdate

type AccountUpdate struct {
	Id                  string         `json:"id"`
	User                string         `json:"user"`
	DisplayName         string         `json:"displayName"`
	DisplayNameDetailed string         `json:"displayNameDetailed"`
	Institution         string         `json:"institution"`
	InstitutionName     string         `json:"institutionName"`
	AccountType         AccountType    `json:"accountType"`
	AccountSubType      AccountSubType `json:"accountSubType"`
	Balance             Balance        `json:"balance"`
	CreatedAt           time.Time      `json:"createdAt"`
	UpdatedAt           time.Time      `json:"updatedAt"`
}

type AddAnnotationRequest

type AddAnnotationRequest struct {
	Category              *CleanCategory    `json:"category,omitempty"`
	Memo                  *string           `json:"memo,omitempty"`
	ExcludeFromBreakdowns *bool             `json:"excludeFromBreakdowns,omitempty"`
	Bootstrap             BootstrapStrategy `json:"bootstrap"`
}

type AddAnnotationResponse

type AddAnnotationResponse struct {
	Transactions []CleanTransaction `json:"transactions"`
}

type Address

type Address struct {
	Line1       string   `json:"line1"`
	Line2       *string  `json:"line2,omitempty"`
	City        string   `json:"city"`
	State       string   `json:"state"`
	Zip         string   `json:"zip"`
	Coordinates *LatLong `json:"coordinates,omitempty"`
}

type ApiAccount

type ApiAccount struct {
	Id                  string             `json:"id"`
	User                string             `json:"user"`
	DisplayName         string             `json:"displayName"`
	DisplayNameDetailed string             `json:"displayNameDetailed"`
	Institution         string             `json:"institution"`
	InstitutionName     string             `json:"institutionName"`
	Colors              *InstitutionColors `json:"colors,omitempty"`
	AccountType         AccountType        `json:"accountType"`
	AccountSubType      AccountSubType     `json:"accountSubType"`
	Balance             Balance            `json:"balance"`
	CreatedAt           time.Time          `json:"createdAt"`
	UpdatedAt           time.Time          `json:"updatedAt"`
}

type BadRequestServiceError

type BadRequestServiceError struct {
	Message string `json:"message"`
}

type Balance

type Balance struct {
	Current   string  `json:"current"`
	Available *string `json:"available,omitempty"`
	Limit     *string `json:"limit,omitempty"`
}

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BootstrapStrategy

type BootstrapStrategy string
const (
	USER_EXACT    BootstrapStrategy = "user-exact"
	USER_FUZZY    BootstrapStrategy = "user-fuzzy"
	ACCOUNT_EXACT BootstrapStrategy = "account-exact"
	ACCOUNT_FUZZY BootstrapStrategy = "account-fuzzy"
	NONE          BootstrapStrategy = "none"
)

List of BootstrapStrategy

type CleanCategory

type CleanCategory string
const (
	ARTS                       CleanCategory = "Arts"
	MUSIC                      CleanCategory = "Music"
	MOVIES__TELEVISION         CleanCategory = "Movies & Television"
	NEWSPAPER__MAGAZINES       CleanCategory = "Newspaper & Magazines"
	OTHER_ENTERTAINMENT        CleanCategory = "Other Entertainment"
	THEATER                    CleanCategory = "Theater"
	GAMBLING                   CleanCategory = "Gambling"
	DEPOSIT                    CleanCategory = "Deposit"
	WITHDRAWAL                 CleanCategory = "Withdrawal"
	DIVIDENDS                  CleanCategory = "Dividends"
	BUY                        CleanCategory = "Buy"
	SELL                       CleanCategory = "Sell"
	OTHER_INVESTMENTS          CleanCategory = "Other Investments"
	GAS__FUEL                  CleanCategory = "Gas & Fuel"
	CAR_PARTS                  CleanCategory = "Car Parts"
	TOLL_FEE                   CleanCategory = "Toll Fee"
	PARKING                    CleanCategory = "Parking"
	TRAFFIC_TICKETS            CleanCategory = "Traffic Tickets"
	MAINTENANCE__REPAIRS       CleanCategory = "Maintenance & Repairs"
	AUTO_PAYMENT               CleanCategory = "Auto Payment"
	AUTO_INSURANCE             CleanCategory = "Auto Insurance"
	PUBLIC_TRANSPORTATION      CleanCategory = "Public Transportation"
	OTHER_CAR                  CleanCategory = "Other Car"
	TAXI                       CleanCategory = "Taxi"
	BOAT                       CleanCategory = "Boat"
	AIR_TRAVEL                 CleanCategory = "Air Travel"
	LODGING                    CleanCategory = "Lodging"
	RIDE_SHARE__RENTAL         CleanCategory = "Ride Share & Rental"
	OTHER_TRAVEL               CleanCategory = "Other Travel"
	ACCOUNT_MAINTENANCE        CleanCategory = "Account Maintenance"
	OVERDRAFT_FEE              CleanCategory = "Overdraft Fee"
	INSUFFICIENT_FUNDS_FEE     CleanCategory = "Insufficient Funds Fee"
	ATM_FEE                    CleanCategory = "ATM Fee"
	CHECK_ORDER_FEE            CleanCategory = "Check Order Fee"
	INTEREST_CHARGED_FEE       CleanCategory = "Interest Charged Fee"
	FOREIGN_TRANSACTION_FEE    CleanCategory = "Foreign Transaction Fee"
	WIRE_FEE                   CleanCategory = "Wire Fee"
	EXCESSIVE_TRANSACTIONS_FEE CleanCategory = "Excessive Transactions Fee"
	LATE_FEE                   CleanCategory = "Late Fee"
	CARD_MEMBERSHIP_FEE        CleanCategory = "Card Membership Fee"
	OTHER_FEE                  CleanCategory = "Other Fee"
	RENT                       CleanCategory = "Rent"
	MORTGAGE_CATEGORY          CleanCategory = "Mortgage"
	OTHER_HOUSING              CleanCategory = "Other Housing"
	RENT_REIMBURSEMENT         CleanCategory = "Rent Reimbursement"
	YARD__GARDEN               CleanCategory = "Yard & Garden"
	CREDIT_CARD_PAYMENT        CleanCategory = "Credit card payment"
	ATM_WITHDRAWALS            CleanCategory = "ATM Withdrawals"
	PREPAID_CARD_LOAD          CleanCategory = "Prepaid Card Load"
	INTERNAL_TRANSFER          CleanCategory = "Internal Transfer"
	EXTERNAL_TRANSFER          CleanCategory = "External Transfer"
	OTHER_TRANSFER             CleanCategory = "Other Transfer"
	LOAN_PAYMENT               CleanCategory = "Loan Payment"
	SERVICES                   CleanCategory = "Services"
	LEGAL_SERVICES             CleanCategory = "Legal Services"
	ACCOUNTING_SERVICES        CleanCategory = "Accounting Services"
	REAL_ESTATE_SERVICES       CleanCategory = "Real Estate Services"
	BUSINESS_SERVICES          CleanCategory = "Business Services"
	COMPUTER_SERVICES          CleanCategory = "Computer Services"
	ONLINE_SUBSCRIPTIONS       CleanCategory = "Online Subscriptions"
	FINANCIAL_SERVICES         CleanCategory = "Financial Services"
	CLEANING_SERVICES          CleanCategory = "Cleaning Services"
	INTERNET                   CleanCategory = "Internet"
	HOME_INSURANCE             CleanCategory = "Home Insurance"
	RENTERS_INSURANCE          CleanCategory = "Renter's Insurance"
	LIFE_INSURANCE             CleanCategory = "Life Insurance"
	OTHER_INSURANCE            CleanCategory = "Other Insurance"
	PHONE_BILL                 CleanCategory = "Phone Bill"
	UTILITIES                  CleanCategory = "Utilities"
	TV                         CleanCategory = "TV"
	OTHER_BILLS                CleanCategory = "Other Bills"
	PAYCHECK                   CleanCategory = "Paycheck"
	INTEREST                   CleanCategory = "Interest"
	REFUND                     CleanCategory = "Refund"
	REWARDS_CATEGORY           CleanCategory = "Rewards"
	REIMBURSEMENT              CleanCategory = "Reimbursement"
	OTHER_INCOME               CleanCategory = "Other Income"
	TUITION                    CleanCategory = "Tuition"
	STUDENT_LOAN               CleanCategory = "Student Loan"
	OTHER_EDUCATION            CleanCategory = "Other Education"
	HEALTH_INSURANCE           CleanCategory = "Health Insurance"
	GYM                        CleanCategory = "Gym"
	DENTIST                    CleanCategory = "Dentist"
	DOCTOR                     CleanCategory = "Doctor"
	PHARMACY                   CleanCategory = "Pharmacy"
	MEDICAL_LABS               CleanCategory = "Medical Labs"
	BARBER_AND_SALON           CleanCategory = "Barber and Salon"
	SPA                        CleanCategory = "Spa"
	NAIL_AND_SKIN              CleanCategory = "Nail and Skin"
	OTHER_HEALTH__FITNESS      CleanCategory = "Other Health & Fitness"
	GROCERIES                  CleanCategory = "Groceries"
	COFFEE                     CleanCategory = "Coffee"
	RESTAURANTS                CleanCategory = "Restaurants"
	ALCOHOL                    CleanCategory = "Alcohol"
	BARS__CLUBS                CleanCategory = "Bars & Clubs"
	OTHER_FOOD__DINING         CleanCategory = "Other Food & Dining"
	CLOTHES__APPAREL           CleanCategory = "Clothes & Apparel"
	SPORTING_GOODS             CleanCategory = "Sporting Goods"
	ELECTRONICS                CleanCategory = "Electronics"
	GAMES                      CleanCategory = "Games"
	TOBACCO__VAPING            CleanCategory = "Tobacco & Vaping"
	CANNABIS                   CleanCategory = "Cannabis"
	BEAUTY                     CleanCategory = "Beauty"
	BOOKS                      CleanCategory = "Books"
	BUSINESS_EQUIPMENT         CleanCategory = "Business Equipment"
	HOME_HARDWARE              CleanCategory = "Home Hardware"
	SHIPPING                   CleanCategory = "Shipping"
	SOFTWARE                   CleanCategory = "Software"
	GUNS__WEAPONS              CleanCategory = "Guns & Weapons"
	TAXES                      CleanCategory = "Taxes"
	GOVERNMENT_SERVICES        CleanCategory = "Government Services"
	FINES                      CleanCategory = "Fines"
	GIFTS__DONATIONS           CleanCategory = "Gifts & Donations"
	SHOPPING                   CleanCategory = "Shopping"
	OTHER_CATEGORY             CleanCategory = "Other"
	PETS                       CleanCategory = "Pets"
	CHILD_CARE                 CleanCategory = "Child Care"
)

List of CleanCategory

type CleanSingleTransactionRequest

type CleanSingleTransactionRequest struct {
	Transaction RawTransaction `json:"transaction"`
}

type CleanSingleTransactionResponse

type CleanSingleTransactionResponse struct {
	Transaction CleanTransaction `json:"transaction"`
}

type CleanTransaction

type CleanTransaction struct {
	Id                    string        `json:"id"`
	Account               string        `json:"account"`
	User                  string        `json:"user"`
	Memo                  string        `json:"memo"`
	RawMemo               string        `json:"rawMemo"`
	Network               *string       `json:"network,omitempty"`
	UserTransactedAt      *time.Time    `json:"userTransactedAt,omitempty"`
	Amount                string        `json:"amount"`
	Categories            []string      `json:"categories"`
	CleanCategory         CleanCategory `json:"cleanCategory"`
	Url                   *string       `json:"url,omitempty"`
	Image                 *string       `json:"image,omitempty"`
	BackgroundImage       *string       `json:"backgroundImage,omitempty"`
	ExcludeFromBreakdowns bool          `json:"excludeFromBreakdowns"`
	Merchant              *string       `json:"merchant,omitempty"`
	MerchantData          *Merchant     `json:"merchantData,omitempty"`
	MerchantAddress       *Address      `json:"merchantAddress,omitempty"`
	Historical            []string      `json:"historical"`
	Tags                  []string      `json:"tags"`
}

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type ConflictServiceError

type ConflictServiceError struct {
	Message string `json:"message"`
}

type CreateWebhookRequest

type CreateWebhookRequest struct {
	Callback      string                `json:"callback"`
	Subscriptions []WebhookSubscription `json:"subscriptions"`
}

type CreateWebhookResponse

type CreateWebhookResponse struct {
	Webhook Webhook `json:"webhook"`
}

type DefaultApiService

type DefaultApiService service

func (*DefaultApiService) CreateAccessToken

func (a *DefaultApiService) CreateAccessToken(ctx context.Context, tenantServiceAccountAgentLoginRequest TenantServiceAccountAgentLoginRequest) (TenantServiceAccountAgentLoginResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param tenantServiceAccountAgentLoginRequest

@return TenantServiceAccountAgentLoginResponse

func (*DefaultApiService) CreateWebhook

func (a *DefaultApiService) CreateWebhook(ctx context.Context, createWebhookRequest CreateWebhookRequest) (CreateWebhookResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createWebhookRequest

@return CreateWebhookResponse

func (*DefaultApiService) DeleteAccount

func (a *DefaultApiService) DeleteAccount(ctx context.Context, accountId string) (EmptyResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId

@return EmptyResponse

func (*DefaultApiService) DeleteForUser

func (a *DefaultApiService) DeleteForUser(ctx context.Context, endUserId string) (EmptyResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param endUserId

@return EmptyResponse

func (*DefaultApiService) DeleteTransaction

func (a *DefaultApiService) DeleteTransaction(ctx context.Context, transactionId string) (EmptyResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param transactionId

@return EmptyResponse

func (*DefaultApiService) DeleteWebhook

func (a *DefaultApiService) DeleteWebhook(ctx context.Context, webhookId string) (EmptyResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param webhookId

@return EmptyResponse

func (*DefaultApiService) GetAccountsForUser

func (a *DefaultApiService) GetAccountsForUser(ctx context.Context, endUserId string) (GetAccountsResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param endUserId

@return GetAccountsResponse

func (*DefaultApiService) GetMerchant

func (a *DefaultApiService) GetMerchant(ctx context.Context, merchantId string) (GetMerchantResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param merchantId

@return GetMerchantResponse

func (*DefaultApiService) GetTransactions

func (a *DefaultApiService) GetTransactions(ctx context.Context, endUserId string, localVarOptionals *GetTransactionsOpts) (GetTransactionsResponse, *http.Response, error)

func (*DefaultApiService) GetWebhooks

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetWebhooksResponse

func (*DefaultApiService) UpsertAccount

func (a *DefaultApiService) UpsertAccount(ctx context.Context, accountRequestWrapper AccountRequestWrapper) (EmptyResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountRequestWrapper

@return EmptyResponse

func (*DefaultApiService) UpsertBatchTransactions

func (a *DefaultApiService) UpsertBatchTransactions(ctx context.Context, uploadBatchTransactionsRequest UploadBatchTransactionsRequest) (EmptyResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param uploadBatchTransactionsRequest

@return EmptyResponse

func (*DefaultApiService) UpsertOneTransaction

func (a *DefaultApiService) UpsertOneTransaction(ctx context.Context, cleanSingleTransactionRequest CleanSingleTransactionRequest) (CleanSingleTransactionResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param cleanSingleTransactionRequest

@return CleanSingleTransactionResponse

func (*DefaultApiService) UpsertUserAnnotation

func (a *DefaultApiService) UpsertUserAnnotation(ctx context.Context, transactionId string, addAnnotationRequest AddAnnotationRequest) (AddAnnotationResponse, *http.Response, error)

DefaultApiService

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param transactionId
  • @param addAnnotationRequest

@return AddAnnotationResponse

type EmptyResponse

type EmptyResponse struct {
	A *int32 `json:"a,omitempty"`
}

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetAccountsResponse

type GetAccountsResponse struct {
	Accounts []ApiAccount `json:"accounts"`
}

type GetMerchantResponse

type GetMerchantResponse struct {
	Merchant *Merchant `json:"merchant,omitempty"`
}

type GetTransactionsOpts

type GetTransactionsOpts struct {
	HighWaterMark optional.String
	Limit         optional.Int32
}

type GetTransactionsResponse

type GetTransactionsResponse struct {
	Transactions  []CleanTransaction `json:"transactions"`
	HighWaterMark *string            `json:"highWaterMark,omitempty"`
}

type GetWebhooksResponse

type GetWebhooksResponse struct {
	Webhooks []Webhook `json:"webhooks"`
}

type InstitutionColors

type InstitutionColors struct {
	Dark    string `json:"dark"`
	Darker  string `json:"darker"`
	Light   string `json:"light"`
	Primary string `json:"primary"`
}

type LatLong

type LatLong struct {
	Latitude  float32 `json:"latitude"`
	Longitude float32 `json:"longitude"`
}

type Merchant

type Merchant struct {
	Name            string        `json:"name"`
	Address         *Address      `json:"address,omitempty"`
	Hours           *OpenHours    `json:"hours,omitempty"`
	Image           *string       `json:"image,omitempty"`
	BackgroundImage *string       `json:"backgroundImage,omitempty"`
	Category        CleanCategory `json:"category"`
	Phone           *string       `json:"phone,omitempty"`
	Url             *string       `json:"url,omitempty"`
	Facebook        *string       `json:"facebook,omitempty"`
	Twitter         *string       `json:"twitter,omitempty"`
	Instagram       *string       `json:"instagram,omitempty"`
	Yelp            *string       `json:"yelp,omitempty"`
}

type NotFoundServiceError

type NotFoundServiceError struct {
	Message string `json:"message"`
}

type OpenHours

type OpenHours struct {
	Description string `json:"description"`
}

type RawMerchant

type RawMerchant struct {
	Mid     *string  `json:"mid,omitempty"`
	Mcc     *string  `json:"mcc,omitempty"`
	Name    *string  `json:"name,omitempty"`
	Address *Address `json:"address,omitempty"`
}

type RawMerchantStore

type RawMerchantStore struct {
	Mid     *string  `json:"mid,omitempty"`
	Name    *string  `json:"name,omitempty"`
	Address *Address `json:"address,omitempty"`
}

type RawTransaction

type RawTransaction struct {
	Id               string            `json:"id"`
	Account          string            `json:"account"`
	User             string            `json:"user"`
	RawMemo          string            `json:"rawMemo"`
	Merchant         *RawMerchant      `json:"merchant,omitempty"`
	Store            *RawMerchantStore `json:"store,omitempty"`
	Network          *string           `json:"network,omitempty"`
	UserTransactedAt *time.Time        `json:"userTransactedAt,omitempty"`
	Amount           string            `json:"amount"`
	Categories       []string          `json:"categories"`
	Kind             string            `json:"kind"`
	State            TransactionState  `json:"state"`
	Tags             []string          `json:"tags"`
}

type ServiceError

type ServiceError struct {
	Message string `json:"message"`
}

type TenantServiceAccountAgentLoginRequest

type TenantServiceAccountAgentLoginRequest struct {
	Id     string `json:"id"`
	Secret string `json:"secret"`
}

type TenantServiceAccountAgentLoginResponse

type TenantServiceAccountAgentLoginResponse struct {
	Token  string    `json:"token"`
	Expiry time.Time `json:"expiry"`
}

type TokenSource

type TokenSource struct {
	Cfg    *Configuration
	Id     string
	Secret string
	// contains filtered or unexported fields
}

func (TokenSource) Token

func (tokenSource TokenSource) Token() (*oauth2.Token, error)

type TooManyRequestsServiceError

type TooManyRequestsServiceError struct {
	Message string `json:"message"`
}

type TransactionState

type TransactionState string
const (
	PENDING   TransactionState = "PENDING"
	COMPLETED TransactionState = "COMPLETED"
	REVERSED  TransactionState = "REVERSED"
	ERROR     TransactionState = "ERROR"
)

List of TransactionState

type UnauthorizedServiceError

type UnauthorizedServiceError struct {
	Message string `json:"message"`
}

type UncaughtExceptionServiceError

type UncaughtExceptionServiceError struct {
	Message string `json:"message"`
}

type UploadBatchTransactionsRequest

type UploadBatchTransactionsRequest struct {
	Transactions []RawTransaction `json:"transactions"`
}

type Webhook

type Webhook struct {
	Id       string `json:"id"`
	Callback string `json:"callback"`
	Secret   string `json:"secret"`
}

type WebhookSubscription

type WebhookSubscription string
const (
	TRANSACTIONS WebhookSubscription = "TRANSACTIONS"
	INSTITUTIONS WebhookSubscription = "INSTITUTIONS"
)

List of WebhookSubscription

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL