Class: Wire4Client::PeticionesDePagoPorCoDiApi
- Inherits:
-
Object
- Object
- Wire4Client::PeticionesDePagoPorCoDiApi
- Defined in:
- lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#consult_codi_request_by_order_id(authorization, order_id, sales_point_id, opts = {}) ⇒ PaymentRequestCodiResponseDTO
Consulta información de petición por orderId Obtiene la información de una petición de pago CODI® por orderId para un punto de venta.
-
#consult_codi_request_by_order_id_with_http_info(authorization, order_id, sales_point_id, opts = {}) ⇒ Array<(PaymentRequestCodiResponseDTO, Fixnum, Hash)>
Consulta información de petición por orderId Obtiene la información de una petición de pago CODI® por orderId para un punto de venta.
-
#generate_codi_code_qr(authorization, codi_info, sales_point_id, opts = {}) ⇒ CodiCodeQrResponseDTO
Genera código QR Genera un código QR solicitado por un punto de venta para un pago mediante CODI®.
-
#generate_codi_code_qr_with_http_info(authorization, codi_info, sales_point_id, opts = {}) ⇒ Array<(CodiCodeQrResponseDTO, Fixnum, Hash)>
Genera código QR Genera un código QR solicitado por un punto de venta para un pago mediante CODI®.
-
#initialize(api_client = ApiClient.default) ⇒ PeticionesDePagoPorCoDiApi
constructor
A new instance of PeticionesDePagoPorCoDiApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PeticionesDePagoPorCoDiApi
Returns a new instance of PeticionesDePagoPorCoDiApi.
19 20 21 |
# File 'lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#consult_codi_request_by_order_id(authorization, order_id, sales_point_id, opts = {}) ⇒ PaymentRequestCodiResponseDTO
Consulta información de petición por orderId Obtiene la información de una petición de pago CODI® por orderId para un punto de venta.
29 30 31 32 |
# File 'lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb', line 29 def consult_codi_request_by_order_id(, order_id, sales_point_id, opts = {}) data, _status_code, _headers = consult_codi_request_by_order_id_with_http_info(, order_id, sales_point_id, opts) data end |
#consult_codi_request_by_order_id_with_http_info(authorization, order_id, sales_point_id, opts = {}) ⇒ Array<(PaymentRequestCodiResponseDTO, Fixnum, Hash)>
Consulta información de petición por orderId Obtiene la información de una petición de pago CODI® por orderId para un punto de venta.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb', line 41 def consult_codi_request_by_order_id_with_http_info(, order_id, sales_point_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PeticionesDePagoPorCoDiApi.consult_codi_request_by_order_id ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling PeticionesDePagoPorCoDiApi.consult_codi_request_by_order_id" end # verify the required parameter 'order_id' is set if @api_client.config.client_side_validation && order_id.nil? fail ArgumentError, "Missing the required parameter 'order_id' when calling PeticionesDePagoPorCoDiApi.consult_codi_request_by_order_id" end # verify the required parameter 'sales_point_id' is set if @api_client.config.client_side_validation && sales_point_id.nil? fail ArgumentError, "Missing the required parameter 'sales_point_id' when calling PeticionesDePagoPorCoDiApi.consult_codi_request_by_order_id" end if @api_client.config.client_side_validation && sales_point_id.to_s.length > 36 fail ArgumentError, 'invalid value for "sales_point_id" when calling PeticionesDePagoPorCoDiApi.consult_codi_request_by_order_id, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && sales_point_id.to_s.length < 36 fail ArgumentError, 'invalid value for "sales_point_id" when calling PeticionesDePagoPorCoDiApi.consult_codi_request_by_order_id, the character length must be great than or equal to 36.' end # resource path local_var_path = '/codi/sales-point/charges' # query parameters query_params = {} query_params[:'orderId'] = order_id query_params[:'salesPointId'] = sales_point_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'Authorization'] = # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PaymentRequestCodiResponseDTO') if @api_client.config.debugging @api_client.config.logger.debug "API called: PeticionesDePagoPorCoDiApi#consult_codi_request_by_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_codi_code_qr(authorization, codi_info, sales_point_id, opts = {}) ⇒ CodiCodeQrResponseDTO
Genera código QR Genera un código QR solicitado por un punto de venta para un pago mediante CODI®
104 105 106 107 |
# File 'lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb', line 104 def generate_codi_code_qr(, codi_info, sales_point_id, opts = {}) data, _status_code, _headers = generate_codi_code_qr_with_http_info(, codi_info, sales_point_id, opts) data end |
#generate_codi_code_qr_with_http_info(authorization, codi_info, sales_point_id, opts = {}) ⇒ Array<(CodiCodeQrResponseDTO, Fixnum, Hash)>
Genera código QR Genera un código QR solicitado por un punto de venta para un pago mediante CODI®
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/wire4_client/api/peticiones_de_pago_por_co_di_api.rb', line 116 def generate_codi_code_qr_with_http_info(, codi_info, sales_point_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PeticionesDePagoPorCoDiApi.generate_codi_code_qr ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling PeticionesDePagoPorCoDiApi.generate_codi_code_qr" end # verify the required parameter 'codi_info' is set if @api_client.config.client_side_validation && codi_info.nil? fail ArgumentError, "Missing the required parameter 'codi_info' when calling PeticionesDePagoPorCoDiApi.generate_codi_code_qr" end # verify the required parameter 'sales_point_id' is set if @api_client.config.client_side_validation && sales_point_id.nil? fail ArgumentError, "Missing the required parameter 'sales_point_id' when calling PeticionesDePagoPorCoDiApi.generate_codi_code_qr" end if @api_client.config.client_side_validation && sales_point_id.to_s.length > 36 fail ArgumentError, 'invalid value for "sales_point_id" when calling PeticionesDePagoPorCoDiApi.generate_codi_code_qr, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && sales_point_id.to_s.length < 36 fail ArgumentError, 'invalid value for "sales_point_id" when calling PeticionesDePagoPorCoDiApi.generate_codi_code_qr, the character length must be great than or equal to 36.' end if @api_client.config.client_side_validation && sales_point_id !~ 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}$/) fail ArgumentError, "invalid value for 'sales_point_id' when calling PeticionesDePagoPorCoDiApi.generate_codi_code_qr, 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}$/." end # resource path local_var_path = '/codi/sales-point/charges' # query parameters query_params = {} query_params[:'salesPointId'] = sales_point_id # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'Authorization'] = # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(codi_info) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CodiCodeQrResponseDTO') if @api_client.config.debugging @api_client.config.logger.debug "API called: PeticionesDePagoPorCoDiApi#generate_codi_code_qr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |