Class: WhatsAppCloudApi::RequestVerificationCodeRequest
- Defined in:
- lib/whats_app_cloud_api/models/request_verification_code_request.rb
Overview
RequestVerificationCodeRequest Model.
Instance Attribute Summary collapse
-
#code_method ⇒ RequestVerificationCodeMethodEnum
Chosen method for verification.
-
#locale ⇒ String
Your locale.
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(code_method = nil, locale = nil) ⇒ RequestVerificationCodeRequest
constructor
A new instance of RequestVerificationCodeRequest.
-
#nullables ⇒ Object
An array for nullable fields.
-
#optionals ⇒ Object
An array for optional fields.
Methods inherited from BaseModel
Constructor Details
#initialize(code_method = nil, locale = nil) ⇒ RequestVerificationCodeRequest
Returns a new instance of RequestVerificationCodeRequest.
38 39 40 41 42 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 38 def initialize(code_method = nil, locale = nil) @code_method = code_method unless code_method == SKIP @locale = locale unless locale == SKIP end |
Instance Attribute Details
#code_method ⇒ RequestVerificationCodeMethodEnum
Chosen method for verification.
14 15 16 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 14 def code_method @code_method end |
#locale ⇒ String
Your locale. For example: “en_US”.
18 19 20 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 18 def locale @locale end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 45 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code_method = hash.key?('code_method') ? hash['code_method'] : SKIP locale = hash.key?('locale') ? hash['locale'] : SKIP # Create object from extracted values. RequestVerificationCodeRequest.new(code_method, locale) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['code_method'] = 'code_method' @_hash['locale'] = 'locale' @_hash end |
Instance Method Details
#nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 34 def nullables [] end |
#optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/whats_app_cloud_api/models/request_verification_code_request.rb', line 29 def optionals [] end |