pier-sdk-ruby 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. data/README.md +141 -0
  2. data/docs/AuthToken.md +12 -0
  3. data/docs/BodyAccessToken.md +10 -0
  4. data/docs/CancelarCartaoResponse.md +11 -0
  5. data/docs/CartaoApi.md +252 -0
  6. data/docs/CartaoResponse.md +29 -0
  7. data/docs/ConsultarCartaoResponse.md +10 -0
  8. data/docs/ConsultarContaCartaoResponse.md +18 -0
  9. data/docs/ConsultarContaResponse.md +11 -0
  10. data/docs/ConsultarExtratoContaResponse.md +23 -0
  11. data/docs/ConsultarSaldoLimitesResponse.md +23 -0
  12. data/docs/ContaApi.md +238 -0
  13. data/docs/ContaCartaoResponse.md +21 -0
  14. data/docs/ContaResponse.md +41 -0
  15. data/docs/DesbloquearCartaoResponse.md +9 -0
  16. data/docs/ExtraInfo.md +8 -0
  17. data/docs/ExtratoResponse.md +35 -0
  18. data/docs/PessoaFisicaResponse.md +26 -0
  19. data/docs/SaldoLimiteResponse.md +39 -0
  20. data/docs/TokenApi.md +114 -0
  21. data/git_push.sh +52 -0
  22. data/lib/pier-sdk-ruby.rb +62 -0
  23. data/lib/pier-sdk-ruby/api/cartao_api.rb +355 -0
  24. data/lib/pier-sdk-ruby/api/conta_api.rb +324 -0
  25. data/lib/pier-sdk-ruby/api/token_api.rb +157 -0
  26. data/lib/pier-sdk-ruby/api_client.rb +368 -0
  27. data/lib/pier-sdk-ruby/api_error.rb +40 -0
  28. data/lib/pier-sdk-ruby/configuration.rb +177 -0
  29. data/lib/pier-sdk-ruby/models/auth_token.rb +325 -0
  30. data/lib/pier-sdk-ruby/models/body_access_token.rb +275 -0
  31. data/lib/pier-sdk-ruby/models/cancelar_cartao_response.rb +286 -0
  32. data/lib/pier-sdk-ruby/models/cartao_response.rb +736 -0
  33. data/lib/pier-sdk-ruby/models/consultar_cartao_response.rb +263 -0
  34. data/lib/pier-sdk-ruby/models/consultar_conta_cartao_response.rb +461 -0
  35. data/lib/pier-sdk-ruby/models/consultar_conta_response.rb +288 -0
  36. data/lib/pier-sdk-ruby/models/consultar_extrato_conta_response.rb +588 -0
  37. data/lib/pier-sdk-ruby/models/consultar_saldo_limites_response.rb +586 -0
  38. data/lib/pier-sdk-ruby/models/conta_cartao_response.rb +536 -0
  39. data/lib/pier-sdk-ruby/models/conta_response.rb +1036 -0
  40. data/lib/pier-sdk-ruby/models/desbloquear_cartao_response.rb +236 -0
  41. data/lib/pier-sdk-ruby/models/extra_info.rb +211 -0
  42. data/lib/pier-sdk-ruby/models/extrato_response.rb +886 -0
  43. data/lib/pier-sdk-ruby/models/pessoa_fisica_response.rb +661 -0
  44. data/lib/pier-sdk-ruby/models/saldo_limite_response.rb +986 -0
  45. data/lib/pier-sdk-ruby/version.rb +19 -0
  46. data/pier-sdk-ruby.gemspec +33 -0
  47. data/spec/api/cartao_api_spec.rb +110 -0
  48. data/spec/api/conta_api_spec.rb +107 -0
  49. data/spec/api/token_api_spec.rb +71 -0
  50. data/spec/models/auth_token_spec.rb +90 -0
  51. data/spec/models/body_access_token_spec.rb +70 -0
  52. data/spec/models/cancelar_cartao_response_spec.rb +80 -0
  53. data/spec/models/cartao_response_spec.rb +260 -0
  54. data/spec/models/consultar_cartao_response_spec.rb +70 -0
  55. data/spec/models/consultar_conta_cartao_response_spec.rb +150 -0
  56. data/spec/models/consultar_conta_response_spec.rb +80 -0
  57. data/spec/models/consultar_extrato_conta_response_spec.rb +200 -0
  58. data/spec/models/consultar_saldo_limites_response_spec.rb +200 -0
  59. data/spec/models/conta_cartao_response_spec.rb +180 -0
  60. data/spec/models/conta_response_spec.rb +380 -0
  61. data/spec/models/desbloquear_cartao_response_spec.rb +60 -0
  62. data/spec/models/extra_info_spec.rb +50 -0
  63. data/spec/models/extrato_response_spec.rb +320 -0
  64. data/spec/models/pessoa_fisica_response_spec.rb +230 -0
  65. data/spec/models/saldo_limite_response_spec.rb +360 -0
  66. metadata +310 -0
