Class: Wire4Client::PuntosDeVentaCoDiApi
- Inherits:
-
Object
- Object
- Wire4Client::PuntosDeVentaCoDiApi
- Defined in:
- lib/wire4_client/api/puntos_de_venta_co_di_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_sales_point(authorization, company_id, sales_point_info, opts = {}) ⇒ SalesPointRespose
Registro de punto de venta.
-
#create_sales_point_with_http_info(authorization, company_id, sales_point_info, opts = {}) ⇒ Array<(SalesPointRespose, Fixnum, Hash)>
Registro de punto de venta.
-
#initialize(api_client = ApiClient.default) ⇒ PuntosDeVentaCoDiApi
constructor
A new instance of PuntosDeVentaCoDiApi.
-
#obtain_sale_points(authorization, company_id, opts = {}) ⇒ Array<SalesPointFound>
Consulta de puntos de venta Obtiene los puntos de venta asociados a una empresa en las cuales se hacen operaciones CODI®.
-
#obtain_sale_points_with_http_info(authorization, company_id, opts = {}) ⇒ Array<(Array<SalesPointFound>, Fixnum, Hash)>
Consulta de puntos de venta Obtiene los puntos de venta asociados a una empresa en las cuales se hacen operaciones CODI®.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PuntosDeVentaCoDiApi
Returns a new instance of PuntosDeVentaCoDiApi.
19 20 21 |
# File 'lib/wire4_client/api/puntos_de_venta_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/puntos_de_venta_co_di_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_sales_point(authorization, company_id, sales_point_info, opts = {}) ⇒ SalesPointRespose
Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®.
29 30 31 32 |
# File 'lib/wire4_client/api/puntos_de_venta_co_di_api.rb', line 29 def create_sales_point(, company_id, sales_point_info, opts = {}) data, _status_code, _headers = create_sales_point_with_http_info(, company_id, sales_point_info, opts) data end |
#create_sales_point_with_http_info(authorization, company_id, sales_point_info, opts = {}) ⇒ Array<(SalesPointRespose, Fixnum, Hash)>
Registro de punto de venta. Se registra un punto de venta (TPV) desde donde se emitarán los cobros CODI®. El punto de venta se debe asociar a un cuenta CLABE registrada previamente ante Banxico para realizar cobros con CODI®.
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 |
# File 'lib/wire4_client/api/puntos_de_venta_co_di_api.rb', line 41 def create_sales_point_with_http_info(, company_id, sales_point_info, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PuntosDeVentaCoDiApi.create_sales_point ...' 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 PuntosDeVentaCoDiApi.create_sales_point" end # verify the required parameter 'company_id' is set if @api_client.config.client_side_validation && company_id.nil? fail ArgumentError, "Missing the required parameter 'company_id' when calling PuntosDeVentaCoDiApi.create_sales_point" end # verify the required parameter 'sales_point_info' is set if @api_client.config.client_side_validation && sales_point_info.nil? fail ArgumentError, "Missing the required parameter 'sales_point_info' when calling PuntosDeVentaCoDiApi.create_sales_point" end # resource path local_var_path = '/codi/companies/salespoint' # query parameters query_params = {} query_params[:'companyId'] = company_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(sales_point_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 => 'SalesPointRespose') if @api_client.config.debugging @api_client.config.logger.debug "API called: PuntosDeVentaCoDiApi#create_sales_point\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#obtain_sale_points(authorization, company_id, opts = {}) ⇒ Array<SalesPointFound>
Consulta de puntos de venta Obtiene los puntos de venta asociados a una empresa en las cuales se hacen operaciones CODI®.
96 97 98 99 |
# File 'lib/wire4_client/api/puntos_de_venta_co_di_api.rb', line 96 def obtain_sale_points(, company_id, opts = {}) data, _status_code, _headers = obtain_sale_points_with_http_info(, company_id, opts) data end |
#obtain_sale_points_with_http_info(authorization, company_id, opts = {}) ⇒ Array<(Array<SalesPointFound>, Fixnum, Hash)>
Consulta de puntos de venta Obtiene los puntos de venta asociados a una empresa en las cuales se hacen operaciones CODI®.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/wire4_client/api/puntos_de_venta_co_di_api.rb', line 107 def obtain_sale_points_with_http_info(, company_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PuntosDeVentaCoDiApi.obtain_sale_points ...' 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 PuntosDeVentaCoDiApi.obtain_sale_points" end # verify the required parameter 'company_id' is set if @api_client.config.client_side_validation && company_id.nil? fail ArgumentError, "Missing the required parameter 'company_id' when calling PuntosDeVentaCoDiApi.obtain_sale_points" end # resource path local_var_path = '/codi/companies/salespoint' # query parameters query_params = {} query_params[:'companyId'] = company_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 => 'Array<SalesPointFound>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PuntosDeVentaCoDiApi#obtain_sale_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |