Class: Invoicetronic_Sdk::SendApi
- Inherits:
-
Object
- Object
- Invoicetronic_Sdk::SendApi
- Defined in:
- lib/invoicetronic_sdk/api/send_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ SendApi
constructor
A new instance of SendApi.
-
#send_file_post(file, opts = {}) ⇒ ModelSend
Add an invoice by file Add a new invoice by uploading a file.
-
#send_file_post_with_http_info(file, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice by file Add a new invoice by uploading a file.
-
#send_get(opts = {}) ⇒ Array<ModelSend>
List invoices Retrieve a paginated list of send invoices.
-
#send_get_with_http_info(opts = {}) ⇒ Array<(Array<ModelSend>, Integer, Hash)>
List invoices Retrieve a paginated list of send invoices.
-
#send_id_get(id, opts = {}) ⇒ ModelSend
Get a invoice by id Retrieve a send invoice by its internal id.
-
#send_id_get_with_http_info(id, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Get a invoice by id Retrieve a send invoice by its internal id.
-
#send_id_payload_get(id, opts = {}) ⇒ nil
Get a send invoice payload by id Retrieve only the payload of a send invoice, without the full invoice metadata.
-
#send_id_payload_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get a send invoice payload by id Retrieve only the payload of a send invoice, without the full invoice metadata.
-
#send_identifier_get(identifier, opts = {}) ⇒ ModelSend
Get a invoice by identifier Retrieve a send invoice by its SDI identifier.
-
#send_identifier_get_with_http_info(identifier, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Get a invoice by identifier Retrieve a send invoice by its SDI identifier.
-
#send_json_post(body, opts = {}) ⇒ ModelSend
Add an invoice by json Add a new invoice using a FatturaPA JSON representation.
-
#send_json_post_with_http_info(body, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice by json Add a new invoice using a FatturaPA JSON representation.
-
#send_post(model_send, opts = {}) ⇒ ModelSend
Add an invoice Add a new invoice using a structured Send object.
-
#send_post_with_http_info(model_send, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice Add a new invoice using a structured Send object.
-
#send_validate_file_post(file, opts = {}) ⇒ nil
Validate an invoice file Validate an invoice file without sending it to SDI.
-
#send_validate_file_post_with_http_info(file, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice file Validate an invoice file without sending it to SDI.
-
#send_validate_json_post(body, opts = {}) ⇒ nil
Validate an invoice by json Validate a JSON invoice without sending it to SDI.
-
#send_validate_json_post_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice by json Validate a JSON invoice without sending it to SDI.
-
#send_validate_post(model_send, opts = {}) ⇒ nil
Validate an invoice Validate an invoice without sending it to SDI.
-
#send_validate_post_with_http_info(model_send, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice Validate an invoice without sending it to SDI.
-
#send_validate_xml_post(body, opts = {}) ⇒ nil
Validate an invoice by xml Validate an XML invoice document without sending it to SDI.
-
#send_validate_xml_post_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice by xml Validate an XML invoice document without sending it to SDI.
-
#send_xml_post(body, opts = {}) ⇒ ModelSend
Add an invoice by xml Add a new invoice using a raw XML document in FatturaPA format.
-
#send_xml_post_with_http_info(body, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice by xml Add a new invoice using a raw XML document in FatturaPA format.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#send_file_post(file, opts = {}) ⇒ ModelSend
Add an invoice by file Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the ‘update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
29 30 31 32 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 29 def send_file_post(file, opts = {}) data, _status_code, _headers = send_file_post_with_http_info(file, opts) data end |
#send_file_post_with_http_info(file, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice by file Add a new invoice by uploading a file. Supported formats are XML (FatturaPA) and P7M (signed). The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
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 97 98 99 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 41 def send_file_post_with_http_info(file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_file_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling SendApi.send_file_post" end allowable_values = ["None", "Apply", "Force", "Auto"] if @api_client.config.client_side_validation && opts[:'signature'] && !allowable_values.include?(opts[:'signature']) fail ArgumentError, "invalid value for \"signature\", must be one of #{allowable_values}" end # resource path local_var_path = '/send/file' # query parameters query_params = opts[:query_params] || {} query_params[:'validate'] = opts[:'validate'] if !opts[:'validate'].nil? query_params[:'signature'] = opts[:'signature'] if !opts[:'signature'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = file # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ModelSend' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_file_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_get(opts = {}) ⇒ Array<ModelSend>
List invoices Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (‘q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
123 124 125 126 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 123 def send_get(opts = {}) data, _status_code, _headers = send_get_with_http_info(opts) data end |
#send_get_with_http_info(opts = {}) ⇒ Array<(Array<ModelSend>, Integer, Hash)>
List invoices Retrieve a paginated list of send invoices. Results can be filtered by various criteria such as company, date ranges, document number, and free-text search (`q`). Use `ids` to fetch specific Send records in a single call (comma-separated, up to 100). Returns invoice metadata; set `include_payload` to true to include the full invoice content. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
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 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 203 204 205 206 207 208 209 210 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 150 def send_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_get ...' end # resource path local_var_path = '/send' # query parameters query_params = opts[:query_params] || {} query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil? query_params[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil? query_params[:'committente'] = opts[:'committente'] if !opts[:'committente'].nil? query_params[:'prestatore'] = opts[:'prestatore'] if !opts[:'prestatore'].nil? query_params[:'file_name'] = opts[:'file_name'] if !opts[:'file_name'].nil? query_params[:'last_update_from'] = opts[:'last_update_from'] if !opts[:'last_update_from'].nil? query_params[:'last_update_to'] = opts[:'last_update_to'] if !opts[:'last_update_to'].nil? query_params[:'date_sent_from'] = opts[:'date_sent_from'] if !opts[:'date_sent_from'].nil? query_params[:'date_sent_to'] = opts[:'date_sent_to'] if !opts[:'date_sent_to'].nil? query_params[:'document_date_from'] = opts[:'document_date_from'] if !opts[:'document_date_from'].nil? query_params[:'document_date_to'] = opts[:'document_date_to'] if !opts[:'document_date_to'].nil? query_params[:'document_number'] = opts[:'document_number'] if !opts[:'document_number'].nil? query_params[:'include_payload'] = opts[:'include_payload'] if !opts[:'include_payload'].nil? query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ModelSend>' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_id_get(id, opts = {}) ⇒ ModelSend
Get a invoice by id Retrieve a send invoice by its internal id. The ‘id` is unique and assigned by the system when the invoice is created. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
218 219 220 221 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 218 def send_id_get(id, opts = {}) data, _status_code, _headers = send_id_get_with_http_info(id, opts) data end |
#send_id_get_with_http_info(id, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Get a invoice by id Retrieve a send invoice by its internal id. The `id` is unique and assigned by the system when the invoice is created. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 229 def send_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_id_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SendApi.send_id_get" end # resource path local_var_path = '/send/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_payload'] = opts[:'include_payload'] if !opts[:'include_payload'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ModelSend' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_id_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_id_payload_get(id, opts = {}) ⇒ nil
Get a send invoice payload by id Retrieve only the payload of a send invoice, without the full invoice metadata. This is useful when you already have the invoice metadata and only need the XML content. The response is a ‘text/plain` string, identical to the `payload` field returned by the standard GET endpoint with `include_payload=true`. Depending on how the invoice was originally submitted, the payload may be Base64-encoded or plain XML.
283 284 285 286 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 283 def send_id_payload_get(id, opts = {}) send_id_payload_get_with_http_info(id, opts) nil end |
#send_id_payload_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get a send invoice payload by id Retrieve only the payload of a send invoice, without the full invoice metadata. This is useful when you already have the invoice metadata and only need the XML content. The response is a `text/plain` string, identical to the `payload` field returned by the standard GET endpoint with `include_payload=true`. Depending on how the invoice was originally submitted, the payload may be Base64-encoded or plain XML.
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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 293 def send_id_payload_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_id_payload_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SendApi.send_id_payload_get" end # resource path local_var_path = '/send/{id}/payload'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/problem+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_id_payload_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_id_payload_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_identifier_get(identifier, opts = {}) ⇒ ModelSend
Get a invoice by identifier Retrieve a send invoice by its SDI identifier. The ‘identifier` is assigned by the SDI and becomes available after the invoice has been accepted. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
347 348 349 350 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 347 def send_identifier_get(identifier, opts = {}) data, _status_code, _headers = send_identifier_get_with_http_info(identifier, opts) data end |
#send_identifier_get_with_http_info(identifier, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Get a invoice by identifier Retrieve a send invoice by its SDI identifier. The `identifier` is assigned by the SDI and becomes available after the invoice has been accepted. Returns invoice metadata; set `include_payload` to true to include the full invoice content. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 358 def send_identifier_get_with_http_info(identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_identifier_get ...' end # verify the required parameter 'identifier' is set if @api_client.config.client_side_validation && identifier.nil? fail ArgumentError, "Missing the required parameter 'identifier' when calling SendApi.send_identifier_get" end # resource path local_var_path = '/send/{identifier}'.sub('{' + 'identifier' + '}', CGI.escape(identifier.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_payload'] = opts[:'include_payload'] if !opts[:'include_payload'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ModelSend' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_identifier_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_identifier_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_json_post(body, opts = {}) ⇒ ModelSend
Add an invoice by json Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the ‘update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
414 415 416 417 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 414 def send_json_post(body, opts = {}) data, _status_code, _headers = send_json_post_with_http_info(body, opts) data end |
#send_json_post_with_http_info(body, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice by json Add a new invoice using a FatturaPA JSON representation. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 426 def send_json_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_json_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SendApi.send_json_post" end allowable_values = ["None", "Apply", "Force", "Auto"] if @api_client.config.client_side_validation && opts[:'signature'] && !allowable_values.include?(opts[:'signature']) fail ArgumentError, "invalid value for \"signature\", must be one of #{allowable_values}" end # resource path local_var_path = '/send/json' # query parameters query_params = opts[:query_params] || {} query_params[:'validate'] = opts[:'validate'] if !opts[:'validate'].nil? query_params[:'signature'] = opts[:'signature'] if !opts[:'signature'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ModelSend' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_json_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_json_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_post(model_send, opts = {}) ⇒ ModelSend
Add an invoice Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the ‘update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
492 493 494 495 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 492 def send_post(model_send, opts = {}) data, _status_code, _headers = send_post_with_http_info(model_send, opts) data end |
#send_post_with_http_info(model_send, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice Add a new invoice using a structured Send object. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
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 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 504 def send_post_with_http_info(model_send, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_post ...' end # verify the required parameter 'model_send' is set if @api_client.config.client_side_validation && model_send.nil? fail ArgumentError, "Missing the required parameter 'model_send' when calling SendApi.send_post" end allowable_values = ["None", "Apply", "Force", "Auto"] if @api_client.config.client_side_validation && opts[:'signature'] && !allowable_values.include?(opts[:'signature']) fail ArgumentError, "invalid value for \"signature\", must be one of #{allowable_values}" end # resource path local_var_path = '/send' # query parameters query_params = opts[:query_params] || {} query_params[:'validate'] = opts[:'validate'] if !opts[:'validate'].nil? query_params[:'signature'] = opts[:'signature'] if !opts[:'signature'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(model_send) # return_type return_type = opts[:debug_return_type] || 'ModelSend' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_validate_file_post(file, opts = {}) ⇒ nil
Validate an invoice file Validate an invoice file without sending it to SDI. Supported formats are XML (FatturaPA) and P7M (signed). Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
568 569 570 571 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 568 def send_validate_file_post(file, opts = {}) send_validate_file_post_with_http_info(file, opts) nil end |
#send_validate_file_post_with_http_info(file, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice file Validate an invoice file without sending it to SDI. Supported formats are XML (FatturaPA) and P7M (signed). Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 578 def send_validate_file_post_with_http_info(file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_validate_file_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling SendApi.send_validate_file_post" end # resource path local_var_path = '/send/validate/file' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['multipart/form-data']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} form_params['file'] = file # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_validate_file_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_validate_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_validate_json_post(body, opts = {}) ⇒ nil
Validate an invoice by json Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
637 638 639 640 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 637 def send_validate_json_post(body, opts = {}) send_validate_json_post_with_http_info(body, opts) nil end |
#send_validate_json_post_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice by json Validate a JSON invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 647 def send_validate_json_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_validate_json_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SendApi.send_validate_json_post" end # resource path local_var_path = '/send/validate/json' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_validate_json_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_validate_json_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_validate_post(model_send, opts = {}) ⇒ nil
Validate an invoice Validate an invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
705 706 707 708 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 705 def send_validate_post(model_send, opts = {}) send_validate_post_with_http_info(model_send, opts) nil end |
#send_validate_post_with_http_info(model_send, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice Validate an invoice without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 715 def send_validate_post_with_http_info(model_send, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_validate_post ...' end # verify the required parameter 'model_send' is set if @api_client.config.client_side_validation && model_send.nil? fail ArgumentError, "Missing the required parameter 'model_send' when calling SendApi.send_validate_post" end # resource path local_var_path = '/send/validate' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(model_send) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_validate_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_validate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_validate_xml_post(body, opts = {}) ⇒ nil
Validate an invoice by xml Validate an XML invoice document without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
773 774 775 776 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 773 def send_validate_xml_post(body, opts = {}) send_validate_xml_post_with_http_info(body, opts) nil end |
#send_validate_xml_post_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Validate an invoice by xml Validate an XML invoice document without sending it to SDI. Use this to check for errors before actual submission. Returns validation results with any errors found. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/).
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 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 783 def send_validate_xml_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_validate_xml_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SendApi.send_validate_xml_post" end # resource path local_var_path = '/send/validate/xml' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_validate_xml_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_validate_xml_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_xml_post(body, opts = {}) ⇒ ModelSend
Add an invoice by xml Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the ‘update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
843 844 845 846 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 843 def send_xml_post(body, opts = {}) data, _status_code, _headers = send_xml_post_with_http_info(body, opts) data end |
#send_xml_post_with_http_info(body, opts = {}) ⇒ Array<(ModelSend, Integer, Hash)>
Add an invoice by xml Add a new invoice using a raw XML document in FatturaPA format. The invoice will be signed (if requested), validated (if requested), and queued for delivery to SDI. Status updates from SDI will be available in the `update` endpoint. Send invoices are outbound sales invoices transmitted to customers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 15 days in the [Sandbox](invoicetronic.com/en/docs/sandbox/). You can also upload invoices via the [Dashboard](dashboard.invoicetronic.com).
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/invoicetronic_sdk/api/send_api.rb', line 855 def send_xml_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SendApi.send_xml_post ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SendApi.send_xml_post" end allowable_values = ["None", "Apply", "Force", "Auto"] if @api_client.config.client_side_validation && opts[:'signature'] && !allowable_values.include?(opts[:'signature']) fail ArgumentError, "invalid value for \"signature\", must be one of #{allowable_values}" end # resource path local_var_path = '/send/xml' # query parameters query_params = opts[:query_params] || {} query_params[:'validate'] = opts[:'validate'] if !opts[:'validate'].nil? query_params[:'signature'] = opts[:'signature'] if !opts[:'signature'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/xml']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ModelSend' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"SendApi.send_xml_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendApi#send_xml_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |