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.



4094
4095
4096
4097
4098
4099
4100
4101
4102
# File 'lib/models/porcelain.rb', line 4094

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.



4088
4089
4090
# File 'lib/models/porcelain.rb', line 4088

def meta
  @meta
end

#rate_limitObject

Rate limit information.



4090
4091
4092
# File 'lib/models/porcelain.rb', line 4090

def rate_limit
  @rate_limit
end

#validObject

Reports if the given token is valid.



4092
4093
4094
# File 'lib/models/porcelain.rb', line 4092

def valid
  @valid
end

Instance Method Details

#to_json(options = {}) ⇒ Object



4104
4105
4106
4107
4108
4109
4110
# File 'lib/models/porcelain.rb', line 4104

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