wire4_client 1.1.2 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +27 -0
  4. data/docs/AccountReassigned.md +1 -1
  5. data/docs/AccountResponse.md +1 -0
  6. data/docs/BeneficiaryDTO.md +10 -0
  7. data/docs/CargosRecurrentesApi.md +110 -0
  8. data/docs/CepResponse.md +1 -0
  9. data/docs/CepSearchBanxico.md +1 -0
  10. data/docs/CertificateRequest.md +1 -1
  11. data/docs/CodiCodeQrResponseDTO.md +1 -0
  12. data/docs/CodiCodeRequestDTO.md +6 -3
  13. data/docs/ConfirmRecurringCharge.md +9 -0
  14. data/docs/CuentasDeBeneficiariosSPEIApi.md +4 -0
  15. data/docs/CuentasDeBeneficiariosSPIDApi.md +4 -0
  16. data/docs/Customer.md +9 -0
  17. data/docs/Deposit.md +1 -0
  18. data/docs/Depositant.md +1 -0
  19. data/docs/DepositantCountResponse.md +8 -0
  20. data/docs/DepositantesApi.md +164 -1
  21. data/docs/FailedChargesDataDTO.md +13 -0
  22. data/docs/MessageDepositReceived.md +3 -0
  23. data/docs/PaymentRequestReportDTO.md +17 -0
  24. data/docs/PaymentRequestReq.md +18 -0
  25. data/docs/PaymentRequestResponse.md +10 -0
  26. data/docs/PaymentsSpeiAndSpidOrderId.md +9 -0
  27. data/docs/PaymentsSpeiAndSpidRequestId.md +12 -0
  28. data/docs/Person.md +1 -1
  29. data/docs/Product.md +11 -0
  30. data/docs/RecurringChargeRequest.md +14 -0
  31. data/docs/ReporteDeSolicitudesDePagosApi.md +107 -0
  32. data/docs/SolicitudDePagosApi.md +59 -0
  33. data/docs/SpidBeneficiaryResponse.md +1 -0
  34. data/docs/SuccessChargesDataDTO.md +12 -0
  35. data/docs/SuccessDataDTO.md +9 -0
  36. data/docs/TransactionSpeiSpid.md +15 -0
  37. data/docs/TransactionsRegister.md +11 -0
  38. data/docs/TransferenciasSPEIApi.md +163 -0
  39. data/lib/wire4_client/api/cargos_recurrentes_api.rb +143 -0
  40. data/lib/wire4_client/api/cuentas_de_beneficiarios_spei_api.rb +6 -0
  41. data/lib/wire4_client/api/cuentas_de_beneficiarios_spid_api.rb +6 -0
  42. data/lib/wire4_client/api/depositantes_api.rb +207 -2
  43. data/lib/wire4_client/api/reporte_de_solicitudes_de_pagos_api.rb +134 -0
  44. data/lib/wire4_client/api/solicitud_de_pagos_api.rb +84 -0
  45. data/lib/wire4_client/api/transferencias_spei_api.rb +234 -4
  46. data/lib/wire4_client/models/account_reassigned.rb +11 -11
  47. data/lib/wire4_client/models/account_response.rb +11 -1
  48. data/lib/wire4_client/models/amount_request.rb +10 -10
  49. data/lib/wire4_client/models/beneficiary_dto.rb +201 -0
  50. data/lib/wire4_client/models/cep_response.rb +45 -1
  51. data/lib/wire4_client/models/cep_search_banxico.rb +48 -4
  52. data/lib/wire4_client/models/certificate_request.rb +6 -15
  53. data/lib/wire4_client/models/codi_code_qr_response_dto.rb +15 -5
  54. data/lib/wire4_client/models/codi_code_request_dto.rb +94 -20
  55. data/lib/wire4_client/models/codi_operations_filters_request_dto.rb +2 -2
  56. data/lib/wire4_client/models/confirm_recurring_charge.rb +194 -0
  57. data/lib/wire4_client/models/customer.rb +205 -0
  58. data/lib/wire4_client/models/deposit.rb +48 -4
  59. data/lib/wire4_client/models/depositant.rb +14 -4
  60. data/lib/wire4_client/models/depositant_count_response.rb +185 -0
  61. data/lib/wire4_client/models/failed_charges_data_dto.rb +228 -0
  62. data/lib/wire4_client/models/message_deposit_received.rb +31 -1
  63. data/lib/wire4_client/models/operations.rb +4 -4
  64. data/lib/wire4_client/models/payment_codi.rb +2 -2
  65. data/lib/wire4_client/models/payment_request_report_dto.rb +300 -0
  66. data/lib/wire4_client/models/payment_request_req.rb +401 -0
  67. data/lib/wire4_client/models/payment_request_response.rb +204 -0
  68. data/lib/wire4_client/models/payments_spei_and_spid_order_id.rb +199 -0
  69. data/lib/wire4_client/models/payments_spei_and_spid_request_id.rb +229 -0
  70. data/lib/wire4_client/models/person.rb +0 -5
  71. data/lib/wire4_client/models/product.rb +288 -0
  72. data/lib/wire4_client/models/recurring_charge_request.rb +278 -0
  73. data/lib/wire4_client/models/sales_point_request.rb +5 -5
  74. data/lib/wire4_client/models/spid_beneficiary_response.rb +11 -1
  75. data/lib/wire4_client/models/success_charges_data_dto.rb +219 -0
  76. data/lib/wire4_client/models/success_data_dto.rb +226 -0
  77. data/lib/wire4_client/models/transaction_outgoing.rb +5 -5
  78. data/lib/wire4_client/models/transaction_spei_spid.rb +390 -0
  79. data/lib/wire4_client/models/transactions_register.rb +229 -0
  80. data/lib/wire4_client/version.rb +1 -1
  81. data/lib/wire4_client.rb +19 -0
  82. data/spec/api/cargos_recurrentes_api_spec.rb +61 -0
  83. data/spec/api/cuentas_de_beneficiarios_spei_api_spec.rb +2 -0
  84. data/spec/api/cuentas_de_beneficiarios_spid_api_spec.rb +2 -0
  85. data/spec/api/depositantes_api_spec.rb +42 -1
  86. data/spec/api/reporte_de_solicitudes_de_pagos_api_spec.rb +59 -0
  87. data/spec/api/solicitud_de_pagos_api_spec.rb +48 -0
  88. data/spec/api/transferencias_spei_api_spec.rb +42 -0
  89. data/spec/models/account_reassigned_spec.rb +3 -3
  90. data/spec/models/account_response_spec.rb +6 -0
  91. data/spec/models/beneficiary_dto_spec.rb +53 -0
  92. data/spec/models/cep_response_spec.rb +10 -0
  93. data/spec/models/cep_search_banxico_spec.rb +10 -0
  94. data/spec/models/codi_code_qr_response_dto_spec.rb +8 -2
  95. data/spec/models/codi_code_request_dto_spec.rb +23 -1
  96. data/spec/models/codi_operations_filters_request_dto_spec.rb +1 -1
  97. data/spec/models/confirm_recurring_charge_spec.rb +47 -0
  98. data/spec/models/customer_spec.rb +47 -0
  99. data/spec/models/deposit_spec.rb +10 -0
  100. data/spec/models/depositant_count_response_spec.rb +41 -0
  101. data/spec/models/depositant_spec.rb +6 -0
  102. data/spec/models/failed_charges_data_dto_spec.rb +71 -0
  103. data/spec/models/message_deposit_received_spec.rb +18 -0
  104. data/spec/models/operations_spec.rb +2 -2
  105. data/spec/models/payment_codi_spec.rb +1 -1
  106. data/spec/models/payment_request_report_dto_spec.rb +99 -0
  107. data/spec/models/payment_request_req_spec.rb +109 -0
  108. data/spec/models/payment_request_response_spec.rb +53 -0
  109. data/spec/models/payments_spei_and_spid_order_id_spec.rb +47 -0
  110. data/spec/models/payments_spei_and_spid_request_id_spec.rb +65 -0
  111. data/spec/models/product_spec.rb +63 -0
  112. data/spec/models/recurring_charge_request_spec.rb +77 -0
  113. data/spec/models/spid_beneficiary_response_spec.rb +6 -0
  114. data/spec/models/success_charges_data_dto_spec.rb +65 -0
  115. data/spec/models/success_data_dto_spec.rb +51 -0
  116. data/spec/models/transaction_spei_spid_spec.rb +83 -0
  117. data/spec/models/transactions_register_spec.rb +59 -0
  118. data/wire4_client-1.1.3.gem +0 -0
  119. data/wire4_client.gemspec +7 -7
  120. metadata +108 -55
