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



809
810
811
812
813
814
# File 'lib/schemas.rb', line 809

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

.from_json!(json) ⇒ Object



816
817
818
# File 'lib/schemas.rb', line 816

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

Instance Method Details

#to_dynamicObject



820
821
822
823
824
# File 'lib/schemas.rb', line 820

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

#to_json(options = nil) ⇒ Object



826
827
828
# File 'lib/schemas.rb', line 826

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