atrium

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a 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 {

	// API Services
	Accounts      *AccountsApiService
	ConnectWidget *ConnectWidgetApiService
	Holdings      *HoldingsApiService
	Identity      *IdentityApiService
	Institutions  *InstitutionsApiService
	Members       *MembersApiService
	Merchants     *MerchantsApiService
	Statements    *StatementsApiService
	Transactions  *TransactionsApiService
	Users         *UsersApiService
	Verification  *VerificationApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the MX API API v0.1 In most cases there should be only one, shared, APIClient.

func AtriumClient

func AtriumClient(apiKey, clientId string) *APIClient

func AtriumClientWithConfiguration

func AtriumClientWithConfiguration(apiKey, clientId string, config *Configuration) *APIClient

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      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 Account

type Account struct {
	AccountNumber      string  `json:"account_number,omitempty"`
	Apr                float32 `json:"apr,omitempty"`
	Apy                float32 `json:"apy,omitempty"`
	AvailableBalance   float32 `json:"available_balance,omitempty"`
	AvailableCredit    float32 `json:"available_credit,omitempty"`
	Balance            float32 `json:"balance,omitempty"`
	CashBalance        float32 `json:"cash_balance,omitempty"`
	CashSurrenderValue float32 `json:"cash_surrender_value,omitempty"`
	CreatedAt          string  `json:"created_at,omitempty"`
	CreditLimit        float32 `json:"credit_limit,omitempty"`
	CurrencyCode       string  `json:"currency_code,omitempty"`
	DayPaymentIsDue    int32   `json:"day_payment_is_due,omitempty"`
	DeathBenefit       float32 `json:"death_benefit,omitempty"`
	GUID               string  `json:"guid,omitempty"`
	HoldingsValue      float32 `json:"holdings_value,omitempty"`
	InstitutionCode    string  `json:"institution_code,omitempty"`
	InterestRate       float32 `json:"interest_rate,omitempty"`
	IsClosed           bool    `json:"is_closed,omitempty"`
	LastPayment        float32 `json:"last_payment,omitempty"`
	LoanAmount         float32 `json:"loan_amount,omitempty"`
	MaturesOn          string  `json:"matures_on,omitempty"`
	MemberGUID         string  `json:"member_guid,omitempty"`
	MinimumBalance     float32 `json:"minimum_balance,omitempty"`
	MinimumPayment     float32 `json:"minimum_payment,omitempty"`
	Name               string  `json:"name,omitempty"`
	OriginalBalance    float32 `json:"original_balance,omitempty"`
	PaymentDueAt       string  `json:"payment_due_at,omitempty"`
	PayoffBalance      float32 `json:"payoff_balance,omitempty"`
	StartedOn          string  `json:"started_on,omitempty"`
	Subtype            string  `json:"subtype,omitempty"`
	TotalAccountValue  float32 `json:"total_account_value,omitempty"`
	Type_              string  `json:"type,omitempty"`
	UpdatedAt          string  `json:"updated_at,omitempty"`
	UserGUID           string  `json:"user_guid,omitempty"`
}

type AccountNumber

type AccountNumber struct {
	AccountGUID   string `json:"account_guid,omitempty"`
	AccountNumber string `json:"account_number,omitempty"`
	MemberGUID    string `json:"member_guid,omitempty"`
	RoutingNumber string `json:"routing_number,omitempty"`
	UserGUID      string `json:"user_guid,omitempty"`
}

type AccountNumbersResponseBody

type AccountNumbersResponseBody struct {
	AccountNumbers []AccountNumber `json:"account_numbers,omitempty"`
}

type AccountOwner

type AccountOwner struct {
	AccountGUID string `json:"account_guid,omitempty"`
	Address     string `json:"address,omitempty"`
	City        string `json:"city,omitempty"`
	Country     string `json:"country,omitempty"`
	Email       string `json:"email,omitempty"`
	GUID        string `json:"guid,omitempty"`
	MemberGUID  string `json:"member_guid,omitempty"`
	OwnerName   string `json:"owner_name,omitempty"`
	PostalCode  string `json:"postal_code,omitempty"`
	State       string `json:"state,omitempty"`
	UserGUID    string `json:"user_guid,omitempty"`
}

type AccountOwnersResponseBody

type AccountOwnersResponseBody struct {
	AccountOwners []AccountOwner `json:"account_owners,omitempty"`
}

type AccountResponseBody

type AccountResponseBody struct {
	Account *Account `json:"account,omitempty"`
}

type AccountsApiService

type AccountsApiService service

func (*AccountsApiService) ListAccountTransactions

func (a *AccountsApiService) ListAccountTransactions(ctx context.Context, accountGUID string, userGUID string, localVarOptionals *ListAccountTransactionsOpts) (TransactionsResponseBody, *http.Response, error)

func (*AccountsApiService) ListUserAccounts

func (a *AccountsApiService) ListUserAccounts(ctx context.Context, userGUID string, localVarOptionals *ListUserAccountsOpts) (AccountsResponseBody, *http.Response, error)

func (*AccountsApiService) ReadAccount

func (a *AccountsApiService) ReadAccount(ctx context.Context, accountGUID string, userGUID string) (AccountResponseBody, *http.Response, error)

AccountsApiService Read an account Reading an account allows you to get information about a specific account that belongs to a user. That includes the account type — e.g., CHECKING, MONEY_MARKET, or PROPERTY — the balance, the date the account was started, and much more.<br> There are two endpoints for reading an account. Both will return the same information.<br> It's important to remember that balance and available_balance will normally be positive numbers — for all account types. But this should be interpreted differently for debt accounts and asset accounts.<br> An asset account, e.g., CHECKING, SAVINGS, or INVESTMENT, will have a positive balance unless it is in an overdraft condition, in which case the balance will be negative.<br> On the other hand, a debt account, e.g., CREDIT CARD, LOAN, MORTGAGE, would have a positivebalance when the user owes money on the account. It would have a negative balance if the account has been overpaid.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountGUID The unique identifier for an `account`.
  • @param userGUID The unique identifier for a `user`.

@return AccountResponseBody

func (*AccountsApiService) ReadAccountByMemberGUID

func (a *AccountsApiService) ReadAccountByMemberGUID(ctx context.Context, accountGUID string, memberGUID string, userGUID string) (AccountResponseBody, *http.Response, error)

AccountsApiService Read an account Reading an account allows you to get information about a specific account that belongs to a user. That includes the account type — e.g., CHECKING, MONEY_MARKET, or PROPERTY — the balance, the date the account was started, and much more.<br> There are two endpoints for reading an account. Both will return the same information.<br> It's important to remember that balance and available_balance will normally be positive numbers — for all account types. But this should be interpreted differently for debt accounts and asset accounts.<br> An asset account, e.g., CHECKING, SAVINGS, or INVESTMENT, will have a positive balance unless it is in an overdraft condition, in which case the balance will be negative.<br> On the other hand, a debt account, e.g., CREDIT CARD, LOAN, MORTGAGE, would have a positivebalance when the user owes money on the account. It would have a negative balance if the account has been overpaid.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountGUID The unique identifier for an `account`.
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return AccountResponseBody

type AccountsResponseBody

type AccountsResponseBody struct {
	Accounts   []Account   `json:"accounts,omitempty"`
	Pagination *Pagination `json:"pagination,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 Challenge

type Challenge struct {
	FieldName    string                 `json:"field_name,omitempty"`
	GUID         string                 `json:"guid,omitempty"`
	ImageData    string                 `json:"image_data,omitempty"`
	ImageOptions []ChallengeImageOption `json:"image_options,omitempty"`
	Label        string                 `json:"label,omitempty"`
	Options      []ChallengeOption      `json:"options,omitempty"`
	Type_        string                 `json:"type,omitempty"`
}

type ChallengeImageOption

type ChallengeImageOption struct {
	DataUri string `json:"data_uri,omitempty"`
	Label   string `json:"label,omitempty"`
	Value   string `json:"value,omitempty"`
}

type ChallengeOption

type ChallengeOption struct {
	Label string `json:"label,omitempty"`
	Value string `json:"value,omitempty"`
}

type ChallengesResponseBody

type ChallengesResponseBody struct {
	Challenges []Challenge `json:"challenges,omitempty"`
}

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 ConnectWidget

type ConnectWidget struct {
	ConnectWidgetURL string `json:"connect_widget_url,omitempty"`
	GUID             string `json:"guid,omitempty"`
}

type ConnectWidgetApiService

type ConnectWidgetApiService service

func (*ConnectWidgetApiService) GetConnectWidget

ConnectWidgetApiService Embedding in a website This endpoint will return a URL for an embeddable version of MX Connect.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userGUID The unique identifier for a `user`.
  • @param body Optional config options for WebView (is_mobile_webview, current_institution_code, current_member_guid, update_credentials)

@return ConnectWidgetResponseBody

type ConnectWidgetRequestBody

type ConnectWidgetRequestBody struct {
	IsMobileWebview          bool    `json:"is_mobile_webview,omitempty"`
	CurrentInstitutionCode   string  `json:"current_institution_code,omitempty"`
	CurrentMemberGUID        string  `json:"current_member_guid,omitempty"`
	DisableInstitutionSearch bool    `json:"disable_institution_search,omitempty"`
	Mode                     string  `json:"mode,omitempty"`
	UiMessageVersion         float32 `json:"ui_message_version,omitempty"`
	UpdateCredentials        bool    `json:"update_credentials,omitempty"`
	WaitForFullAggregation   bool    `json:"wait_for_full_aggregation,omitempty"`
}

type ConnectWidgetResponseBody

type ConnectWidgetResponseBody struct {
	User *ConnectWidget `json:"user,omitempty"`
}

type CredentialOption

type CredentialOption struct {
	Label string `json:"label,omitempty"`
	Value string `json:"value,omitempty"`
}

type CredentialRequest

type CredentialRequest struct {
	GUID  string `json:"guid,omitempty"`
	Value string `json:"value,omitempty"`
}

type CredentialResponse

type CredentialResponse struct {
	FieldName string             `json:"field_name,omitempty"`
	GUID      string             `json:"guid,omitempty"`
	Label     string             `json:"label,omitempty"`
	Options   []CredentialOption `json:"options,omitempty"`
	Type_     string             `json:"type,omitempty"`
}

type CredentialsResponseBody

type CredentialsResponseBody struct {
	Credentials []CredentialResponse `json:"credentials,omitempty"`
}

type GenericError

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

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

func (GenericError) Body

func (e GenericError) Body() []byte

Body returns the raw bytes of the response

func (GenericError) Error

func (e GenericError) Error() string

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

func (GenericError) Model

func (e GenericError) Model() interface{}

Model returns the unpacked model of the error

type Holding

type Holding struct {
	AccountGUID   string  `json:"account_guid,omitempty"`
	CostBasis     float32 `json:"cost_basis,omitempty"`
	CreatedAt     string  `json:"created_at,omitempty"`
	CurrencyCode  string  `json:"currency_code,omitempty"`
	Cusip         string  `json:"cusip,omitempty"`
	DailyChange   float32 `json:"daily_change,omitempty"`
	Description   string  `json:"description,omitempty"`
	GUID          string  `json:"guid,omitempty"`
	HoldingType   string  `json:"holding_type,omitempty"`
	MarketValue   float32 `json:"market_value,omitempty"`
	MemberGUID    string  `json:"member_guid,omitempty"`
	PurchasePrice float32 `json:"purchase_price,omitempty"`
	Shares        float32 `json:"shares,omitempty"`
	Symbol        string  `json:"symbol,omitempty"`
	UpdatedAt     string  `json:"updated_at,omitempty"`
	UserGUID      string  `json:"user_guid,omitempty"`
}

type HoldingResponseBody

type HoldingResponseBody struct {
	Holding *Holding `json:"holding,omitempty"`
}

type HoldingsApiService

type HoldingsApiService service

func (*HoldingsApiService) ListHoldings

func (a *HoldingsApiService) ListHoldings(ctx context.Context, userGUID string) (HoldingsResponseBody, *http.Response, error)

HoldingsApiService List holdings Use this endpoint to read all holdings associated with a specific user.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userGUID The unique identifier for a `user`.

@return HoldingsResponseBody

func (*HoldingsApiService) ListHoldingsByAccount

func (a *HoldingsApiService) ListHoldingsByAccount(ctx context.Context, accountGUID string, userGUID string) (HoldingsResponseBody, *http.Response, error)

HoldingsApiService List holdings by account Use this endpoint to read all holdings associated with a specific account.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountGUID The unique identifier for an `account`.
  • @param userGUID The unique identifier for a `user`.

@return HoldingsResponseBody

func (*HoldingsApiService) ListHoldingsByMember

func (a *HoldingsApiService) ListHoldingsByMember(ctx context.Context, memberGUID string, userGUID string) (HoldingsResponseBody, *http.Response, error)

HoldingsApiService List holdings by member Use this endpoint to read all holdings associated with a specific member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return HoldingsResponseBody

func (*HoldingsApiService) ReadHolding

func (a *HoldingsApiService) ReadHolding(ctx context.Context, holdingGUID string, userGUID string) (HoldingResponseBody, *http.Response, error)

HoldingsApiService Read holding Use this endpoint to read the attributes of a specific holding.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param holdingGUID The unique identifier for a `holding`.
  • @param userGUID The unique identifier for a `user`.

@return HoldingResponseBody

type HoldingsResponseBody

type HoldingsResponseBody struct {
	Holdings   []Holding   `json:"holdings,omitempty"`
	Pagination *Pagination `json:"pagination,omitempty"`
}

type IdentityApiService

type IdentityApiService service

func (*IdentityApiService) IdentifyMember

func (a *IdentityApiService) IdentifyMember(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

IdentityApiService Identify The identify endpoint begins an identification process for an already-existing member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

func (*IdentityApiService) ListAccountOwners

func (a *IdentityApiService) ListAccountOwners(ctx context.Context, memberGUID string, userGUID string) (AccountOwnersResponseBody, *http.Response, error)

IdentityApiService List member account owners This endpoint returns an array with information about every account associated with a particular member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return AccountOwnersResponseBody

type Institution

type Institution struct {
	Code                          string `json:"code,omitempty"`
	MediumLogoURL                 string `json:"medium_logo_url,omitempty"`
	Name                          string `json:"name,omitempty"`
	SmallLogoURL                  string `json:"small_logo_url,omitempty"`
	SupportsAccountIdentification bool   `json:"supports_account_identification,omitempty"`
	SupportsAccountStatement      bool   `json:"supports_account_statement,omitempty"`
	SupportsAccountVerification   bool   `json:"supports_account_verification,omitempty"`
	SupportsTransactionHistory    bool   `json:"supports_transaction_history,omitempty"`
	URL                           string `json:"url,omitempty"`
}

type InstitutionResponseBody

type InstitutionResponseBody struct {
	Institution *Institution `json:"institution,omitempty"`
}

type InstitutionsApiService

type InstitutionsApiService service

func (*InstitutionsApiService) ListInstitutions

func (a *InstitutionsApiService) ListInstitutions(ctx context.Context, localVarOptionals *ListInstitutionsOpts) (InstitutionsResponseBody, *http.Response, error)

func (*InstitutionsApiService) ReadInstitution

func (a *InstitutionsApiService) ReadInstitution(ctx context.Context, institutionCode string) (InstitutionResponseBody, *http.Response, error)

InstitutionsApiService Read institution This endpoint allows you to see information for a specific institution.

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

@return InstitutionResponseBody

func (*InstitutionsApiService) ReadInstitutionCredentials

func (a *InstitutionsApiService) ReadInstitutionCredentials(ctx context.Context, institutionCode string) (CredentialsResponseBody, *http.Response, error)

InstitutionsApiService Read institution credentials Use this endpoint to see which credentials will be needed to create a member for a specific institution.

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

@return CredentialsResponseBody

type InstitutionsResponseBody

type InstitutionsResponseBody struct {
	Institutions []Institution `json:"institutions,omitempty"`
	Pagination   *Pagination   `json:"pagination,omitempty"`
}

type ListAccountTransactionsOpts

type ListAccountTransactionsOpts struct {
	FromDate       optional.String
	ToDate         optional.String
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type ListInstitutionsOpts

type ListInstitutionsOpts struct {
	Name                          optional.String
	Page                          optional.Int32
	RecordsPerPage                optional.Int32
	SupportsAccountIdentification optional.Bool
	SupportsAccountStatement      optional.Bool
	SupportsAccountVerification   optional.Bool
	SupportsTransactionHistory    optional.Bool
}

type ListMemberAccountsOpts

type ListMemberAccountsOpts struct {
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type ListMemberStatementsOpts

type ListMemberStatementsOpts struct {
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type ListMemberTransactionsOpts

type ListMemberTransactionsOpts struct {
	FromDate       optional.String
	ToDate         optional.String
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type ListMembersOpts

type ListMembersOpts struct {
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type ListUserAccountsOpts

type ListUserAccountsOpts struct {
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type ListUserTransactionsOpts

type ListUserTransactionsOpts struct {
	Page           optional.Int32
	FromDate       optional.String
	RecordsPerPage optional.Int32
	ToDate         optional.String
}

type ListUsersOpts

type ListUsersOpts struct {
	Page           optional.Int32
	RecordsPerPage optional.Int32
}

type Member

type Member struct {
	AggregatedAt             string `json:"aggregated_at,omitempty"`
	ConnectionStatus         string `json:"connection_status,omitempty"`
	GUID                     string `json:"guid,omitempty"`
	Identifier               string `json:"identifier,omitempty"`
	InstitutionCode          string `json:"institution_code,omitempty"`
	IsBeingAggregated        bool   `json:"is_being_aggregated,omitempty"`
	Metadata                 string `json:"metadata,omitempty"`
	Name                     string `json:"name,omitempty"`
	Status                   string `json:"status,omitempty"`
	SuccessfullyAggregatedAt string `json:"successfully_aggregated_at,omitempty"`
	UserGUID                 string `json:"user_guid,omitempty"`
}

type MemberConnectionStatus

type MemberConnectionStatus struct {
	AggregatedAt             string      `json:"aggregated_at,omitempty"`
	Challenges               []Challenge `json:"challenges,omitempty"`
	ConnectionStatus         string      `json:"connection_status,omitempty"`
	GUID                     string      `json:"guid,omitempty"`
	HasProcessedAccounts     bool        `json:"has_processed_accounts,omitempty"`
	HasProcessedTransactions bool        `json:"has_processed_transactions,omitempty"`
	IsAuthenticated          bool        `json:"is_authenticated,omitempty"`
	IsBeingAggregated        bool        `json:"is_being_aggregated,omitempty"`
	Status                   string      `json:"status,omitempty"`
	SuccessfullyAggregatedAt string      `json:"successfully_aggregated_at,omitempty"`
}

type MemberConnectionStatusResponseBody

type MemberConnectionStatusResponseBody struct {
	Member *MemberConnectionStatus `json:"member,omitempty"`
}

type MemberCreateRequest

type MemberCreateRequest struct {
	Credentials     []CredentialRequest `json:"credentials"`
	Identifier      string              `json:"identifier,omitempty"`
	InstitutionCode string              `json:"institution_code"`
	Metadata        string              `json:"metadata,omitempty"`
	SkipAggregation bool                `json:"skip_aggregation,omitempty"`
}

type MemberCreateRequestBody

type MemberCreateRequestBody struct {
	Member *MemberCreateRequest `json:"member,omitempty"`
}

type MemberResponseBody

type MemberResponseBody struct {
	Member *Member `json:"member,omitempty"`
}

type MemberResumeRequest

type MemberResumeRequest struct {
	Challenges []CredentialRequest `json:"challenges,omitempty"`
}

type MemberResumeRequestBody

type MemberResumeRequestBody struct {
	Member *MemberResumeRequest `json:"member,omitempty"`
}

type MemberUpdateRequest

type MemberUpdateRequest struct {
	Credentials []CredentialRequest `json:"credentials,omitempty"`
	Identifier  string              `json:"identifier,omitempty"`
	Metadata    string              `json:"metadata,omitempty"`
}

type MemberUpdateRequestBody

type MemberUpdateRequestBody struct {
	Member *MemberUpdateRequest `json:"member,omitempty"`
}

type MembersApiService

type MembersApiService service

func (*MembersApiService) AggregateMember

func (a *MembersApiService) AggregateMember(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

MembersApiService Aggregate member Calling this endpoint initiates an aggregation event for the member. This brings in the latest account and transaction data from the connected institution. If this data has recently been updated, MX may not initiate an aggregation event.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

func (*MembersApiService) AggregateMemberBalances

func (a *MembersApiService) AggregateMemberBalances(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

MembersApiService Aggregate member account balances This endpoint operates much like the _aggregate member_ endpoint except that it gathers only account balance information; it does not gather any transaction data at all.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

func (*MembersApiService) CreateMember

MembersApiService Create member This endpoint allows you to create a new member. Members are created with the required parameters credentials and institution_code, and the optional parameters identifier and metadata.<br> When creating a member, you'll need to include the correct type of credential required by the financial institution and provided by the user. You can find out which credential type is required with the /institutions/{institution_code}/credentials endpoint.<br> If successful, Atrium will respond with the newly-created member object.<br> Once you successfully create a member, MX will immediately validate the provided credentials and attempt to aggregate data for accounts and transactions.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userGUID The unique identifier for a `user`.
  • @param body Member object to be created with optional parameters (identifier and metadata) and required parameters (credentials and institution_code)

@return MemberResponseBody

func (*MembersApiService) DeleteMember

func (a *MembersApiService) DeleteMember(ctx context.Context, memberGUID string, userGUID string) (*http.Response, error)

MembersApiService Delete member Accessing this endpoint will permanently delete a member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

func (*MembersApiService) ExtendHistory

func (a *MembersApiService) ExtendHistory(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

MembersApiService Extend history The extend_history endpoint begins the process of fetching up to 24 months of data associated with a particular `member`.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

func (*MembersApiService) ListMemberAccounts

func (a *MembersApiService) ListMemberAccounts(ctx context.Context, memberGUID string, userGUID string, localVarOptionals *ListMemberAccountsOpts) (AccountsResponseBody, *http.Response, error)

func (*MembersApiService) ListMemberCredentials

func (a *MembersApiService) ListMemberCredentials(ctx context.Context, memberGUID string, userGUID string) (CredentialsResponseBody, *http.Response, error)

MembersApiService List member credentials This endpoint returns an array which contains information on every non-MFA credential associated with a specific member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return CredentialsResponseBody

func (*MembersApiService) ListMemberMFAChallenges

func (a *MembersApiService) ListMemberMFAChallenges(ctx context.Context, memberGUID string, userGUID string) (ChallengesResponseBody, *http.Response, error)

MembersApiService List member MFA challenges Use this endpoint for information on what multi-factor authentication challenges need to be answered in order to aggregate a member.<br> If the aggregation is not challenged, i.e., the member does not have a connection status of CHALLENGED, then code 204 No Content will be returned.<br> If the aggregation has been challenged, i.e., the member does have a connection status of CHALLENGED, then code 200 OK will be returned — along with the corresponding credentials.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return ChallengesResponseBody

func (*MembersApiService) ListMemberTransactions

func (a *MembersApiService) ListMemberTransactions(ctx context.Context, memberGUID string, userGUID string, localVarOptionals *ListMemberTransactionsOpts) (TransactionsResponseBody, *http.Response, error)

func (*MembersApiService) ListMembers

func (a *MembersApiService) ListMembers(ctx context.Context, userGUID string, localVarOptionals *ListMembersOpts) (MembersResponseBody, *http.Response, error)

func (*MembersApiService) ReadMember

func (a *MembersApiService) ReadMember(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

MembersApiService Read member Use this endpoint to read the attributes of a specific member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

func (*MembersApiService) ReadMemberStatus

func (a *MembersApiService) ReadMemberStatus(ctx context.Context, memberGUID string, userGUID string) (MemberConnectionStatusResponseBody, *http.Response, error)

MembersApiService Read member connection status This endpoint provides the status of the member's most recent aggregation event. This is an important step in the aggregation process, and the results returned by this endpoint should determine what you do next in order to successfully aggregate a member.<br> MX has introduced new, more detailed information on the current status of a member's connection to a financial institution and the state of its aggregation: the connection_status field. These are intended to replace and expand upon the information provided in the status field, which will soon be deprecated; support for the status field remains for the time being.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberConnectionStatusResponseBody

func (*MembersApiService) ResumeMember

func (a *MembersApiService) ResumeMember(ctx context.Context, memberGUID string, userGUID string, body MemberResumeRequestBody) (MemberResponseBody, *http.Response, error)

MembersApiService Resume aggregation from MFA This endpoint answers the challenges needed when a member has been challenged by multi-factor authentication.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.
  • @param body Member object with MFA challenge answers

@return MemberResponseBody

func (*MembersApiService) UpdateMember

func (a *MembersApiService) UpdateMember(ctx context.Context, memberGUID string, userGUID string, localVarOptionals *UpdateMemberOpts) (MemberResponseBody, *http.Response, error)

type MembersResponseBody

type MembersResponseBody struct {
	Members    []Member    `json:"members,omitempty"`
	Pagination *Pagination `json:"pagination,omitempty"`
}

type Merchant

type Merchant struct {
	CreatedAt  string `json:"created_at,omitempty"`
	GUID       string `json:"guid,omitempty"`
	LogoURL    string `json:"logo_url,omitempty"`
	Name       string `json:"name,omitempty"`
	UpdatedAt  string `json:"updated_at,omitempty"`
	WebsiteURL string `json:"website_url,omitempty"`
}

type MerchantResponseBody

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

type MerchantsApiService

type MerchantsApiService service

func (*MerchantsApiService) ReadMerchant

func (a *MerchantsApiService) ReadMerchant(ctx context.Context, merchantGUID string) (MerchantResponseBody, *http.Response, error)

MerchantsApiService Read merchant Returns information about a particular merchant, such as a logo, name, and website.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param merchantGUID The unique identifier for a `merchant`.

@return MerchantResponseBody

type Pagination

type Pagination struct {
	CurrentPage  int32 `json:"current_page,omitempty"`
	PerPage      int32 `json:"per_page,omitempty"`
	TotalEntries int32 `json:"total_entries,omitempty"`
	TotalPages   int32 `json:"total_pages,omitempty"`
}

type Statement

type Statement struct {
	// The unique identifier for the `account` associated with the `statement`. Defined by MX.
	AccountGUID string `json:"account_guid,omitempty"`
	// SHA256 digest of the pdf payload
	ContentHash string `json:"content_hash,omitempty"`
	// The date and time the `statement` was created.
	CreatedAt string `json:"created_at,omitempty"`
	// The unique identifier for the `statement`. Defined by MX.
	GUID string `json:"guid,omitempty"`
	// The unique identifier for the `member` associated with the `statement`.  Defined by MX.
	MemberGUID string `json:"member_guid,omitempty"`
	// A URI for accessing the byte payload of the `statement`.
	Uri string `json:"uri,omitempty"`
	// The unique identifier for the `user` associated with the `statement`.  Defined by MX.
	UserGUID string `json:"user_guid,omitempty"`
	// The date and time at which the `statement` was last updated.
	UpdatedAt string `json:"updated_at,omitempty"`
}

type StatementResponseBody

type StatementResponseBody struct {
	User *Statement `json:"user,omitempty"`
}

type StatementsApiService

type StatementsApiService service

func (*StatementsApiService) DownloadStatementPdf

func (a *StatementsApiService) DownloadStatementPdf(ctx context.Context, memberGUID string, userGUID string, statementGUID string) (*os.File, *http.Response, error)

StatementsApiService Download statement PDF Use this endpoint to download a specified statement. The endpoint URL is the same as the URI given in each `statement` object.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.
  • @param statementGUID The unique identifier for an `statement`.

@return *os.File

func (*StatementsApiService) FetchStatements

func (a *StatementsApiService) FetchStatements(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

StatementsApiService Fetch statements The fetch statements endpoint begins fetching statements for a member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

func (*StatementsApiService) ListMemberStatements

func (a *StatementsApiService) ListMemberStatements(ctx context.Context, memberGUID string, userGUID string, localVarOptionals *ListMemberStatementsOpts) (StatementsResponseBody, *http.Response, error)

func (*StatementsApiService) ReadMemberStatement

func (a *StatementsApiService) ReadMemberStatement(ctx context.Context, memberGUID string, userGUID string, statementGUID string) (StatementResponseBody, *http.Response, error)

StatementsApiService Read statement JSON Use this endpoint to download a specified statement. The endpoint URL is the same as the URI given in each `statement` object.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.
  • @param statementGUID The unique identifier for an `statement`.

@return StatementResponseBody

type StatementsResponseBody

type StatementsResponseBody struct {
	Statements []Statement `json:"statements,omitempty"`
	Pagination *Pagination `json:"pagination,omitempty"`
}

type Transaction

type Transaction struct {
	AccountGUID          string  `json:"account_guid,omitempty"`
	Amount               float32 `json:"amount,omitempty"`
	Category             string  `json:"category,omitempty"`
	CheckNumber          int32   `json:"check_number,omitempty"`
	CheckNumberString    string  `json:"check_number_string,omitempty"`
	CreatedAt            string  `json:"created_at,omitempty"`
	CurrencyCode         string  `json:"currency_code,omitempty"`
	Date                 string  `json:"date,omitempty"`
	Description          string  `json:"description,omitempty"`
	GUID                 string  `json:"guid,omitempty"`
	IsBillPay            bool    `json:"is_bill_pay,omitempty"`
	IsDirectDeposit      bool    `json:"is_direct_deposit,omitempty"`
	IsExpense            bool    `json:"is_expense,omitempty"`
	IsFee                bool    `json:"is_fee,omitempty"`
	IsIncome             bool    `json:"is_income,omitempty"`
	IsInternational      bool    `json:"is_international,omitempty"`
	IsOverdraftFee       bool    `json:"is_overdraft_fee,omitempty"`
	IsPayrollAdvance     bool    `json:"is_payroll_advance,omitempty"`
	Latitude             float32 `json:"latitude,omitempty"`
	Longitude            float32 `json:"longitude,omitempty"`
	MemberGUID           string  `json:"member_guid,omitempty"`
	Memo                 string  `json:"memo,omitempty"`
	MerchantCategoryCode int32   `json:"merchant_category_code,omitempty"`
	MerchantGUID         string  `json:"merchant_guid,omitempty"`
	OriginalDescription  string  `json:"original_description,omitempty"`
	PostedAt             string  `json:"posted_at,omitempty"`
	Status               string  `json:"status,omitempty"`
	TopLevelCategory     string  `json:"top_level_category,omitempty"`
	TransactedAt         string  `json:"transacted_at,omitempty"`
	Type_                string  `json:"type,omitempty"`
	UpdatedAt            string  `json:"updated_at,omitempty"`
	UserGUID             string  `json:"user_guid,omitempty"`
}

type TransactionCleanseAndCategorizeRequest

type TransactionCleanseAndCategorizeRequest struct {
	Amount               float32 `json:"amount,omitempty"`
	Description          string  `json:"description,omitempty"`
	Identifier           string  `json:"identifier,omitempty"`
	MerchantCategoryCode float32 `json:"merchant_category_code,omitempty"`
	Type_                string  `json:"type,omitempty"`
}

type TransactionCleanseAndCategorizeResponse

type TransactionCleanseAndCategorizeResponse struct {
	Amount               float32 `json:"amount,omitempty"`
	Category             string  `json:"category,omitempty"`
	Description          string  `json:"description,omitempty"`
	Identifier           string  `json:"identifier,omitempty"`
	Type_                string  `json:"type,omitempty"`
	IsBillPay            bool    `json:"is_bill_pay,omitempty"`
	IsDirectDeposit      bool    `json:"is_direct_deposit,omitempty"`
	IsExpense            bool    `json:"is_expense,omitempty"`
	IsFee                bool    `json:"is_fee,omitempty"`
	IsIncome             bool    `json:"is_income,omitempty"`
	IsInternational      bool    `json:"is_international,omitempty"`
	IsOverdraftFee       bool    `json:"is_overdraft_fee,omitempty"`
	IsPayrollAdvance     bool    `json:"is_payroll_advance,omitempty"`
	MerchantCategoryCode float32 `json:"merchant_category_code,omitempty"`
	MerchantGUID         string  `json:"merchant_guid,omitempty"`
	OriginalDescription  string  `json:"original_description,omitempty"`
}

type TransactionResponseBody

type TransactionResponseBody struct {
	Transaction *Transaction `json:"transaction,omitempty"`
}

type TransactionsApiService

type TransactionsApiService service

func (*TransactionsApiService) CleanseAndCategorizeTransactions

TransactionsApiService Categorize transactions Use this endpoint to categorize, cleanse, and classify transactions. These transactions are not persisted or stored on the MX platform.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body User object to be created with optional parameters (amount, type) amd required parameters (description, identifier)

@return TransactionsCleanseAndCategorizeResponseBody

func (*TransactionsApiService) ListUserTransactions

func (a *TransactionsApiService) ListUserTransactions(ctx context.Context, userGUID string, localVarOptionals *ListUserTransactionsOpts) (TransactionsResponseBody, *http.Response, error)

func (*TransactionsApiService) ReadTransaction

func (a *TransactionsApiService) ReadTransaction(ctx context.Context, transactionGUID string, userGUID string) (TransactionResponseBody, *http.Response, error)

TransactionsApiService Read a transaction This endpoint allows you to view information about a specific transaction that belongs to a user.<br>

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param transactionGUID The unique identifier for a `transaction`.
  • @param userGUID The unique identifier for a `user`.

@return TransactionResponseBody

type TransactionsCleanseAndCategorizeRequestBody

type TransactionsCleanseAndCategorizeRequestBody struct {
	Transactions []TransactionCleanseAndCategorizeRequest `json:"transactions,omitempty"`
}

type TransactionsCleanseAndCategorizeResponseBody

type TransactionsCleanseAndCategorizeResponseBody struct {
	Transactions []TransactionCleanseAndCategorizeResponse `json:"transactions,omitempty"`
}

type TransactionsResponseBody

type TransactionsResponseBody struct {
	Transactions []Transaction `json:"transactions,omitempty"`
	Pagination   *Pagination   `json:"pagination,omitempty"`
}

type UpdateMemberOpts

type UpdateMemberOpts struct {
	Body optional.Interface
}

type UpdateUserOpts

type UpdateUserOpts struct {
	Body optional.Interface
}

type User

type User struct {
	GUID       string `json:"guid,omitempty"`
	Identifier string `json:"identifier,omitempty"`
	IsDisabled bool   `json:"is_disabled,omitempty"`
	Metadata   string `json:"metadata,omitempty"`
}

type UserCreateRequestBody

type UserCreateRequestBody struct {
	User *User `json:"user,omitempty"`
}

type UserResponseBody

type UserResponseBody struct {
	User *User `json:"user,omitempty"`
}

type UserUpdateRequestBody

type UserUpdateRequestBody struct {
	User *User `json:"user,omitempty"`
}

type UsersApiService

type UsersApiService service

func (*UsersApiService) CreateUser

UsersApiService Create user Call this endpoint to create a new user. Atrium will respond with the newly-created user object if successful. This endpoint accepts several parameters: identifier, metadata, and is_disabled.<br> Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user's data until they are no longer disabled. Users who are disabled for the entirety of an Atrium billing period will not be factored into that month's bill.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body User object to be created with optional parameters (identifier, is_disabled, metadata)

@return UserResponseBody

func (*UsersApiService) DeleteUser

func (a *UsersApiService) DeleteUser(ctx context.Context, userGUID string) (*http.Response, error)

UsersApiService Delete user Calling this endpoint will permanently delete a user from Atrium. If successful, the API will respond with Status: 204 No Content.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userGUID The unique identifier for a `user`.

func (*UsersApiService) ListUsers

func (a *UsersApiService) ListUsers(ctx context.Context, localVarOptionals *ListUsersOpts) (UsersResponseBody, *http.Response, error)

func (*UsersApiService) ReadUser

func (a *UsersApiService) ReadUser(ctx context.Context, userGUID string) (UserResponseBody, *http.Response, error)

UsersApiService Read user Use this endpoint to read the attributes of a specific user.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param userGUID The unique identifier for a `user`.

@return UserResponseBody

func (*UsersApiService) UpdateUser

func (a *UsersApiService) UpdateUser(ctx context.Context, userGUID string, localVarOptionals *UpdateUserOpts) (UserResponseBody, *http.Response, error)

type UsersResponseBody

type UsersResponseBody struct {
	Users      []User      `json:"users,omitempty"`
	Pagination *Pagination `json:"pagination,omitempty"`
}

type VerificationApiService

type VerificationApiService service

func (*VerificationApiService) ListAccountNumbers

func (a *VerificationApiService) ListAccountNumbers(ctx context.Context, memberGUID string, userGUID string) (AccountNumbersResponseBody, *http.Response, error)

VerificationApiService Read account numbers Use this endpoint to check whether account and routing numbers are available for accounts associated with a particular member. It returns the account_numbers object, which contains account and routing number data for each account associated with the member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return AccountNumbersResponseBody

func (*VerificationApiService) ListAccountNumbersByAccount

func (a *VerificationApiService) ListAccountNumbersByAccount(ctx context.Context, accountGUID string, userGUID string) (AccountNumbersResponseBody, *http.Response, error)

VerificationApiService Read account numbers by account GUID Use this endpoint to check whether account and routing numbers are available for a specific account. It returns the account_numbers object, which contains account and routing number data.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountGUID The unique identifier for an `account`.
  • @param userGUID The unique identifier for a `user`.

@return AccountNumbersResponseBody

func (*VerificationApiService) VerifyMember

func (a *VerificationApiService) VerifyMember(ctx context.Context, memberGUID string, userGUID string) (MemberResponseBody, *http.Response, error)

VerificationApiService Verify The verify endpoint begins a verification process for a member.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param memberGUID The unique identifier for a `member`.
  • @param userGUID The unique identifier for a `user`.

@return MemberResponseBody

Source Files

Jump to

Keyboard shortcuts

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