Class: CloudWaba::Models::Templates::Response

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/cloud_waba/models/templates/response.rb

Class Method Summary collapse

Class Method Details

.parse(template_hash:) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/cloud_waba/models/templates/response.rb', line 18

def self.parse(template_hash:)
  category = ::CloudWaba::Models::Enums::Templates::Category.try_deserialize(template_hash["category"])

  self.new(
    id: template_hash["id"],
    status: template_hash["status"],
    category: category,
    language: template_hash["language"],
    name: template_hash["name"]
  )
end