Documentation ¶
Index ¶
- type Client
- func (c *Client) Balances(optionals ...OptionalValue) (*balancesResponse, error)
- func (c *Client) BuyPBNTags(coin string, optionals ...OptionalValue) (*buyPBNTagsResponse, error)
- func (c *Client) CancelWithdrawal(id string, optionals ...OptionalValue) (*cancelWithdrawalResponse, error)
- func (c *Client) ClaimPBNCoupon(coupon string, optionals ...OptionalValue) (*claimPBNCouponResponse, error)
- func (c *Client) ClaimPBNTag(tagid, name string, optionals ...OptionalValue) (*claimPBNTagResponse, error)
- func (c *Client) Convert(amount, from, to string, optionals ...OptionalValue) (*convertResponse, error)
- func (c *Client) ConvertLimits(from, to string, optionals ...OptionalValue) (*convertLimitsResponse, error)
- func (c *Client) CreateTransaction(amount, currency1, currency2, buyerEmail string, optionals ...OptionalValue) (*createTransactionResponse, error)
- func (c *Client) CreateTransfer(amount, currency string, optionals ...OptionalValue) (*createTransferResponse, error)
- func (c *Client) CreateWithdrawal(amount, currency string, optionals ...OptionalValue) (*createWithdrawalResponse, error)
- func (c *Client) DeletePBNTag(tagid string, optionals ...OptionalValue) (*deletePBNTagResponse, error)
- func (c *Client) GetBasicInfo(optionals ...OptionalValue) (*getBasicInfoResponse, error)
- func (c *Client) GetCallbackAddress(currency string, optionals ...OptionalValue) (*getCallbackAddressResponse, error)
- func (c *Client) GetConversionInfo(id string, optionals ...OptionalValue) (*getConversionInfoResponse, error)
- func (c *Client) GetDepositAddress(currency string, optionals ...OptionalValue) (*getDepositAddressResponse, error)
- func (c *Client) GetPBNInfo(pbntag string, optionals ...OptionalValue) (*getPBNInfoResponse, error)
- func (c *Client) GetPBNList(optionals ...OptionalValue) (*getPBNListResponse, error)
- func (c *Client) GetTxIds(optionals ...OptionalValue) (*getTxIdsResponse, error)
- func (c *Client) GetTxInfo(txid string, optionals ...OptionalValue) (*getTxInfoResponse, error)
- func (c *Client) GetTxInfoMulti(txid string, optionals ...OptionalValue) (*getTxInfoMultiResponse, error)
- func (c *Client) GetWithdrawalHistory(optionals ...OptionalValue) (*getWithdrawalHistoryResponse, error)
- func (c *Client) GetWithdrawalInfo(id string, optionals ...OptionalValue) (*getWithdrawalInfoResponse, error)
- func (c *Client) ParseIPN(r *http.Request) (*IPN, error)
- func (c *Client) Rates(optionals ...OptionalValue) (*ratesResponse, error)
- func (c *Client) RenewPBNTag(tagid, coin string, optionals ...OptionalValue) (*renewPBNTagResponse, error)
- func (c *Client) UpdatePBNTag(tagid string, optionals ...OptionalValue) (*updatePBNTagResponse, error)
- type ClientOption
- type IPN
- func (i *IPN) ToApiIPN() (*apiIPN, error)
- func (i *IPN) ToButtonIPN() (*buttonIPN, error)
- func (i *IPN) ToCartIPN() (*cartIPN, error)
- func (i *IPN) ToDepositIPN() (*depositIPN, error)
- func (i *IPN) ToDonationIPN() (*donationIPN, error)
- func (i *IPN) ToSimpleIPN() (*simpleIPN, error)
- func (i *IPN) ToWithdrawalIPN() (*withdrawalIPN, error)
- type OptionalValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client allows programmatic access to the coinpayments api
func NewClient ¶
func NewClient(publicKey, privateKey string, options ...ClientOption) *Client
NewClient returns a new Client with the applied options
func (*Client) Balances ¶
func (c *Client) Balances(optionals ...OptionalValue) (*balancesResponse, error)
Balances calls the "balances" command
func (*Client) BuyPBNTags ¶
func (c *Client) BuyPBNTags(coin string, optionals ...OptionalValue) (*buyPBNTagsResponse, error)
BuyPBNTags calls the "buy_pbn_tags" command
func (*Client) CancelWithdrawal ¶
func (c *Client) CancelWithdrawal(id string, optionals ...OptionalValue) (*cancelWithdrawalResponse, error)
CancelWithdrawal calls the "create_withdrawal" command
func (*Client) ClaimPBNCoupon ¶
func (c *Client) ClaimPBNCoupon(coupon string, optionals ...OptionalValue) (*claimPBNCouponResponse, error)
ClaimPBNCoupon calls the "claim_pbn_coupon" command
func (*Client) ClaimPBNTag ¶
func (c *Client) ClaimPBNTag(tagid, name string, optionals ...OptionalValue) (*claimPBNTagResponse, error)
ClaimPBNTag calls the "claim_pbn_tag" command
func (*Client) Convert ¶
func (c *Client) Convert(amount, from, to string, optionals ...OptionalValue) (*convertResponse, error)
Convert calls the "convert" command
func (*Client) ConvertLimits ¶
func (c *Client) ConvertLimits(from, to string, optionals ...OptionalValue) (*convertLimitsResponse, error)
ConvertLimits calls the "convert_limits" command
func (*Client) CreateTransaction ¶
func (c *Client) CreateTransaction(amount, currency1, currency2, buyerEmail string, optionals ...OptionalValue) (*createTransactionResponse, error)
CreateTransaction calls the "create_transaction" command
func (*Client) CreateTransfer ¶
func (c *Client) CreateTransfer(amount, currency string, optionals ...OptionalValue) (*createTransferResponse, error)
CreateTransfer calls the "create_transfer" command
func (*Client) CreateWithdrawal ¶
func (c *Client) CreateWithdrawal(amount, currency string, optionals ...OptionalValue) (*createWithdrawalResponse, error)
CreateWithdrawal calls the "create_withdrawal" command
func (*Client) DeletePBNTag ¶
func (c *Client) DeletePBNTag(tagid string, optionals ...OptionalValue) (*deletePBNTagResponse, error)
DeletePBNTag calls the "delete_pbn_tag" command
func (*Client) GetBasicInfo ¶
func (c *Client) GetBasicInfo(optionals ...OptionalValue) (*getBasicInfoResponse, error)
GetBasicInfo calls the "get_basic_info" command
func (*Client) GetCallbackAddress ¶
func (c *Client) GetCallbackAddress(currency string, optionals ...OptionalValue) (*getCallbackAddressResponse, error)
GetCallbackAddress calls the "get_callback_address" command
func (*Client) GetConversionInfo ¶
func (c *Client) GetConversionInfo(id string, optionals ...OptionalValue) (*getConversionInfoResponse, error)
GetConversionInfo calls the "get_conversion_info" command
func (*Client) GetDepositAddress ¶
func (c *Client) GetDepositAddress(currency string, optionals ...OptionalValue) (*getDepositAddressResponse, error)
GetDepositAddress calls the "get_deposit_address" command
func (*Client) GetPBNInfo ¶
func (c *Client) GetPBNInfo(pbntag string, optionals ...OptionalValue) (*getPBNInfoResponse, error)
GetPBNInfo calls the "get_pbn_info" command
func (*Client) GetPBNList ¶
func (c *Client) GetPBNList(optionals ...OptionalValue) (*getPBNListResponse, error)
GetPBNList calls the "get_pbn_list" command
func (*Client) GetTxIds ¶
func (c *Client) GetTxIds(optionals ...OptionalValue) (*getTxIdsResponse, error)
GetTxIds calls the "get_tx_ids" command
func (*Client) GetTxInfo ¶
func (c *Client) GetTxInfo(txid string, optionals ...OptionalValue) (*getTxInfoResponse, error)
GetTxInfo calls the "get_tx_info" command
func (*Client) GetTxInfoMulti ¶
func (c *Client) GetTxInfoMulti(txid string, optionals ...OptionalValue) (*getTxInfoMultiResponse, error)
GetTxInfoMulti calls the "get_tx_info_multi" command
func (*Client) GetWithdrawalHistory ¶
func (c *Client) GetWithdrawalHistory(optionals ...OptionalValue) (*getWithdrawalHistoryResponse, error)
GetWithdrawalHistory calls the "get_withdrawal_history" command
func (*Client) GetWithdrawalInfo ¶
func (c *Client) GetWithdrawalInfo(id string, optionals ...OptionalValue) (*getWithdrawalInfoResponse, error)
GetWithdrawalInfo calls the "get_withdrawal_info" command
func (*Client) Rates ¶
func (c *Client) Rates(optionals ...OptionalValue) (*ratesResponse, error)
Rates calls the "rates" command
func (*Client) RenewPBNTag ¶
func (c *Client) RenewPBNTag(tagid, coin string, optionals ...OptionalValue) (*renewPBNTagResponse, error)
RenewPBNTag calls the "renew_pbn_tag" command
func (*Client) UpdatePBNTag ¶
func (c *Client) UpdatePBNTag(tagid string, optionals ...OptionalValue) (*updatePBNTagResponse, error)
UpdatePBNTag calls the "update_pbn_tag" command
type ClientOption ¶
type ClientOption func(client *Client)
ClientOption is an option used to modify a client
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient is an option that makes the Client use the provided http client
func WithIPNSecret ¶
func WithIPNSecret(secret string) ClientOption
WithIPNSecret is an option that makes the Client use the provided secret
type IPN ¶
type IPN struct {
// contains filtered or unexported fields
}
IPN holds the data and type from an IPN
func (*IPN) ToButtonIPN ¶
ToButtonIPN returns the data from the "button" ipn type
func (*IPN) ToDepositIPN ¶
ToDepositIPN returns the data from the "deposit" ipn type
func (*IPN) ToDonationIPN ¶
ToDonationIPN returns the data from the "donation" ipn type
func (*IPN) ToSimpleIPN ¶
ToSimpleIPN returns the data from the "simple" ipn type
func (*IPN) ToWithdrawalIPN ¶
ToWithdrawalIPN returns the data from the "withdrawal" ipn type
type OptionalValue ¶
OptionalValue is an option used to add values to an api request
func WithOptionalValue ¶
func WithOptionalValue(key, value string) OptionalValue
WithOptionalValue is an option that adds values to an api request