Class: NewStoreApi::OfflineCountriesConfigV1Dto

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/new_store_api/models/offline_countries_config_v1_dto.rb

Overview

OfflineCountriesConfigV1Dto Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(at = nil, de = nil, es = nil, fr = nil, ie = nil, min = nil, it = nil, mc = nil, no = nil, pl = nil, pr = nil, se = nil, th = nil) ⇒ OfflineCountriesConfigV1Dto

Returns a new instance of OfflineCountriesConfigV1Dto.



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 93

def initialize(at = nil, de = nil, es = nil, fr = nil, ie = nil, min = nil,
               it = nil, mc = nil, no = nil, pl = nil, pr = nil, se = nil,
               th = nil)
  @at = at
  @de = de
  @es = es
  @fr = fr
  @ie = ie
  @min = min
  @it = it
  @mc = mc
  @no = no
  @pl = pl
  @pr = pr
  @se = se
  @th = th
end

Instance Attribute Details

#atOfflineCountryConfigV1Dto

Per country offline mode configuration for Austria.



14
15
16
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 14

def at
  @at
end

#deOfflineCountryConfigV1Dto

Per country offline mode configuration for Germany.



18
19
20
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 18

def de
  @de
end

#esOfflineCountryConfigV1Dto

Per country offline mode configuration for Spain.



22
23
24
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 22

def es
  @es
end

#frOfflineCountryConfigV1Dto

Per country offline mode configuration for France.



26
27
28
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 26

def fr
  @fr
end

#ieOfflineCountryConfigV1Dto

Per country offline mode configuration for Ireland.



30
31
32
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 30

def ie
  @ie
end

#itOfflineCountryConfigV1Dto

Per country offline mode configuration for Italy.



38
39
40
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 38

def it
  @it
end

#mcOfflineCountryConfigV1Dto

Per country offline mode configuration for Monaco.



42
43
44
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 42

def mc
  @mc
end

#minOfflineCountryConfigV1Dto

Per country offline mode configuration for India.



34
35
36
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 34

def min
  @min
end

#noOfflineCountryConfigV1Dto

Per country offline mode configuration for Norway.



46
47
48
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 46

def no
  @no
end

#plOfflineCountryConfigV1Dto

Per country offline mode configuration for Poland.



50
51
52
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 50

def pl
  @pl
end

#prOfflineCountryConfigV1Dto

Per country offline mode configuration for Puerto Rico.



54
55
56
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 54

def pr
  @pr
end

#seOfflineCountryConfigV1Dto

Per country offline mode configuration for Sweden.



58
59
60
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 58

def se
  @se
end

#thOfflineCountryConfigV1Dto

Per country offline mode configuration for Thailand.



62
63
64
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 62

def th
  @th
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 112

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  at = OfflineCountryConfigV1Dto.from_hash(hash['AT']) if hash['AT']
  de = OfflineCountryConfigV1Dto.from_hash(hash['DE']) if hash['DE']
  es = OfflineCountryConfigV1Dto.from_hash(hash['ES']) if hash['ES']
  fr = OfflineCountryConfigV1Dto.from_hash(hash['FR']) if hash['FR']
  ie = OfflineCountryConfigV1Dto.from_hash(hash['IE']) if hash['IE']
  min = OfflineCountryConfigV1Dto.from_hash(hash['IN']) if hash['IN']
  it = OfflineCountryConfigV1Dto.from_hash(hash['IT']) if hash['IT']
  mc = OfflineCountryConfigV1Dto.from_hash(hash['MC']) if hash['MC']
  no = OfflineCountryConfigV1Dto.from_hash(hash['NO']) if hash['NO']
  pl = OfflineCountryConfigV1Dto.from_hash(hash['PL']) if hash['PL']
  pr = OfflineCountryConfigV1Dto.from_hash(hash['PR']) if hash['PR']
  se = OfflineCountryConfigV1Dto.from_hash(hash['SE']) if hash['SE']
  th = OfflineCountryConfigV1Dto.from_hash(hash['TH']) if hash['TH']

  # Create object from extracted values.
  OfflineCountriesConfigV1Dto.new(at,
                                  de,
                                  es,
                                  fr,
                                  ie,
                                  min,
                                  it,
                                  mc,
                                  no,
                                  pl,
                                  pr,
                                  se,
                                  th)
end

.namesObject

A mapping from model property names to API property names.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 65

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['at'] = 'AT'
  @_hash['de'] = 'DE'
  @_hash['es'] = 'ES'
  @_hash['fr'] = 'FR'
  @_hash['ie'] = 'IE'
  @_hash['min'] = 'IN'
  @_hash['it'] = 'IT'
  @_hash['mc'] = 'MC'
  @_hash['no'] = 'NO'
  @_hash['pl'] = 'PL'
  @_hash['pr'] = 'PR'
  @_hash['se'] = 'SE'
  @_hash['th'] = 'TH'
  @_hash
end

.nullablesObject

An array for nullable fields



89
90
91
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 89

def self.nullables
  []
end

.optionalsObject

An array for optional fields



84
85
86
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 84

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



154
155
156
157
158
159
160
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 154

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} at: #{@at.inspect}, de: #{@de.inspect}, es: #{@es.inspect}, fr:"\
  " #{@fr.inspect}, ie: #{@ie.inspect}, min: #{@min.inspect}, it: #{@it.inspect}, mc:"\
  " #{@mc.inspect}, no: #{@no.inspect}, pl: #{@pl.inspect}, pr: #{@pr.inspect}, se:"\
  " #{@se.inspect}, th: #{@th.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



147
148
149
150
151
# File 'lib/new_store_api/models/offline_countries_config_v1_dto.rb', line 147

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} at: #{@at}, de: #{@de}, es: #{@es}, fr: #{@fr}, ie: #{@ie}, min: #{@min},"\
  " it: #{@it}, mc: #{@mc}, no: #{@no}, pl: #{@pl}, pr: #{@pr}, se: #{@se}, th: #{@th}>"
end