Documentation ¶
Index ¶
- Constants
- type Account
- type Address
- type Buy
- type Client
- func (c *Client) CancelRequestMoney(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
- func (c *Client) CommitBuy(ctx context.Context, accountID string, buyID string) (*Buy, error)
- func (c *Client) CommitDeposit(ctx context.Context, accountID string, depositID string) (*Deposit, error)
- func (c *Client) CommitSell(ctx context.Context, accountID string, sellID string) (*Sell, error)
- func (c *Client) CommitWithdrawal(ctx context.Context, accountID string, withdrawID string) (*Withdrawal, error)
- func (c *Client) CompleteRequestMoney(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
- func (c *Client) CreateAddress(ctx context.Context, accountID string, addressData CreateAddress) (*Address, error)
- func (c *Client) DeleteAccount(ctx context.Context, accountID string) error
- func (c *Client) DepositFunds(ctx context.Context, accountID string, depositData DepositFunds) (*Deposit, error)
- func (c *Client) GetAccount(ctx context.Context, accountID string) (*Account, error)
- func (c *Client) GetBuy(ctx context.Context, accountID string, buyID string) (*Buy, error)
- func (c *Client) GetBuyPrice(ctx context.Context, currencyPair string) (*Price, error)
- func (c *Client) GetDeposit(ctx context.Context, accountID string, depositID string) (*Deposit, error)
- func (c *Client) GetSell(ctx context.Context, accountID string, sellID string) (*Sell, error)
- func (c *Client) GetSellPrice(ctx context.Context, currencyPair string) (*Price, error)
- func (c *Client) GetSpotPrice(ctx context.Context, currencyPair string) (*Price, error)
- func (c *Client) GetTime(ctx context.Context) (*Time, error)
- func (c *Client) GetTransaction(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
- func (c *Client) GetUser(ctx context.Context) (*User, error)
- func (c *Client) GetUserByID(ctx context.Context, userID string) (*User, error)
- func (c *Client) GetWithdrawal(ctx context.Context, accountID string, withdrawalID string) (*Withdrawal, error)
- func (c *Client) ListAccounts(ctx context.Context) (*[]Account, *Pagination, error)
- func (c *Client) ListAddressTransactions(ctx context.Context, accountID string, addressID string) (*[]Transaction, *Pagination, error)
- func (c *Client) ListAddresses(ctx context.Context, accountID string) (*[]Address, *Pagination, error)
- func (c *Client) ListBuys(ctx context.Context, accountID string) (*[]Buy, *Pagination, error)
- func (c *Client) ListCurrencies(ctx context.Context) (*[]Currency, error)
- func (c *Client) ListDeposits(ctx context.Context, accountID string) (*[]Deposit, *Pagination, error)
- func (c *Client) ListExchangeRates(ctx context.Context, currency string) (*ExchangeRates, error)
- func (c *Client) ListPaymentMethods(ctx context.Context) (*[]PaymentMethod, *Pagination, error)
- func (c *Client) ListSells(ctx context.Context, accountID string) (*[]Sell, *Pagination, error)
- func (c *Client) ListTransactions(ctx context.Context, accountID string) (*[]Transaction, *Pagination, error)
- func (c *Client) ListWithdrawals(ctx context.Context, accountID string) (*[]Withdrawal, *Pagination, error)
- func (c *Client) NewRequest(ctx context.Context, method, url string, payload interface{}) (*http.Request, error)
- func (c *Client) PlaceBuy(ctx context.Context, accountID string, buyData PlaceBuy) (*Buy, error)
- func (c *Client) PlaceSell(ctx context.Context, accountID string, sellData PlaceSell) (*Sell, error)
- func (c *Client) RequestMoney(ctx context.Context, accountID string, requestData RequestMoney) (*Transaction, error)
- func (c *Client) ResendRequestMoney(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
- func (c *Client) Send(req *http.Request, v ...interface{}) error
- func (c *Client) SendMoney(ctx context.Context, accountID string, sendData SendMoney) (*Transaction, error)
- func (c *Client) SendWithAuth(req *http.Request, v ...interface{}) error
- func (c *Client) SetLog(log io.Writer)
- func (c *Client) ShowAddress(ctx context.Context, accountID string, addressID string) (*Address, error)
- func (c *Client) ShowPaymentMethod(ctx context.Context, paymentMethodID string) (*PaymentMethod, error)
- func (c *Client) TransferMoney(ctx context.Context, accountID string, transferData TransferMoney) (*Transaction, error)
- func (c *Client) UpdateAccount(ctx context.Context, accountID string, accountData UpdateAccount) (*Account, error)
- func (c *Client) UpdateUser(ctx context.Context, userData UpdateCurrentUser) (*User, error)
- func (c *Client) Withdraw(ctx context.Context, accountID string, withdrawData Withdraw) (*Withdrawal, error)
- type CreateAddress
- type Currency
- type Deposit
- type DepositFunds
- type ErrorResponse
- type Errors
- type ExchangeRates
- type From
- type Network
- type Pagination
- type PaymentMethod
- type PlaceBuy
- type PlaceSell
- type Price
- type RequestMoney
- type Response
- type Sell
- type SendMoney
- type Time
- type Transaction
- type TransferMoney
- type UpdateAccount
- type UpdateCurrentUser
- type User
- type Withdraw
- type Withdrawal
Constants ¶
const (
APIBase = "https://api.coinbase.com/v2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Primary bool `json:"primary,omitempty"` Type string `json:"type,omitempty"` Currency string `json:"currency,omitempty"` Balance string `json:"balance,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` }
type Address ¶
type Address struct { ID string `json:"id,omitempty"` Address string `json:"address,omitempty"` Name string `json:"name,omitempty"` Network string `json:"network,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` }
type Buy ¶
type Buy struct { ID string `json:"id,omitempty"` Status string `json:"status,omitempty"` PaymentMethod struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"payment_method,omitempty"` Transaction struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"transaction,omitempty"` Amount struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"amount,omitempty"` Total struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"total,omitempty"` SubTotal struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"subtotal,omitempty"` Fee struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"fee,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` PayoutAt time.Time `json:"payout_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` Committed bool `json:"committed,omitempty"` Instant bool `json:"instant,omitempty"` }
type Client ¶
type Client struct { HTTPClient *http.Client APIKey string APISecret string APIBase string Log io.Writer // If set, all request will be logged there Localization string // Preferred language for Error Messages }
Client represents a Coinbase REST API Client
func (*Client) CancelRequestMoney ¶
func (c *Client) CancelRequestMoney(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
CancelRequestMoney Lets a user cancel a money request. Endpoint: DELETE /accounts/:account_id/transactions/:transaction_id
func (*Client) CommitBuy ¶
CommitBuy Completes a buy that is created in commit: false state. Endpoint: POST /accounts/:account_id/buys/:buy_id/commit
func (*Client) CommitDeposit ¶
func (c *Client) CommitDeposit(ctx context.Context, accountID string, depositID string) (*Deposit, error)
CommitDeposit Completes a deposit that is created in commit: false state. Endpoint: POST /accounts/:account_id/deposits/:deposit_id/commit
func (*Client) CommitSell ¶
CommitSell Completes a sell that is created in commit: false state. Endpoint: POST /accounts/:account_id/sells/:sell_id/commit
func (*Client) CommitWithdrawal ¶
func (c *Client) CommitWithdrawal(ctx context.Context, accountID string, withdrawID string) (*Withdrawal, error)
CommitWithdrawal Completes a withdrawal that is created in commit: false state. Endpoint: POST /accounts/:account_id/withdrawals/:withdrawal_id/commit
func (*Client) CompleteRequestMoney ¶
func (c *Client) CompleteRequestMoney(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
CompleteRequestMoney Lets the recipient of a money request complete the request by sending money to the user who requested the money. Endpoint: POST /accounts/:account_id/transactions/:transaction_id/complete
func (*Client) CreateAddress ¶
func (c *Client) CreateAddress(ctx context.Context, accountID string, addressData CreateAddress) (*Address, error)
CreateAddress Creates a new address for an account. Endpoint: POST /accounts/:account_id/addresses
func (*Client) DeleteAccount ¶
DeleteAccount Removes user’s account. Endpoint: DELETE /accounts/:account_id
func (*Client) DepositFunds ¶
func (c *Client) DepositFunds(ctx context.Context, accountID string, depositData DepositFunds) (*Deposit, error)
DepositFunds Deposits user-defined amount of funds to a fiat account. Endpoint: POST /accounts/:account_id/deposits
func (*Client) GetAccount ¶
GetAccount Show current user’s account. Endpoint: GET /accounts/:account_id
func (*Client) GetBuy ¶
GetBuy Show an individual buy. Endpoint: GET /accounts/:account_id/buys/:buy_id
func (*Client) GetBuyPrice ¶
GetBuyPrice Get the total price to buy one bitcoin or ether. Endpoint: GET /prices/:currency_pair/buy
func (*Client) GetDeposit ¶
func (c *Client) GetDeposit(ctx context.Context, accountID string, depositID string) (*Deposit, error)
GetDeposit Show an individual deposit. Endpoint: GET /accounts/:account_id/deposits/:deposit_id
func (*Client) GetSell ¶
GetSell Show an individual sell. Endpoint: GET /accounts/:account_id/sells/:sell_id
func (*Client) GetSellPrice ¶
GetSellPrice Get the total price to sell one bitcoin or ether. Endpoint: GET /prices/:currency_pair/sell
func (*Client) GetSpotPrice ¶
GetSpotPrice Get the current market price for bitcoin. Endpoint: GET /prices/:currency_pair/spot
func (*Client) GetTransaction ¶
func (c *Client) GetTransaction(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
GetTransaction Show an individual transaction for an account. Endpoint: GET /accounts/:account_id/transactions/:transaction_id
func (*Client) GetUserByID ¶
GetUserByID Get any user’s public information with their ID. Endpoint: GET /users/:user_id
func (*Client) GetWithdrawal ¶
func (c *Client) GetWithdrawal(ctx context.Context, accountID string, withdrawalID string) (*Withdrawal, error)
GetWithdrawal Show an individual withdrawal. Endpoint: GET /accounts/:account_id/withdrawals/:withdrawal_id
func (*Client) ListAccounts ¶
ListAccounts Lists current user’s accounts to which the authentication method has access to. Endpoint: GET /accounts
func (*Client) ListAddressTransactions ¶
func (c *Client) ListAddressTransactions(ctx context.Context, accountID string, addressID string) (*[]Transaction, *Pagination, error)
ListAddressTransactions List transactions that have been sent to a specific address. Endpoint: GET /accounts/:account_id/addresses/:address_id/transactions
func (*Client) ListAddresses ¶
func (c *Client) ListAddresses(ctx context.Context, accountID string) (*[]Address, *Pagination, error)
ListAddresses Lists addresses for an account. Endpoint: GET /accounts/:account_id/addresses
func (*Client) ListBuys ¶
ListBuys Lists buys for an account. Endpoint: GET /accounts/:account_id/buys
func (*Client) ListCurrencies ¶
ListCurrencies List known currencies. Endpoint: GET /currencies
func (*Client) ListDeposits ¶
func (c *Client) ListDeposits(ctx context.Context, accountID string) (*[]Deposit, *Pagination, error)
ListDeposits Lists deposits for an account. Endpoint: GET /accounts/:account_id/deposits
func (*Client) ListExchangeRates ¶
ListExchangeRates Get current exchange rates. Endpoint: GET /exchange-rates
func (*Client) ListPaymentMethods ¶
func (c *Client) ListPaymentMethods(ctx context.Context) (*[]PaymentMethod, *Pagination, error)
ListPaymentMethods Lists current user’s payment methods. Endpoint: GET /payment-methods
func (*Client) ListSells ¶
ListSells Lists sells for an account. Endpoint: GET /accounts/:account_id/sells
func (*Client) ListTransactions ¶
func (c *Client) ListTransactions(ctx context.Context, accountID string) (*[]Transaction, *Pagination, error)
ListTransactions Lists account’s transactions. Endpoint: GET /accounts/:account_id/transactions
func (*Client) ListWithdrawals ¶
func (c *Client) ListWithdrawals(ctx context.Context, accountID string) (*[]Withdrawal, *Pagination, error)
ListWithdrawals Lists withdrawals for an account. Endpoint: GET /accounts/:account_id/withdrawals
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, url string, payload interface{}) (*http.Request, error)
NewRequest constructs a request Convert payload to a JSON
func (*Client) PlaceBuy ¶
PlaceBuy Buys a user-defined amount of bitcoin, bitcoin cash, litecoin or ethereum. Endpoint: POST /accounts/:account_id/buys
func (*Client) PlaceSell ¶
func (c *Client) PlaceSell(ctx context.Context, accountID string, sellData PlaceSell) (*Sell, error)
PlaceSell Sells a user-defined amount of bitcoin, bitcoin cash, litecoin or ethereum. Endpoint: POST /accounts/:account_id/sells
func (*Client) RequestMoney ¶
func (c *Client) RequestMoney(ctx context.Context, accountID string, requestData RequestMoney) (*Transaction, error)
RequestMoney Requests money from an email address. Endpoint: POST /accounts/:account_id/transactions
func (*Client) ResendRequestMoney ¶
func (c *Client) ResendRequestMoney(ctx context.Context, accountID string, transactionID string) (*Transaction, error)
ResendRequestMoney Lets the user resend a money request. Endpoint: POST /accounts/:account_id/transactions/:transaction_id/resend
func (*Client) Send ¶
Send makes a request to the API, the response body will be unmarshaled into v, or if v is an io.Writer, the response will be written to it without decoding
func (*Client) SendMoney ¶
func (c *Client) SendMoney(ctx context.Context, accountID string, sendData SendMoney) (*Transaction, error)
SendMoney Send funds to a bitcoin address, bitcoin cash address, litecoin address, ethereum address, or email address. Endpoint: POST /accounts/:account_id/transactions
func (*Client) SendWithAuth ¶
SendWithAuth makes a request to the API and apply Authentication headers automatically.
func (*Client) ShowAddress ¶
func (c *Client) ShowAddress(ctx context.Context, accountID string, addressID string) (*Address, error)
ShowAddress Show an individual address for an account. Endpoint: GET /accounts/:account_id/addresses/:address_id
func (*Client) ShowPaymentMethod ¶
func (c *Client) ShowPaymentMethod(ctx context.Context, paymentMethodID string) (*PaymentMethod, error)
ShowPaymentMethod Show current user’s payment method. Endpoint: GET /payment-methods/:payment_method_id/
func (*Client) TransferMoney ¶
func (c *Client) TransferMoney(ctx context.Context, accountID string, transferData TransferMoney) (*Transaction, error)
TransferMoney Transfer bitcoin, bitcoin cash, litecoin or ethereum between two of a user’s accounts. Endpoint: POST /accounts/:account_id/transactions
func (*Client) UpdateAccount ¶
func (c *Client) UpdateAccount(ctx context.Context, accountID string, accountData UpdateAccount) (*Account, error)
UpdateAccount Modifies user’s account. Endpoint: PUT /accounts/:account_id
func (*Client) UpdateUser ¶
UpdateUser Modify current user and their preferences. Endpoint: PUT /user
type CreateAddress ¶
type CreateAddress struct {
Name string `json:"name,omitempty"`
}
type Deposit ¶
type Deposit struct { ID string `json:"id,omitempty"` Status string `json:"status,omitempty"` PaymentMethod struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"payment_method,omitempty"` Transaction struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"transaction,omitempty"` Amount struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"amount,omitempty"` SubTotal struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"subtotal,omitempty"` Fee struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"fee,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` PayoutAt time.Time `json:"payout_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` Committed bool `json:"committed,omitempty"` }
type DepositFunds ¶
type ErrorResponse ¶
type ErrorResponse struct { Response *http.Response `json:"-,omitempty"` Errors []Errors `json:"errors,omitempty"` }
ErrorResponse represents a Coinbase REST API Error Response
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
Error method implementation for ErrorResponse struct
type Errors ¶
type Errors struct { ID string `json:"id,omitempty"` Message string `json:"message,omitempty"` Url string `json:"url,omitempty"` }
Error represents a Coinbase REST API Error Detail
type ExchangeRates ¶
type Pagination ¶
type Pagination struct { EndingBefore string `json:"ending_before,omitempty"` StartingAfter string `json:"starting_after,omitempty"` Limit uint8 `json:"limit,omitempty"` Order string `json:"order,omitempty"` PreviousUri string `json:"previous_uri,omitempty"` NextUri string `json:"next_uri,omitempty"` }
type PaymentMethod ¶
type PaymentMethod struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` Currency string `json:"currency,omitempty"` PrimaryBuy bool `json:"primary_buy,omitempty"` PrimarySell bool `json:"primary_sell,omitempty"` AllowBuy bool `json:"allow_buy,omitempty"` AllowSell bool `json:"allow_sell,omitempty"` InstantBuy bool `json:"instant_buy,omitempty"` InstantSell bool `json:"instant_sell,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` }
type PlaceBuy ¶
type PlaceBuy struct { Amount string `json:"amount,omitempty"` Total string `json:"total,omitempty"` Currency string `json:"currency,omitempty"` PaymentMethod string `json:"payment_method,omitempty"` AgreeBtcAmountVaries bool `json:"agree_btc_amount_varies,omitempty"` Commit bool `json:"commit,omitempty"` Quote bool `json:"quote,omitempty"` }
type PlaceSell ¶
type PlaceSell struct { Amount string `json:"amount,omitempty"` Total string `json:"total,omitempty"` Currency string `json:"currency,omitempty"` PaymentMethod string `json:"payment_method,omitempty"` AgreeBtcAmountVaries bool `json:"agree_btc_amount_varies,omitempty"` Commit bool `json:"commit,omitempty"` Quote bool `json:"quote,omitempty"` }
type RequestMoney ¶
type Response ¶
type Response struct { Pagination interface{} `json:"pagination"` Data interface{} `json:"data"` }
type Sell ¶
type Sell struct { ID string `json:"id,omitempty"` Status string `json:"status,omitempty"` PaymentMethod struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"payment_method,omitempty"` Transaction struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"transaction,omitempty"` Amount struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"amount,omitempty"` Total struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"total,omitempty"` SubTotal struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"subtotal,omitempty"` Fee struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"fee,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` PayoutAt time.Time `json:"payout_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` Committed bool `json:"committed,omitempty"` Instant bool `json:"instant,omitempty"` }
type SendMoney ¶
type SendMoney struct { Type string `json:"type,omitempty"` To string `json:"to,omitempty"` Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` Description string `json:"description,omitempty"` SkipNotifications bool `json:"skip_notifications,omitempty"` Fee string `json:"fee,omitempty"` Idem string `json:"idem,omitempty"` ToFinancialInstitution bool `json:"to_financial_institution,omitempty"` FinancialInstitutionWebsite string `json:"financial_institution_website,omitempty"` }
type Transaction ¶
type Transaction struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Status string `json:"status,omitempty"` Amount struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"amount,omitempty"` NativeAmount struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"native_amount,omitempty"` Description string `json:"description,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` Network Network `json:"network,omitempty"` From From `json:"from,omitempty"` }
type TransferMoney ¶
type UpdateAccount ¶
type UpdateAccount struct {
Name string `json:"name,omitempty"`
}
type UpdateCurrentUser ¶
type User ¶
type User struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Username string `json:"username,omitempty"` ProfileLocation string `json:"profile_location,omitempty"` ProfileBio string `json:"profile_bio,omitempty"` ProfileUrl string `json:"profile_url,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` SendsDisabled bool `json:"sends_disabled,omitempty"` }
type Withdrawal ¶
type Withdrawal struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Status string `json:"status,omitempty"` Amount struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"amount,omitempty"` PaymentMethod struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"payment_method,omitempty"` Transaction struct { ID string `json:"id,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` } `json:"transaction,omitempty"` SubTotal struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"subtotal,omitempty"` Fee struct { Amount string `json:"amount,omitempty"` Currency string `json:"currency,omitempty"` } `json:"fee,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` PayoutAt time.Time `json:"payout_at,omitempty"` Resource string `json:"resource,omitempty"` ResourcePath string `json:"resource_path,omitempty"` Committed bool `json:"committed,omitempty"` }