Class: NewStoreApi::PostSupportUsersRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::PostSupportUsersRequest
- Defined in:
- lib/new_store_api/models/post_support_users_request.rb
Overview
PostSupportUsersRequest Model.
Instance Attribute Summary collapse
-
#email ⇒ String
Email address of the user.
-
#first_name ⇒ String
First name of the user.
-
#idp_user_id ⇒ String
IDP user ID.
-
#last_name ⇒ String
Last name of the user.
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.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(email = nil, idp_user_id = nil, first_name = SKIP, last_name = SKIP) ⇒ PostSupportUsersRequest
constructor
A new instance of PostSupportUsersRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(email = nil, idp_user_id = nil, first_name = SKIP, last_name = SKIP) ⇒ PostSupportUsersRequest
Returns a new instance of PostSupportUsersRequest.
51 52 53 54 55 56 57 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 51 def initialize(email = nil, idp_user_id = nil, first_name = SKIP, last_name = SKIP) @email = email @first_name = first_name unless first_name == SKIP @idp_user_id = idp_user_id @last_name = last_name unless last_name == SKIP end |
Instance Attribute Details
#email ⇒ String
Email address of the user.
14 15 16 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 14 def email @email end |
#first_name ⇒ String
First name of the user.
18 19 20 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 18 def first_name @first_name end |
#idp_user_id ⇒ String
IDP user ID.
22 23 24 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 22 def idp_user_id @idp_user_id end |
#last_name ⇒ String
Last name of the user.
26 27 28 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 26 def last_name @last_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. email = hash.key?('email') ? hash['email'] : nil idp_user_id = hash.key?('idp_user_id') ? hash['idp_user_id'] : nil first_name = hash.key?('first_name') ? hash['first_name'] : SKIP last_name = hash.key?('last_name') ? hash['last_name'] : SKIP # Create object from extracted values. PostSupportUsersRequest.new(email, idp_user_id, first_name, last_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['email'] = 'email' @_hash['first_name'] = 'first_name' @_hash['idp_user_id'] = 'idp_user_id' @_hash['last_name'] = 'last_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 39 def self.optionals %w[ first_name last_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
84 85 86 87 88 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 84 def inspect class_name = self.class.name.split('::').last "<#{class_name} email: #{@email.inspect}, first_name: #{@first_name.inspect}, idp_user_id:"\ " #{@idp_user_id.inspect}, last_name: #{@last_name.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
77 78 79 80 81 |
# File 'lib/new_store_api/models/post_support_users_request.rb', line 77 def to_s class_name = self.class.name.split('::').last "<#{class_name} email: #{@email}, first_name: #{@first_name}, idp_user_id: #{@idp_user_id},"\ " last_name: #{@last_name}>" end |