Class: Cadenya::Types::WidgetSessionSpec
- Inherits:
-
Object
- Object
- Cadenya::Types::WidgetSessionSpec
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#pinned_parameters ⇒ Object
readonly
Returns the value of attribute pinned_parameters.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#tenant ⇒ Object
readonly
Returns the value of attribute tenant.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#token_expires_at ⇒ Object
readonly
Returns the value of attribute token_expires_at.
-
#widget_id ⇒ Object
readonly
Returns the value of attribute widget_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(widget_id: nil, tenant: nil, subject: nil, expires_at: nil, token: nil, token_expires_at: nil, pinned_parameters: nil) ⇒ WidgetSessionSpec
constructor
A new instance of WidgetSessionSpec.
- #to_h ⇒ Object
Constructor Details
#initialize(widget_id: nil, tenant: nil, subject: nil, expires_at: nil, token: nil, token_expires_at: nil, pinned_parameters: nil) ⇒ WidgetSessionSpec
Returns a new instance of WidgetSessionSpec.
7411 7412 7413 7414 7415 7416 7417 7418 7419 |
# File 'lib/cadenya/types.rb', line 7411 def initialize(widget_id: nil, tenant: nil, subject: nil, expires_at: nil, token: nil, token_expires_at: nil, pinned_parameters: nil) @widget_id = @tenant = tenant @subject = subject @expires_at = expires_at @token = token @token_expires_at = token_expires_at @pinned_parameters = pinned_parameters end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def expires_at @expires_at end |
#pinned_parameters ⇒ Object (readonly)
Returns the value of attribute pinned_parameters.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def pinned_parameters @pinned_parameters end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def subject @subject end |
#tenant ⇒ Object (readonly)
Returns the value of attribute tenant.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def tenant @tenant end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def token @token end |
#token_expires_at ⇒ Object (readonly)
Returns the value of attribute token_expires_at.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def token_expires_at @token_expires_at end |
#widget_id ⇒ Object (readonly)
Returns the value of attribute widget_id.
7409 7410 7411 |
# File 'lib/cadenya/types.rb', line 7409 def @widget_id end |
Class Method Details
.from_json(data) ⇒ Object
7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 |
# File 'lib/cadenya/types.rb', line 7421 def self.from_json(data) new( widget_id: data["widgetId"], tenant: data["tenant"].nil? ? nil : Types::TenantAssertion.from_json(data["tenant"]), subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]), expires_at: data["expiresAt"].nil? ? nil : Time.iso8601(data["expiresAt"]), token: data["token"], token_expires_at: data["tokenExpiresAt"].nil? ? nil : Time.iso8601(data["tokenExpiresAt"]), pinned_parameters: data["pinnedParameters"], ) end |
Instance Method Details
#to_h ⇒ Object
7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 |
# File 'lib/cadenya/types.rb', line 7433 def to_h { widget_id: Util.plain(@widget_id), tenant: Util.plain(@tenant), subject: Util.plain(@subject), expires_at: Util.plain(@expires_at), token: Util.plain(@token), token_expires_at: Util.plain(@token_expires_at), pinned_parameters: Util.plain(@pinned_parameters), }.reject { |_k, v| v.nil? } end |