Class: Invoicetronic_Sdk::ReceiveApi
- Inherits:
-
Object
- Object
- Invoicetronic_Sdk::ReceiveApi
- Defined in:
- lib/invoicetronic_sdk/api/receive_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) ⇒ ReceiveApi
constructor
A new instance of ReceiveApi.
-
#receive_get(opts = {}) ⇒ Array<Receive>
List incoming invoices Retrieve a paginated list of receive invoices.
-
#receive_get_with_http_info(opts = {}) ⇒ Array<(Array<Receive>, Integer, Hash)>
List incoming invoices Retrieve a paginated list of receive invoices.
-
#receive_id_delete(id, opts = {}) ⇒ Receive
Delete an incoming invoice by id Permanently delete a receive invoice by its internal id.
-
#receive_id_delete_with_http_info(id, opts = {}) ⇒ Array<(Receive, Integer, Hash)>
Delete an incoming invoice by id Permanently delete a receive invoice by its internal id.
-
#receive_id_get(id, opts = {}) ⇒ Receive
Get an incoming invoice by id Retrieve an incoming invoice by its internal id.
-
#receive_id_get_with_http_info(id, opts = {}) ⇒ Array<(Receive, Integer, Hash)>
Get an incoming invoice by id Retrieve an incoming invoice by its internal id.
-
#receive_id_payload_get(id, opts = {}) ⇒ nil
Get a receive invoice payload by id Retrieve only the payload of a receive invoice, without the full invoice metadata.
-
#receive_id_payload_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get a receive invoice payload by id Retrieve only the payload of a receive invoice, without the full invoice metadata.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ReceiveApi
Returns a new instance of ReceiveApi.
19 20 21 |
# File 'lib/invoicetronic_sdk/api/receive_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/invoicetronic_sdk/api/receive_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#receive_get(opts = {}) ⇒ Array<Receive>
List incoming invoices Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, document number, and free-text search (‘q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. Receive invoices are inbound purchase invoices received from suppliers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](invoicetronic.com/en/docs/sandbox/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
44 45 46 47 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 44 def receive_get(opts = {}) data, _status_code, _headers = receive_get_with_http_info(opts) data end |
#receive_get_with_http_info(opts = {}) ⇒ Array<(Array<Receive>, Integer, Hash)>
List incoming invoices Retrieve a paginated list of receive invoices. Results can be filtered by various criteria such as company, date ranges, sender, document number, and free-text search (`q`). Returns invoice metadata; set `include_payload` to true to include the full invoice content. Invoices are marked as read (`is_read` = true) only when `include_payload` is true. Receive invoices are inbound purchase invoices received from suppliers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](invoicetronic.com/en/docs/sandbox/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
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 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 71 def receive_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReceiveApi.receive_get ...' end # resource path local_var_path = '/receive' # 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[:'unread'] = opts[:'unread'] if !opts[:'unread'].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[:'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<Receive>' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"ReceiveApi.receive_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: ReceiveApi#receive_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#receive_id_delete(id, opts = {}) ⇒ Receive
Delete an incoming invoice by id Permanently delete a receive invoice by its internal id. This action cannot be undone. Receive invoices are inbound purchase invoices received from suppliers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](invoicetronic.com/en/docs/sandbox/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
138 139 140 141 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 138 def receive_id_delete(id, opts = {}) data, _status_code, _headers = receive_id_delete_with_http_info(id, opts) data end |
#receive_id_delete_with_http_info(id, opts = {}) ⇒ Array<(Receive, Integer, Hash)>
Delete an incoming invoice by id Permanently delete a receive invoice by its internal id. This action cannot be undone. Receive invoices are inbound purchase invoices received from suppliers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](invoicetronic.com/en/docs/sandbox/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
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 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 148 def receive_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReceiveApi.receive_id_delete ...' 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 ReceiveApi.receive_id_delete" end # resource path local_var_path = '/receive/{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] || 'Receive' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"ReceiveApi.receive_id_delete", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReceiveApi#receive_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#receive_id_get(id, opts = {}) ⇒ Receive
Get an incoming invoice by id Retrieve an incoming invoice by its internal id. The ‘id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. Receive invoices are inbound purchase invoices received from suppliers through Italy’s SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](invoicetronic.com/en/docs/sandbox/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
202 203 204 205 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 202 def receive_id_get(id, opts = {}) data, _status_code, _headers = receive_id_get_with_http_info(id, opts) data end |
#receive_id_get_with_http_info(id, opts = {}) ⇒ Array<(Receive, Integer, Hash)>
Get an incoming invoice by id Retrieve an incoming invoice by its internal id. The `id` is unique and assigned by the system when the invoice is received. Returns invoice metadata; set `include_payload` to true to include the full invoice content. The invoice is marked as read (`is_read` = true) only when `include_payload` is true. Receive invoices are inbound purchase invoices received from suppliers through Italy's SDI (Sistema di Interscambio). Preserved for two years in the live environment and 24 hours in the [Sandbox](invoicetronic.com/en/docs/sandbox/). Inbound invoices are routed to your account via the recipient VAT number, so the recipient company must exist in Invoicetronic for the invoice to be matched. If an invoice arrives before its company has been registered, it is held by our SDI infrastructure and automatically re-processed once the company is created—no invoice is lost. See [Prerequisites](invoicetronic.com/en/docs/prerequisites/) for the recommended setup order.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 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 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 213 def receive_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReceiveApi.receive_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 ReceiveApi.receive_id_get" end # resource path local_var_path = '/receive/{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] || 'Receive' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"ReceiveApi.receive_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: ReceiveApi#receive_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#receive_id_payload_get(id, opts = {}) ⇒ nil
Get a receive invoice payload by id Retrieve only the payload of a receive 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`. The invoice is marked as read (`is_read` = true) and counted as an operation, same as when retrieving the full invoice with `include_payload=true`.
267 268 269 270 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 267 def receive_id_payload_get(id, opts = {}) receive_id_payload_get_with_http_info(id, opts) nil end |
#receive_id_payload_get_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Get a receive invoice payload by id Retrieve only the payload of a receive 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`. The invoice is marked as read (`is_read` = true) and counted as an operation, same as when retrieving the full invoice with `include_payload=true`.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 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 |
# File 'lib/invoicetronic_sdk/api/receive_api.rb', line 277 def receive_id_payload_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReceiveApi.receive_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 ReceiveApi.receive_id_payload_get" end # resource path local_var_path = '/receive/{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 => :"ReceiveApi.receive_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: ReceiveApi#receive_id_payload_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |