Class: WhatsAppCloudApi::UpdateBusinessProfileRequest
- Defined in:
- lib/whats_app_cloud_api/models/update_business_profile_request.rb
Overview
UpdateBusinessProfileRequest Model.
Instance Attribute Summary collapse
-
#address ⇒ String
Address of the business.
-
#description ⇒ String
Description of the business.
-
#email ⇒ String
The contact email address (in valid email format) of the business.
-
#messaging_product ⇒ String
The messaging service used for the request.
-
#profile_picture_url ⇒ String
URL of the profile picture generated from a call to the Resumable Upload API.
-
#vertical ⇒ VerticalEnum
Industry of the business.
-
#websites ⇒ List of String
The URLs associated with the business.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
Instance Method Summary collapse
-
#initialize(messaging_product = nil, address = nil, description = nil, vertical = nil, email = nil, websites = nil, profile_picture_url = nil) ⇒ UpdateBusinessProfileRequest
constructor
A new instance of UpdateBusinessProfileRequest.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(messaging_product = nil, address = nil, description = nil, vertical = nil, email = nil, websites = nil, profile_picture_url = nil) ⇒ UpdateBusinessProfileRequest
Returns a new instance of UpdateBusinessProfileRequest.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 75 def initialize(messaging_product = nil, address = nil, description = nil, vertical = nil, email = nil, websites = nil, profile_picture_url = nil) @messaging_product = messaging_product unless messaging_product == SKIP @address = address unless address == SKIP @description = description unless description == SKIP @vertical = vertical unless vertical == SKIP @email = email unless email == SKIP @websites = websites unless websites == SKIP @profile_picture_url = profile_picture_url unless profile_picture_url == SKIP end |
Instance Attribute Details
#address ⇒ String
Address of the business.
19 20 21 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 19 def address @address end |
#description ⇒ String
Description of the business.
23 24 25 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 23 def description @description end |
#email ⇒ String
The contact email address (in valid email format) of the business.
32 33 34 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 32 def email @email end |
#messaging_product ⇒ String
The messaging service used for the request. Always set it to “whatsapp” if you are using the WhatsApp Business API.
15 16 17 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 15 def messaging_product @messaging_product end |
#profile_picture_url ⇒ String
URL of the profile picture generated from a call to the Resumable Upload API.
43 44 45 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 43 def profile_picture_url @profile_picture_url end |
#vertical ⇒ VerticalEnum
Industry of the business. This can be either an empty string or one of the accepted values.
28 29 30 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 28 def vertical @vertical end |
#websites ⇒ List of String
The URLs associated with the business. For instance, a website, Facebook Page, or Instagram. You must include the http:// or https:// portion of the URL.
38 39 40 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 38 def websites @websites end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 92 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. messaging_product = hash.key?('messaging_product') ? hash['messaging_product'] : SKIP address = hash.key?('address') ? hash['address'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP vertical = hash.key?('vertical') ? hash['vertical'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP websites = hash.key?('websites') ? hash['websites'] : SKIP profile_picture_url = hash.key?('profile_picture_url') ? hash['profile_picture_url'] : SKIP # Create object from extracted values. UpdateBusinessProfileRequest.new(messaging_product, address, description, vertical, email, websites, profile_picture_url) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['messaging_product'] = 'messaging_product' @_hash['address'] = 'address' @_hash['description'] = 'description' @_hash['vertical'] = 'vertical' @_hash['email'] = 'email' @_hash['websites'] = 'websites' @_hash['profile_picture_url'] = 'profile_picture_url' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
71 72 73 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 71 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/whats_app_cloud_api/models/update_business_profile_request.rb', line 59 def optionals %w[ address description vertical email websites profile_picture_url ] end |