Documentation
¶
Index ¶
- Constants
- type Bank
- type Client
- type Country
- type Option
- type Session
- func (s *Session) Auth(ctx context.Context) error
- func (s *Session) Banks(ctx context.Context, country Country) ([]Bank, error)
- func (s *Session) Countries(ctx context.Context) ([]Country, error)
- func (s *Session) FillTransferDetails(ctx context.Context, transaction *Transaction, details *TransferDetails) error
- func (s *Session) FillTransferParticipants(ctx context.Context, transaction *Transaction, ...) error
- func (s *Session) StartTransaction(ctx context.Context, bank Bank) (*Transaction, error)
- func (s *Session) TransferRate(ctx context.Context, transaction *Transaction) (float64, error)
- type Transaction
- type TransferDetails
- type TransferParticipants
- type TransferRecipient
- type TransferSender
Constants ¶
View Source
const ( DefaultUpstream = "https://online.contact-sys.com" DefaultPartnerID = "D5267BED-18CC-4661-B03A-65934CAE1CA4" DefaultRetries = 3 DefaultTimeout = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(session *Session)
func WithPartnerID ¶
func WithUpstream ¶
func WithVerbose ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) FillTransferDetails ¶
func (s *Session) FillTransferDetails(ctx context.Context, transaction *Transaction, details *TransferDetails) error
func (*Session) FillTransferParticipants ¶
func (s *Session) FillTransferParticipants(ctx context.Context, transaction *Transaction, participants *TransferParticipants) error
func (*Session) StartTransaction ¶
func (*Session) TransferRate ¶
type Transaction ¶
type Transaction struct {
ID string `json:"id"`
}
type TransferDetails ¶
type TransferDetails struct {
Amount string `json:"trnAmount"`
Currency string `json:"trnCurrency"`
Source string `json:"tSource"`
Ground string `json:"tGround"`
Relation string `json:"tRelation"`
}
func RandomTransferDetails ¶
func RandomTransferDetails(amount float64) *TransferDetails
type TransferParticipants ¶
type TransferParticipants struct {
*TransferSender
*TransferRecipient
}
type TransferRecipient ¶
type TransferRecipient struct {
Name string `json:"bName"`
LastName string `json:"bLastName"`
Country string `json:"bCountryC"`
City string `json:"bCity"`
Phone string `json:"bPhone"`
Address string `json:"bAddress"`
Sex string `json:"bSex"`
Account string `json:"bAccount"`
}
func RandomTransferRecipient ¶
func RandomTransferRecipient(country Country, bank Bank) *TransferRecipient
type TransferSender ¶
type TransferSender struct {
Name string `json:"sName"`
LastName string `json:"sLastName"`
BirthPlace string `json:"sBirthPlace"`
Country string `json:"sCountryC"`
IDType string `json:"sIDtype"`
IDNumber string `json:"sIDnumber"`
IDExpireDate string `json:"sIDexpireDate"`
Birthday string `json:"sBirthday"`
Sex string `json:"sSex"`
Occupation string `json:"sOccupation"`
}
func RandomTransferSender ¶
func RandomTransferSender() *TransferSender
Click to show internal directories.
Click to hide internal directories.