Class: WhatsappSdk::Resource::BusinessProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/whatsapp_sdk/resource/business_profile.rb

Constant Summary collapse

VERTICAL_VALUES =
%w[
  UNDEFINED OTHER AUTO BEAUTY APPAREL EDU ENTERTAIN EVENT_PLAN FINANCE GROCERY
  GOVT HOTEL HEALTH NONPROFIT PROF_SERVICES RETAIL TRAVEL RESTAURANT NOT_A_BIZ
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aboutObject

Returns the value of attribute about.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def about
  @about
end

#addressObject

Returns the value of attribute address.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def address
  @address
end

#descriptionObject

Returns the value of attribute description.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def description
  @description
end

#emailObject

Returns the value of attribute email.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def email
  @email
end

#messaging_productObject

Returns the value of attribute messaging_product.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def messaging_product
  @messaging_product
end

#profile_picture_urlObject

Returns the value of attribute profile_picture_url.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def profile_picture_url
  @profile_picture_url
end

#verticalObject

Returns the value of attribute vertical.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def vertical
  @vertical
end

#websitesObject

Returns the value of attribute websites.



11
12
13
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 11

def websites
  @websites
end

Class Method Details

.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

Instance Method Details

#==(other) ⇒ Object



28
29
30
31
32
33
34
35
36
37
# File 'lib/whatsapp_sdk/resource/business_profile.rb', line 28

def ==(other)
  about == other.about &&
    address == other.address &&
    description == other.description &&
    email == other.email &&
    messaging_product == other.messaging_product &&
    profile_picture_url == other.profile_picture_url &&
    vertical == other.vertical &&
    websites == other.websites
end