models

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressTypeHome   = "home"
	AddressTypeOffice = "office"
)
View Source
const (
	ContactsType = "contacts"

	ContactTypeNaturalPerson = "natural_person"
	ContactTypeCompany       = "company"
	ContactTypeCCorp         = "c-corp"
	ContactTypeLLC           = "llc"
	ContactTypeSCorp         = "s-corp"
	ContactTypeTrust         = "trust"

	AccountRoleOwner            = "owner"
	AccountRoleTaxFormRecipient = "tax form recipient"
)
View Source
const (
	WebhooksType = "webhook-configs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Data AccountData `json:"data"`
}

type AccountAttributes

type AccountAttributes struct {
	CreatedAt time.Time `json:"created-at"`
	Name      string    `json:"name"`
	Number    string    `json:"number"`
	Status    string    `json:"status"`
}

type AccountData

type AccountData struct {
	ID            string            `json:"id,omitempty"`
	Type          string            `json:"type"`
	Attributes    AccountAttributes `json:"attributes"`
	Links         Links             `json:"links"`
	Relationships Relationships     `json:"relationships"`
}

type AccountType

type AccountType struct {
	Data AccountTypeData `json:"data"`
}

type AccountTypeAttributes

type AccountTypeAttributes struct {
	Description          string   `json:"description"`
	Label                string   `json:"label"`
	ManageInvestments    bool     `json:"manage-investments"`
	OwnerRole            string   `json:"owner-role"`
	StatementRoles       []string `json:"statement-roles"`
	TaxFormRecipientRole string   `json:"tax-form-recipient-role"`
	Trust                bool     `json:"trust"`
}

type AccountTypeData

type AccountTypeData struct {
	ID            string                `json:"id,omitempty"`
	Type          string                `json:"type"`
	Attributes    AccountTypeAttributes `json:"attributes"`
	Links         Links                 `json:"links"`
	Relationships Relationships         `json:"relationships"`
}

type AccountTypesResponse

type AccountTypesResponse struct {
	CollectionResponse
	Data     []AccountTypeData `json:"data"`
	Included interface{}       `json:"included"`
}

type AccountsResponse

type AccountsResponse struct {
	CollectionResponse
	Data []AccountData `json:"data"`
}

type Address

type Address struct {
	ID         string `json:"id,omitempty"`
	Type       string `json:"type,omitempty"`
	City       string `json:"city"`
	Country    string `json:"country"`
	PostalCode string `json:"postal-code,omitempty"`
	Region     string `json:"region,omitempty"`
	Street1    string `json:"street-1"`
	Street2    string `json:"street-2,omitempty"`
}

type CashTransaction

type CashTransaction struct {
	Data CashTransactionData `json:"data"`
}

type CashTransactionAttributes

type CashTransactionAttributes struct {
	ID                      string    `json:"id,omitempty"`
	ActualSettlementDate    string    `json:"actual-settlement-date"`
	Amount                  float64   `json:"amount"`
	CommentsLine1           string    `json:"comments-line-1"`
	CommentsLine2           string    `json:"comments-line-2"`
	CommentsLine3           string    `json:"comments-line-3"`
	CommentsLine4           string    `json:"comments-line-4"`
	CreatedAt               time.Time `json:"actual-settlement-date"`
	Currency                string    `json:"currency"`
	CustomerReference       string    `json:"customer-reference"`
	EffectiveSettlementDate string    `json:"effective-settlement-date"`
	SettlementDate          string    `json:"settlement-date"`
	TradeDate               string    `json:"trade-date"`
	TransactionNumber       int       `json:"transaction-number"`
}

type CashTransactionData

type CashTransactionData struct {
	ID            string            `json:"id,omitempty"`
	Type          string            `json:"type"`
	Attributes    AccountAttributes `json:"attributes"`
	Links         Links             `json:"links"`
	Relationships Relationships     `json:"relationships"`
}

type CashTransactionsResponse

type CashTransactionsResponse struct {
	CollectionResponse
	Data []CashTransaction `json:"data"`
}

