# Binance Public Spot API
#
# OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en)
#
# The version of the OpenAPI document: 1.0
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title InlineResponse20092PositionAmountVos
#'
#' @description InlineResponse20092PositionAmountVos Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field amount character
#'
#' @field amountInBTC character
#'
#' @field amountInUSDT character
#'
#' @field asset character
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse20092PositionAmountVos <- R6::R6Class(
'InlineResponse20092PositionAmountVos',
public = list(
`amount` = NULL,
`amountInBTC` = NULL,
`amountInUSDT` = NULL,
`asset` = NULL,
initialize = function(
`amount`, `amountInBTC`, `amountInUSDT`, `asset`, ...
) {
local.optional.var <- list(...)
if (!missing(`amount`)) {
stopifnot(is.character(`amount`), length(`amount`) == 1)
self$`amount` <- `amount`
}
if (!missing(`amountInBTC`)) {
stopifnot(is.character(`amountInBTC`), length(`amountInBTC`) == 1)
self$`amountInBTC` <- `amountInBTC`
}
if (!missing(`amountInUSDT`)) {
stopifnot(is.character(`amountInUSDT`), length(`amountInUSDT`) == 1)
self$`amountInUSDT` <- `amountInUSDT`
}
if (!missing(`asset`)) {
stopifnot(is.character(`asset`), length(`asset`) == 1)
self$`asset` <- `asset`
}
},
toJSON = function() {
InlineResponse20092PositionAmountVosObject <- list()
if (!is.null(self$`amount`)) {
InlineResponse20092PositionAmountVosObject[['amount']] <-
self$`amount`
}
if (!is.null(self$`amountInBTC`)) {
InlineResponse20092PositionAmountVosObject[['amountInBTC']] <-
self$`amountInBTC`
}
if (!is.null(self$`amountInUSDT`)) {
InlineResponse20092PositionAmountVosObject[['amountInUSDT']] <-
self$`amountInUSDT`
}
if (!is.null(self$`asset`)) {
InlineResponse20092PositionAmountVosObject[['asset']] <-
self$`asset`
}
InlineResponse20092PositionAmountVosObject
},
fromJSON = function(InlineResponse20092PositionAmountVosJson) {
InlineResponse20092PositionAmountVosObject <- jsonlite::fromJSON(InlineResponse20092PositionAmountVosJson)
if (!is.null(InlineResponse20092PositionAmountVosObject$`amount`)) {
self$`amount` <- InlineResponse20092PositionAmountVosObject$`amount`
}
if (!is.null(InlineResponse20092PositionAmountVosObject$`amountInBTC`)) {
self$`amountInBTC` <- InlineResponse20092PositionAmountVosObject$`amountInBTC`
}
if (!is.null(InlineResponse20092PositionAmountVosObject$`amountInUSDT`)) {
self$`amountInUSDT` <- InlineResponse20092PositionAmountVosObject$`amountInUSDT`
}
if (!is.null(InlineResponse20092PositionAmountVosObject$`asset`)) {
self$`asset` <- InlineResponse20092PositionAmountVosObject$`asset`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`amount`)) {
sprintf(
'"amount":
"%s"
',
self$`amount`
)},
if (!is.null(self$`amountInBTC`)) {
sprintf(
'"amountInBTC":
"%s"
',
self$`amountInBTC`
)},
if (!is.null(self$`amountInUSDT`)) {
sprintf(
'"amountInUSDT":
"%s"
',
self$`amountInUSDT`
)},
if (!is.null(self$`asset`)) {
sprintf(
'"asset":
"%s"
',
self$`asset`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(InlineResponse20092PositionAmountVosJson) {
InlineResponse20092PositionAmountVosObject <- jsonlite::fromJSON(InlineResponse20092PositionAmountVosJson)
self$`amount` <- InlineResponse20092PositionAmountVosObject$`amount`
self$`amountInBTC` <- InlineResponse20092PositionAmountVosObject$`amountInBTC`
self$`amountInUSDT` <- InlineResponse20092PositionAmountVosObject$`amountInUSDT`
self$`asset` <- InlineResponse20092PositionAmountVosObject$`asset`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.