@@ -0,0 +1,1036 @@
1
+ =begin
2
+ CaaS - Conductor as a Service
3
+
4
+ Gest\u00C3\u00A3o de pagamento eletr\u00C3\u00B4nicos como servi\u00C3\u00A7o
5
+
6
+ OpenAPI spec version: 0.0.1
7
+ Contact: contato@conductor.com.br
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: Apache 2.0
11
+ http://www.apache.org/licenses/LICENSE-2.0.html
12
+
13
+ Terms of Service: http://dev.conductor.com.br/terms/
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module Pier
20
+ class ContaResponse
21
+ attr_accessor :bin
22
+
23
+ attr_accessor :cartao
24
+
25
+ attr_accessor :data_cadastramento
26
+
27
+ attr_accessor :data_ultimo_pagamento
28
+
29
+ attr_accessor :data_venc_cobranca
30
+
31
+ attr_accessor :dddcelular_sms
32
+
33
+ attr_accessor :descricao_status
34
+
35
+ attr_accessor :dias_em_atraso
36
+
37
+ attr_accessor :emissor
38
+
39
+ attr_accessor :flag_cancelamento
40
+
41
+ attr_accessor :forma_envio_fatura
42
+
43
+ attr_accessor :id_bandeira
44
+
45
+ attr_accessor :id_conta
46
+
47
+ attr_accessor :id_emissor
48
+
49
+ attr_accessor :id_endereco
50
+
51
+ attr_accessor :id_fantasia_basica
52
+
53
+ attr_accessor :id_origem_comercial
54
+
55
+ attr_accessor :id_produto
56
+
57
+ attr_accessor :id_proposta
58
+
59
+ attr_accessor :melhor_dia
60
+
61
+ attr_accessor :nome_credor
62
+
63
+ attr_accessor :nome_produto
64
+
65
+ attr_accessor :num_celular_sms
66
+
67
+ attr_accessor :pagamentos
68
+
69
+ attr_accessor :permite_refinanciamento
70
+
71
+ attr_accessor :pessoa_fisica
72
+
73
+ attr_accessor :quantidade_pagamentos
74
+
75
+ attr_accessor :saldo_limite
76
+
77
+ attr_accessor :status
78
+
79
+ attr_accessor :status_data
80
+
81
+ attr_accessor :taxa_refinanciamento
82
+
83
+ attr_accessor :vcto
84
+
85
+ attr_accessor :vencimento1
86
+
87
+ attr_accessor :vinculo_origem_usuario
88
+
89
+ # Attribute mapping from ruby-style variable name to JSON key.
90
+ def self.attribute_map
91
+ {
92
+
93
+ :'bin' => :'bin',
94
+
95
+ :'cartao' => :'cartao',
96
+
97
+ :'data_cadastramento' => :'dataCadastramento',
98
+
99
+ :'data_ultimo_pagamento' => :'dataUltimoPagamento',
100
+
101
+ :'data_venc_cobranca' => :'dataVencCobranca',
102
+
103
+ :'dddcelular_sms' => :'dddcelularSMS',
104
+
105
+ :'descricao_status' => :'descricaoStatus',
106
+
107
+ :'dias_em_atraso' => :'diasEmAtraso',
108
+
109
+ :'emissor' => :'emissor',
110
+
111
+ :'flag_cancelamento' => :'flagCancelamento',
112
+
113
+ :'forma_envio_fatura' => :'formaEnvioFatura',
114
+
115
+ :'id_bandeira' => :'idBandeira',
116
+
117
+ :'id_conta' => :'idConta',
118
+
119
+ :'id_emissor' => :'idEmissor',
120
+
121
+ :'id_endereco' => :'idEndereco',
122
+
123
+ :'id_fantasia_basica' => :'idFantasiaBasica',
124
+
125
+ :'id_origem_comercial' => :'idOrigemComercial',
126
+
127
+ :'id_produto' => :'idProduto',
128
+
129
+ :'id_proposta' => :'idProposta',
130
+
131
+ :'melhor_dia' => :'melhorDia',
132
+
133
+ :'nome_credor' => :'nomeCredor',
134
+
135
+ :'nome_produto' => :'nomeProduto',
136
+
137
+ :'num_celular_sms' => :'numCelularSMS',
138
+
139
+ :'pagamentos' => :'pagamentos',
140
+
141
+ :'permite_refinanciamento' => :'permiteRefinanciamento',
142
+
143
+ :'pessoa_fisica' => :'pessoaFisica',
144
+
145
+ :'quantidade_pagamentos' => :'quantidadePagamentos',
146
+
147
+ :'saldo_limite' => :'saldoLimite',
148
+
149
+ :'status' => :'status',
150
+
151
+ :'status_data' => :'statusData',
152
+
153
+ :'taxa_refinanciamento' => :'taxaRefinanciamento',
154
+
155
+ :'vcto' => :'vcto',
156
+
157
+ :'vencimento1' => :'vencimento1',
158
+
159
+ :'vinculo_origem_usuario' => :'vinculoOrigemUsuario'
160
+
161
+ }
162
+ end
163
+
164
+ # Attribute type mapping.
165
+ def self.swagger_types
166
+ {
167
+
168
+ :'bin' => :'Integer',
169
+
170
+ :'cartao' => :'ConsultarContaCartaoResponse',
171
+
172
+ :'data_cadastramento' => :'String',
173
+
174
+ :'data_ultimo_pagamento' => :'String',
175
+
176
+ :'data_venc_cobranca' => :'String',
177
+
178
+ :'dddcelular_sms' => :'String',
179
+
180
+ :'descricao_status' => :'String',
181
+
182
+ :'dias_em_atraso' => :'Integer',
183
+
184
+ :'emissor' => :'String',
185
+
186
+ :'flag_cancelamento' => :'BOOLEAN',
187
+
188
+ :'forma_envio_fatura' => :'String',
189
+
190
+ :'id_bandeira' => :'Integer',
191
+
192
+ :'id_conta' => :'Integer',
193
+
194
+ :'id_emissor' => :'Integer',
195
+
196
+ :'id_endereco' => :'Integer',
197
+
198
+ :'id_fantasia_basica' => :'Integer',
199
+
200
+ :'id_origem_comercial' => :'Integer',
201
+
202
+ :'id_produto' => :'Integer',
203
+
204
+ :'id_proposta' => :'Integer',
205
+
206
+ :'melhor_dia' => :'Integer',
207
+
208
+ :'nome_credor' => :'String',
209
+
210
+ :'nome_produto' => :'String',
211
+
212
+ :'num_celular_sms' => :'String',
213
+
214
+ :'pagamentos' => :'Float',
215
+
216
+ :'permite_refinanciamento' => :'BOOLEAN',
217
+
218
+ :'pessoa_fisica' => :'PessoaFisicaResponse',
219
+
220
+ :'quantidade_pagamentos' => :'Integer',
221
+
222
+ :'saldo_limite' => :'SaldoLimiteResponse',
223
+
224
+ :'status' => :'Integer',
225
+
226
+ :'status_data' => :'DateTime',
227
+
228
+ :'taxa_refinanciamento' => :'String',
229
+
230
+ :'vcto' => :'String',
231
+
232
+ :'vencimento1' => :'Integer',
233
+
234
+ :'vinculo_origem_usuario' => :'BOOLEAN'
235
+
236
+ }
237
+ end
238
+
239
+ # Initializes the object
240
+ # @param [Hash] attributes Model attributes in the form of hash
241
+ def initialize(attributes = {})
242
+ return unless attributes.is_a?(Hash)
243
+
244
+ # convert string to symbol for hash key
245
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
246
+
247
+
248
+ if attributes[:'bin']
249
+
250
+
251
+ self.bin = attributes[:'bin']
252
+
253
+
254
+ end
255
+
256
+
257
+ if attributes[:'cartao']
258
+
259
+
260
+ self.cartao = attributes[:'cartao']
261
+
262
+
263
+ end
264
+
265
+
266
+ if attributes[:'dataCadastramento']
267
+
268
+
269
+ self.data_cadastramento = attributes[:'dataCadastramento']
270
+
271
+
272
+ end
273
+
274
+
275
+ if attributes[:'dataUltimoPagamento']
276
+
277
+
278
+ self.data_ultimo_pagamento = attributes[:'dataUltimoPagamento']
279
+
280
+
281
+ end
282
+
283
+
284
+ if attributes[:'dataVencCobranca']
285
+
286
+
287
+ self.data_venc_cobranca = attributes[:'dataVencCobranca']
288
+
289
+
290
+ end
291
+
292
+
293
+ if attributes[:'dddcelularSMS']
294
+
295
+
296
+ self.dddcelular_sms = attributes[:'dddcelularSMS']
297
+
298
+
299
+ end
300
+
301
+
302
+ if attributes[:'descricaoStatus']
303
+
304
+
305
+ self.descricao_status = attributes[:'descricaoStatus']
306
+
307
+
308
+ end
309
+
310
+
311
+ if attributes[:'diasEmAtraso']
312
+
313
+
314
+ self.dias_em_atraso = attributes[:'diasEmAtraso']
315
+
316
+
317
+ end
318
+
319
+
320
+ if attributes[:'emissor']
321
+
322
+
323
+ self.emissor = attributes[:'emissor']
324
+
325
+
326
+ end
327
+
328
+
329
+ if attributes[:'flagCancelamento']
330
+
331
+
332
+ self.flag_cancelamento = attributes[:'flagCancelamento']
333
+
334
+
335
+ end
336
+
337
+
338
+ if attributes[:'formaEnvioFatura']
339
+
340
+
341
+ self.forma_envio_fatura = attributes[:'formaEnvioFatura']
342
+
343
+
344
+ end
345
+
346
+
347
+ if attributes[:'idBandeira']
348
+
349
+
350
+ self.id_bandeira = attributes[:'idBandeira']
351
+
352
+
353
+ end
354
+
355
+
356
+ if attributes[:'idConta']
357
+
358
+
359
+ self.id_conta = attributes[:'idConta']
360
+
361
+
362
+ end
363
+
364
+
365
+ if attributes[:'idEmissor']
366
+
367
+
368
+ self.id_emissor = attributes[:'idEmissor']
369
+
370
+
371
+ end
372
+
373
+
374
+ if attributes[:'idEndereco']
375
+
376
+
377
+ self.id_endereco = attributes[:'idEndereco']
378
+
379
+
380
+ end
381
+
382
+
383
+ if attributes[:'idFantasiaBasica']
384
+
385
+
386
+ self.id_fantasia_basica = attributes[:'idFantasiaBasica']
387
+
388
+
389
+ end
390
+
391
+
392
+ if attributes[:'idOrigemComercial']
393
+
394
+
395
+ self.id_origem_comercial = attributes[:'idOrigemComercial']
396
+
397
+
398
+ end
399
+
400
+
401
+ if attributes[:'idProduto']
402
+
403
+
404
+ self.id_produto = attributes[:'idProduto']
405
+
406
+
407
+ end
408
+
409
+
410
+ if attributes[:'idProposta']
411
+
412
+
413
+ self.id_proposta = attributes[:'idProposta']
414
+
415
+
416
+ end
417
+
418
+
419
+ if attributes[:'melhorDia']
420
+
421
+
422
+ self.melhor_dia = attributes[:'melhorDia']
423
+
424
+
425
+ end
426
+
427
+
428
+ if attributes[:'nomeCredor']
429
+
430
+
431
+ self.nome_credor = attributes[:'nomeCredor']
432
+
433
+
434
+ end
435
+
436
+
437
+ if attributes[:'nomeProduto']
438
+
439
+
440
+ self.nome_produto = attributes[:'nomeProduto']
441
+
442
+
443
+ end
444
+
445
+
446
+ if attributes[:'numCelularSMS']
447
+
448
+
449
+ self.num_celular_sms = attributes[:'numCelularSMS']
450
+
451
+
452
+ end
453
+
454
+
455
+ if attributes[:'pagamentos']
456
+
457
+
458
+ self.pagamentos = attributes[:'pagamentos']
459
+
460
+
461
+ end
462
+
463
+
464
+ if attributes[:'permiteRefinanciamento']
465
+
466
+
467
+ self.permite_refinanciamento = attributes[:'permiteRefinanciamento']
468
+
469
+
470
+ end
471
+
472
+
473
+ if attributes[:'pessoaFisica']
474
+
475
+
476
+ self.pessoa_fisica = attributes[:'pessoaFisica']
477
+
478
+
479
+ end
480
+
481
+
482
+ if attributes[:'quantidadePagamentos']
483
+
484
+
485
+ self.quantidade_pagamentos = attributes[:'quantidadePagamentos']
486
+
487
+
488
+ end
489
+
490
+
491
+ if attributes[:'saldoLimite']
492
+
493
+
494
+ self.saldo_limite = attributes[:'saldoLimite']
495
+
496
+
497
+ end
498
+
499
+
500
+ if attributes[:'status']
501
+
502
+
503
+ self.status = attributes[:'status']
504
+
505
+
506
+ end
507
+
508
+
509
+ if attributes[:'statusData']
510
+
511
+
512
+ self.status_data = attributes[:'statusData']
513
+
514
+
515
+ end
516
+
517
+
518
+ if attributes[:'taxaRefinanciamento']
519
+
520
+
521
+ self.taxa_refinanciamento = attributes[:'taxaRefinanciamento']
522
+
523
+
524
+ end
525
+
526
+
527
+ if attributes[:'vcto']
528
+
529
+
530
+ self.vcto = attributes[:'vcto']
531
+
532
+
533
+ end
534
+
535
+
536
+ if attributes[:'vencimento1']
537
+
538
+
539
+ self.vencimento1 = attributes[:'vencimento1']
540
+
541
+
542
+ end
543
+
544
+
545
+ if attributes[:'vinculoOrigemUsuario']
546
+
547
+
548
+ self.vinculo_origem_usuario = attributes[:'vinculoOrigemUsuario']
549
+
550
+
551
+ end
552
+
553
+
554
+ end
555
+
556
+ # Show invalid properties with the reasons. Usually used together with valid?
557
+ # @return Array for valid properies with the reasons
558
+ def list_invalid_properties
559
+ invalid_properties = Array.new
560
+
561
+
562
+ return invalid_properties
563
+ end
564
+
565
+ # Check to see if the all the properties in the model are valid
566
+ # @return true if the model is valid
567
+ def valid?
568
+
569
+
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+ end
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
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
771
+
772
+
773
+
774
+
775
+
776
+
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
+
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+
826
+
827
+
828
+
829
+
830
+
831
+
832
+
833
+
834
+
835
+
836
+
837
+
838
+
839
+
840
+
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+ # Checks equality by comparing each attribute.
879
+ # @param [Object] Object to be compared
880
+ def ==(o)
881
+ return true if self.equal?(o)
882
+ self.class == o.class &&
883
+ bin == o.bin &&
884
+ cartao == o.cartao &&
885
+ data_cadastramento == o.data_cadastramento &&
886
+ data_ultimo_pagamento == o.data_ultimo_pagamento &&
887
+ data_venc_cobranca == o.data_venc_cobranca &&
888
+ dddcelular_sms == o.dddcelular_sms &&
889
+ descricao_status == o.descricao_status &&
890
+ dias_em_atraso == o.dias_em_atraso &&
891
+ emissor == o.emissor &&
892
+ flag_cancelamento == o.flag_cancelamento &&
893
+ forma_envio_fatura == o.forma_envio_fatura &&
894
+ id_bandeira == o.id_bandeira &&
895
+ id_conta == o.id_conta &&
896
+ id_emissor == o.id_emissor &&
897
+ id_endereco == o.id_endereco &&
898
+ id_fantasia_basica == o.id_fantasia_basica &&
899
+ id_origem_comercial == o.id_origem_comercial &&
900
+ id_produto == o.id_produto &&
901
+ id_proposta == o.id_proposta &&
902
+ melhor_dia == o.melhor_dia &&
903
+ nome_credor == o.nome_credor &&
904
+ nome_produto == o.nome_produto &&
905
+ num_celular_sms == o.num_celular_sms &&
906
+ pagamentos == o.pagamentos &&
907
+ permite_refinanciamento == o.permite_refinanciamento &&
908
+ pessoa_fisica == o.pessoa_fisica &&
909
+ quantidade_pagamentos == o.quantidade_pagamentos &&
910
+ saldo_limite == o.saldo_limite &&
911
+ status == o.status &&
912
+ status_data == o.status_data &&
913
+ taxa_refinanciamento == o.taxa_refinanciamento &&
914
+ vcto == o.vcto &&
915
+ vencimento1 == o.vencimento1 &&
916
+ vinculo_origem_usuario == o.vinculo_origem_usuario
917
+ end
918
+
919
+ # @see the `==` method
920
+ # @param [Object] Object to be compared
921
+ def eql?(o)
922
+ self == o
923
+ end
924
+
925
+ # Calculates hash code according to all attributes.
926
+ # @return [Fixnum] Hash code
927
+ def hash
928
+ [bin, cartao, data_cadastramento, data_ultimo_pagamento, data_venc_cobranca, dddcelular_sms, descricao_status, dias_em_atraso, emissor, flag_cancelamento, forma_envio_fatura, id_bandeira, id_conta, id_emissor, id_endereco, id_fantasia_basica, id_origem_comercial, id_produto, id_proposta, melhor_dia, nome_credor, nome_produto, num_celular_sms, pagamentos, permite_refinanciamento, pessoa_fisica, quantidade_pagamentos, saldo_limite, status, status_data, taxa_refinanciamento, vcto, vencimento1, vinculo_origem_usuario].hash
929
+ end
930
+
931
+ # Builds the object from hash
932
+ # @param [Hash] attributes Model attributes in the form of hash
933
+ # @return [Object] Returns the model itself
934
+ def build_from_hash(attributes)
935
+ return nil unless attributes.is_a?(Hash)
936
+ self.class.swagger_types.each_pair do |key, type|
937
+ if type =~ /^Array<(.*)>/i
938
+ # check to ensure the input is an array given that the the attribute
939
+ # is documented as an array but the input is not
940
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
941
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
942
+ end
943
+ elsif !attributes[self.class.attribute_map[key]].nil?
944
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
945
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
946
+ end
947
+
948
+ self
949
+ end
950
+
951
+ # Deserializes the data based on type
952
+ # @param string type Data type
953
+ # @param string value Value to be deserialized
954
+ # @return [Object] Deserialized data
955
+ def _deserialize(type, value)
956
+ case type.to_sym
957
+ when :DateTime
958
+ DateTime.parse(value)
959
+ when :Date
960
+ Date.parse(value)
961
+ when :String
962
+ value.to_s
963
+ when :Integer
964
+ value.to_i
965
+ when :Float
966
+ value.to_f
967
+ when :BOOLEAN
968
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
969
+ true
970
+ else
971
+ false
972
+ end
973
+ when :Object
974
+ # generic object (usually a Hash), return directly
975
+ value
976
+ when /\AArray<(?<inner_type>.+)>\z/
977
+ inner_type = Regexp.last_match[:inner_type]
978
+ value.map { |v| _deserialize(inner_type, v) }
979
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
980
+ k_type = Regexp.last_match[:k_type]
981
+ v_type = Regexp.last_match[:v_type]
982
+ {}.tap do |hash|
983
+ value.each do |k, v|
984
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
985
+ end
986
+ end
987
+ else # model
988
+ temp_model = Pier.const_get(type).new
989
+ temp_model.build_from_hash(value)
990
+ end
991
+ end
992
+
993
+ # Returns the string representation of the object
994
+ # @return [String] String presentation of the object
995
+ def to_s
996
+ to_hash.to_s
997
+ end
998
+
999
+ # to_body is an alias to to_hash (backward compatibility)
1000
+ # @return [Hash] Returns the object in the form of hash
1001
+ def to_body
1002
+ to_hash
1003
+ end
1004
+
1005
+ # Returns the object in the form of hash
1006
+ # @return [Hash] Returns the object in the form of hash
1007
+ def to_hash
1008
+ hash = {}
1009
+ self.class.attribute_map.each_pair do |attr, param|
1010
+ value = self.send(attr)
1011
+ next if value.nil?
1012
+ hash[param] = _to_hash(value)
1013
+ end
1014
+ hash
1015
+ end
1016
+
1017
+ # Outputs non-array value in the form of hash
1018
+ # For object, use to_hash. Otherwise, just return the value
1019
+ # @param [Object] value Any valid value
1020
+ # @return [Hash] Returns the value in the form of hash
1021
+ def _to_hash(value)
1022
+ if value.is_a?(Array)
1023
+ value.compact.map{ |v| _to_hash(v) }
1024
+ elsif value.is_a?(Hash)
1025
+ {}.tap do |hash|
1026
+ value.each { |k, v| hash[k] = _to_hash(v) }
1027
+ end
1028
+ elsif value.respond_to? :to_hash
1029
+ value.to_hash
1030
+ else
1031
+ value
1032
+ end
1033
+ end
1034
+
1035
+ end
1036
+ end