Documentation ¶
Index ¶
- Constants
- type AddressRequest
- type AddressResponse
- type BankInfo
- type BillingInfo
- type CardData
- type CryptoInfo
- type CustomerInfo
- type Details
- type EscrowPayment
- 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 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,omitempty"` 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,omitempty"` Address string `json:"address,omitempty"` Memo string `json:"memo,omitempty"` }
type BillingInfo ¶
type BillingInfo struct { Address *string `json:"address,omitempty"` CountryCode *string `json:"country_code,omitempty"` Country *string `json:"country,omitempty"` City *string `json:"city,omitempty"` PostCode *string `json:"post_code,omitempty"` Region *string `json:"region,omitempty"` PaymentPurpose *string `json:"payment_purpose,omitempty"` Street *string `json:"street,omitempty"` }
type CryptoInfo ¶
type CryptoInfo struct {
Memo *string `json:"memo,omitempty"`
}
type CustomerInfo ¶
type CustomerInfo struct { FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` CustomerID *string `json:"customer_id,omitempty"` NationalID *string `json:"national_id,omitempty"` TaxpayerIdentificationNumber *string `json:"taxpayer_identification_number,omitempty"` }
type Details ¶ added in v0.0.2
type Details 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"` UI *UISchema `json:"ui,omitempty"` EscrowPayment *EscrowPayment `json:"escrow_payment,omitempty"` }
type EscrowPayment ¶ added in v0.0.2
type EscrowPayment struct {
PaymentWalletID *string `json:"payment_wallet_id,omitempty"`
}
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"` Details *Details `json:"details,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,omitempty"` 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,omitempty"` Address string `json:"address,omitempty"` Memo string `json:"memo,omitempty"` FlowData *FlowData `json:"flow_data,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 WebData ¶
type WebData struct { IP string `json:"ip,omitempty"` UserAgent string `json:"user_agent,omitempty"` BrowserColorDepth int `json:"browser_color_depth,omitempty"` BrowserLanguage string `json:"browser_language,omitempty"` BrowserScreenHeight int `json:"browser_screen_height,omitempty"` BrowserScreenWidth int `json:"browser_screen_width,omitempty"` BrowserTimezone string `json:"browser_timezone,omitempty"` BrowserTimezoneOffset int `json:"browser_timezone_offset,omitempty"` BrowserJavaEnabled string `json:"browser_java_enabled,omitempty"` BrowserJavaScriptEnabled string `json:"browser_java_script_enabled,omitempty"` BrowserAcceptHeader string `json:"browser_accept_header,omitempty"` }
type WithdrawalRequest ¶
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,omitempty"` AmountSpent float64 `json:"amount_spent,omitempty"` }
Click to show internal directories.
Click to hide internal directories.