Class: Invoicetronic_Sdk::ExportApi
- Inherits:
-
Object
- Object
- Invoicetronic_Sdk::ExportApi
- Defined in:
- lib/invoicetronic_sdk/api/export_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#export_get(opts = {}) ⇒ nil
Export invoices as a ZIP archive Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.).
-
#export_get_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Export invoices as a ZIP archive Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.).
-
#initialize(api_client = ApiClient.default) ⇒ ExportApi
constructor
A new instance of ExportApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/invoicetronic_sdk/api/export_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#export_get(opts = {}) ⇒ nil
Export invoices as a ZIP archive
Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). Sent invoices are only included when they have reached a definitive state (e.g., Consegnato for private recipients, AccettatoDalDestinatario, DecorrenzaTermini, etc.). Invoices still being processed by SDI are excluded. Received invoices are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - year + month (e.g., year=2026&month=3 for March 2026) - year + quarter (e.g., year=2026&quarter=1 for Q1 Jan-Mar) - document_date_from / document_date_to for a custom date range These options are mutually exclusive. The year parameter alone is not valid and requires either month or quarter. ### Response Returns 200 with a ZIP archive, or 204 No Content if no invoices match the given filters. Files in the archive are organized by company VAT number ({vat}/send/, {vat}/receive/). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a 429 Too Many Requests response.
33 34 35 36 |
# File 'lib/invoicetronic_sdk/api/export_api.rb', line 33 def export_get(opts = {}) export_get_with_http_info(opts) nil end |
#export_get_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>
Export invoices as a ZIP archive Export invoices as a ZIP archive of FatturaPA XML files, suitable for import into accounting software (TeamSystem, Zucchetti, etc.). Sent invoices are only included when they have reached a definitive state (e.g., `Consegnato` for private recipients, `AccettatoDalDestinatario`, `DecorrenzaTermini`, etc.). Invoices still being processed by SDI are excluded. Received invoices are always included. Unread invoices are automatically marked as read and counted as operations. ### Period filters You can filter by period using either: - `year` + `month` (e.g., `year=2026&month=3` for March 2026) - `year` + `quarter` (e.g., `year=2026&quarter=1` for Q1 Jan-Mar) - `document_date_from` / `document_date_to` for a custom date range These options are mutually exclusive. The `year` parameter alone is not valid and requires either `month` or `quarter`. ### Response Returns `200` with a ZIP archive, or `204 No Content` if no invoices match the given filters. Files in the archive are organized by company VAT number (`vat/send/`, `vat/receive/`). ### Rate limiting This endpoint has a dedicated rate limit: only one export request per user can be processed at a time. Concurrent requests will receive a `429 Too Many Requests` response.
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 |
# File 'lib/invoicetronic_sdk/api/export_api.rb', line 49 def export_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ExportApi.export_get ...' end # resource path local_var_path = '/export' # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil? query_params[:'year'] = opts[:'year'] if !opts[:'year'].nil? query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil? query_params[:'quarter'] = opts[:'quarter'] if !opts[:'quarter'].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? # 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 => :"ExportApi.export_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: ExportApi#export_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |