Class: NewStoreApi::StoreConfigUpdateV1Dto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::StoreConfigUpdateV1Dto
- Defined in:
- lib/new_store_api/models/store_config_update_v1_dto.rb
Overview
StoreConfigUpdateV1Dto Model.
Instance Attribute Summary collapse
-
#auto_report_types ⇒ Array[PeriodTypeEnum]
List of periodic report types that should be closed automatically before the first transaction in the next period.
-
#report_types ⇒ Array[PeriodTypeEnum]
List of supported periodic report types.
-
#timezone ⇒ TimezoneEnum
List of supported periodic report types.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(auto_report_types = SKIP, report_types = SKIP, timezone = SKIP) ⇒ StoreConfigUpdateV1Dto
constructor
A new instance of StoreConfigUpdateV1Dto.
-
#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(auto_report_types = SKIP, report_types = SKIP, timezone = SKIP) ⇒ StoreConfigUpdateV1Dto
Returns a new instance of StoreConfigUpdateV1Dto.
48 49 50 51 52 53 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 48 def initialize(auto_report_types = SKIP, report_types = SKIP, timezone = SKIP) @auto_report_types = auto_report_types unless auto_report_types == SKIP @report_types = report_types unless report_types == SKIP @timezone = timezone unless timezone == SKIP end |
Instance Attribute Details
#auto_report_types ⇒ Array[PeriodTypeEnum]
List of periodic report types that should be closed automatically before the first transaction in the next period.
15 16 17 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 15 def auto_report_types @auto_report_types end |
#report_types ⇒ Array[PeriodTypeEnum]
List of supported periodic report types.
19 20 21 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 19 def report_types @report_types end |
#timezone ⇒ TimezoneEnum
List of supported periodic report types.
23 24 25 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 23 def timezone @timezone end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 56 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auto_report_types = hash.key?('auto_report_types') ? hash['auto_report_types'] : SKIP report_types = hash.key?('report_types') ? hash['report_types'] : SKIP timezone = hash.key?('timezone') ? hash['timezone'] : SKIP # Create object from extracted values. StoreConfigUpdateV1Dto.new(auto_report_types, report_types, timezone) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['auto_report_types'] = 'auto_report_types' @_hash['report_types'] = 'report_types' @_hash['timezone'] = 'timezone' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 41 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 35 def self.optionals %w[ auto_report_types report_types timezone ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
73 74 75 76 77 78 79 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 73 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} auto_report_types: #{@auto_report_types.inspect}, report_types:"\ " #{@report_types.inspect}, timezone: #{@timezone.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 |
# File 'lib/new_store_api/models/store_config_update_v1_dto.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} auto_report_types: #{@auto_report_types}, report_types: #{@report_types},"\ " timezone: #{@timezone}>" end |