Class: Invoicetronic_Sdk::UpdateApi
- Inherits:
-
Object
- Object
- Invoicetronic_Sdk::UpdateApi
- Defined in:
- lib/invoicetronic_sdk/api/update_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) ⇒ UpdateApi
constructor
A new instance of UpdateApi.
-
#update_get(opts = {}) ⇒ Array<Update>
List updates Retrieve a paginated list of updates.
-
#update_get_with_http_info(opts = {}) ⇒ Array<(Array<Update>, Integer, Hash)>
List updates Retrieve a paginated list of updates.
-
#update_id_get(id, opts = {}) ⇒ Update
Get an update by id Retrieve an update by its internal id.
-
#update_id_get_with_http_info(id, opts = {}) ⇒ Array<(Update, Integer, Hash)>
Get an update by id Retrieve an update by its internal id.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/invoicetronic_sdk/api/update_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#update_get(opts = {}) ⇒ Array<Update>
List updates Retrieve a paginated list of updates. Results can be filtered by various criteria such as company, send item, SDI state, and date ranges. Updates are status notifications from Italy’s SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The ‘state` field is the most important property and can have the following values: | Value | Name | Description | |——-|——|————-| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient’s tax drawer, but it was not possible to deliver it to the recipient’s reception system. | | 11 | ‘DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | Cost: Querying this endpoint is free and does not count as an operation against your plan limits. Important: Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was not successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection.
39 40 41 42 |
# File 'lib/invoicetronic_sdk/api/update_api.rb', line 39 def update_get(opts = {}) data, _status_code, _headers = update_get_with_http_info(opts) data end |
#update_get_with_http_info(opts = {}) ⇒ Array<(Array<Update>, Integer, Hash)>
List updates Retrieve a paginated list of updates. Results can be filtered by various criteria such as company, send item, SDI state, and date ranges. Updates are status notifications from Italy's SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The `state` field is the most important property and can have the following values: | Value | Name | Description | |——-|——|————-| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient's tax drawer, but it was not possible to deliver it to the recipient's reception system. | | 11 | `DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | Cost: Querying this endpoint is free and does not count as an operation against your plan limits. Important: Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was not successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection.
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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/invoicetronic_sdk/api/update_api.rb', line 61 def update_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UpdateApi.update_get ...' end allowable_values = ["Inviato", "Consegnato", "NonConsegnato", "Scartato", "AccettatoDalDestinatario", "RifiutatoDalDestinatario", "ImpossibilitaDiRecapito", "DecorrenzaTermini", "AttestazioneTrasmissioneFattura"] if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state']) fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}" end # resource path local_var_path = '/update' # 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[:'prestatore'] = opts[:'prestatore'] if !opts[:'prestatore'].nil? query_params[:'unread'] = opts[:'unread'] if !opts[:'unread'].nil? query_params[:'send_id'] = opts[:'send_id'] if !opts[:'send_id'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].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[:'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? # 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<Update>' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"UpdateApi.update_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: UpdateApi#update_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_id_get(id, opts = {}) ⇒ Update
Get an update by id Retrieve an update by its internal id. Updates are status notifications from Italy’s SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The ‘state` field is the most important property and can have the following values: | Value | Name | Description | |——-|——|————-| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient’s tax drawer, but it was not possible to deliver it to the recipient’s reception system. | | 11 | ‘DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | Cost: Querying this endpoint is free and does not count as an operation against your plan limits. Important: Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was not successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection.
127 128 129 130 |
# File 'lib/invoicetronic_sdk/api/update_api.rb', line 127 def update_id_get(id, opts = {}) data, _status_code, _headers = update_id_get_with_http_info(id, opts) data end |
#update_id_get_with_http_info(id, opts = {}) ⇒ Array<(Update, Integer, Hash)>
Get an update by id Retrieve an update by its internal id. Updates are status notifications from Italy's SDI (Sistema di Interscambio) about invoices you sent. Multiple updates can exist for the same send item as the invoice progresses through the SDI workflow. The `state` field is the most important property and can have the following values: | Value | Name | Description | |——-|——|————-| | 2 | `Inviato` | Sent to the SDI. | | 5 | `Consegnato` | Delivered to the recipient. | | 6 | `NonConsegnato` | Not delivered to the recipient. Only relevant for public administration entities. | | 7 | `Scartato` | Rejected by the SDI. | | 8 | `AccettatoDalDestinatario` | Accepted by the recipient. Only relevant for public administration entities. | | 9 | `RifiutatoDalDestinatario` | Rejected by the recipient. Only relevant for public administration entities. | | 10 | `ImpossibilitaDiRecapito` | Available on the recipient's tax drawer, but it was not possible to deliver it to the recipient's reception system. | | 11 | `DecorrenzaTermini` | A public administration entity has not responded for more than 15 days. The document is considered delivered. | | 12 | `AttestazioneTrasmissioneFattura` | A public administration entity has received the document, but has not yet processed it. | Cost: Querying this endpoint is free and does not count as an operation against your plan limits. Important: Always monitor the state of your sent invoices. A state of `Inviato` only means the invoice has been submitted to SDI, not that it has been delivered. A state like `Scartato` indicates that the invoice was not successfully delivered and may require corrective action, such as fixing validation errors and resubmitting. In that case, `description` contains the reason for the rejection.
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 177 178 179 180 181 182 183 |
# File 'lib/invoicetronic_sdk/api/update_api.rb', line 137 def update_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UpdateApi.update_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 UpdateApi.update_id_get" end # resource path local_var_path = '/update/{id}'.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/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] || 'Update' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"UpdateApi.update_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: UpdateApi#update_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |