Class: Raas::CreateCustomerRequestModel
- Defined in:
- lib/raas/models/create_customer_request_model.rb
Overview
Represents the request to create a customer
Instance Attribute Summary collapse
-
#customer_identifier ⇒ String
The customer identifier.
-
#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(customer_identifier = nil, display_name = nil) ⇒ CreateCustomerRequestModel
constructor
A new instance of CreateCustomerRequestModel.
Methods inherited from BaseModel
Constructor Details
#initialize(customer_identifier = nil, display_name = nil) ⇒ CreateCustomerRequestModel
Returns a new instance of CreateCustomerRequestModel.
23 24 25 26 27 |
# File 'lib/raas/models/create_customer_request_model.rb', line 23 def initialize(customer_identifier = nil, display_name = nil) @customer_identifier = customer_identifier @display_name = display_name end |
Instance Attribute Details
#customer_identifier ⇒ String
The customer identifier
9 10 11 |
# File 'lib/raas/models/create_customer_request_model.rb', line 9 def customer_identifier @customer_identifier end |
#display_name ⇒ String
The display name
13 14 15 |
# File 'lib/raas/models/create_customer_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.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/raas/models/create_customer_request_model.rb', line 30 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. customer_identifier = hash['customerIdentifier'] display_name = hash['displayName'] # Create object from extracted values. CreateCustomerRequestModel.new(customer_identifier, display_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
16 17 18 19 20 21 |
# File 'lib/raas/models/create_customer_request_model.rb', line 16 def self.names @_hash = {} if @_hash.nil? @_hash['customer_identifier'] = 'customerIdentifier' @_hash['display_name'] = 'displayName' @_hash end |