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