# 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 InlineResponse20075
#'
#' @description InlineResponse20075 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field code integer
#'
#' @field msg character
#'
#' @field snapshotVos list( \link{InlineResponse20075SnapshotVos} )
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse20075 <- R6::R6Class(
'InlineResponse20075',
public = list(
`code` = NULL,
`msg` = NULL,
`snapshotVos` = NULL,
initialize = function(
`code`, `msg`, `snapshotVos`, ...
) {
local.optional.var <- list(...)
if (!missing(`code`)) {
stopifnot(is.numeric(`code`), length(`code`) == 1)
self$`code` <- `code`
}
if (!missing(`msg`)) {
stopifnot(is.character(`msg`), length(`msg`) == 1)
self$`msg` <- `msg`
}
if (!missing(`snapshotVos`)) {
stopifnot(is.vector(`snapshotVos`), length(`snapshotVos`) != 0)
sapply(`snapshotVos`, function(x) stopifnot(R6::is.R6(x)))
self$`snapshotVos` <- `snapshotVos`
}
},
toJSON = function() {
InlineResponse20075Object <- list()
if (!is.null(self$`code`)) {
InlineResponse20075Object[['code']] <-
self$`code`
}
if (!is.null(self$`msg`)) {
InlineResponse20075Object[['msg']] <-
self$`msg`
}
if (!is.null(self$`snapshotVos`)) {
InlineResponse20075Object[['snapshotVos']] <-
lapply(self$`snapshotVos`, function(x) x$toJSON())
}
InlineResponse20075Object
},
fromJSON = function(InlineResponse20075Json) {
InlineResponse20075Object <- jsonlite::fromJSON(InlineResponse20075Json)
if (!is.null(InlineResponse20075Object$`code`)) {
self$`code` <- InlineResponse20075Object$`code`
}
if (!is.null(InlineResponse20075Object$`msg`)) {
self$`msg` <- InlineResponse20075Object$`msg`
}
if (!is.null(InlineResponse20075Object$`snapshotVos`)) {
self$`snapshotVos` <- ApiClient$new()$deserializeObj(InlineResponse20075Object$`snapshotVos`, "array[InlineResponse20075SnapshotVos]", loadNamespace("binanceRapi"))
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`code`)) {
sprintf(
'"code":
%d
',
self$`code`
)},
if (!is.null(self$`msg`)) {
sprintf(
'"msg":
"%s"
',
self$`msg`
)},
if (!is.null(self$`snapshotVos`)) {
sprintf(
'"snapshotVos":
[%s]
',
paste(sapply(self$`snapshotVos`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",")
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(InlineResponse20075Json) {
InlineResponse20075Object <- jsonlite::fromJSON(InlineResponse20075Json)
self$`code` <- InlineResponse20075Object$`code`
self$`msg` <- InlineResponse20075Object$`msg`
self$`snapshotVos` <- ApiClient$new()$deserializeObj(InlineResponse20075Object$`snapshotVos`, "array[InlineResponse20075SnapshotVos]", loadNamespace("binanceRapi"))
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.