type CollectionResponse

type CollectionResponse struct {
	Links Links `json:"links"`
	Meta  Meta  `json:"meta"`
}

type Contact

type Contact struct {
	Data ContactData `json:"data"`
}

func NewCompanyContact

func NewCompanyContact(accountId string) *Contact

func NewNaturalPersonContact

func NewNaturalPersonContact(accountId string) *Contact

type ContactAttributes

type ContactAttributes struct {
	ID                 string               `json:"id,omitempty"`
	Type               string               `json:"type"`
	AccountID          string               `json:"account-id"`
	AccountRoles       []string             `json:"account-roles"`
	ContactType        string               `json:"contact-type,omitempty"`
	AMLCleared         bool                 `json:"aml-cleared"`
	CIPCleared         bool                 `json:"cip-cleared"`
	DateOfBirth        string               `json:"date-of-birth,omitempty"`
	Email              string               `json:"email"`
	Name               string               `json:"name"`
	Sex                string               `json:"sex,omitempty"`
	Label              string               `json:"label,omitempty"`
	RegionOfFormation  string               `json:"region-of-formation,omitempty"`
	TaxIDNumber        string               `json:"tax-id-number"`
	TaxCountry         string               `json:"tax-country"`
	TaxState           string               `json:"tax-state,omitempty"`
	PrimaryAddress     Address              `json:"primary-address"`
	PrimaryPhoneNumber PhoneNumber          `json:"primary-phone-number"`
	RelatedContacts    []RelatedContactData `json:"related-contacts,omitempty"`
}

type ContactData

type ContactData struct {
	ID            string            `json:"id,omitempty"`
	Type          string            `json:"type"`
	Attributes    ContactAttributes `json:"attributes"`
	Links         Links             `json:"links"`
	Relationships Relationships     `json:"relationships"`
}

type ContactsResponse

type ContactsResponse struct {
	CollectionResponse
	Data []ContactData `json:"data"`
}

type Document

type Document struct {
	AccountID   string         `json:"account-id,omitempty"`
	ContactID   string         `json:"contact-id,omitempty"`
	Description string         `json:"description,omitempty"`
	Extension   string         `json:"extension,omitempty"`
	File        multipart.File `json:"file,omitempty"`
	Label       string         `json:"label,omitempty"`
	MimeType    string         `json:"mime_type,omitempty"`
	Public      bool           `json:"public,omitempty"`
	CreatedAt   string         `json:"created-at,omitempty"`
	FileURL     string         `json:"file-url,omitempty"`
	VersionUrls struct {
		Original string `json:"original"`
	} `json:"version-urls,omitempty"`
}

func NewDocument

func NewDocument(accountId string, contactId string, file multipart.File, description string, extension string, label string, mimeType string, public bool) *Document

type DocumentData

type DocumentData struct {
	ID            string        `json:"id,omitempty"`
	Type          string        `json:"type"`
	Attributes    Document      `json:"attributes"`
	Links         Links         `json:"links"`
	Relationships Relationships `json:"relationships"`
}

type DocumentResponse

type DocumentResponse struct {
	CollectionResponse
	Data DocumentData `json:"data"`
}
type Links struct {
	Self    string `json:"self,omitempty"`
	First   string `json:"first,omitempty"`
	Related string `json:"related,omitempty"`
}

type Meta

type Meta struct {
	PageCount     int64 `json:"page-count,omitempty"`
	ResourceCount int64 `json:"resource-count,omitempty"`
}

type PhoneNumber

type PhoneNumber struct {
	ID          string `json:"id,omitempty"`
	Number      string `json:"number"`
	SMS         bool   `json:"sms,omitempty"`
	ClientInput string `json:"client-input,omitempty"`
	Country     string `json:"country,omitempty"`
}

type RelatedContactData

