Class: WhatsappSdk::Resource::BusinessAccount

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#account_review_statusObject

Returns the value of attribute account_review_status.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def 
  @account_review_status
end

#analyticsObject

Returns the value of attribute analytics.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def analytics
  @analytics
end

#business_verification_statusObject

Returns the value of attribute business_verification_status.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def business_verification_status
  @business_verification_status
end

#call_analyticsObject

Returns the value of attribute call_analytics.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def call_analytics
  @call_analytics
end

#conversation_analyticsObject

Returns the value of attribute conversation_analytics.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def conversation_analytics
  @conversation_analytics
end

#countryObject

Returns the value of attribute country.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def country
  @country
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def id
  @id
end

#message_template_namespaceObject

Returns the value of attribute message_template_namespace.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def message_template_namespace
  @message_template_namespace
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def name
  @name
end

#ownership_typeObject

Returns the value of attribute ownership_type.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def ownership_type
  @ownership_type
end

#pricing_analyticsObject

Returns the value of attribute pricing_analytics.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def pricing_analytics
  @pricing_analytics
end

#primary_business_locationObject

Returns the value of attribute primary_business_location.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def primary_business_location
  @primary_business_location
end

#timezone_idObject

Returns the value of attribute timezone_id.



6
7
8
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 6

def timezone_id
  @timezone_id
end

Class Method Details

.from_hash(hash) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/whatsapp_sdk/resource/business_account.rb', line 10

def self.from_hash(hash)
   = BusinessAccount.new
  .id = hash["id"]
  .name = hash["name"]
  .timezone_id = hash["timezone_id"]
  .message_template_namespace = hash["message_template_namespace"]
  . = hash["account_review_status"]
  .business_verification_status = hash["business_verification_status"]
  .country = hash["country"]
  .ownership_type = hash["ownership_type"]
  .primary_business_location = hash["primary_business_location"]
  .analytics = hash["analytics"]
  .conversation_analytics = hash["conversation_analytics"]
  .pricing_analytics = hash["pricing_analytics"]
  .call_analytics = hash["call_analytics"]

  
end

Instance Method Details

#==(other) ⇒ Object



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

def ==(other)
  return false unless other.is_a?(WhatsappSdk::Resource::BusinessAccount)

  %i[id name timezone_id message_template_namespace account_review_status
     business_verification_status country ownership_type primary_business_location].all? do |field|
    send(field) == other.send(field)
  end
end