Class: NewStoreApi::StoreConfigUpdatePlV1Dto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::StoreConfigUpdatePlV1Dto
- Defined in:
- lib/new_store_api/models/store_config_update_pl_v1_dto.rb
Overview
StoreConfigUpdatePlV1Dto 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.
-
#footer_image_url ⇒ String
The footer image URL to be configured on the fiscal printers.
-
#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, footer_image_url = SKIP, report_types = SKIP, timezone = SKIP) ⇒ StoreConfigUpdatePlV1Dto
constructor
A new instance of StoreConfigUpdatePlV1Dto.
-
#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, footer_image_url = SKIP, report_types = SKIP, timezone = SKIP) ⇒ StoreConfigUpdatePlV1Dto
Returns a new instance of StoreConfigUpdatePlV1Dto.
59 60 61 62 63 64 65 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 59 def initialize(auto_report_types = SKIP, = SKIP, report_types = SKIP, timezone = SKIP) @auto_report_types = auto_report_types unless auto_report_types == SKIP @footer_image_url = unless == 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_pl_v1_dto.rb', line 15 def auto_report_types @auto_report_types end |
#footer_image_url ⇒ String
The footer image URL to be configured on the fiscal printers.
- Footer image must be a monochrome bitmap with top-down DIB, and without compression.
- Footer image will be configured on the fiscal printers during the fiscal activation of a fiscal printer.
- Fiscal printer will print the footer image on all supported documents.
24 25 26 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 24 def @footer_image_url end |
#report_types ⇒ Array[PeriodTypeEnum]
List of supported periodic report types.
28 29 30 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 28 def report_types @report_types end |
#timezone ⇒ TimezoneEnum
List of supported periodic report types.
32 33 34 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 32 def timezone @timezone end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 68 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 = hash.key?('footer_image_url') ? hash['footer_image_url'] : SKIP report_types = hash.key?('report_types') ? hash['report_types'] : SKIP timezone = hash.key?('timezone') ? hash['timezone'] : SKIP # Create object from extracted values. StoreConfigUpdatePlV1Dto.new(auto_report_types, , report_types, timezone) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['auto_report_types'] = 'auto_report_types' @_hash['footer_image_url'] = 'footer_image_url' @_hash['report_types'] = 'report_types' @_hash['timezone'] = 'timezone' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 45 def self.optionals %w[ auto_report_types footer_image_url report_types timezone ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
88 89 90 91 92 93 94 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 88 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.
104 105 106 107 108 109 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} auto_report_types: #{@auto_report_types.inspect}, footer_image_url:"\ " #{@footer_image_url.inspect}, report_types: #{@report_types.inspect}, timezone:"\ " #{@timezone.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 |
# File 'lib/new_store_api/models/store_config_update_pl_v1_dto.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} auto_report_types: #{@auto_report_types}, footer_image_url:"\ " #{@footer_image_url}, report_types: #{@report_types}, timezone: #{@timezone}>" end |