Documentation
¶
Overview ¶
TODO check if that file can be removed
Index ¶
- Constants
- func Empty(s string) bool
- func IsError(r *http.Response) bool
- func NewErrorResponse(resp *http.Response, body []byte) error
- func UrlFor(entity string, data url.Values) url.URL
- type ApiClient
- func (c *ApiClient) ClientDetails(id string) (*Client, error)
- func (c *ApiClient) ClientUpdate(id string, email string, description string) (*Client, error)
- func (c *ApiClient) CreateClient(email string, description string) (*Client, error)
- func (c *ApiClient) CreatePayment(token string, client *string) (*Payment, error)
- func (c *ApiClient) CreateTransaction(transactionPayload TransactionPayload) (*Transaction, error)
- func (c *ApiClient) DeletePayment(id string) (ok bool, err error)
- func (c *ApiClient) ListClients(order string, filter map[string]string) (payments []Client, err error)
- func (c *ApiClient) ListPayments(order string, filter string) (payments []Payment, err error)
- func (c *ApiClient) PaymentDetails(id string) (*Payment, error)
- func (c *ApiClient) RemoveClient(id string) (ok bool, err error)
- type Client
- type ClientResponse
- type DeletePaymentResponse
- type ErrorResponse
- type ListClientsResponse
- type ListPaymentResponse
- type Payment
- type PaymentResponse
- type Transaction
- type TransactionPayload
- type TransactionResponse
Constants ¶
View Source
const APIBase string = "api.paymill.com"
View Source
const APIScheme string = "https"
View Source
const APIVersion string = "v2"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ApiClient ¶
type ApiClient struct {
Token string
}
func NewApiClient ¶
func (*ApiClient) ClientUpdate ¶
func (*ApiClient) CreateClient ¶
func (*ApiClient) CreatePayment ¶
func (*ApiClient) CreateTransaction ¶
func (c *ApiClient) CreateTransaction(transactionPayload TransactionPayload) (*Transaction, error)
func (*ApiClient) ListClients ¶
func (*ApiClient) ListPayments ¶
type Client ¶
type ClientResponse ¶
func NewClientResponse ¶
func NewClientResponse(resp *http.Response, body []byte) (r *ClientResponse, e error)
type DeletePaymentResponse ¶
type DeletePaymentResponse struct {
Data []interface{}
}
func NewDeletePaymentResponse ¶
func NewDeletePaymentResponse(resp *http.Response, body []byte) (r *DeletePaymentResponse, e error)
type ErrorResponse ¶
type ListClientsResponse ¶
func NewListClientsResponse ¶
func NewListClientsResponse(resp *http.Response, body []byte) (r *ListClientsResponse, e error)
type ListPaymentResponse ¶
func NewListPaymentResponse ¶
func NewListPaymentResponse(resp *http.Response, body []byte) (r *ListPaymentResponse, e error)
type Payment ¶
type Payment struct {
Id string `json:"id"`
Type string `json:"type"`
Client *string `json:"client"`
CardType string `json:"card_type"`
Code string `json:"code"`
Account string `json:"account"`
Country string `json:"country"`
ExpireMonth string `json:"expire_month"`
ExpireYear string `json:"expire_year"`
Holder string `json:"holder"`
CardHolder *string `json:"card_holder"`
Last4 string `json:"last4"`
Created int64 `json:"created_at"`
Updated int64 `json:"updated_at"`
AppId *string `json:"app_id"`
}
Object for direct debit payments
type PaymentResponse ¶
func NewPaymentResponse ¶
func NewPaymentResponse(resp *http.Response, body []byte) (r *PaymentResponse, e error)
type Transaction ¶
type Transaction struct {
Id string
Amount string
OriginAmount int `json:"origin_amount"`
Status string
Description *string
LiveMode bool `json:"livemode"`
IsFraud bool `json:"is_fraud"`
//Refunds []Refund
Currency string
Created int64 `json:"created_at"`
Updated int64 `json:"updated_at"`
ResponseCode int `json:"response_code"`
ShortId string `json:"short_id"`
//Invoices []string
Payment Payment
Client Client
//Preauthorization Preauthorization
//Fees []string
AppId *string `json: "app_id"`
}
func (*Transaction) CreatedAt ¶
func (t *Transaction) CreatedAt() time.Time
func (*Transaction) UpdatedAt ¶
func (t *Transaction) UpdatedAt() time.Time
type TransactionPayload ¶
type TransactionResponse ¶
type TransactionResponse struct {
Data *Transaction
Mode string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.