Class: SecretIdentifiersRequest

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



1159
1160
1161
1162
1163
1164
# File 'lib/schemas.rb', line 1159

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    organization_id: d.fetch("organizationId"),
  )
end

.from_json!(json) ⇒ Object



1166
1167
1168
# File 'lib/schemas.rb', line 1166

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



1170
1171
1172
1173
1174
# File 'lib/schemas.rb', line 1170

def to_dynamic
  {
    "organizationId" => organization_id,
  }
end

#to_json(options = nil) ⇒ Object



1176
1177
1178
# File 'lib/schemas.rb', line 1176

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end