Class: NewStoreApi::OrderInjectionConfigurationResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::OrderInjectionConfigurationResponse
- Defined in:
- lib/new_store_api/models/order_injection_configuration_response.rb
Overview
Update configuration response
Instance Attribute Summary collapse
-
#updated_at ⇒ DateTime
TODO: Write general description for this method.
-
#updated_by ⇒ String
Internal User ID.
-
#value ⇒ OrderInjectionTenantConfiguration
Tenant configuration object.
-
#version ⇒ String
Current Configuration version.
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(updated_at = SKIP, updated_by = SKIP, value = SKIP, version = SKIP) ⇒ OrderInjectionConfigurationResponse
constructor
A new instance of OrderInjectionConfigurationResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_updated_at ⇒ Object
-
#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(updated_at = SKIP, updated_by = SKIP, value = SKIP, version = SKIP) ⇒ OrderInjectionConfigurationResponse
Returns a new instance of OrderInjectionConfigurationResponse.
54 55 56 57 58 59 60 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 54 def initialize(updated_at = SKIP, updated_by = SKIP, value = SKIP, version = SKIP) @updated_at = updated_at unless updated_at == SKIP @updated_by = updated_by unless updated_by == SKIP @value = value unless value == SKIP @version = version unless version == SKIP end |
Instance Attribute Details
#updated_at ⇒ DateTime
TODO: Write general description for this method
15 16 17 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 15 def updated_at @updated_at end |
#updated_by ⇒ String
Internal User ID
19 20 21 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 19 def updated_by @updated_by end |
#value ⇒ OrderInjectionTenantConfiguration
Tenant configuration object.
23 24 25 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 23 def value @value end |
#version ⇒ String
Current Configuration version
27 28 29 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 27 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. updated_at = if hash.key?('updated_at') (DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at']) else SKIP end updated_by = hash.key?('updated_by') ? hash['updated_by'] : SKIP value = OrderInjectionTenantConfiguration.from_hash(hash['value']) if hash['value'] version = hash.key?('version') ? hash['version'] : SKIP # Create object from extracted values. OrderInjectionConfigurationResponse.new(updated_at, updated_by, value, version) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['updated_at'] = 'updated_at' @_hash['updated_by'] = 'updated_by' @_hash['value'] = 'value' @_hash['version'] = 'version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 40 def self.optionals %w[ updated_at updated_by value version ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
95 96 97 98 99 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 95 def inspect class_name = self.class.name.split('::').last "<#{class_name} updated_at: #{@updated_at.inspect}, updated_by: #{@updated_by.inspect},"\ " value: #{@value.inspect}, version: #{@version.inspect}>" end |
#to_custom_updated_at ⇒ Object
83 84 85 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 83 def to_custom_updated_at DateTimeHelper.to_rfc3339(updated_at) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
88 89 90 91 92 |
# File 'lib/new_store_api/models/order_injection_configuration_response.rb', line 88 def to_s class_name = self.class.name.split('::').last "<#{class_name} updated_at: #{@updated_at}, updated_by: #{@updated_by}, value: #{@value},"\ " version: #{@version}>" end |