Class: StickyIoRestfulApiV2025731::UpdateWarehouseRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- StickyIoRestfulApiV2025731::UpdateWarehouseRequest
- Defined in:
- lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb
Overview
UpdateWarehouseRequest Model.
Instance Attribute Summary collapse
-
#active ⇒ Integer
TODO: Write general description for this method.
-
#address_1 ⇒ String
TODO: Write general description for this method.
-
#address_2 ⇒ String
TODO: Write general description for this method.
-
#city ⇒ String
TODO: Write general description for this method.
-
#country_id ⇒ Integer
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#state ⇒ String
TODO: Write general description for this method.
-
#zip ⇒ String
TODO: Write general description for this method.
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(name:, description:, address_1:, address_2:, city:, state:, zip:, country_id:, active:, additional_properties: nil) ⇒ UpdateWarehouseRequest
constructor
A new instance of UpdateWarehouseRequest.
-
#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(name:, description:, address_1:, address_2:, city:, state:, zip:, country_id:, active:, additional_properties: nil) ⇒ UpdateWarehouseRequest
Returns a new instance of UpdateWarehouseRequest.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 73 def initialize(name:, description:, address_1:, address_2:, city:, state:, zip:, country_id:, active:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name @description = description @address_1 = address_1 @address_2 = address_2 @city = city @state = state @zip = zip @country_id = country_id @active = active @additional_properties = additional_properties end |
Instance Attribute Details
#active ⇒ Integer
TODO: Write general description for this method
46 47 48 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 46 def active @active end |
#address_1 ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 22 def address_1 @address_1 end |
#address_2 ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 26 def address_2 @address_2 end |
#city ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 30 def city @city end |
#country_id ⇒ Integer
TODO: Write general description for this method
42 43 44 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 42 def country_id @country_id end |
#description ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 18 def description @description end |
#name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 14 def name @name end |
#state ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 34 def state @state end |
#zip ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 38 def zip @zip end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 91 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : nil description = hash.key?('description') ? hash['description'] : nil address_1 = hash.key?('address_1') ? hash['address_1'] : nil address_2 = hash.key?('address_2') ? hash['address_2'] : nil city = hash.key?('city') ? hash['city'] : nil state = hash.key?('state') ? hash['state'] : nil zip = hash.key?('zip') ? hash['zip'] : nil country_id = hash.key?('country_id') ? hash['country_id'] : nil active = hash.key?('active') ? hash['active'] : nil # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. UpdateWarehouseRequest.new(name: name, description: description, address_1: address_1, address_2: address_2, city: city, state: state, zip: zip, country_id: country_id, active: active, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 49 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['description'] = 'description' @_hash['address_1'] = 'address_1' @_hash['address_2'] = 'address_2' @_hash['city'] = 'city' @_hash['state'] = 'state' @_hash['zip'] = 'zip' @_hash['country_id'] = 'country_id' @_hash['active'] = 'active' @_hash end |
.nullables ⇒ Object
An array for nullable fields
69 70 71 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 69 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 64 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
134 135 136 137 138 139 140 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 134 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, description: #{@description.inspect}, address_1:"\ " #{@address_1.inspect}, address_2: #{@address_2.inspect}, city: #{@city.inspect}, state:"\ " #{@state.inspect}, zip: #{@zip.inspect}, country_id: #{@country_id.inspect}, active:"\ " #{@active.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
126 127 128 129 130 131 |
# File 'lib/sticky_io_restful_api_v2025731/models/update_warehouse_request.rb', line 126 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, description: #{@description}, address_1: #{@address_1},"\ " address_2: #{@address_2}, city: #{@city}, state: #{@state}, zip: #{@zip}, country_id:"\ " #{@country_id}, active: #{@active}, additional_properties: #{@additional_properties}>" end |