Class: NewStoreApi::CreateImportRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::CreateImportRequest
- Defined in:
- lib/new_store_api/models/create_import_request.rb
Overview
CreateImportRequest Model.
Instance Attribute Summary collapse
-
#display_name ⇒ String
The human readable import identifier.
-
#file_name ⇒ String
The name of the CSV file that has been uploaded to the S3 bucket.
-
#type ⇒ String
readonly
The type of import.
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(display_name = nil, file_name = nil) ⇒ CreateImportRequest
constructor
A new instance of CreateImportRequest.
-
#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(display_name = nil, file_name = nil) ⇒ CreateImportRequest
Returns a new instance of CreateImportRequest.
43 44 45 46 47 |
# File 'lib/new_store_api/models/create_import_request.rb', line 43 def initialize(display_name = nil, file_name = nil) @display_name = display_name @file_name = file_name @type = 'OUTREACH_LIST' end |
Instance Attribute Details
#display_name ⇒ String
The human readable import identifier.
14 15 16 |
# File 'lib/new_store_api/models/create_import_request.rb', line 14 def display_name @display_name end |
#file_name ⇒ String
The name of the CSV file that has been uploaded to the S3 bucket.
18 19 20 |
# File 'lib/new_store_api/models/create_import_request.rb', line 18 def file_name @file_name end |
#type ⇒ String (readonly)
The type of import.
22 23 24 |
# File 'lib/new_store_api/models/create_import_request.rb', line 22 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/new_store_api/models/create_import_request.rb', line 50 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. display_name = hash.key?('display_name') ? hash['display_name'] : nil file_name = hash.key?('file_name') ? hash['file_name'] : nil # Create object from extracted values. CreateImportRequest.new(display_name, file_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/new_store_api/models/create_import_request.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['display_name'] = 'display_name' @_hash['file_name'] = 'file_name' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 |
# File 'lib/new_store_api/models/create_import_request.rb', line 39 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 |
# File 'lib/new_store_api/models/create_import_request.rb', line 34 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
69 70 71 72 73 |
# File 'lib/new_store_api/models/create_import_request.rb', line 69 def inspect class_name = self.class.name.split('::').last "<#{class_name} display_name: #{@display_name.inspect}, file_name: #{@file_name.inspect},"\ " type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
63 64 65 66 |
# File 'lib/new_store_api/models/create_import_request.rb', line 63 def to_s class_name = self.class.name.split('::').last "<#{class_name} display_name: #{@display_name}, file_name: #{@file_name}, type: #{@type}>" end |