R/inline_response20089.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 InlineResponse20089
#'
#' @description InlineResponse20089 Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field asset  character 
#'
#' @field displayPriority  integer 
#'
#' @field duration  integer 
#'
#' @field interestPerLot  character 
#'
#' @field interestRate  character 
#'
#' @field lotSize  character 
#'
#' @field lotsLowLimit  integer 
#'
#' @field lotsPurchased  integer 
#'
#' @field lotsUpLimit  integer 
#'
#' @field maxLotsPerUser  integer 
#'
#' @field needKyc  character 
#'
#' @field projectId  character 
#'
#' @field projectName  character 
#'
#' @field status  character 
#'
#' @field type  character 
#'
#' @field withAreaLimitation  character 
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
InlineResponse20089 <- R6::R6Class(
  'InlineResponse20089',
  public = list(
    `asset` = NULL,
    `displayPriority` = NULL,
    `duration` = NULL,
    `interestPerLot` = NULL,
    `interestRate` = NULL,
    `lotSize` = NULL,
    `lotsLowLimit` = NULL,
    `lotsPurchased` = NULL,
    `lotsUpLimit` = NULL,
    `maxLotsPerUser` = NULL,
    `needKyc` = NULL,
    `projectId` = NULL,
    `projectName` = NULL,
    `status` = NULL,
    `type` = NULL,
    `withAreaLimitation` = NULL,
    initialize = function(
        `asset`, `displayPriority`, `duration`, `interestPerLot`, `interestRate`, `lotSize`, `lotsLowLimit`, `lotsPurchased`, `lotsUpLimit`, `maxLotsPerUser`, `needKyc`, `projectId`, `projectName`, `status`, `type`, `withAreaLimitation`, ...
    ) {
      local.optional.var <- list(...)
      if (!missing(`asset`)) {
        stopifnot(is.character(`asset`), length(`asset`) == 1)
        self$`asset` <- `asset`
      }
      if (!missing(`displayPriority`)) {
        stopifnot(is.numeric(`displayPriority`), length(`displayPriority`) == 1)
        self$`displayPriority` <- `displayPriority`
      }
      if (!missing(`duration`)) {
        stopifnot(is.numeric(`duration`), length(`duration`) == 1)
        self$`duration` <- `duration`
      }
      if (!missing(`interestPerLot`)) {
        stopifnot(is.character(`interestPerLot`), length(`interestPerLot`) == 1)
        self$`interestPerLot` <- `interestPerLot`
      }
      if (!missing(`interestRate`)) {
        stopifnot(is.character(`interestRate`), length(`interestRate`) == 1)
        self$`interestRate` <- `interestRate`
      }
      if (!missing(`lotSize`)) {
        stopifnot(is.character(`lotSize`), length(`lotSize`) == 1)
        self$`lotSize` <- `lotSize`
      }
      if (!missing(`lotsLowLimit`)) {
        stopifnot(is.numeric(`lotsLowLimit`), length(`lotsLowLimit`) == 1)
        self$`lotsLowLimit` <- `lotsLowLimit`
      }
      if (!missing(`lotsPurchased`)) {
        stopifnot(is.numeric(`lotsPurchased`), length(`lotsPurchased`) == 1)
        self$`lotsPurchased` <- `lotsPurchased`
      }
      if (!missing(`lotsUpLimit`)) {
        stopifnot(is.numeric(`lotsUpLimit`), length(`lotsUpLimit`) == 1)
        self$`lotsUpLimit` <- `lotsUpLimit`
      }
      if (!missing(`maxLotsPerUser`)) {
        stopifnot(is.numeric(`maxLotsPerUser`), length(`maxLotsPerUser`) == 1)
        self$`maxLotsPerUser` <- `maxLotsPerUser`
      }
      if (!missing(`needKyc`)) {
        stopifnot(is.logical(`needKyc`), length(`needKyc`) == 1)
        self$`needKyc` <- `needKyc`
      }
      if (!missing(`projectId`)) {
        stopifnot(is.character(`projectId`), length(`projectId`) == 1)
        self$`projectId` <- `projectId`
      }
      if (!missing(`projectName`)) {
        stopifnot(is.character(`projectName`), length(`projectName`) == 1)
        self$`projectName` <- `projectName`
      }
      if (!missing(`status`)) {
        stopifnot(is.character(`status`), length(`status`) == 1)
        self$`status` <- `status`
      }
      if (!missing(`type`)) {
        stopifnot(is.character(`type`), length(`type`) == 1)
        self$`type` <- `type`
      }
      if (!missing(`withAreaLimitation`)) {
        stopifnot(is.logical(`withAreaLimitation`), length(`withAreaLimitation`) == 1)
        self$`withAreaLimitation` <- `withAreaLimitation`
      }
    },
    toJSON = function() {
      InlineResponse20089Object <- list()
      if (!is.null(self$`asset`)) {
        InlineResponse20089Object[['asset']] <-
          self$`asset`
      }
      if (!is.null(self$`displayPriority`)) {
        InlineResponse20089Object[['displayPriority']] <-
          self$`displayPriority`
      }
      if (!is.null(self$`duration`)) {
        InlineResponse20089Object[['duration']] <-
          self$`duration`
      }
      if (!is.null(self$`interestPerLot`)) {
        InlineResponse20089Object[['interestPerLot']] <-
          self$`interestPerLot`
      }
      if (!is.null(self$`interestRate`)) {
        InlineResponse20089Object[['interestRate']] <-
          self$`interestRate`
      }
      if (!is.null(self$`lotSize`)) {
        InlineResponse20089Object[['lotSize']] <-
          self$`lotSize`
      }
      if (!is.null(self$`lotsLowLimit`)) {
        InlineResponse20089Object[['lotsLowLimit']] <-
          self$`lotsLowLimit`
      }
      if (!is.null(self$`lotsPurchased`)) {
        InlineResponse20089Object[['lotsPurchased']] <-
          self$`lotsPurchased`
      }
      if (!is.null(self$`lotsUpLimit`)) {
        InlineResponse20089Object[['lotsUpLimit']] <-
          self$`lotsUpLimit`
      }
      if (!is.null(self$`maxLotsPerUser`)) {
        InlineResponse20089Object[['maxLotsPerUser']] <-
          self$`maxLotsPerUser`
      }
      if (!is.null(self$`needKyc`)) {
        InlineResponse20089Object[['needKyc']] <-
          self$`needKyc`
      }
      if (!is.null(self$`projectId`)) {
        InlineResponse20089Object[['projectId']] <-
          self$`projectId`
      }
      if (!is.null(self$`projectName`)) {
        InlineResponse20089Object[['projectName']] <-
          self$`projectName`
      }
      if (!is.null(self$`status`)) {
        InlineResponse20089Object[['status']] <-
          self$`status`
      }
      if (!is.null(self$`type`)) {
        InlineResponse20089Object[['type']] <-
          self$`type`
      }
      if (!is.null(self$`withAreaLimitation`)) {
        InlineResponse20089Object[['withAreaLimitation']] <-
          self$`withAreaLimitation`
      }

      InlineResponse20089Object
    },
    fromJSON = function(InlineResponse20089Json) {
      InlineResponse20089Object <- jsonlite::fromJSON(InlineResponse20089Json)
      if (!is.null(InlineResponse20089Object$`asset`)) {
        self$`asset` <- InlineResponse20089Object$`asset`
      }
      if (!is.null(InlineResponse20089Object$`displayPriority`)) {
        self$`displayPriority` <- InlineResponse20089Object$`displayPriority`
      }
      if (!is.null(InlineResponse20089Object$`duration`)) {
        self$`duration` <- InlineResponse20089Object$`duration`
      }
      if (!is.null(InlineResponse20089Object$`interestPerLot`)) {
        self$`interestPerLot` <- InlineResponse20089Object$`interestPerLot`
      }
      if (!is.null(InlineResponse20089Object$`interestRate`)) {
        self$`interestRate` <- InlineResponse20089Object$`interestRate`
      }
      if (!is.null(InlineResponse20089Object$`lotSize`)) {
        self$`lotSize` <- InlineResponse20089Object$`lotSize`
      }
      if (!is.null(InlineResponse20089Object$`lotsLowLimit`)) {
        self$`lotsLowLimit` <- InlineResponse20089Object$`lotsLowLimit`
      }
      if (!is.null(InlineResponse20089Object$`lotsPurchased`)) {
        self$`lotsPurchased` <- InlineResponse20089Object$`lotsPurchased`
      }
      if (!is.null(InlineResponse20089Object$`lotsUpLimit`)) {
        self$`lotsUpLimit` <- InlineResponse20089Object$`lotsUpLimit`
      }
      if (!is.null(InlineResponse20089Object$`maxLotsPerUser`)) {
        self$`maxLotsPerUser` <- InlineResponse20089Object$`maxLotsPerUser`
      }
      if (!is.null(InlineResponse20089Object$`needKyc`)) {
        self$`needKyc` <- InlineResponse20089Object$`needKyc`
      }
      if (!is.null(InlineResponse20089Object$`projectId`)) {
        self$`projectId` <- InlineResponse20089Object$`projectId`
      }
      if (!is.null(InlineResponse20089Object$`projectName`)) {
        self$`projectName` <- InlineResponse20089Object$`projectName`
      }
      if (!is.null(InlineResponse20089Object$`status`)) {
        self$`status` <- InlineResponse20089Object$`status`
      }
      if (!is.null(InlineResponse20089Object$`type`)) {
        self$`type` <- InlineResponse20089Object$`type`
      }
      if (!is.null(InlineResponse20089Object$`withAreaLimitation`)) {
        self$`withAreaLimitation` <- InlineResponse20089Object$`withAreaLimitation`
      }
      self
    },
    toJSONString = function() {
      jsoncontent <- c(
        if (!is.null(self$`asset`)) {
        sprintf(
        '"asset":
          "%s"
                ',
        self$`asset`
        )},
        if (!is.null(self$`displayPriority`)) {
        sprintf(
        '"displayPriority":
          %d
                ',
        self$`displayPriority`
        )},
        if (!is.null(self$`duration`)) {
        sprintf(
        '"duration":
          %d
                ',
        self$`duration`
        )},
        if (!is.null(self$`interestPerLot`)) {
        sprintf(
        '"interestPerLot":
          "%s"
                ',
        self$`interestPerLot`
        )},
        if (!is.null(self$`interestRate`)) {
        sprintf(
        '"interestRate":
          "%s"
                ',
        self$`interestRate`
        )},
        if (!is.null(self$`lotSize`)) {
        sprintf(
        '"lotSize":
          "%s"
                ',
        self$`lotSize`
        )},
        if (!is.null(self$`lotsLowLimit`)) {
        sprintf(
        '"lotsLowLimit":
          %d
                ',
        self$`lotsLowLimit`
        )},
        if (!is.null(self$`lotsPurchased`)) {
        sprintf(
        '"lotsPurchased":
          %d
                ',
        self$`lotsPurchased`
        )},
        if (!is.null(self$`lotsUpLimit`)) {
        sprintf(
        '"lotsUpLimit":
          %d
                ',
        self$`lotsUpLimit`
        )},
        if (!is.null(self$`maxLotsPerUser`)) {
        sprintf(
        '"maxLotsPerUser":
          %d
                ',
        self$`maxLotsPerUser`
        )},
        if (!is.null(self$`needKyc`)) {
        sprintf(
        '"needKyc":
          %s
                ',
        tolower(self$`needKyc`)
        )},
        if (!is.null(self$`projectId`)) {
        sprintf(
        '"projectId":
          "%s"
                ',
        self$`projectId`
        )},
        if (!is.null(self$`projectName`)) {
        sprintf(
        '"projectName":
          "%s"
                ',
        self$`projectName`
        )},
        if (!is.null(self$`status`)) {
        sprintf(
        '"status":
          "%s"
                ',
        self$`status`
        )},
        if (!is.null(self$`type`)) {
        sprintf(
        '"type":
          "%s"
                ',
        self$`type`
        )},
        if (!is.null(self$`withAreaLimitation`)) {
        sprintf(
        '"withAreaLimitation":
          %s
                ',
        tolower(self$`withAreaLimitation`)
        )}
      )
      jsoncontent <- paste(jsoncontent, collapse = ",")
      paste('{', jsoncontent, '}', sep = "")
    },
    fromJSONString = function(InlineResponse20089Json) {
      InlineResponse20089Object <- jsonlite::fromJSON(InlineResponse20089Json)
      self$`asset` <- InlineResponse20089Object$`asset`
      self$`displayPriority` <- InlineResponse20089Object$`displayPriority`
      self$`duration` <- InlineResponse20089Object$`duration`
      self$`interestPerLot` <- InlineResponse20089Object$`interestPerLot`
      self$`interestRate` <- InlineResponse20089Object$`interestRate`
      self$`lotSize` <- InlineResponse20089Object$`lotSize`
      self$`lotsLowLimit` <- InlineResponse20089Object$`lotsLowLimit`
      self$`lotsPurchased` <- InlineResponse20089Object$`lotsPurchased`
      self$`lotsUpLimit` <- InlineResponse20089Object$`lotsUpLimit`
      self$`maxLotsPerUser` <- InlineResponse20089Object$`maxLotsPerUser`
      self$`needKyc` <- InlineResponse20089Object$`needKyc`
      self$`projectId` <- InlineResponse20089Object$`projectId`
      self$`projectName` <- InlineResponse20089Object$`projectName`
      self$`status` <- InlineResponse20089Object$`status`
      self$`type` <- InlineResponse20089Object$`type`
      self$`withAreaLimitation` <- InlineResponse20089Object$`withAreaLimitation`
      self
    }
  )
)
grahamjwhite/binanceRapi documentation built on Nov. 22, 2022, 9:37 p.m.