# NamSor API v2
#
# NamSor API v2 : enpoints to process personal names (gender, cultural origin or ethnicity) in all alphabets or languages. Use GET methods for small tests, but prefer POST methods for higher throughput (batch processing of up to 100 names at a time). Need something you can't find here? We have many more features coming soon. Let us know, we'll do our best to add it!
#
# The version of the OpenAPI document: 2.0.10
# Contact: contact@namsor.com
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title APIBillingPeriodUsageOut
#' @description APIBillingPeriodUsageOut Class
#' @format An \code{R6Class} generator object
#' @field apiKey character [optional]
#'
#' @field subscriptionStarted integer [optional]
#'
#' @field periodStarted integer [optional]
#'
#' @field periodEnded integer [optional]
#'
#' @field stripeCurrentPeriodEnd integer [optional]
#'
#' @field stripeCurrentPeriodStart integer [optional]
#'
#' @field billingStatus character [optional]
#'
#' @field usage integer [optional]
#'
#' @field softLimit integer [optional]
#'
#' @field hardLimit integer [optional]
#'
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
APIBillingPeriodUsageOut <- R6::R6Class(
'APIBillingPeriodUsageOut',
public = list(
`apiKey` = NULL,
`subscriptionStarted` = NULL,
`periodStarted` = NULL,
`periodEnded` = NULL,
`stripeCurrentPeriodEnd` = NULL,
`stripeCurrentPeriodStart` = NULL,
`billingStatus` = NULL,
`usage` = NULL,
`softLimit` = NULL,
`hardLimit` = NULL,
initialize = function(`apiKey`=NULL, `subscriptionStarted`=NULL, `periodStarted`=NULL, `periodEnded`=NULL, `stripeCurrentPeriodEnd`=NULL, `stripeCurrentPeriodStart`=NULL, `billingStatus`=NULL, `usage`=NULL, `softLimit`=NULL, `hardLimit`=NULL, ...){
local.optional.var <- list(...)
if (!is.null(`apiKey`)) {
stopifnot(is.character(`apiKey`), length(`apiKey`) == 1)
self$`apiKey` <- `apiKey`
}
if (!is.null(`subscriptionStarted`)) {
stopifnot(is.numeric(`subscriptionStarted`), length(`subscriptionStarted`) == 1)
self$`subscriptionStarted` <- `subscriptionStarted`
}
if (!is.null(`periodStarted`)) {
stopifnot(is.numeric(`periodStarted`), length(`periodStarted`) == 1)
self$`periodStarted` <- `periodStarted`
}
if (!is.null(`periodEnded`)) {
stopifnot(is.numeric(`periodEnded`), length(`periodEnded`) == 1)
self$`periodEnded` <- `periodEnded`
}
if (!is.null(`stripeCurrentPeriodEnd`)) {
stopifnot(is.numeric(`stripeCurrentPeriodEnd`), length(`stripeCurrentPeriodEnd`) == 1)
self$`stripeCurrentPeriodEnd` <- `stripeCurrentPeriodEnd`
}
if (!is.null(`stripeCurrentPeriodStart`)) {
stopifnot(is.numeric(`stripeCurrentPeriodStart`), length(`stripeCurrentPeriodStart`) == 1)
self$`stripeCurrentPeriodStart` <- `stripeCurrentPeriodStart`
}
if (!is.null(`billingStatus`)) {
stopifnot(is.character(`billingStatus`), length(`billingStatus`) == 1)
self$`billingStatus` <- `billingStatus`
}
if (!is.null(`usage`)) {
stopifnot(is.numeric(`usage`), length(`usage`) == 1)
self$`usage` <- `usage`
}
if (!is.null(`softLimit`)) {
stopifnot(is.numeric(`softLimit`), length(`softLimit`) == 1)
self$`softLimit` <- `softLimit`
}
if (!is.null(`hardLimit`)) {
stopifnot(is.numeric(`hardLimit`), length(`hardLimit`) == 1)
self$`hardLimit` <- `hardLimit`
}
},
toJSON = function() {
APIBillingPeriodUsageOutObject <- list()
if (!is.null(self$`apiKey`)) {
APIBillingPeriodUsageOutObject[['apiKey']] <-
self$`apiKey`
}
if (!is.null(self$`subscriptionStarted`)) {
APIBillingPeriodUsageOutObject[['subscriptionStarted']] <-
self$`subscriptionStarted`
}
if (!is.null(self$`periodStarted`)) {
APIBillingPeriodUsageOutObject[['periodStarted']] <-
self$`periodStarted`
}
if (!is.null(self$`periodEnded`)) {
APIBillingPeriodUsageOutObject[['periodEnded']] <-
self$`periodEnded`
}
if (!is.null(self$`stripeCurrentPeriodEnd`)) {
APIBillingPeriodUsageOutObject[['stripeCurrentPeriodEnd']] <-
self$`stripeCurrentPeriodEnd`
}
if (!is.null(self$`stripeCurrentPeriodStart`)) {
APIBillingPeriodUsageOutObject[['stripeCurrentPeriodStart']] <-
self$`stripeCurrentPeriodStart`
}
if (!is.null(self$`billingStatus`)) {
APIBillingPeriodUsageOutObject[['billingStatus']] <-
self$`billingStatus`
}
if (!is.null(self$`usage`)) {
APIBillingPeriodUsageOutObject[['usage']] <-
self$`usage`
}
if (!is.null(self$`softLimit`)) {
APIBillingPeriodUsageOutObject[['softLimit']] <-
self$`softLimit`
}
if (!is.null(self$`hardLimit`)) {
APIBillingPeriodUsageOutObject[['hardLimit']] <-
self$`hardLimit`
}
APIBillingPeriodUsageOutObject
},
fromJSON = function(APIBillingPeriodUsageOutJson) {
APIBillingPeriodUsageOutObject <- jsonlite::fromJSON(APIBillingPeriodUsageOutJson)
if (!is.null(APIBillingPeriodUsageOutObject$`apiKey`)) {
self$`apiKey` <- APIBillingPeriodUsageOutObject$`apiKey`
}
if (!is.null(APIBillingPeriodUsageOutObject$`subscriptionStarted`)) {
self$`subscriptionStarted` <- APIBillingPeriodUsageOutObject$`subscriptionStarted`
}
if (!is.null(APIBillingPeriodUsageOutObject$`periodStarted`)) {
self$`periodStarted` <- APIBillingPeriodUsageOutObject$`periodStarted`
}
if (!is.null(APIBillingPeriodUsageOutObject$`periodEnded`)) {
self$`periodEnded` <- APIBillingPeriodUsageOutObject$`periodEnded`
}
if (!is.null(APIBillingPeriodUsageOutObject$`stripeCurrentPeriodEnd`)) {
self$`stripeCurrentPeriodEnd` <- APIBillingPeriodUsageOutObject$`stripeCurrentPeriodEnd`
}
if (!is.null(APIBillingPeriodUsageOutObject$`stripeCurrentPeriodStart`)) {
self$`stripeCurrentPeriodStart` <- APIBillingPeriodUsageOutObject$`stripeCurrentPeriodStart`
}
if (!is.null(APIBillingPeriodUsageOutObject$`billingStatus`)) {
self$`billingStatus` <- APIBillingPeriodUsageOutObject$`billingStatus`
}
if (!is.null(APIBillingPeriodUsageOutObject$`usage`)) {
self$`usage` <- APIBillingPeriodUsageOutObject$`usage`
}
if (!is.null(APIBillingPeriodUsageOutObject$`softLimit`)) {
self$`softLimit` <- APIBillingPeriodUsageOutObject$`softLimit`
}
if (!is.null(APIBillingPeriodUsageOutObject$`hardLimit`)) {
self$`hardLimit` <- APIBillingPeriodUsageOutObject$`hardLimit`
}
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`apiKey`)) {
sprintf(
'"apiKey":
"%s"
',
self$`apiKey`
)},
if (!is.null(self$`subscriptionStarted`)) {
sprintf(
'"subscriptionStarted":
%d
',
self$`subscriptionStarted`
)},
if (!is.null(self$`periodStarted`)) {
sprintf(
'"periodStarted":
%d
',
self$`periodStarted`
)},
if (!is.null(self$`periodEnded`)) {
sprintf(
'"periodEnded":
%d
',
self$`periodEnded`
)},
if (!is.null(self$`stripeCurrentPeriodEnd`)) {
sprintf(
'"stripeCurrentPeriodEnd":
%d
',
self$`stripeCurrentPeriodEnd`
)},
if (!is.null(self$`stripeCurrentPeriodStart`)) {
sprintf(
'"stripeCurrentPeriodStart":
%d
',
self$`stripeCurrentPeriodStart`
)},
if (!is.null(self$`billingStatus`)) {
sprintf(
'"billingStatus":
"%s"
',
self$`billingStatus`
)},
if (!is.null(self$`usage`)) {
sprintf(
'"usage":
%d
',
self$`usage`
)},
if (!is.null(self$`softLimit`)) {
sprintf(
'"softLimit":
%d
',
self$`softLimit`
)},
if (!is.null(self$`hardLimit`)) {
sprintf(
'"hardLimit":
%d
',
self$`hardLimit`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(APIBillingPeriodUsageOutJson) {
APIBillingPeriodUsageOutObject <- jsonlite::fromJSON(APIBillingPeriodUsageOutJson)
self$`apiKey` <- APIBillingPeriodUsageOutObject$`apiKey`
self$`subscriptionStarted` <- APIBillingPeriodUsageOutObject$`subscriptionStarted`
self$`periodStarted` <- APIBillingPeriodUsageOutObject$`periodStarted`
self$`periodEnded` <- APIBillingPeriodUsageOutObject$`periodEnded`
self$`stripeCurrentPeriodEnd` <- APIBillingPeriodUsageOutObject$`stripeCurrentPeriodEnd`
self$`stripeCurrentPeriodStart` <- APIBillingPeriodUsageOutObject$`stripeCurrentPeriodStart`
self$`billingStatus` <- APIBillingPeriodUsageOutObject$`billingStatus`
self$`usage` <- APIBillingPeriodUsageOutObject$`usage`
self$`softLimit` <- APIBillingPeriodUsageOutObject$`softLimit`
self$`hardLimit` <- APIBillingPeriodUsageOutObject$`hardLimit`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.