Class: ProjectsListRequest

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



911
912
913
914
915
916
# File 'lib/schemas.rb', line 911

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

.from_json!(json) ⇒ Object



918
919
920
# File 'lib/schemas.rb', line 918

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

Instance Method Details

#to_dynamicObject



922
923
924
925
926
# File 'lib/schemas.rb', line 922

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

#to_json(options = nil) ⇒ Object



928
929
930
# File 'lib/schemas.rb', line 928

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