Class: Cadenya::Types::CredentialHeaders

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers: nil) ⇒ CredentialHeaders

Returns a new instance of CredentialHeaders.



2085
2086
2087
# File 'lib/cadenya/types.rb', line 2085

def initialize(headers: nil)
  @headers = headers
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



2083
2084
2085
# File 'lib/cadenya/types.rb', line 2083

def headers
  @headers
end

Class Method Details

.from_json(data) ⇒ Object



2089
2090
2091
2092
2093
# File 'lib/cadenya/types.rb', line 2089

def self.from_json(data)
  new(
    headers: data["headers"],
  )
end

Instance Method Details

#to_hObject



2095
2096
2097
2098
2099
# File 'lib/cadenya/types.rb', line 2095

def to_h
  {
    headers: Util.plain(@headers),
  }.reject { |_k, v| v.nil? }
end