@@ -242,8 +242,8 @@ module Wire4Client
242
242
  fail ArgumentError, 'invalid value for "opts[:"begin_date"]" when calling TransferenciasSPEIApi.incoming_spei_transactions_report_using_get, the character length must be great than or equal to 10.'
243
243
  end
244
244
 
245
- if @api_client.config.client_side_validation && !opts[:'begin_date'].nil? && opts[:'begin_date'] !~ Regexp.new(/([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/)
246
- fail ArgumentError, "invalid value for 'opts[:\"begin_date\"]' when calling TransferenciasSPEIApi.incoming_spei_transactions_report_using_get, must conform to the pattern /([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/."
245
+ if @api_client.config.client_side_validation && !opts[:'begin_date'].nil? && opts[:'begin_date'] !~ Regexp.new(/([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))/)
246
+ fail ArgumentError, "invalid value for 'opts[:\"begin_date\"]' when calling TransferenciasSPEIApi.incoming_spei_transactions_report_using_get, must conform to the pattern /([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))/."
247
247
  end
248
248
 
249
249
  if @api_client.config.client_side_validation && !opts[:'end_date'].nil? && opts[:'end_date'].to_s.length > 10
@@ -254,8 +254,8 @@ module Wire4Client
254
254
  fail ArgumentError, 'invalid value for "opts[:"end_date"]" when calling TransferenciasSPEIApi.incoming_spei_transactions_report_using_get, the character length must be great than or equal to 10.'
255
255
  end
256
256
 
257
- if @api_client.config.client_side_validation && !opts[:'end_date'].nil? && opts[:'end_date'] !~ Regexp.new(/([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/)
258
- fail ArgumentError, "invalid value for 'opts[:\"end_date\"]' when calling TransferenciasSPEIApi.incoming_spei_transactions_report_using_get, must conform to the pattern /([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))/."
257
+ if @api_client.config.client_side_validation && !opts[:'end_date'].nil? && opts[:'end_date'] !~ Regexp.new(/([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))/)
258
+ fail ArgumentError, "invalid value for 'opts[:\"end_date\"]' when calling TransferenciasSPEIApi.incoming_spei_transactions_report_using_get, must conform to the pattern /([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))/."
259
259
  end
260
260
 
261
261
  # resource path
@@ -367,6 +367,157 @@ module Wire4Client
367
367
  end
368
368
  return data, status_code, headers
369
369
  end
370
+ # Consulta de transferencias realizadas por order_id
371
+ # Consulta las transferencias que regresa este recuso son únicamente las transferencias recibidas en el día en el que se realiza la consulta o las transferencias identificadas con el <strong>order_id</strong> proporcionado, para este tipo de consultas no importa el día en el que se realizó la transferencia. <br> Es importante que conozca que la respuesta puede dar como resultado un objeto con una lista spei o una lista spid con el/los elementos ya que un identificador order_id solo puede pertenecer a una transacción sea spei o spid.
372
+ # @param authorization Header para token
373
+ # @param subscription Es el identificador de la suscripción a esta API.
374
+ # @param [Hash] opts the optional parameters
375
+ # @option opts [String] :order_id Es el identificador de la orden a buscar.
376
+ # @return [PaymentsSpeiAndSpidOrderId]
377
+ def out_comming_spei_spid_order_id_transaction_report_using_get(authorization, subscription, opts = {})
378
+ data, _status_code, _headers = out_comming_spei_spid_order_id_transaction_report_using_get_with_http_info(authorization, subscription, opts)
379
+ data
380
+ end
381
+
382
+ # Consulta de transferencias realizadas por order_id
383
+ # Consulta las transferencias que regresa este recuso son únicamente las transferencias recibidas en el día en el que se realiza la consulta o las transferencias identificadas con el &lt;strong&gt;order_id&lt;/strong&gt; proporcionado, para este tipo de consultas no importa el día en el que se realizó la transferencia. &lt;br&gt; Es importante que conozca que la respuesta puede dar como resultado un objeto con una lista spei o una lista spid con el/los elementos ya que un identificador order_id solo puede pertenecer a una transacción sea spei o spid.
384
+ # @param authorization Header para token
385
+ # @param subscription Es el identificador de la suscripción a esta API.
386
+ # @param [Hash] opts the optional parameters
387
+ # @option opts [String] :order_id Es el identificador de la orden a buscar.
388
+ # @return [Array<(PaymentsSpeiAndSpidOrderId, Fixnum, Hash)>] PaymentsSpeiAndSpidOrderId data, response status code and response headers
389
+ def out_comming_spei_spid_order_id_transaction_report_using_get_with_http_info(authorization, subscription, opts = {})
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: TransferenciasSPEIApi.out_comming_spei_spid_order_id_transaction_report_using_get ...'
392
+ end
393
+ # verify the required parameter 'authorization' is set
394
+ if @api_client.config.client_side_validation && authorization.nil?
395
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TransferenciasSPEIApi.out_comming_spei_spid_order_id_transaction_report_using_get"
396
+ end
397
+ # verify the required parameter 'subscription' is set
398
+ if @api_client.config.client_side_validation && subscription.nil?
399
+ fail ArgumentError, "Missing the required parameter 'subscription' when calling TransferenciasSPEIApi.out_comming_spei_spid_order_id_transaction_report_using_get"
400
+ end
401
+ if @api_client.config.client_side_validation && subscription.to_s.length > 36
402
+ fail ArgumentError, 'invalid value for "subscription" when calling TransferenciasSPEIApi.out_comming_spei_spid_order_id_transaction_report_using_get, the character length must be smaller than or equal to 36.'
403
+ end
404
+
405
+ if @api_client.config.client_side_validation && subscription.to_s.length < 36
406
+ fail ArgumentError, 'invalid value for "subscription" when calling TransferenciasSPEIApi.out_comming_spei_spid_order_id_transaction_report_using_get, the character length must be great than or equal to 36.'
407
+ end
408
+
409
+ if @api_client.config.client_side_validation && subscription !~ Regexp.new(/[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/)
410
+ fail ArgumentError, "invalid value for 'subscription' when calling TransferenciasSPEIApi.out_comming_spei_spid_order_id_transaction_report_using_get, must conform to the pattern /[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/."
411
+ end
412
+
413
+ # resource path
414
+ local_var_path = '/subscriptions/{subscription}/transactions/outcoming'.sub('{' + 'subscription' + '}', subscription.to_s)
415
+
416
+ # query parameters
417
+ query_params = {}
418
+ query_params[:'order_id'] = opts[:'order_id'] if !opts[:'order_id'].nil?
419
+
420
+ # header parameters
421
+ header_params = {}
422
+ # HTTP header 'Accept' (if needed)
423
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
424
+ header_params[:'Authorization'] = authorization
425
+
426
+ # form parameters
427
+ form_params = {}
428
+
429
+ # http body (model)
430
+ post_body = nil
431
+ auth_names = []
432
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
433
+ :header_params => header_params,
434
+ :query_params => query_params,
435
+ :form_params => form_params,
436
+ :body => post_body,
437
+ :auth_names => auth_names,
438
+ :return_type => 'PaymentsSpeiAndSpidOrderId')
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug "API called: TransferenciasSPEIApi#out_comming_spei_spid_order_id_transaction_report_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
441
+ end
442
+ return data, status_code, headers
443
+ end
444
+ # Consulta de transferencias de salida por identificador de petición
445
+ # Consulta las transferencias de salida registradas en una petición, las transferencias que regresa este recuso son únicamente las transferencias de salida agrupadas al identificador de la petición que se generó al hacer el registro de las transacciones el cuál se debe especificar como parte del path de este endpoint.
446
+ # @param authorization Header para token
447
+ # @param request_id Identificador de la petición a buscar.
448
+ # @param subscription Es el identificador de la suscripción a esta API.
449
+ # @param [Hash] opts the optional parameters
450
+ # @return [PaymentsSpeiAndSpidRequestId]
451
+ def out_comming_spei_spid_request_id_transactions_report_using_get(authorization, request_id, subscription, opts = {})
452
+ data, _status_code, _headers = out_comming_spei_spid_request_id_transactions_report_using_get_with_http_info(authorization, request_id, subscription, opts)
453
+ data
454
+ end
455
+
456
+ # Consulta de transferencias de salida por identificador de petición
457
+ # Consulta las transferencias de salida registradas en una petición, las transferencias que regresa este recuso son únicamente las transferencias de salida agrupadas al identificador de la petición que se generó al hacer el registro de las transacciones el cuál se debe especificar como parte del path de este endpoint.
458
+ # @param authorization Header para token
459
+ # @param request_id Identificador de la petición a buscar.
460
+ # @param subscription Es el identificador de la suscripción a esta API.
461
+ # @param [Hash] opts the optional parameters
462
+ # @return [Array<(PaymentsSpeiAndSpidRequestId, Fixnum, Hash)>] PaymentsSpeiAndSpidRequestId data, response status code and response headers
463
+ def out_comming_spei_spid_request_id_transactions_report_using_get_with_http_info(authorization, request_id, subscription, opts = {})
464
+ if @api_client.config.debugging
465
+ @api_client.config.logger.debug 'Calling API: TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get ...'
466
+ end
467
+ # verify the required parameter 'authorization' is set
468
+ if @api_client.config.client_side_validation && authorization.nil?
469
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get"
470
+ end
471
+ # verify the required parameter 'request_id' is set
472
+ if @api_client.config.client_side_validation && request_id.nil?
473
+ fail ArgumentError, "Missing the required parameter 'request_id' when calling TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get"
474
+ end
475
+ # verify the required parameter 'subscription' is set
476
+ if @api_client.config.client_side_validation && subscription.nil?
477
+ fail ArgumentError, "Missing the required parameter 'subscription' when calling TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get"
478
+ end
479
+ if @api_client.config.client_side_validation && subscription.to_s.length > 36
480
+ fail ArgumentError, 'invalid value for "subscription" when calling TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get, the character length must be smaller than or equal to 36.'
481
+ end
482
+
483
+ if @api_client.config.client_side_validation && subscription.to_s.length < 36
484
+ fail ArgumentError, 'invalid value for "subscription" when calling TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get, the character length must be great than or equal to 36.'
485
+ end
486
+
487
+ if @api_client.config.client_side_validation && subscription !~ Regexp.new(/[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/)
488
+ fail ArgumentError, "invalid value for 'subscription' when calling TransferenciasSPEIApi.out_comming_spei_spid_request_id_transactions_report_using_get, must conform to the pattern /[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/."
489
+ end
490
+
491
+ # resource path
492
+ local_var_path = '/subscriptions/{subscription}/transactions/outcoming/{requestId}'.sub('{' + 'requestId' + '}', request_id.to_s).sub('{' + 'subscription' + '}', subscription.to_s)
493
+
494
+ # query parameters
495
+ query_params = {}
496
+
497
+ # header parameters
498
+ header_params = {}
499
+ # HTTP header 'Accept' (if needed)
500
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
501
+ header_params[:'Authorization'] = authorization
502
+
503
+ # form parameters
504
+ form_params = {}
505
+
506
+ # http body (model)
507
+ post_body = nil
508
+ auth_names = []
509
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
510
+ :header_params => header_params,
511
+ :query_params => query_params,
512
+ :form_params => form_params,
513
+ :body => post_body,
514
+ :auth_names => auth_names,
515
+ :return_type => 'PaymentsSpeiAndSpidRequestId')
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug "API called: TransferenciasSPEIApi#out_comming_spei_spid_request_id_transactions_report_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
518
+ end
519
+ return data, status_code, headers
520
+ end
370
521
  # Consulta de transferencias realizadas
371
522
  # Consulta las transferencias realizadas en la cuenta del cliente Monex relacionada a la suscripción, las transferencias que regresa este recuso son únicamente las transferencias recibidas en el día en el que se realiza la consulta.<br>Se pueden realizar consultas por <strong>order_id</strong> al realizar este tipo de consultas no importa el día en el que se realizó la transferencia
372
523
  # @param authorization Header para token
@@ -520,5 +671,84 @@ module Wire4Client
520
671
  end
521
672
  return data, status_code, headers
522
673
  end
674
+ # Registro de transferencias SPEI y SPID
675
+ # Se registra un conjunto de transferencias (una o más) tanto SPEI como SPID en una sola petición en la cuenta del cliente Monex relacionada a la suscripción. En la respuesta se proporcionará una dirección URL que lo llevará al centro de autorización para que las transferencias sean confirmadas (autorizadas) por el cliente para que se efectúen, para ello debe ingresar la llave electrónica (Token).<br> Nota: Debe considerar que el concepto de cada una de las transacciones solo debe contener caracteres alfanuméricos por lo que en caso de que se reciban caracteres como ñ o acentos serán sustituidos por n o en su caso por la letra sin acento. Los caracteres no alfanuméricos como pueden ser caracteres especiales serán eliminados.
676
+ # @param authorization Header para token
677
+ # @param subscription Es el identificador de la suscripción a esta API.
678
+ # @param transactions Información de las transferencias SPEI y SPID de salida
679
+ # @param [Hash] opts the optional parameters
680
+ # @return [TokenRequiredResponse]
681
+ def register_spei_spid_outgoing_transactions_using_post(authorization, subscription, transactions, opts = {})
682
+ data, _status_code, _headers = register_spei_spid_outgoing_transactions_using_post_with_http_info(authorization, subscription, transactions, opts)
683
+ data
684
+ end
685
+
686
+ # Registro de transferencias SPEI y SPID
687
+ # Se registra un conjunto de transferencias (una o más) tanto SPEI como SPID en una sola petición en la cuenta del cliente Monex relacionada a la suscripción. En la respuesta se proporcionará una dirección URL que lo llevará al centro de autorización para que las transferencias sean confirmadas (autorizadas) por el cliente para que se efectúen, para ello debe ingresar la llave electrónica (Token).&lt;br&gt; Nota: Debe considerar que el concepto de cada una de las transacciones solo debe contener caracteres alfanuméricos por lo que en caso de que se reciban caracteres como ñ o acentos serán sustituidos por n o en su caso por la letra sin acento. Los caracteres no alfanuméricos como pueden ser caracteres especiales serán eliminados.
688
+ # @param authorization Header para token
689
+ # @param subscription Es el identificador de la suscripción a esta API.
690
+ # @param transactions Información de las transferencias SPEI y SPID de salida
691
+ # @param [Hash] opts the optional parameters
692
+ # @return [Array<(TokenRequiredResponse, Fixnum, Hash)>] TokenRequiredResponse data, response status code and response headers
693
+ def register_spei_spid_outgoing_transactions_using_post_with_http_info(authorization, subscription, transactions, opts = {})
694
+ if @api_client.config.debugging
695
+ @api_client.config.logger.debug 'Calling API: TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post ...'
696
+ end
697
+ # verify the required parameter 'authorization' is set
698
+ if @api_client.config.client_side_validation && authorization.nil?
699
+ fail ArgumentError, "Missing the required parameter 'authorization' when calling TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post"
700
+ end
701
+ # verify the required parameter 'subscription' is set
702
+ if @api_client.config.client_side_validation && subscription.nil?
703
+ fail ArgumentError, "Missing the required parameter 'subscription' when calling TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post"
704
+ end
705
+ if @api_client.config.client_side_validation && subscription.to_s.length > 36
706
+ fail ArgumentError, 'invalid value for "subscription" when calling TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post, the character length must be smaller than or equal to 36.'
707
+ end
708
+
709
+ if @api_client.config.client_side_validation && subscription.to_s.length < 36
710
+ fail ArgumentError, 'invalid value for "subscription" when calling TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post, the character length must be great than or equal to 36.'
711
+ end
712
+
713
+ if @api_client.config.client_side_validation && subscription !~ Regexp.new(/[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/)
714
+ fail ArgumentError, "invalid value for 'subscription' when calling TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post, must conform to the pattern /[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/."
715
+ end
716
+
717
+ # verify the required parameter 'transactions' is set
718
+ if @api_client.config.client_side_validation && transactions.nil?
719
+ fail ArgumentError, "Missing the required parameter 'transactions' when calling TransferenciasSPEIApi.register_spei_spid_outgoing_transactions_using_post"
720
+ end
721
+ # resource path
722
+ local_var_path = '/subscriptions/{subscription}/transactions/outcoming'.sub('{' + 'subscription' + '}', subscription.to_s)
723
+
724
+ # query parameters
725
+ query_params = {}
726
+
727
+ # header parameters
728
+ header_params = {}
729
+ # HTTP header 'Accept' (if needed)
730
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
731
+ # HTTP header 'Content-Type'
732
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
733
+ header_params[:'Authorization'] = authorization
734
+
735
+ # form parameters
736
+ form_params = {}
737
+
738
+ # http body (model)
739
+ post_body = @api_client.object_to_http_body(transactions)
740
+ auth_names = []
741
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
742
+ :header_params => header_params,
743
+ :query_params => query_params,
744
+ :form_params => form_params,
745
+ :body => post_body,
746
+ :auth_names => auth_names,
747
+ :return_type => 'TokenRequiredResponse')
748
+ if @api_client.config.debugging
749
+ @api_client.config.logger.debug "API called: TransferenciasSPEIApi#register_spei_spid_outgoing_transactions_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
750
+ end
751
+ return data, status_code, headers
752
+ end
523
753
  end
524
754
  end
@@ -18,15 +18,15 @@ module Wire4Client
18
18
  # Es el monto límite permitido que se registra para la cuenta. Por ejemplo 1000.00.
19
19
  attr_accessor :amount_limit
20
20
 
21
+ # Es la fecha en la que se autorizó el registro del beneficiario. Ésta fecha viene en formato ISO 8601 con zona horaria, ejemplo: <strong>2020-10-27T11:03:15.000-06:00</strong>.
22
+ attr_accessor :authorization_date
23
+
21
24
  # Es el banco al cuál pertenece la cuenta.
22
25
  attr_accessor :bank
23
26
 
24
27
  # Es la cuenta del beneficiario, podría ser teléfono celular (se valida que sea de 10 dígitos), Tarjeta de débito (TDD, se valida que sea de 16 dígitos) o cuenta CLABE (se valida que sea de 18 dígitos). <br/><br/>Por ejemplo Teléfono celular: 5525072600, TDD: 4323 1234 5678 9123, CLABE: 032180000118359719.
25
28
  attr_accessor :beneficiary_account
26
29
 
27
- # Es el código de divisa. Es en el formato estándar de 3 dígitos, por ejemplo para el peso mexicano: <b>MXP</b>, para el dólar estadounidense: <b>USD</b>.<br/><br/>Este dato es opcional, al registrar una cuenta si no se cuenta con este valor se asignará <b>MXP</b>
28
- attr_accessor :currency_code
29
-
30
30
  # Es una lista de correos electrónicos (emails). Se valida el formato de email. Este campo es opcional.
31
31
  attr_accessor :email
32
32
 
@@ -61,9 +61,9 @@ module Wire4Client
61
61
  def self.attribute_map
62
62
  {
63
63
  :'amount_limit' => :'amount_limit',
64
+ :'authorization_date' => :'authorization_date',
64
65
  :'bank' => :'bank',
65
66
  :'beneficiary_account' => :'beneficiary_account',
66
- :'currency_code' => :'currency_code',
67
67
  :'email' => :'email',
68
68
  :'institution' => :'institution',
69
69
  :'kind_of_relationship' => :'kind_of_relationship',
@@ -81,9 +81,9 @@ module Wire4Client
81
81
  def self.swagger_types
82
82
  {
83
83
  :'amount_limit' => :'Float',
84
+ :'authorization_date' => :'DateTime',
84
85
  :'bank' => :'Institution',
85
86
  :'beneficiary_account' => :'String',
86
- :'currency_code' => :'String',
87
87
  :'email' => :'Array<String>',
88
88
  :'institution' => :'BeneficiaryInstitution',
89
89
  :'kind_of_relationship' => :'String',
@@ -109,6 +109,10 @@ module Wire4Client
109
109
  self.amount_limit = attributes[:'amount_limit']
110
110
  end
111
111
 
112
+ if attributes.has_key?(:'authorization_date')
113
+ self.authorization_date = attributes[:'authorization_date']
114
+ end
115
+
112
116
  if attributes.has_key?(:'bank')
113
117
  self.bank = attributes[:'bank']
114
118
  end
@@ -117,10 +121,6 @@ module Wire4Client
117
121
  self.beneficiary_account = attributes[:'beneficiary_account']
118
122
  end
119
123
 
120
- if attributes.has_key?(:'currency_code')
121
- self.currency_code = attributes[:'currency_code']
122
- end
123
-
124
124
  if attributes.has_key?(:'email')
125
125
  if (value = attributes[:'email']).is_a?(Array)
126
126
  self.email = value
@@ -241,9 +241,9 @@ module Wire4Client
241
241
  return true if self.equal?(o)
242
242
  self.class == o.class &&
243
243
  amount_limit == o.amount_limit &&
244
+ authorization_date == o.authorization_date &&
244
245
  bank == o.bank &&
245
246
  beneficiary_account == o.beneficiary_account &&
246
- currency_code == o.currency_code &&
247
247
  email == o.email &&
248
248
  institution == o.institution &&
249
249
  kind_of_relationship == o.kind_of_relationship &&
@@ -265,7 +265,7 @@ module Wire4Client
265
265
  # Calculates hash code according to all attributes.
266
266
  # @return [Fixnum] Hash code
267
267
  def hash
268
- [amount_limit, bank, beneficiary_account, currency_code, email, institution, kind_of_relationship, numeric_reference_spei, payment_concept_spei, person, register_date, relationship, rfc, status].hash
268
+ [amount_limit, authorization_date, bank, beneficiary_account, email, institution, kind_of_relationship, numeric_reference_spei, payment_concept_spei, person, register_date, relationship, rfc, status].hash
269
269
  end
270
270
 
271
271
  # Builds the object from hash
@@ -18,6 +18,9 @@ module Wire4Client
18
18
  # Es el monto límite permitido que se registra para la cuenta. Por ejemplo 1000.00.
19
19
  attr_accessor :amount_limit
20
20
 
21
+ # Es la fecha en la que se autorizó el registro del beneficiario. Ésta fecha viene en formato ISO 8601 con zona horaria, ejemplo: <strong>2020-10-27T11:03:15.000-06:00</strong>.
22
+ attr_accessor :authorization_date
23
+
21
24
  # Es el banco al cuál pertenece la cuenta.
22
25
  attr_accessor :bank
23
26
 
@@ -58,6 +61,7 @@ module Wire4Client
58
61
  def self.attribute_map
59
62
  {
60
63
  :'amount_limit' => :'amount_limit',
64
+ :'authorization_date' => :'authorization_date',
61
65
  :'bank' => :'bank',
62
66
  :'beneficiary_account' => :'beneficiary_account',
63
67
  :'email' => :'email',
@@ -77,6 +81,7 @@ module Wire4Client
77
81
  def self.swagger_types
78
82
  {
79
83
  :'amount_limit' => :'Float',
84
+ :'authorization_date' => :'DateTime',
80
85
  :'bank' => :'Institution',
81
86
  :'beneficiary_account' => :'String',
82
87
  :'email' => :'Array<String>',
@@ -104,6 +109,10 @@ module Wire4Client
104
109
  self.amount_limit = attributes[:'amount_limit']
105
110
  end
106
111
 
112
+ if attributes.has_key?(:'authorization_date')
113
+ self.authorization_date = attributes[:'authorization_date']
114
+ end
115
+
107
116
  if attributes.has_key?(:'bank')
108
117
  self.bank = attributes[:'bank']
109
118
  end
@@ -232,6 +241,7 @@ module Wire4Client
232
241
  return true if self.equal?(o)
233
242
  self.class == o.class &&
234
243
  amount_limit == o.amount_limit &&
244
+ authorization_date == o.authorization_date &&
235
245
  bank == o.bank &&
236
246
  beneficiary_account == o.beneficiary_account &&
237
247
  email == o.email &&
@@ -255,7 +265,7 @@ module Wire4Client
255
265
  # Calculates hash code according to all attributes.
256
266
  # @return [Fixnum] Hash code
257
267
  def hash
258
- [amount_limit, bank, beneficiary_account, email, institution, kind_of_relationship, numeric_reference_spei, payment_concept_spei, person, register_date, relationship, rfc, status].hash
268
+ [amount_limit, authorization_date, bank, beneficiary_account, email, institution, kind_of_relationship, numeric_reference_spei, payment_concept_spei, person, register_date, relationship, rfc, status].hash
259
269
  end
260
270
 
261
271
  # Builds the object from hash
@@ -89,8 +89,8 @@ module Wire4Client
89
89
  invalid_properties.push('invalid value for "amount_limit", amount_limit cannot be nil.')
90
90
  end
91
91
 
92
- if @amount_limit < 0.0
93
- invalid_properties.push('invalid value for "amount_limit", must be greater than or equal to 0.0.')
92
+ if @amount_limit < 0
93
+ invalid_properties.push('invalid value for "amount_limit", must be greater than or equal to 0.')
94
94
  end
95
95
 
96
96
  if @cancel_return_url.nil?
@@ -113,8 +113,8 @@ module Wire4Client
113
113
  invalid_properties.push('invalid value for "previous_amount_limit", previous_amount_limit cannot be nil.')
114
114
  end
115
115
 
116
- if @previous_amount_limit < 0.0
117
- invalid_properties.push('invalid value for "previous_amount_limit", must be greater than or equal to 0.0.')
116
+ if @previous_amount_limit < 0
117
+ invalid_properties.push('invalid value for "previous_amount_limit", must be greater than or equal to 0.')
118
118
  end
119
119
 
120
120
  if @return_url.nil?
@@ -136,13 +136,13 @@ module Wire4Client
136
136
  # @return true if the model is valid
137
137
  def valid?
138
138
  return false if @amount_limit.nil?
139
- return false if @amount_limit < 0.0
139
+ return false if @amount_limit < 0
140
140
  return false if @cancel_return_url.nil?
141
141
  return false if @cancel_return_url.to_s.length > 512
142
142
  return false if @cancel_return_url.to_s.length < 10
143
143
  return false if @currency_code.nil?
144
144
  return false if @previous_amount_limit.nil?
145
- return false if @previous_amount_limit < 0.0
145
+ return false if @previous_amount_limit < 0
146
146
  return false if @return_url.nil?
147
147
  return false if @return_url.to_s.length > 512
148
148
  return false if @return_url.to_s.length < 10
@@ -156,8 +156,8 @@ module Wire4Client
156
156
  fail ArgumentError, 'amount_limit cannot be nil'
157
157
  end
158
158
 
159
- if amount_limit < 0.0
160
- fail ArgumentError, 'invalid value for "amount_limit", must be greater than or equal to 0.0.'
159
+ if amount_limit < 0
160
+ fail ArgumentError, 'invalid value for "amount_limit", must be greater than or equal to 0.'
161
161
  end
162
162
 
163
163
  @amount_limit = amount_limit
@@ -188,8 +188,8 @@ module Wire4Client
188
188
  fail ArgumentError, 'previous_amount_limit cannot be nil'
189
189
  end
190
190
 
191
- if previous_amount_limit < 0.0
192
- fail ArgumentError, 'invalid value for "previous_amount_limit", must be greater than or equal to 0.0.'
191
+ if previous_amount_limit < 0
192
+ fail ArgumentError, 'invalid value for "previous_amount_limit", must be greater than or equal to 0.'
193
193
  end
194
194
 
195
195
  @previous_amount_limit = previous_amount_limit
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Wire4RestAPI
3
+
4
+ #Referencia de la API de Wire4
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.10
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module Wire4Client
16
+ class BeneficiaryDTO
17
+ attr_accessor :account
18
+
19
+ attr_accessor :account_type
20
+
21
+ attr_accessor :name
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'account' => :'account',
27
+ :'account_type' => :'account_type',
28
+ :'name' => :'name'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'account' => :'String',
36
+ :'account_type' => :'Integer',
37
+ :'name' => :'String'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ if attributes.has_key?(:'account')
50
+ self.account = attributes[:'account']
51
+ end
52
+
53
+ if attributes.has_key?(:'account_type')
54
+ self.account_type = attributes[:'account_type']
55
+ end
56
+
57
+ if attributes.has_key?(:'name')
58
+ self.name = attributes[:'name']
59
+ end
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ account == o.account &&
81
+ account_type == o.account_type &&
82
+ name == o.name
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [account, account_type, name].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+ self.class.swagger_types.each_pair do |key, type|
103
+ if type =~ /\AArray<(.*)>/i
104
+ # check to ensure the input is an array given that the the attribute
105
+ # is documented as an array but the input is not
106
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
107
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
108
+ end
109
+ elsif !attributes[self.class.attribute_map[key]].nil?
110
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
111
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
112
+ end
113
+
114
+ self
115
+ end
116
+
117
+ # Deserializes the data based on type
118
+ # @param string type Data type
119
+ # @param string value Value to be deserialized
120
+ # @return [Object] Deserialized data
121
+ def _deserialize(type, value)
122
+ case type.to_sym
123
+ when :DateTime
124
+ DateTime.parse(value)
125
+ when :Date
126
+ Date.parse(value)
127
+ when :String
128
+ value.to_s
129
+ when :Integer
130
+ value.to_i
131
+ when :Float
132
+ value.to_f
133
+ when :BOOLEAN
134
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
135
+ true
136
+ else
137
+ false
138
+ end
139
+ when :Object
140
+ # generic object (usually a Hash), return directly
141
+ value
142
+ when /\AArray<(?<inner_type>.+)>\z/
143
+ inner_type = Regexp.last_match[:inner_type]
144
+ value.map { |v| _deserialize(inner_type, v) }
145
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
146
+ k_type = Regexp.last_match[:k_type]
147
+ v_type = Regexp.last_match[:v_type]
148
+ {}.tap do |hash|
149
+ value.each do |k, v|
150
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
151
+ end
152
+ end
153
+ else # model
154
+ temp_model = Wire4Client.const_get(type).new
155
+ temp_model.build_from_hash(value)
156
+ end
157
+ end
158
+
159
+ # Returns the string representation of the object
160
+ # @return [String] String presentation of the object
161
+ def to_s
162
+ to_hash.to_s
163
+ end
164
+
165
+ # to_body is an alias to to_hash (backward compatibility)
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_body
168
+ to_hash
169
+ end
170
+
171
+ # Returns the object in the form of hash
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ next if value.nil?
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ # Outputs non-array value in the form of hash
184
+ # For object, use to_hash. Otherwise, just return the value
185
+ # @param [Object] value Any valid value
186
+ # @return [Hash] Returns the value in the form of hash
187
+ def _to_hash(value)
188
+ if value.is_a?(Array)
189
+ value.compact.map { |v| _to_hash(v) }
190
+ elsif value.is_a?(Hash)
191
+ {}.tap do |hash|
192
+ value.each { |k, v| hash[k] = _to_hash(v) }
193
+ end
194
+ elsif value.respond_to? :to_hash
195
+ value.to_hash
196
+ else
197
+ value
198
+ end
199
+ end
200
+ end
201
+ end