Class: NewStoreApi::UpdateServiceLevelRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::UpdateServiceLevelRequest
- Defined in:
- lib/new_store_api/models/update_service_level_request.rb
Overview
Request body to update service level for an order id.
Instance Attribute Summary collapse
-
#new_service_level ⇒ String
The chosen service level identifier.
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(new_service_level = nil) ⇒ UpdateServiceLevelRequest
constructor
A new instance of UpdateServiceLevelRequest.
-
#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(new_service_level = nil) ⇒ UpdateServiceLevelRequest
Returns a new instance of UpdateServiceLevelRequest.
33 34 35 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 33 def initialize(new_service_level = nil) @new_service_level = new_service_level end |
Instance Attribute Details
#new_service_level ⇒ String
The chosen service level identifier.
14 15 16 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 14 def new_service_level @new_service_level end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 38 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. new_service_level = hash.key?('new_service_level') ? hash['new_service_level'] : nil # Create object from extracted values. UpdateServiceLevelRequest.new(new_service_level) end |
.names ⇒ Object
A mapping from model property names to API property names.
17 18 19 20 21 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 17 def self.names @_hash = {} if @_hash.nil? @_hash['new_service_level'] = 'new_service_level' @_hash end |
.nullables ⇒ Object
An array for nullable fields
29 30 31 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 29 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
24 25 26 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 24 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
56 57 58 59 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 56 def inspect class_name = self.class.name.split('::').last "<#{class_name} new_service_level: #{@new_service_level.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
50 51 52 53 |
# File 'lib/new_store_api/models/update_service_level_request.rb', line 50 def to_s class_name = self.class.name.split('::').last "<#{class_name} new_service_level: #{@new_service_level}>" end |