Class: NuvemfiscalSdkRuby::CteSefazIde
- Inherits:
-
Object
- Object
- NuvemfiscalSdkRuby::CteSefazIde
- Defined in:
- lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb
Overview
Identificação do CT-e.
Instance Attribute Summary collapse
-
#c_ct ⇒ Object
Código numérico que compõe a Chave de Acesso.
-
#c_dv ⇒ Object
Digito Verificador da chave de acesso do CT-e.
-
#c_mun_env ⇒ Object
Código do Município de envio do CT-e (de onde o documento foi transmitido).
-
#c_mun_fim ⇒ Object
Código do Município de término da prestação.
-
#c_mun_ini ⇒ Object
Código do Município de início da prestação.
-
#c_uf ⇒ Object
Código da UF do emitente do CT-e.
-
#cfop ⇒ Object
Código Fiscal de Operações e Prestações.
-
#dh_cont ⇒ Object
Data e Hora da entrada em contingência.
-
#dh_emi ⇒ Object
Data e hora de emissão do CT-e.
-
#ind_globalizado ⇒ Object
Indicador de CT-e Globalizado.
-
#ind_ie_toma ⇒ Object
Indicador do papel do tomador na prestação do serviço: * 1 - Contribuinte ICMS * 2 - Contribuinte isento de inscrição * 9 - Não Contribuinte Aplica-se ao tomador que for indicado no toma3 ou toma4.
-
#mod ⇒ Object
Modelo do documento fiscal.
-
#modal ⇒ Object
Modal.
-
#n_ct ⇒ Object
Número do CT-e.
-
#nat_op ⇒ Object
Natureza da Operação.
-
#proc_emi ⇒ Object
Identificador do processo de emissão do CT-e.
-
#retira ⇒ Object
Indicador se o Recebedor retira no Aeroporto, Filial, Porto ou Estação de Destino? Preencher com: * 0 - Sim * 1 - Não.
-
#serie ⇒ Object
Série do CT-e.
-
#toma3 ⇒ Object
Returns the value of attribute toma3.
-
#toma4 ⇒ Object
Returns the value of attribute toma4.
-
#tp_amb ⇒ Object
Tipo do Ambiente: * 1 - Produção * 2 - Homologação.
-
#tp_cte ⇒ Object
Tipo do CT-e.
-
#tp_emis ⇒ Object
Forma de emissão do CT-e.
-
#tp_imp ⇒ Object
Formato de impressão do DACTE: * 1 - Retrato * 2 - Paisagem.
-
#tp_serv ⇒ Object
Tipo do Serviço.
-
#uf_env ⇒ Object
Sigla da UF de envio do CT-e (de onde o documento foi transmitido).
-
#uf_fim ⇒ Object
UF do término da prestação.
-
#uf_ini ⇒ Object
UF do início da prestação.
-
#ver_proc ⇒ Object
Versão do processo de emissão.
-
#x_det_retira ⇒ Object
Detalhes do retira.
-
#x_just ⇒ Object
Justificativa da entrada em contingência.
-
#x_mun_env ⇒ Object
Nome do Município de envio do CT-e (de onde o documento foi transmitido).
-
#x_mun_fim ⇒ Object
Nome do Município do término da prestação.
-
#x_mun_ini ⇒ Object
Nome do Município do início da prestação.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CteSefazIde
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ CteSefazIde
Initializes the object
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 244 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NuvemfiscalSdkRuby::CteSefazIde` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `NuvemfiscalSdkRuby::CteSefazIde`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'c_uf') self.c_uf = attributes[:'c_uf'] else self.c_uf = nil end if attributes.key?(:'c_ct') self.c_ct = attributes[:'c_ct'] end if attributes.key?(:'cfop') self.cfop = attributes[:'cfop'] else self.cfop = nil end if attributes.key?(:'nat_op') self.nat_op = attributes[:'nat_op'] else self.nat_op = nil end if attributes.key?(:'mod') self.mod = attributes[:'mod'] end if attributes.key?(:'serie') self.serie = attributes[:'serie'] else self.serie = nil end if attributes.key?(:'n_ct') self.n_ct = attributes[:'n_ct'] else self.n_ct = nil end if attributes.key?(:'dh_emi') self.dh_emi = attributes[:'dh_emi'] else self.dh_emi = nil end if attributes.key?(:'tp_imp') self.tp_imp = attributes[:'tp_imp'] else self.tp_imp = nil end if attributes.key?(:'tp_emis') self.tp_emis = attributes[:'tp_emis'] else self.tp_emis = nil end if attributes.key?(:'c_dv') self.c_dv = attributes[:'c_dv'] end if attributes.key?(:'tp_amb') self.tp_amb = attributes[:'tp_amb'] end if attributes.key?(:'tp_cte') self.tp_cte = attributes[:'tp_cte'] else self.tp_cte = nil end if attributes.key?(:'proc_emi') self.proc_emi = attributes[:'proc_emi'] else self.proc_emi = nil end if attributes.key?(:'ver_proc') self.ver_proc = attributes[:'ver_proc'] else self.ver_proc = nil end if attributes.key?(:'ind_globalizado') self.ind_globalizado = attributes[:'ind_globalizado'] end if attributes.key?(:'c_mun_env') self.c_mun_env = attributes[:'c_mun_env'] else self.c_mun_env = nil end if attributes.key?(:'x_mun_env') self.x_mun_env = attributes[:'x_mun_env'] else self.x_mun_env = nil end if attributes.key?(:'uf_env') self.uf_env = attributes[:'uf_env'] else self.uf_env = nil end if attributes.key?(:'modal') self.modal = attributes[:'modal'] else self.modal = nil end if attributes.key?(:'tp_serv') self.tp_serv = attributes[:'tp_serv'] else self.tp_serv = nil end if attributes.key?(:'c_mun_ini') self.c_mun_ini = attributes[:'c_mun_ini'] else self.c_mun_ini = nil end if attributes.key?(:'x_mun_ini') self.x_mun_ini = attributes[:'x_mun_ini'] else self.x_mun_ini = nil end if attributes.key?(:'uf_ini') self.uf_ini = attributes[:'uf_ini'] else self.uf_ini = nil end if attributes.key?(:'c_mun_fim') self.c_mun_fim = attributes[:'c_mun_fim'] else self.c_mun_fim = nil end if attributes.key?(:'x_mun_fim') self.x_mun_fim = attributes[:'x_mun_fim'] else self.x_mun_fim = nil end if attributes.key?(:'uf_fim') self.uf_fim = attributes[:'uf_fim'] else self.uf_fim = nil end if attributes.key?(:'retira') self.retira = attributes[:'retira'] else self.retira = nil end if attributes.key?(:'x_det_retira') self.x_det_retira = attributes[:'x_det_retira'] end if attributes.key?(:'ind_ie_toma') self.ind_ie_toma = attributes[:'ind_ie_toma'] else self.ind_ie_toma = nil end if attributes.key?(:'toma3') self.toma3 = attributes[:'toma3'] end if attributes.key?(:'toma4') self.toma4 = attributes[:'toma4'] end if attributes.key?(:'dh_cont') self.dh_cont = attributes[:'dh_cont'] end if attributes.key?(:'x_just') self.x_just = attributes[:'x_just'] end end |
Instance Attribute Details
#c_ct ⇒ Object
Código numérico que compõe a Chave de Acesso. Número aleatório gerado pelo emitente para cada CT-e, com o objetivo de evitar acessos indevidos ao documento. *Geramos automaticamente quando nenhum valor é informado.*
23 24 25 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 23 def c_ct @c_ct end |
#c_dv ⇒ Object
Digito Verificador da chave de acesso do CT-e. Informar o dígito de controle da chave de acesso do CT-e, que deve ser calculado com a aplicação do algoritmo módulo 11 (base 2,9) da chave de acesso. *Geramos automaticamente quando nenhum valor é informado.*
50 51 52 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 50 def c_dv @c_dv end |
#c_mun_env ⇒ Object
Código do Município de envio do CT-e (de onde o documento foi transmitido). Utilizar a tabela do IBGE. Informar 9999999 para as operações com o exterior.
68 69 70 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 68 def c_mun_env @c_mun_env end |
#c_mun_fim ⇒ Object
Código do Município de término da prestação. Utilizar a tabela do IBGE. Informar 9999999 para operações com o exterior.
92 93 94 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 92 def c_mun_fim @c_mun_fim end |
#c_mun_ini ⇒ Object
Código do Município de início da prestação. Utilizar a tabela do IBGE. Informar 9999999 para operações com o exterior.
83 84 85 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 83 def c_mun_ini @c_mun_ini end |
#c_uf ⇒ Object
Código da UF do emitente do CT-e. Utilizar a Tabela do IBGE.
20 21 22 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 20 def c_uf @c_uf end |
#cfop ⇒ Object
Código Fiscal de Operações e Prestações.
26 27 28 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 26 def cfop @cfop end |
#dh_cont ⇒ Object
Data e Hora da entrada em contingência. Informar a data e hora no formato AAAA-MM-DDTHH:MM:SS.
114 115 116 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 114 def dh_cont @dh_cont end |
#dh_emi ⇒ Object
Data e hora de emissão do CT-e. Formato AAAA-MM-DDTHH:MM:DD TZD.
41 42 43 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 41 def dh_emi @dh_emi end |
#ind_globalizado ⇒ Object
Indicador de CT-e Globalizado. Informar valor 1 quando for Globalizado e não informar a tag quando não tratar de CT-e Globalizado.
65 66 67 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 65 def ind_globalizado @ind_globalizado end |
#ind_ie_toma ⇒ Object
Indicador do papel do tomador na prestação do serviço: * 1 - Contribuinte ICMS * 2 - Contribuinte isento de inscrição * 9 - Não Contribuinte Aplica-se ao tomador que for indicado no toma3 ou toma4.
107 108 109 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 107 def ind_ie_toma @ind_ie_toma end |
#mod ⇒ Object
Modelo do documento fiscal. Utilizar o código 57 para identificação do CT-e, emitido em substituição aos modelos de conhecimentos em papel.
32 33 34 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 32 def mod @mod end |
#modal ⇒ Object
Modal. Preencher com: * 01 - Rodoviário * 02 - Aéreo * 03 - Aquaviário * 04 - Ferroviário * 05 - Dutoviário * 06 - Multimodal
77 78 79 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 77 def modal @modal end |
#n_ct ⇒ Object
Número do CT-e.
38 39 40 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 38 def n_ct @n_ct end |
#nat_op ⇒ Object
Natureza da Operação.
29 30 31 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 29 def nat_op @nat_op end |
#proc_emi ⇒ Object
Identificador do processo de emissão do CT-e. Preencher com: * 0 - emissão de CT-e com aplicativo do contribuinte * 3 - emissão CT-e pelo contribuinte com aplicativo fornecido pelo SEBRAE
59 60 61 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 59 def proc_emi @proc_emi end |
#retira ⇒ Object
Indicador se o Recebedor retira no Aeroporto, Filial, Porto ou Estação de Destino? Preencher com: * 0 - Sim * 1 - Não
101 102 103 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 101 def retira @retira end |
#serie ⇒ Object
Série do CT-e. Preencher com "0" no caso de série única.
35 36 37 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 35 def serie @serie end |
#toma3 ⇒ Object
Returns the value of attribute toma3.
109 110 111 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 109 def toma3 @toma3 end |
#toma4 ⇒ Object
Returns the value of attribute toma4.
111 112 113 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 111 def toma4 @toma4 end |
#tp_amb ⇒ Object
Tipo do Ambiente: * 1 - Produção * 2 - Homologação
53 54 55 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 53 def tp_amb @tp_amb end |
#tp_cte ⇒ Object
Tipo do CT-e. Preencher com: * 0 - CT-e Normal * 1 - CT-e de Complemento de Valores * 3 - CT-e de Substituição
56 57 58 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 56 def tp_cte @tp_cte end |
#tp_emis ⇒ Object
Forma de emissão do CT-e. Preencher com: * 1 - Normal * 3 - Regime Especial NFF * 4 - EPEC pela SVC * 5 - Contingência FSDA * 7 - Autorização pela SVC-RS * 8 - Autorização pela SVC-SP
47 48 49 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 47 def tp_emis @tp_emis end |
#tp_imp ⇒ Object
Formato de impressão do DACTE: * 1 - Retrato * 2 - Paisagem
44 45 46 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 44 def tp_imp @tp_imp end |
#tp_serv ⇒ Object
Tipo do Serviço. Preencher com: * 0 - Normal * 1 - Subcontratação * 2 - Redespacho * 3 - Redespacho Intermediário * 4 - Serviço Vinculado a Multimodal
80 81 82 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 80 def tp_serv @tp_serv end |
#uf_env ⇒ Object
Sigla da UF de envio do CT-e (de onde o documento foi transmitido). Informar ‘EX’ para operações com o exterior.
74 75 76 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 74 def uf_env @uf_env end |
#uf_fim ⇒ Object
UF do término da prestação. Informar ‘EX’ para operações com o exterior.
98 99 100 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 98 def uf_fim @uf_fim end |
#uf_ini ⇒ Object
UF do início da prestação. Informar ‘EX’ para operações com o exterior.
89 90 91 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 89 def uf_ini @uf_ini end |
#ver_proc ⇒ Object
Versão do processo de emissão. Iinformar a versão do aplicativo emissor de CT-e.
62 63 64 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 62 def ver_proc @ver_proc end |
#x_det_retira ⇒ Object
Detalhes do retira.
104 105 106 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 104 def x_det_retira @x_det_retira end |
#x_just ⇒ Object
Justificativa da entrada em contingência.
117 118 119 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 117 def x_just @x_just end |
#x_mun_env ⇒ Object
Nome do Município de envio do CT-e (de onde o documento foi transmitido). Informar PAIS/Municipio para as operações com o exterior.
71 72 73 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 71 def x_mun_env @x_mun_env end |
#x_mun_fim ⇒ Object
Nome do Município do término da prestação. Informar ‘EXTERIOR’ para operações com o exterior.
95 96 97 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 95 def x_mun_fim @x_mun_fim end |
#x_mun_ini ⇒ Object
Nome do Município do início da prestação. Informar ‘EXTERIOR’ para operações com o exterior.
86 87 88 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 86 def x_mun_ini @x_mun_ini end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 777 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = NuvemfiscalSdkRuby.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
160 161 162 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 160 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 120 def self.attribute_map { :'c_uf' => :'cUF', :'c_ct' => :'cCT', :'cfop' => :'CFOP', :'nat_op' => :'natOp', :'mod' => :'mod', :'serie' => :'serie', :'n_ct' => :'nCT', :'dh_emi' => :'dhEmi', :'tp_imp' => :'tpImp', :'tp_emis' => :'tpEmis', :'c_dv' => :'cDV', :'tp_amb' => :'tpAmb', :'tp_cte' => :'tpCTe', :'proc_emi' => :'procEmi', :'ver_proc' => :'verProc', :'ind_globalizado' => :'indGlobalizado', :'c_mun_env' => :'cMunEnv', :'x_mun_env' => :'xMunEnv', :'uf_env' => :'UFEnv', :'modal' => :'modal', :'tp_serv' => :'tpServ', :'c_mun_ini' => :'cMunIni', :'x_mun_ini' => :'xMunIni', :'uf_ini' => :'UFIni', :'c_mun_fim' => :'cMunFim', :'x_mun_fim' => :'xMunFim', :'uf_fim' => :'UFFim', :'retira' => :'retira', :'x_det_retira' => :'xDetRetira', :'ind_ie_toma' => :'indIEToma', :'toma3' => :'toma3', :'toma4' => :'toma4', :'dh_cont' => :'dhCont', :'x_just' => :'xJust' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 753 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 205 def self.openapi_nullable Set.new([ :'c_uf', :'c_ct', :'cfop', :'nat_op', :'mod', :'serie', :'n_ct', :'dh_emi', :'tp_imp', :'tp_emis', :'c_dv', :'tp_amb', :'tp_cte', :'proc_emi', :'ver_proc', :'ind_globalizado', :'c_mun_env', :'x_mun_env', :'uf_env', :'modal', :'tp_serv', :'c_mun_ini', :'x_mun_ini', :'uf_ini', :'c_mun_fim', :'x_mun_fim', :'uf_fim', :'retira', :'x_det_retira', :'ind_ie_toma', :'dh_cont', :'x_just' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 165 def self.openapi_types { :'c_uf' => :'Integer', :'c_ct' => :'String', :'cfop' => :'String', :'nat_op' => :'String', :'mod' => :'Integer', :'serie' => :'Integer', :'n_ct' => :'Integer', :'dh_emi' => :'Time', :'tp_imp' => :'Integer', :'tp_emis' => :'Integer', :'c_dv' => :'Integer', :'tp_amb' => :'Integer', :'tp_cte' => :'Integer', :'proc_emi' => :'Integer', :'ver_proc' => :'String', :'ind_globalizado' => :'Integer', :'c_mun_env' => :'String', :'x_mun_env' => :'String', :'uf_env' => :'String', :'modal' => :'String', :'tp_serv' => :'Integer', :'c_mun_ini' => :'String', :'x_mun_ini' => :'String', :'uf_ini' => :'String', :'c_mun_fim' => :'String', :'x_mun_fim' => :'String', :'uf_fim' => :'String', :'retira' => :'Integer', :'x_det_retira' => :'String', :'ind_ie_toma' => :'Integer', :'toma3' => :'CteSefazToma3', :'toma4' => :'CteSefazToma4', :'dh_cont' => :'Time', :'x_just' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 699 def ==(o) return true if self.equal?(o) self.class == o.class && c_uf == o.c_uf && c_ct == o.c_ct && cfop == o.cfop && nat_op == o.nat_op && mod == o.mod && serie == o.serie && n_ct == o.n_ct && dh_emi == o.dh_emi && tp_imp == o.tp_imp && tp_emis == o.tp_emis && c_dv == o.c_dv && tp_amb == o.tp_amb && tp_cte == o.tp_cte && proc_emi == o.proc_emi && ver_proc == o.ver_proc && ind_globalizado == o.ind_globalizado && c_mun_env == o.c_mun_env && x_mun_env == o.x_mun_env && uf_env == o.uf_env && modal == o.modal && tp_serv == o.tp_serv && c_mun_ini == o.c_mun_ini && x_mun_ini == o.x_mun_ini && uf_ini == o.uf_ini && c_mun_fim == o.c_mun_fim && x_mun_fim == o.x_mun_fim && uf_fim == o.uf_fim && retira == o.retira && x_det_retira == o.x_det_retira && ind_ie_toma == o.ind_ie_toma && toma3 == o.toma3 && toma4 == o.toma4 && dh_cont == o.dh_cont && x_just == o.x_just end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
848 849 850 851 852 853 854 855 856 857 858 859 860 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 848 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
740 741 742 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 740 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
746 747 748 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 746 def hash [c_uf, c_ct, cfop, nat_op, mod, serie, n_ct, dh_emi, tp_imp, tp_emis, c_dv, tp_amb, tp_cte, proc_emi, ver_proc, ind_globalizado, c_mun_env, x_mun_env, uf_env, modal, tp_serv, c_mun_ini, x_mun_ini, uf_ini, c_mun_fim, x_mun_fim, uf_fim, retira, x_det_retira, ind_ie_toma, toma3, toma4, dh_cont, x_just].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 444 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @nat_op.to_s.length > 60 invalid_properties.push('invalid value for "nat_op", the character length must be smaller than or equal to 60.') end if @nat_op.to_s.length < 1 invalid_properties.push('invalid value for "nat_op", the character length must be great than or equal to 1.') end if @serie > 999 invalid_properties.push('invalid value for "serie", must be smaller than or equal to 999.') end if @serie < 0 invalid_properties.push('invalid value for "serie", must be greater than or equal to 0.') end if @n_ct > 999999999 invalid_properties.push('invalid value for "n_ct", must be smaller than or equal to 999999999.') end if @n_ct < 1 invalid_properties.push('invalid value for "n_ct", must be greater than or equal to 1.') end if !@c_dv.nil? && @c_dv > 9 invalid_properties.push('invalid value for "c_dv", must be smaller than or equal to 9.') end if !@c_dv.nil? && @c_dv < 0 invalid_properties.push('invalid value for "c_dv", must be greater than or equal to 0.') end if @ver_proc.to_s.length > 20 invalid_properties.push('invalid value for "ver_proc", the character length must be smaller than or equal to 20.') end if @ver_proc.to_s.length < 1 invalid_properties.push('invalid value for "ver_proc", the character length must be great than or equal to 1.') end if @x_mun_env.to_s.length > 60 invalid_properties.push('invalid value for "x_mun_env", the character length must be smaller than or equal to 60.') end if @x_mun_env.to_s.length < 2 invalid_properties.push('invalid value for "x_mun_env", the character length must be great than or equal to 2.') end if @x_mun_ini.to_s.length > 60 invalid_properties.push('invalid value for "x_mun_ini", the character length must be smaller than or equal to 60.') end if @x_mun_ini.to_s.length < 2 invalid_properties.push('invalid value for "x_mun_ini", the character length must be great than or equal to 2.') end if @x_mun_fim.to_s.length > 60 invalid_properties.push('invalid value for "x_mun_fim", the character length must be smaller than or equal to 60.') end if @x_mun_fim.to_s.length < 2 invalid_properties.push('invalid value for "x_mun_fim", the character length must be great than or equal to 2.') end if !@x_det_retira.nil? && @x_det_retira.to_s.length > 160 invalid_properties.push('invalid value for "x_det_retira", the character length must be smaller than or equal to 160.') end if !@x_det_retira.nil? && @x_det_retira.to_s.length < 1 invalid_properties.push('invalid value for "x_det_retira", the character length must be great than or equal to 1.') end if !@x_just.nil? && @x_just.to_s.length > 256 invalid_properties.push('invalid value for "x_just", the character length must be smaller than or equal to 256.') end if !@x_just.nil? && @x_just.to_s.length < 15 invalid_properties.push('invalid value for "x_just", the character length must be great than or equal to 15.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
824 825 826 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 824 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
830 831 832 833 834 835 836 837 838 839 840 841 842 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 830 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
818 819 820 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 818 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/nuvemfiscal_sdk_ruby/models/cte_sefaz_ide.rb', line 532 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @nat_op.to_s.length > 60 return false if @nat_op.to_s.length < 1 return false if @serie > 999 return false if @serie < 0 return false if @n_ct > 999999999 return false if @n_ct < 1 return false if !@c_dv.nil? && @c_dv > 9 return false if !@c_dv.nil? && @c_dv < 0 return false if @ver_proc.to_s.length > 20 return false if @ver_proc.to_s.length < 1 return false if @x_mun_env.to_s.length > 60 return false if @x_mun_env.to_s.length < 2 return false if @x_mun_ini.to_s.length > 60 return false if @x_mun_ini.to_s.length < 2 return false if @x_mun_fim.to_s.length > 60 return false if @x_mun_fim.to_s.length < 2 return false if !@x_det_retira.nil? && @x_det_retira.to_s.length > 160 return false if !@x_det_retira.nil? && @x_det_retira.to_s.length < 1 return false if !@x_just.nil? && @x_just.to_s.length > 256 return false if !@x_just.nil? && @x_just.to_s.length < 15 true end |