Class: SDM::ControlPanelVerifyJWTResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

ControlPanelVerifyJWTResponse reports whether x-sdm-token is valid.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, rate_limit: nil, valid: nil) ⇒ ControlPanelVerifyJWTResponse

Returns a new instance of ControlPanelVerifyJWTResponse.



3297
3298
3299
3300
3301
3302
3303
3304
3305
# File 'lib/models/porcelain.rb', line 3297

def initialize(
  meta: nil,
  rate_limit: nil,
  valid: nil
)
  @meta = meta == nil ? nil : meta
  @rate_limit = rate_limit == nil ? nil : rate_limit
  @valid = valid == nil ? false : valid
end

Instance Attribute Details

#metaObject

Reserved for future use.



3291
3292
3293
# File 'lib/models/porcelain.rb', line 3291

def meta
  @meta
end

#rate_limitObject

Rate limit information.



3293
3294
3295
# File 'lib/models/porcelain.rb', line 3293

def rate_limit
  @rate_limit
end

#validObject

Reports if the given token is valid.



3295
3296
3297
# File 'lib/models/porcelain.rb', line 3295

def valid
  @valid
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3307
3308
3309
3310
3311
3312
3313
# File 'lib/models/porcelain.rb', line 3307

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end