Documentation ¶
Index ¶
- Constants
- type AddressRequest
- type AddressResponse
- type BankInfo
- type BillingInfo
- type CardData
- type CryptoInfo
- type CustomerInfo
- type FlowData
- type InvoiceRequest
- type InvoiceResponse
- type PSPark
- func (client *PSPark) CreateAddress(walletId string, data AddressRequest) (AddressResponse, error)
- func (client *PSPark) CreateInvoice(walletId string, data InvoiceRequest) (InvoiceResponse, error)
- func (client *PSPark) CreateWithdrawal(walletId string, data WithdrawalRequest) (WithdrawalResponse, error)
- func (client *PSPark) GetBalances() ([]WalletBalance, error)
- func (client *PSPark) GetWalletBalance(walletId string) (WalletBalance, error)
- type ResponseDTO
- type ResponseValidationError
- type SignedToken
- type UISchema
- type WalletBalance
- type WebData
- type WithdrawalDetails
- type WithdrawalRequest
- type WithdrawalResponse
Constants ¶
View Source
const ( BaseURL = "https://api.pspark.io" APIVersion = "v1" TokenExpirationTime = 30 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressRequest ¶
type AddressResponse ¶
type AddressResponse struct { ID string `json:"id"` Reference string `json:"reference"` WalletID string `json:"wallet_id"` Currency string `json:"currency"` Amount float64 `json:"amount"` AmountInitial float64 `json:"amount_initial"` Type string `json:"type"` Status string `json:"status"` StatusCode int `json:"status_code,omitempty"` StatusMessage string `json:"status_message,omitempty"` PaymentFee float64 `json:"payment_fee"` Address string `json:"address,omitempty"` Memo string `json:"memo,omitempty"` }
type BillingInfo ¶
type CryptoInfo ¶
type CryptoInfo struct {
Memo *string `json:"memo,omitempty"`
}
type CustomerInfo ¶
type InvoiceRequest ¶
type InvoiceRequest struct { Reference string `json:"reference"` Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` LimitMinute *int `json:"limit_minute,omitempty"` CallbackURL *string `json:"callback_url,omitempty"` Amount float64 `json:"amount"` Currency string `json:"currency"` ReturnURL string `json:"return_url"` Customer *CustomerInfo `json:"customer,omitempty"` BillingInfo *BillingInfo `json:"billing_info,omitempty"` Bank *BankInfo `json:"bank,omitempty"` CardData *CardData `json:"card_data,omitempty"` WebData *WebData `json:"web_data,omitempty"` UI *UISchema `json:"ui,omitempty"` }
type InvoiceResponse ¶
type InvoiceResponse struct { ID string `json:"id"` Reference string `json:"reference"` WalletID string `json:"wallet_id"` Currency string `json:"currency"` Amount float64 `json:"amount"` AmountInitial float64 `json:"amount_initial"` Type string `json:"type"` Status string `json:"status"` StatusCode int `json:"status_code,omitempty"` StatusMessage string `json:"status_message,omitempty"` PaymentFee float64 `json:"payment_fee"` Address string `json:"address,omitempty"` Memo string `json:"memo,omitempty"` FlowData *FlowData `json:"flowData,omitempty"` }
type PSPark ¶
func PSParkClient ¶
func (*PSPark) CreateAddress ¶
func (client *PSPark) CreateAddress(walletId string, data AddressRequest) (AddressResponse, error)
func (*PSPark) CreateInvoice ¶
func (client *PSPark) CreateInvoice(walletId string, data InvoiceRequest) (InvoiceResponse, error)
func (*PSPark) CreateWithdrawal ¶
func (client *PSPark) CreateWithdrawal(walletId string, data WithdrawalRequest) (WithdrawalResponse, error)
func (*PSPark) GetBalances ¶
func (client *PSPark) GetBalances() ([]WalletBalance, error)
func (*PSPark) GetWalletBalance ¶
func (client *PSPark) GetWalletBalance(walletId string) (WalletBalance, error)
type ResponseDTO ¶
type ResponseValidationError ¶
func (*ResponseValidationError) Error ¶
func (e *ResponseValidationError) Error() string
type SignedToken ¶
type UISchema ¶
type UISchema struct {
Language *string `json:"language,omitempty"` // Values: "en", "ua", "ru"
}
type WalletBalance ¶
type WithdrawalDetails ¶
type WithdrawalDetails struct { Crypto *CryptoInfo `json:"crypto,omitempty"` Customer *CustomerInfo `json:"customer,omitempty"` Billing *BillingInfo `json:"billing_info,omitempty"` Bank *BankInfo `json:"bank,omitempty"` CardData *CardData `json:"card_data,omitempty"` WebData *WebData `json:"web_data,omitempty"` }
type WithdrawalRequest ¶
type WithdrawalRequest struct { Reference string `json:"reference"` Amount float64 `json:"amount"` Account string `json:"account"` Details *WithdrawalDetails `json:"details,omitempty"` }
type WithdrawalResponse ¶
type WithdrawalResponse struct { ID string `json:"id"` Reference string `json:"reference"` Amount float64 `json:"amount"` Currency string `json:"currency"` Type string `json:"type"` Status string `json:"status"` StatusCode int `json:"status_code,omitempty"` StatusMessage string `json:"status_message,omitempty"` PaymentFee float64 `json:"payment_fee"` AmountSpent float64 `json:"amount_spent"` }
Click to show internal directories.
Click to hide internal directories.