Class: Dinie::Credential

Inherits:
Internal::Model show all
Defined in:
lib/dinie/generated/types/credential.rb

Direct Known Subclasses

CredentialWithSecret

Constant Summary

Constants inherited from Internal::Model

Internal::Model::REDACTED_ATTRIBUTES

Class Method Summary collapse

Methods inherited from Internal::Model

#==, attribute, attributes, #deconstruct_keys, #hash, inherited, #initialize, #inspect, #to_h

Constructor Details

This class inherits a constructor from Dinie::Internal::Model

Class Method Details

.deserialize(raw) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/dinie/generated/types/credential.rb', line 15

def self.deserialize(raw)
  new(
    client_id: raw[:client_id],
    created_at: raw[:created_at],
    description: raw[:description],
    expires_at: raw[:expires_at],
    id: raw[:id],
    last_used_at: raw[:last_used_at],
    name: raw[:name],
    status: raw[:status],
    updated_at: raw[:updated_at]
  )
end

.serialize_create(name:, expires_at: Internal::OMIT) ⇒ Object



29
30
31
# File 'lib/dinie/generated/types/credential.rb', line 29

def self.serialize_create(name:, expires_at: Internal::OMIT)
  { expires_at:, name: }.reject { |_key, value| Internal.omitted?(value) }
end