Class: WhatsappSdk::Resource::PhoneNumber

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#account_modeObject

Returns the value of attribute account_mode.



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

def 
  @account_mode
end

#certificateObject

Returns the value of attribute certificate.



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

def certificate
  @certificate
end

#code_verification_statusObject

Returns the value of attribute code_verification_status.



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

def code_verification_status
  @code_verification_status
end

#display_phone_numberObject

Returns the value of attribute display_phone_number.



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

def display_phone_number
  @display_phone_number
end

#eligibility_for_api_business_global_searchObject

Returns the value of attribute eligibility_for_api_business_global_search.



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

def eligibility_for_api_business_global_search
  @eligibility_for_api_business_global_search
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#is_official_business_accountObject

Returns the value of attribute is_official_business_account.



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

def 
  @is_official_business_account
end

#is_pin_enabledObject

Returns the value of attribute is_pin_enabled.



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

def is_pin_enabled
  @is_pin_enabled
end

#messaging_limit_tierObject

Returns the value of attribute messaging_limit_tier.



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

def messaging_limit_tier
  @messaging_limit_tier
end

#name_statusObject

Returns the value of attribute name_status.



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

def name_status
  @name_status
end

#new_name_statusObject

Returns the value of attribute new_name_status.



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

def new_name_status
  @new_name_status
end

#quality_ratingObject

Returns the value of attribute quality_rating.



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

def quality_rating
  @quality_rating
end

#search_visibilityObject

Returns the value of attribute search_visibility.



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

def search_visibility
  @search_visibility
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#verified_nameObject

Returns the value of attribute verified_name.



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

def verified_name
  @verified_name
end

Class Method Details

.from_hash(hash) ⇒ Object



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

def self.from_hash(hash)
  phone_number = PhoneNumber.new
  phone_number.id = hash["id"]
  phone_number.verified_name = hash["verified_name"]
  phone_number.display_phone_number = hash["display_phone_number"]
  phone_number.quality_rating = hash["quality_rating"]
  phone_number.is_pin_enabled = hash["is_pin_enabled"]
  phone_number. = hash["is_official_business_account"]
  phone_number. = hash["account_mode"]
  phone_number.certificate = hash["certificate"]
  phone_number.code_verification_status = hash["code_verification_status"]
  phone_number.eligibility_for_api_business_global_search = hash["eligibility_for_api_business_global_search"]
  phone_number.name_status = hash["name_status"]
  phone_number.new_name_status = hash["new_name_status"]
  phone_number.status = hash["status"]
  phone_number.search_visibility = hash["search_visibility"]
  phone_number.messaging_limit_tier = hash["messaging_limit_tier"]

  phone_number
end

Instance Method Details

#==(other) ⇒ Object

rubocop:disable Metrics/PerceivedComplexity



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/whatsapp_sdk/resource/phone_number.rb', line 33

def ==(other)
  id == other.id &&
    verified_name == other.verified_name &&
    display_phone_number == other.display_phone_number &&
    quality_rating == other.quality_rating &&
    is_pin_enabled == other.is_pin_enabled &&
     == other. &&
     == other. &&
    certificate == other.certificate &&
    code_verification_status == other.code_verification_status &&
    eligibility_for_api_business_global_search == other.eligibility_for_api_business_global_search &&
    name_status == other.name_status &&
    new_name_status == other.new_name_status &&
    status == other.status &&
    search_visibility == other.search_visibility &&
    messaging_limit_tier == other.messaging_limit_tier
end