Skip to content

Commit

Permalink
api: Regenerate types - add TransferID (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
echarrod authored Feb 23, 2024
1 parent 18fa69d commit c142d4d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
22 changes: 16 additions & 6 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ type CancelWithdrawalResponse struct {
// Status
Status Status `json:"status"`

// Transfer ID is the identifier of the Withdrawal's transfer once it completes.
TransferId string `json:"transfer_id"`

// Type distinguishes between different withdrawal methods where more than one is supported
// for the given currency.
Type string `json:"type"`
Expand Down Expand Up @@ -188,6 +191,9 @@ type CreateWithdrawalResponse struct {
// Status
Status Status `json:"status"`

// Transfer ID is the identifier of the Withdrawal's transfer once it completes.
TransferId string `json:"transfer_id"`

// Type distinguishes between different withdrawal methods where more than one is supported
// for the given currency.
Type string `json:"type"`
Expand Down Expand Up @@ -588,7 +594,7 @@ type GetOrderV2Response struct {
// Use this field and `side` to determine credit or debit of funds.
Base decimal.Decimal `json:"base"`

// The base account ID used to place the order
// The base currency account
BaseAccountId int64 `json:"base_account_id"`

// Client Order ID has the value that was passed in when the Order was posted.
Expand All @@ -606,7 +612,7 @@ type GetOrderV2Response struct {
// Use this field and `side` to determine credit or debit of funds.
Counter decimal.Decimal `json:"counter"`

// The counter account ID used to place the order
// The counter currency account
CounterAccountId int64 `json:"counter_account_id"`

// Time of order creation (Unix milliseconds)
Expand Down Expand Up @@ -698,7 +704,7 @@ type GetOrderV3Response struct {
// Use this field and `side` to determine credit or debit of funds.
Base decimal.Decimal `json:"base"`

// The base account ID used to place the order
// The base currency account
BaseAccountId int64 `json:"base_account_id"`

// Client Order ID has the value that was passed in when the Order was posted.
Expand All @@ -716,7 +722,7 @@ type GetOrderV3Response struct {
// Use this field and `side` to determine credit or debit of funds.
Counter decimal.Decimal `json:"counter"`

// The counter account ID used to place the order
// The counter currency account
CounterAccountId int64 `json:"counter_account_id"`

// Time of order creation (Unix milliseconds)
Expand Down Expand Up @@ -898,6 +904,9 @@ type GetWithdrawalResponse struct {
// Status
Status Status `json:"status"`

// Transfer ID is the identifier of the Withdrawal's transfer once it completes.
TransferId string `json:"transfer_id"`

// Type distinguishes between different withdrawal methods where more than one is supported
// for the given currency.
Type string `json:"type"`
Expand All @@ -918,8 +927,7 @@ func (cl *Client) GetWithdrawal(ctx context.Context, req *GetWithdrawalRequest)
}

// ListBeneficiariesResponseRequest is the request struct for ListBeneficiariesResponse.
type ListBeneficiariesResponseRequest struct {
}
type ListBeneficiariesResponseRequest struct{}

// ListBeneficiariesResponseResponse is the response struct for ListBeneficiariesResponse.
type ListBeneficiariesResponseResponse struct {
Expand Down Expand Up @@ -1031,6 +1039,8 @@ type ListOrdersV2Response struct {
// oldest. This endpoint will list up to 100 most recent open orders by
// default.
//
// <b>Please note:</b> This data is archived 100 days after an exchange order is completed.
//
// Permissions required: <Code>Perm_R_Orders</Code>
func (cl *Client) ListOrdersV2(ctx context.Context, req *ListOrdersV2Request) (*ListOrdersV2Response, error) {
var res ListOrdersV2Response
Expand Down
7 changes: 5 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ type OrderV2 struct {
// Use this field and `side` to determine credit or debit of funds.
Base decimal.Decimal `json:"base"`

// The base account ID used to place the order
// The base currency account
BaseAccountId int64 `json:"base_account_id"`

// Client Order ID has the value that was passed in when the Order was posted.
Expand All @@ -253,7 +253,7 @@ type OrderV2 struct {
// Use this field and `side` to determine credit or debit of funds.
Counter decimal.Decimal `json:"counter"`

// The counter account ID used to place the order
// The counter currency account
CounterAccountId int64 `json:"counter_account_id"`

// Time of order creation (Unix milliseconds)
Expand Down Expand Up @@ -557,6 +557,9 @@ type Withdrawal struct {
// Status
Status Status `json:"status"`

// Transfer ID is the identifier of the Withdrawal's transfer once it completes.
TransferId string `json:"transfer_id"`

// Type distinguishes between different withdrawal methods where more than one is supported
// for the given currency.
Type string `json:"type"`
Expand Down

0 comments on commit c142d4d

Please sign in to comment.