# 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 InlineResponse200108
#'
#' @description InlineResponse200108 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field code integer
#'
#' @field msg character
#'
#' @field data \link{InlineResponse200108Data}
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse200108 <- R6::R6Class(
'InlineResponse200108',
public = list(
`code` = NULL,
`msg` = NULL,
`data` = NULL,
initialize = function(
`code`, `msg`, `data`, ...
) {
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(`data`)) {
stopifnot(R6::is.R6(`data`))
self$`data` <- `data`
}
},
toJSON = function() {
InlineResponse200108Object <- list()
if (!is.null(self$`code`)) {
InlineResponse200108Object[['code']] <-
self$`code`
}
if (!is.null(self$`msg`)) {
InlineResponse200108Object[['msg']] <-
self$`msg`
}
if (!is.null(self$`data`)) {
InlineResponse200108Object[['data']] <-
self$`data`$toJSON()
}
InlineResponse200108Object
},
fromJSON = function(InlineResponse200108Json) {
InlineResponse200108Object <- jsonlite::fromJSON(InlineResponse200108Json)
if (!is.null(InlineResponse200108Object$`code`)) {
self$`code` <- InlineResponse200108Object$`code`
}
if (!is.null(InlineResponse200108Object$`msg`)) {
self$`msg` <- InlineResponse200108Object$`msg`
}
if (!is.null(InlineResponse200108Object$`data`)) {
dataObject <- InlineResponse200108Data$new()
dataObject$fromJSON(jsonlite::toJSON(InlineResponse200108Object$data, auto_unbox = TRUE, digits = NA))
self$`data` <- dataObject
}
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$`data`)) {
sprintf(
'"data":
%s
',
jsonlite::toJSON(self$`data`$toJSON(), auto_unbox=TRUE, digits = NA)
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(InlineResponse200108Json) {
InlineResponse200108Object <- jsonlite::fromJSON(InlineResponse200108Json)
self$`code` <- InlineResponse200108Object$`code`
self$`msg` <- InlineResponse200108Object$`msg`
self$`data` <- InlineResponse200108Data$new()$fromJSON(jsonlite::toJSON(InlineResponse200108Object$data, auto_unbox = TRUE, digits = NA))
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.