type RelatedContactData struct {
	Type               string      `json:"type"`
	DateOfBirth        string      `json:"date-of-birth"`
	Email              string      `json:"email"`
	Name               string      `json:"name"`
	Sex                string      `json:"sex"`
	Label              string      `json:"label"`
	TaxIDNumber        string      `json:"tax-id-number"`
	TaxCountry         string      `json:"tax-country"`
	PrimaryAddress     Address     `json:"primary-address"`
	PrimaryPhoneNumber PhoneNumber `json:"primary-phone-number"`
}

type Relationship

type Relationship struct {
	Links Links `json:"links"`
}

type Relationships

type Relationships struct {
	Accounts                 Relationship `json:"accounts,omitempty"`
	Account                  Relationship `json:"account,omitempty"`
	Contacts                 Relationship `json:"contacts,omitempty"`
	Contact                  Relationship `json:"contact,omitempty"`
	AccountType              Relationship `json:"account-type,omitempty"`
	Addresses                Relationship `json:"addresses,omitempty"`
	AMLChecks                Relationship `json:"aml-checks,omitempty"`
	CIPChecks                Relationship `json:"cip-checks,omitempty"`
	Contributions            Relationship `json:"contributions,omitempty"`
	Disbursements            Relationship `json:"disbursements,omitempty"`
	FromContactRelationships Relationship `json:"from-contact-relationships,omitempty"`
	PaymentMethods           Relationship `json:"payment-methods,omitempty"`
	PhoneNumbers             Relationship `json:"phone-numbers,omitempty"`
	UploadedDocuments        Relationship `json:"uploaded-documents,omitempty"`
	RelatedFromContacts      Relationship `json:"related-from-contacts,omitempty"`
	RelatedToContacts        Relationship `json:"related-to-contacts,omitempty"`
	ToContactRelationships   Relationship `json:"to-contact-relationships,omitempty"`
	PrimaryAddress           Relationship `json:"primary-address,omitempty"`
	PrimaryContact           Relationship `json:"primary-contact,omitempty"`
	PrimaryPhoneNumber       Relationship `json:"primary-phone-number,omitempty"`
}

type Webhook

type Webhook struct {
	Data WebhookData `json:"data"`
}

func NewWebhook

func NewWebhook(accountId string, url string, email string, secret string, enabled bool) *Webhook

type WebhookAttribute

type WebhookAttribute struct {
	AccountID    string    `json:"account_id"`
	URL          string    `json:"url"`
	Enabled      bool      `json:"enabled"`
	ContactEmail string    `json:"contact-email"`
	SharedSecret string    `json:"shared-secret"`
	CreatedAt    time.Time `json:"created-at,omitempty"`
	Failures     int       `json:"failures,omitempty"`
	UpdatedAt    time.Time `json:"updated-at,omitempty"`
}

type WebhookData

type WebhookData struct {
	ID            string           `json:"id,omitempty"`
	Type          string           `json:"type"`
	Attributes    WebhookAttribute `json:"attributes"`
	Links         Links            `json:"links,omitempty"`
	Relationships Relationships    `json:"relationships,omitempty"`
}

type WebhookPayload added in v1.0.4

type WebhookPayload struct {
	ID               string             `json:"id,omitempty"`
	Action           string             `json:"action,omitempty"`
	CreatedAt        time.Time          `json:"created_at,omitempty"`
	Data             WebhookPayloadData `json:"data,omitempty"`
	Failures         int                `json:"failures,omitempty"`
	LastRequestAt    time.Time          `json:"last_request_at,omitempty"`
	LastResponseCode int                `json:"last_response_code,omitempty"`
	ResourceID       string             `json:"resource_id,omitempty"`
	ResourceType     string             `json:"resource_type,omitempty"`
	Success          bool               `json:"success,omitempty"`
}

type WebhookPayloadData added in v1.0.4

type WebhookPayloadData struct {
	Changes    []string          `json:"changes,omitempty"`
	Attributes map[string]string `json:"attributes,omitempty"`
}

type WebhooksResponse

type WebhooksResponse struct {
	CollectionResponse
	Data []WebhookData `json:"data"`
}

Jump to

Keyboard shortcuts

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