wise

package
v0.0.0-...-f73e9a6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintAccountsTable

func PrintAccountsTable(accounts []Account, out io.Writer)

func PrintTransfersTable

func PrintTransfersTable(transfers []Transfer, out io.Writer)

Types

type Account

type Account struct {
	ID                int         `json:"id"`
	Business          interface{} `json:"business"`
	Profile           int         `json:"profile"`
	AccountHolderName string      `json:"accountHolderName"`
	Currency          string      `json:"currency"`
	Country           string      `json:"country"`
	Type              string      `json:"type"`
	Details           struct {
		Address struct {
			Country     string      `json:"country"`
			CountryCode string      `json:"countryCode"`
			FirstLine   string      `json:"firstLine"`
			PostCode    string      `json:"postCode"`
			City        string      `json:"city"`
			State       interface{} `json:"state"`
		} `json:"address"`
		Email                   interface{} `json:"email"`
		LegalType               string      `json:"legalType"`
		AccountHolderName       interface{} `json:"accountHolderName"`
		AccountNumber           interface{} `json:"accountNumber"`
		SortCode                interface{} `json:"sortCode"`
		Abartn                  interface{} `json:"abartn"`
		AccountType             interface{} `json:"accountType"`
		BankgiroNumber          interface{} `json:"bankgiroNumber"`
		IfscCode                interface{} `json:"ifscCode"`
		BsbCode                 interface{} `json:"bsbCode"`
		InstitutionNumber       interface{} `json:"institutionNumber"`
		TransitNumber           interface{} `json:"transitNumber"`
		PhoneNumber             interface{} `json:"phoneNumber"`
		BankCode                interface{} `json:"bankCode"`
		RussiaRegion            interface{} `json:"russiaRegion"`
		RoutingNumber           interface{} `json:"routingNumber"`
		BranchCode              interface{} `json:"branchCode"`
		Cpf                     interface{} `json:"cpf"`
		CardToken               interface{} `json:"cardToken"`
		IDType                  interface{} `json:"idType"`
		IDNumber                interface{} `json:"idNumber"`
		IDCountryIso3           interface{} `json:"idCountryIso3"`
		IDValidFrom             interface{} `json:"idValidFrom"`
		IDValidTo               interface{} `json:"idValidTo"`
		Clabe                   interface{} `json:"clabe"`
		SwiftCode               interface{} `json:"swiftCode"`
		DateOfBirth             interface{} `json:"dateOfBirth"`
		ClearingNumber          interface{} `json:"clearingNumber"`
		BankName                interface{} `json:"bankName"`
		BranchName              interface{} `json:"branchName"`
		BusinessNumber          interface{} `json:"businessNumber"`
		Province                interface{} `json:"province"`
		City                    interface{} `json:"city"`
		Rut                     interface{} `json:"rut"`
		Token                   interface{} `json:"token"`
		Cnpj                    interface{} `json:"cnpj"`
		PayinReference          interface{} `json:"payinReference"`
		PspReference            interface{} `json:"pspReference"`
		OrderID                 interface{} `json:"orderId"`
		IDDocumentType          interface{} `json:"idDocumentType"`
		IDDocumentNumber        interface{} `json:"idDocumentNumber"`
		TargetProfile           string      `json:"targetProfile"`
		TargetUserID            interface{} `json:"targetUserId"`
		TaxID                   interface{} `json:"taxId"`
		Job                     interface{} `json:"job"`
		Nationality             interface{} `json:"nationality"`
		InteracAccount          interface{} `json:"interacAccount"`
		Bban                    interface{} `json:"bban"`
		Town                    interface{} `json:"town"`
		PostCode                interface{} `json:"postCode"`
		Language                interface{} `json:"language"`
		BillerCode              interface{} `json:"billerCode"`
		CustomerReferenceNumber interface{} `json:"customerReferenceNumber"`
		Prefix                  interface{} `json:"prefix"`
		Iban                    interface{} `json:"IBAN"`
		Bic                     interface{} `json:"BIC"`
	} `json:"details"`
	User            int  `json:"user"`
	Active          bool `json:"active"`
	OwnedByCustomer bool `json:"ownedByCustomer"`
}

type AccountListOptions

type AccountListOptions struct {
	ProfileID int    `json:"profileId"`
	Currency  string `json:"currency"`
	Limit     int    `json:"limit"`
	Offset    int    `json:"offset"`
}

type Profile

type Profile struct {
	ID      int    `json:"id"`
	Type    string `json:"type"`
	Details struct {
		FirstName       string      `json:"firstName"`
		LastName        string      `json:"lastName"`
		DateOfBirth     string      `json:"dateOfBirth"`
		PhoneNumber     string      `json:"phoneNumber"`
		Avatar          string      `json:"avatar"`
		Occupation      string      `json:"occupation"`
		Occupations     interface{} `json:"occupations"`
		PrimaryAddress  interface{} `json:"primaryAddress"`
		FirstNameInKana interface{} `json:"firstNameInKana"`
		LastNameInKana  interface{} `json:"lastNameInKana"`
	} `json:"details"`
}

type Transfer

type Transfer struct {
	ID              int         `json:"id"`
	User            int         `json:"user"`
	TargetAccount   int         `json:"targetAccount"`
	SourceAccount   int         `json:"sourceAccount"`
	Quote           int         `json:"quote"`
	QuoteUUID       string      `json:"quoteUuid"`
	Status          string      `json:"status"`
	Reference       string      `json:"reference"`
	Rate            float32     `json:"rate"`
	Created         string      `json:"created"`
	Business        interface{} `json:"business"`
	TransferRequest interface{} `json:"transferRequest"`
	Details         struct {
		Reference string `json:"reference"`
	} `json:"details"`
	HasActiveIssues       bool    `json:"hasActiveIssues"`
	SourceCurrency        string  `json:"sourceCurrency"`
	SourceValue           float64 `json:"sourceValue"`
	TargetCurrency        string  `json:"targetCurrency"`
	TargetValue           float64 `json:"targetValue"`
	CustomerTransactionID string  `json:"customerTransactionId"`
}

type TransferListOptions

type TransferListOptions struct {
	Profile          int    `json:"profile"`
	Status           string `json:"status"`
	SourceCurrency   string `json:"sourceCurrency"`
	TargetCurrency   string `json:"targetCurrency"`
	CreatedDateStart string `json:"createdDateStart"`
	CreatedDateEnd   string `json:"createdDateEnd"`
	Limit            int    `json:"limit"`
	Offset           int    `json:"offset"`
}

type WiseClient

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

func NewClient

func NewClient(token string) *WiseClient

func (WiseClient) GetProfiles

func (w WiseClient) GetProfiles() ([]Profile, error)

func (WiseClient) GetReceipt

func (w WiseClient) GetReceipt(id int) ([]byte, error)

func (WiseClient) GetTransfer

func (w WiseClient) GetTransfer(id int) (Transfer, error)

func (WiseClient) ListAccounts

func (w WiseClient) ListAccounts(opts *AccountListOptions) ([]Account, error)

func (WiseClient) ListTransfers

func (w WiseClient) ListTransfers(opts *TransferListOptions) ([]Transfer, error)

Jump to

Keyboard shortcuts

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