Method: WhatsappSdk::Resource::BusinessProfile.from_hash

Defined in:
lib/whatsapp_sdk/resource/business_profile.rb

.from_hash(hash) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 14

def self.from_hash(hash)
  business_profile = BusinessProfile.new
  business_profile.about = hash["about"]
  business_profile.address = hash["address"]
  business_profile.description = hash["description"]
  business_profile.email = hash["email"]
  business_profile.messaging_product = hash["messaging_product"]
  business_profile.profile_picture_url = hash["profile_picture_url"]
  business_profile.vertical = hash["vertical"]
  business_profile.websites = hash["websites"]

  business_profile
end