# 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 APIPlanSubscriptionOut
#' @description APIPlanSubscriptionOut Class
#' @format An \code{R6Class} generator object
#' @field apiKey character [optional]
#'
#' @field planStarted integer [optional]
#'
#' @field priorPlanStarted integer [optional]
#'
#' @field planEnded integer [optional]
#'
#' @field taxRate numeric [optional]
#'
#' @field planName character [optional]
#'
#' @field planBaseFeesKey character [optional]
#'
#' @field planStatus character [optional]
#'
#' @field planQuota integer [optional]
#'
#' @field priceUSD numeric [optional]
#'
#' @field priceOverageUSD numeric [optional]
#'
#' @field price numeric [optional]
#'
#' @field priceOverage numeric [optional]
#'
#' @field currency character [optional]
#'
#' @field currencyFactor numeric [optional]
#'
#' @field stripeCustomerId character [optional]
#'
#' @field stripeStatus character [optional]
#'
#' @field stripeSubscription character [optional]
#'
#' @field userId character [optional]
#'
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
APIPlanSubscriptionOut <- R6::R6Class(
'APIPlanSubscriptionOut',
public = list(
`apiKey` = NULL,
`planStarted` = NULL,
`priorPlanStarted` = NULL,
`planEnded` = NULL,
`taxRate` = NULL,
`planName` = NULL,
`planBaseFeesKey` = NULL,
`planStatus` = NULL,
`planQuota` = NULL,
`priceUSD` = NULL,
`priceOverageUSD` = NULL,
`price` = NULL,
`priceOverage` = NULL,
`currency` = NULL,
`currencyFactor` = NULL,
`stripeCustomerId` = NULL,
`stripeStatus` = NULL,
`stripeSubscription` = NULL,
`userId` = NULL,
initialize = function(`apiKey`=NULL, `planStarted`=NULL, `priorPlanStarted`=NULL, `planEnded`=NULL, `taxRate`=NULL, `planName`=NULL, `planBaseFeesKey`=NULL, `planStatus`=NULL, `planQuota`=NULL, `priceUSD`=NULL, `priceOverageUSD`=NULL, `price`=NULL, `priceOverage`=NULL, `currency`=NULL, `currencyFactor`=NULL, `stripeCustomerId`=NULL, `stripeStatus`=NULL, `stripeSubscription`=NULL, `userId`=NULL, ...){
local.optional.var <- list(...)
if (!is.null(`apiKey`)) {
stopifnot(is.character(`apiKey`), length(`apiKey`) == 1)
self$`apiKey` <- `apiKey`
}
if (!is.null(`planStarted`)) {
stopifnot(is.numeric(`planStarted`), length(`planStarted`) == 1)
self$`planStarted` <- `planStarted`
}
if (!is.null(`priorPlanStarted`)) {
stopifnot(is.numeric(`priorPlanStarted`), length(`priorPlanStarted`) == 1)
self$`priorPlanStarted` <- `priorPlanStarted`
}
if (!is.null(`planEnded`)) {
stopifnot(is.numeric(`planEnded`), length(`planEnded`) == 1)
self$`planEnded` <- `planEnded`
}
if (!is.null(`taxRate`)) {
stopifnot(is.numeric(`taxRate`), length(`taxRate`) == 1)
self$`taxRate` <- `taxRate`
}
if (!is.null(`planName`)) {
stopifnot(is.character(`planName`), length(`planName`) == 1)
self$`planName` <- `planName`
}
if (!is.null(`planBaseFeesKey`)) {
stopifnot(is.character(`planBaseFeesKey`), length(`planBaseFeesKey`) == 1)
self$`planBaseFeesKey` <- `planBaseFeesKey`
}
if (!is.null(`planStatus`)) {
stopifnot(is.character(`planStatus`), length(`planStatus`) == 1)
self$`planStatus` <- `planStatus`
}
if (!is.null(`planQuota`)) {
stopifnot(is.numeric(`planQuota`), length(`planQuota`) == 1)
self$`planQuota` <- `planQuota`
}
if (!is.null(`priceUSD`)) {
stopifnot(is.numeric(`priceUSD`), length(`priceUSD`) == 1)
self$`priceUSD` <- `priceUSD`
}
if (!is.null(`priceOverageUSD`)) {
stopifnot(is.numeric(`priceOverageUSD`), length(`priceOverageUSD`) == 1)
self$`priceOverageUSD` <- `priceOverageUSD`
}
if (!is.null(`price`)) {
stopifnot(is.numeric(`price`), length(`price`) == 1)
self$`price` <- `price`
}
if (!is.null(`priceOverage`)) {
stopifnot(is.numeric(`priceOverage`), length(`priceOverage`) == 1)
self$`priceOverage` <- `priceOverage`
}
if (!is.null(`currency`)) {
stopifnot(is.character(`currency`), length(`currency`) == 1)
self$`currency` <- `currency`
}
if (!is.null(`currencyFactor`)) {
stopifnot(is.numeric(`currencyFactor`), length(`currencyFactor`) == 1)
self$`currencyFactor` <- `currencyFactor`
}
if (!is.null(`stripeCustomerId`)) {
stopifnot(is.character(`stripeCustomerId`), length(`stripeCustomerId`) == 1)
self$`stripeCustomerId` <- `stripeCustomerId`
}
if (!is.null(`stripeStatus`)) {
stopifnot(is.character(`stripeStatus`), length(`stripeStatus`) == 1)
self$`stripeStatus` <- `stripeStatus`
}
if (!is.null(`stripeSubscription`)) {
stopifnot(is.character(`stripeSubscription`), length(`stripeSubscription`) == 1)
self$`stripeSubscription` <- `stripeSubscription`
}
if (!is.null(`userId`)) {
stopifnot(is.character(`userId`), length(`userId`) == 1)
self$`userId` <- `userId`
}
},
toJSON = function() {
APIPlanSubscriptionOutObject <- list()
if (!is.null(self$`apiKey`)) {
APIPlanSubscriptionOutObject[['apiKey']] <-
self$`apiKey`
}
if (!is.null(self$`planStarted`)) {
APIPlanSubscriptionOutObject[['planStarted']] <-
self$`planStarted`
}
if (!is.null(self$`priorPlanStarted`)) {
APIPlanSubscriptionOutObject[['priorPlanStarted']] <-
self$`priorPlanStarted`
}
if (!is.null(self$`planEnded`)) {
APIPlanSubscriptionOutObject[['planEnded']] <-
self$`planEnded`
}
if (!is.null(self$`taxRate`)) {
APIPlanSubscriptionOutObject[['taxRate']] <-
self$`taxRate`
}
if (!is.null(self$`planName`)) {
APIPlanSubscriptionOutObject[['planName']] <-
self$`planName`
}
if (!is.null(self$`planBaseFeesKey`)) {
APIPlanSubscriptionOutObject[['planBaseFeesKey']] <-
self$`planBaseFeesKey`
}
if (!is.null(self$`planStatus`)) {
APIPlanSubscriptionOutObject[['planStatus']] <-
self$`planStatus`
}
if (!is.null(self$`planQuota`)) {
APIPlanSubscriptionOutObject[['planQuota']] <-
self$`planQuota`
}
if (!is.null(self$`priceUSD`)) {
APIPlanSubscriptionOutObject[['priceUSD']] <-
self$`priceUSD`
}
if (!is.null(self$`priceOverageUSD`)) {
APIPlanSubscriptionOutObject[['priceOverageUSD']] <-
self$`priceOverageUSD`
}
if (!is.null(self$`price`)) {
APIPlanSubscriptionOutObject[['price']] <-
self$`price`
}
if (!is.null(self$`priceOverage`)) {
APIPlanSubscriptionOutObject[['priceOverage']] <-
self$`priceOverage`
}
if (!is.null(self$`currency`)) {
APIPlanSubscriptionOutObject[['currency']] <-
self$`currency`
}
if (!is.null(self$`currencyFactor`)) {
APIPlanSubscriptionOutObject[['currencyFactor']] <-
self$`currencyFactor`
}
if (!is.null(self$`stripeCustomerId`)) {
APIPlanSubscriptionOutObject[['stripeCustomerId']] <-
self$`stripeCustomerId`
}
if (!is.null(self$`stripeStatus`)) {
APIPlanSubscriptionOutObject[['stripeStatus']] <-
self$`stripeStatus`
}
if (!is.null(self$`stripeSubscription`)) {
APIPlanSubscriptionOutObject[['stripeSubscription']] <-
self$`stripeSubscription`
}
if (!is.null(self$`userId`)) {
APIPlanSubscriptionOutObject[['userId']] <-
self$`userId`
}
APIPlanSubscriptionOutObject
},
fromJSON = function(APIPlanSubscriptionOutJson) {
APIPlanSubscriptionOutObject <- jsonlite::fromJSON(APIPlanSubscriptionOutJson)
if (!is.null(APIPlanSubscriptionOutObject$`apiKey`)) {
self$`apiKey` <- APIPlanSubscriptionOutObject$`apiKey`
}
if (!is.null(APIPlanSubscriptionOutObject$`planStarted`)) {
self$`planStarted` <- APIPlanSubscriptionOutObject$`planStarted`
}
if (!is.null(APIPlanSubscriptionOutObject$`priorPlanStarted`)) {
self$`priorPlanStarted` <- APIPlanSubscriptionOutObject$`priorPlanStarted`
}
if (!is.null(APIPlanSubscriptionOutObject$`planEnded`)) {
self$`planEnded` <- APIPlanSubscriptionOutObject$`planEnded`
}
if (!is.null(APIPlanSubscriptionOutObject$`taxRate`)) {
self$`taxRate` <- APIPlanSubscriptionOutObject$`taxRate`
}
if (!is.null(APIPlanSubscriptionOutObject$`planName`)) {
self$`planName` <- APIPlanSubscriptionOutObject$`planName`
}
if (!is.null(APIPlanSubscriptionOutObject$`planBaseFeesKey`)) {
self$`planBaseFeesKey` <- APIPlanSubscriptionOutObject$`planBaseFeesKey`
}
if (!is.null(APIPlanSubscriptionOutObject$`planStatus`)) {
self$`planStatus` <- APIPlanSubscriptionOutObject$`planStatus`
}
if (!is.null(APIPlanSubscriptionOutObject$`planQuota`)) {
self$`planQuota` <- APIPlanSubscriptionOutObject$`planQuota`
}
if (!is.null(APIPlanSubscriptionOutObject$`priceUSD`)) {
self$`priceUSD` <- APIPlanSubscriptionOutObject$`priceUSD`
}
if (!is.null(APIPlanSubscriptionOutObject$`priceOverageUSD`)) {
self$`priceOverageUSD` <- APIPlanSubscriptionOutObject$`priceOverageUSD`
}
if (!is.null(APIPlanSubscriptionOutObject$`price`)) {
self$`price` <- APIPlanSubscriptionOutObject$`price`
}
if (!is.null(APIPlanSubscriptionOutObject$`priceOverage`)) {
self$`priceOverage` <- APIPlanSubscriptionOutObject$`priceOverage`
}
if (!is.null(APIPlanSubscriptionOutObject$`currency`)) {
self$`currency` <- APIPlanSubscriptionOutObject$`currency`
}
if (!is.null(APIPlanSubscriptionOutObject$`currencyFactor`)) {
self$`currencyFactor` <- APIPlanSubscriptionOutObject$`currencyFactor`
}
if (!is.null(APIPlanSubscriptionOutObject$`stripeCustomerId`)) {
self$`stripeCustomerId` <- APIPlanSubscriptionOutObject$`stripeCustomerId`
}
if (!is.null(APIPlanSubscriptionOutObject$`stripeStatus`)) {
self$`stripeStatus` <- APIPlanSubscriptionOutObject$`stripeStatus`
}
if (!is.null(APIPlanSubscriptionOutObject$`stripeSubscription`)) {
self$`stripeSubscription` <- APIPlanSubscriptionOutObject$`stripeSubscription`
}
if (!is.null(APIPlanSubscriptionOutObject$`userId`)) {
self$`userId` <- APIPlanSubscriptionOutObject$`userId`
}
},
toJSONString = function() {
jsoncontent <- c(
if (!is.null(self$`apiKey`)) {
sprintf(
'"apiKey":
"%s"
',
self$`apiKey`
)},
if (!is.null(self$`planStarted`)) {
sprintf(
'"planStarted":
%d
',
self$`planStarted`
)},
if (!is.null(self$`priorPlanStarted`)) {
sprintf(
'"priorPlanStarted":
%d
',
self$`priorPlanStarted`
)},
if (!is.null(self$`planEnded`)) {
sprintf(
'"planEnded":
%d
',
self$`planEnded`
)},
if (!is.null(self$`taxRate`)) {
sprintf(
'"taxRate":
%d
',
self$`taxRate`
)},
if (!is.null(self$`planName`)) {
sprintf(
'"planName":
"%s"
',
self$`planName`
)},
if (!is.null(self$`planBaseFeesKey`)) {
sprintf(
'"planBaseFeesKey":
"%s"
',
self$`planBaseFeesKey`
)},
if (!is.null(self$`planStatus`)) {
sprintf(
'"planStatus":
"%s"
',
self$`planStatus`
)},
if (!is.null(self$`planQuota`)) {
sprintf(
'"planQuota":
%d
',
self$`planQuota`
)},
if (!is.null(self$`priceUSD`)) {
sprintf(
'"priceUSD":
%d
',
self$`priceUSD`
)},
if (!is.null(self$`priceOverageUSD`)) {
sprintf(
'"priceOverageUSD":
%d
',
self$`priceOverageUSD`
)},
if (!is.null(self$`price`)) {
sprintf(
'"price":
%d
',
self$`price`
)},
if (!is.null(self$`priceOverage`)) {
sprintf(
'"priceOverage":
%d
',
self$`priceOverage`
)},
if (!is.null(self$`currency`)) {
sprintf(
'"currency":
"%s"
',
self$`currency`
)},
if (!is.null(self$`currencyFactor`)) {
sprintf(
'"currencyFactor":
%d
',
self$`currencyFactor`
)},
if (!is.null(self$`stripeCustomerId`)) {
sprintf(
'"stripeCustomerId":
"%s"
',
self$`stripeCustomerId`
)},
if (!is.null(self$`stripeStatus`)) {
sprintf(
'"stripeStatus":
"%s"
',
self$`stripeStatus`
)},
if (!is.null(self$`stripeSubscription`)) {
sprintf(
'"stripeSubscription":
"%s"
',
self$`stripeSubscription`
)},
if (!is.null(self$`userId`)) {
sprintf(
'"userId":
"%s"
',
self$`userId`
)}
)
jsoncontent <- paste(jsoncontent, collapse = ",")
paste('{', jsoncontent, '}', sep = "")
},
fromJSONString = function(APIPlanSubscriptionOutJson) {
APIPlanSubscriptionOutObject <- jsonlite::fromJSON(APIPlanSubscriptionOutJson)
self$`apiKey` <- APIPlanSubscriptionOutObject$`apiKey`
self$`planStarted` <- APIPlanSubscriptionOutObject$`planStarted`
self$`priorPlanStarted` <- APIPlanSubscriptionOutObject$`priorPlanStarted`
self$`planEnded` <- APIPlanSubscriptionOutObject$`planEnded`
self$`taxRate` <- APIPlanSubscriptionOutObject$`taxRate`
self$`planName` <- APIPlanSubscriptionOutObject$`planName`
self$`planBaseFeesKey` <- APIPlanSubscriptionOutObject$`planBaseFeesKey`
self$`planStatus` <- APIPlanSubscriptionOutObject$`planStatus`
self$`planQuota` <- APIPlanSubscriptionOutObject$`planQuota`
self$`priceUSD` <- APIPlanSubscriptionOutObject$`priceUSD`
self$`priceOverageUSD` <- APIPlanSubscriptionOutObject$`priceOverageUSD`
self$`price` <- APIPlanSubscriptionOutObject$`price`
self$`priceOverage` <- APIPlanSubscriptionOutObject$`priceOverage`
self$`currency` <- APIPlanSubscriptionOutObject$`currency`
self$`currencyFactor` <- APIPlanSubscriptionOutObject$`currencyFactor`
self$`stripeCustomerId` <- APIPlanSubscriptionOutObject$`stripeCustomerId`
self$`stripeStatus` <- APIPlanSubscriptionOutObject$`stripeStatus`
self$`stripeSubscription` <- APIPlanSubscriptionOutObject$`stripeSubscription`
self$`userId` <- APIPlanSubscriptionOutObject$`userId`
self
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.