# 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 InlineResponse200113DataAccountProfits
#'
#' @description InlineResponse200113DataAccountProfits Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field time integer
#'
#' @field coinName character
#'
#' @field type integer
#'
#' @field puid integer
#'
#' @field subName character
#'
#' @field amount numeric
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse200113DataAccountProfits <- R6::R6Class(
'InlineResponse200113DataAccountProfits',
public = list(
`time` = NULL,
`coinName` = NULL,
`type` = NULL,
`puid` = NULL,
`subName` = NULL,
`amount` = NULL,
initialize = function(
`time`, `coinName`, `type`, `puid`, `subName`, `amount`, ...
) {
local.optional.var <- list(...)
if (!missing(`time`)) {
stopifnot(is.numeric(`time`), length(`time`) == 1)
self$`time` <- `time`
}
if (!missing(`coinName`)) {
stopifnot(is.character(`coinName`), length(`coinName`) == 1)
self$`coinName` <- `coinName`
}
if (!missing(`type`)) {
stopifnot(is.numeric(`type`), length(`type`) == 1)
self$`type` <- `type`
}
if (!missing(`puid`)) {
stopifnot(is.numeric(`puid`), length(`puid`) == 1)
self$`puid` <- `puid`
}
if (!missing(`subName`)) {
stopifnot(is.character(`subName`), length(`subName`) == 1)
self$`subName` <- `subName`
}
if (!missing(`amount`)) {
self$`amount` <- `amount`
}
},
toJSON = function() {
InlineResponse200113DataAccountProfitsObject <- list()
if (!is.null(self$`time`)) {
InlineResponse200113DataAccountProfitsObject[['time']] <-
self$`time`
}
if (!is.null(self$`coinName`)) {
InlineResponse200113DataAccountProfitsObject[['coinName']] <-
self$`coinName`
}
if (!is.null(self$`type`)) {
InlineResponse200113DataAccountProfitsObject[['type']] <-
self$`type`
}
if (!is.null(self$`puid`)) {
InlineResponse200113DataAccountProfitsObject[['puid']] <-
self$`puid`
}
if (!is.null(self$`subName`)) {
InlineResponse200113DataAccountProfitsObject[['subName']] <-
self$`subName`
}
if (!is.null(self$`amount`)) {
InlineResponse200113DataAccountProfitsObject[['amount']] <-
self$`amount`
}
InlineResponse200113DataAccountProfitsObject
},
fromJSON = function(InlineResponse200113DataAccountProfitsJson) {
InlineResponse200113DataAccountProfitsObject <- jsonlite::fromJSON(InlineResponse200113DataAccountProfitsJson)
if (!is.null(InlineResponse200113DataAccountProfitsObject$`time`)) {
self$`time` <- InlineResponse200113DataAccountProfitsObject$`time`
}
if (!is.null(InlineResponse200113DataAccountProfitsObject$`coinName`)) {
self$`coinName` <- InlineResponse200113DataAccountProfitsObject$`coinName`
}
if (!is.null(InlineResponse200113DataAccountProfitsObject$`type`)) {
self$`type` <- InlineResponse200113DataAccountProfitsObject$`type`
}
if (!is.null(InlineResponse200113DataAccountProfitsObject$`puid`)) {
self$`puid` <- InlineResponse200113DataAccountProfitsObject$`puid`
}
if (!is.null(InlineResponse200113DataAccountProfitsObject$`subName`)) {
self$`subName` <- InlineResponse200113DataAccountProfitsObject$`subName`
}
if (!is.null(InlineResponse200113DataAccountProfitsObject$`amount`)) {
self$`amount` <- InlineResponse200113DataAccountProfitsObject$`amount`
}
self
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`time`)) {
sprintf(
'"time":
%d
',
self$`time`
)},
if (!is.null(self$`coinName`)) {
sprintf(
'"coinName":
"%s"
',
self$`coinName`
)},
if (!is.null(self$`type`)) {
sprintf(
'"type":
%d
',
self$`type`
)},
if (!is.null(self$`puid`)) {
sprintf(
'"puid":
%d
',
self$`puid`
)},
if (!is.null(self$`subName`)) {
sprintf(
'"subName":
"%s"
',
self$`subName`
)},
if (!is.null(self$`amount`)) {
sprintf(
'"amount":
%d
',
self$`amount`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(InlineResponse200113DataAccountProfitsJson) {
InlineResponse200113DataAccountProfitsObject <- jsonlite::fromJSON(InlineResponse200113DataAccountProfitsJson)
self$`time` <- InlineResponse200113DataAccountProfitsObject$`time`
self$`coinName` <- InlineResponse200113DataAccountProfitsObject$`coinName`
self$`type` <- InlineResponse200113DataAccountProfitsObject$`type`
self$`puid` <- InlineResponse200113DataAccountProfitsObject$`puid`
self$`subName` <- InlineResponse200113DataAccountProfitsObject$`subName`
self$`amount` <- InlineResponse200113DataAccountProfitsObject$`amount`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.