R/inline_response20097.R

# 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 InlineResponse20097
#'
#' @description InlineResponse20097 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field success  character 
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse20097 <- R6::R6Class(
  'InlineResponse20097',
  public = list(
    `success` = NULL,
    initialize = function(
        `success`, ...
    ) {
      local.optional.var <- list(...)
      if (!missing(`success`)) {
        stopifnot(is.logical(`success`), length(`success`) == 1)
        self$`success` <- `success`
      }
    },
    toJSON = function() {
      InlineResponse20097Object <- list()
      if (!is.null(self$`success`)) {
        InlineResponse20097Object[['success']] <-
          self$`success`
      }

      InlineResponse20097Object
    },
    fromJSON = function(InlineResponse20097Json) {
      InlineResponse20097Object <- jsonlite::fromJSON(InlineResponse20097Json)
      if (!is.null(InlineResponse20097Object$`success`)) {
        self$`success` <- InlineResponse20097Object$`success`
      }
      self
    },
    toJSONString = function() {
      jsoncontent <- c(
        if (!is.null(self$`success`)) {
        sprintf(
        '"success":
          %s
                ',
        tolower(self$`success`)
        )}
      )
      jsoncontent <- paste(jsoncontent, collapse = ",")
      paste('{', jsoncontent, '}', sep = "")
    },
    fromJSONString = function(InlineResponse20097Json) {
      InlineResponse20097Object <- jsonlite::fromJSON(InlineResponse20097Json)
      self$`success` <- InlineResponse20097Object$`success`
      self
    }
  )
)
grahamjwhite/binanceRapi documentation built on Nov. 22, 2022, 9:37 p.m.