Class: Raas::CreateAccountRequestModel
- Defined in:
- lib/raas/models/create_account_request_model.rb
Overview
Represents the request to create an account
Instance Attribute Summary collapse
-
#account_identifier ⇒ String
The account identifier.
-
#contact_email ⇒ String
The contact email.
-
#display_name ⇒ String
The display name.
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(account_identifier = nil, display_name = nil, contact_email = nil) ⇒ CreateAccountRequestModel
constructor
A new instance of CreateAccountRequestModel.
Methods inherited from BaseModel
Constructor Details
#initialize(account_identifier = nil, display_name = nil, contact_email = nil) ⇒ CreateAccountRequestModel
Returns a new instance of CreateAccountRequestModel.
28 29 30 31 32 33 34 |
# File 'lib/raas/models/create_account_request_model.rb', line 28 def initialize(account_identifier = nil, display_name = nil, contact_email = nil) @account_identifier = account_identifier @display_name = display_name @contact_email = contact_email end |
Instance Attribute Details
#account_identifier ⇒ String
The account identifier
9 10 11 |
# File 'lib/raas/models/create_account_request_model.rb', line 9 def account_identifier @account_identifier end |
#contact_email ⇒ String
The contact email
17 18 19 |
# File 'lib/raas/models/create_account_request_model.rb', line 17 def contact_email @contact_email end |
#display_name ⇒ String
The display name
13 14 15 |
# File 'lib/raas/models/create_account_request_model.rb', line 13 def display_name @display_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/raas/models/create_account_request_model.rb', line 37 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_identifier = hash['accountIdentifier'] display_name = hash['displayName'] contact_email = hash['contactEmail'] # Create object from extracted values. CreateAccountRequestModel.new(account_identifier, display_name, contact_email) end |
.names ⇒ Object
A mapping from model property names to API property names.
20 21 22 23 24 25 26 |
# File 'lib/raas/models/create_account_request_model.rb', line 20 def self.names @_hash = {} if @_hash.nil? @_hash['account_identifier'] = 'accountIdentifier' @_hash['display_name'] = 'displayName' @_hash['contact_email'] = 'contactEmail' @_hash end |