From f3cd169e57d5818af089f6fdab3c8acb7948a75b Mon Sep 17 00:00:00 2001 From: fattureincloud-bot <91328460+fattureincloud-bot@users.noreply.github.com> Date: Wed, 15 Feb 2023 09:42:10 +0100 Subject: [PATCH] chore: bumping version to 2.0.4 --- .openapi-generator/FILES | 2 + .openapi-generator/VERSION | 2 +- README.md | 5 +- api/api_archive.go | 62 +++--- api/api_cashbook.go | 40 ++-- api/api_clients.go | 42 ++--- api/api_companies.go | 6 +- api/api_emails.go | 6 +- api/api_info.go | 74 ++++---- api/api_issued_documents.go | 126 +++++++------ api/api_issued_e_invoices.go | 28 +-- api/api_products.go | 42 ++--- api/api_receipts.go | 54 +++--- api/api_received_documents.go | 84 ++++----- api/api_settings.go | 70 +++---- api/api_suppliers.go | 42 ++--- api/api_taxes.go | 66 +++---- api/api_user.go | 6 +- api/client.go | 178 +++++++++++++----- api/configuration.go | 16 +- docs/IssuedDocumentsApi.md | 6 +- docs/ReceivedDocument.md | 36 ++++ docs/SendEInvoiceRequest.md | 36 ++++ docs/SendEInvoiceRequestOptions.md | 66 +++++++ model/model_archive_document.go | 15 +- model/model_attachment_data.go | 15 +- model/model_cashbook_entry.go | 15 +- model/model_cashbook_entry_document.go | 15 +- model/model_cashbook_entry_kind.go | 2 +- model/model_cashbook_entry_type.go | 2 +- model/model_city.go | 15 +- model/model_client.go | 15 +- model/model_client_type.go | 2 +- model/model_company.go | 15 +- model/model_company_info.go | 15 +- model/model_company_info_access_info.go | 15 +- model/model_company_info_plan_info.go | 15 +- .../model_company_info_plan_info_functions.go | 15 +- ...company_info_plan_info_functions_status.go | 15 +- model/model_company_info_plan_info_limits.go | 15 +- model/model_company_type.go | 2 +- model/model_controlled_company.go | 15 +- .../model_create_archive_document_request.go | 15 +- .../model_create_archive_document_response.go | 15 +- model/model_create_cashbook_entry_request.go | 15 +- model/model_create_cashbook_entry_response.go | 15 +- model/model_create_client_request.go | 15 +- model/model_create_client_response.go | 15 +- model/model_create_f24_request.go | 15 +- model/model_create_f24_response.go | 15 +- model/model_create_issued_document_request.go | 15 +- .../model_create_issued_document_response.go | 15 +- model/model_create_payment_account_request.go | 15 +- .../model_create_payment_account_response.go | 15 +- model/model_create_payment_method_request.go | 15 +- model/model_create_payment_method_response.go | 15 +- model/model_create_product_request.go | 15 +- model/model_create_product_response.go | 15 +- model/model_create_receipt_request.go | 15 +- model/model_create_receipt_response.go | 15 +- .../model_create_received_document_request.go | 15 +- ...model_create_received_document_response.go | 15 +- model/model_create_supplier_request.go | 15 +- model/model_create_supplier_response.go | 15 +- model/model_create_vat_type_request.go | 15 +- model/model_create_vat_type_response.go | 15 +- model/model_currency.go | 15 +- model/model_detailed_country.go | 15 +- model/model_document_template.go | 15 +- model/model_e_invoice_rejection_reason.go | 15 +- model/model_email.go | 15 +- model/model_email_attachment.go | 15 +- model/model_email_data.go | 15 +- .../model_email_data_default_sender_email.go | 15 +- model/model_email_recipient_status.go | 2 +- model/model_email_schedule.go | 15 +- model/model_email_schedule_include.go | 15 +- model/model_email_status.go | 2 +- model/model_entity.go | 15 +- model/model_entity_type.go | 2 +- model/model_f24.go | 15 +- model/model_f24_status.go | 2 +- model/model_function_status.go | 15 +- model/model_get_archive_document_response.go | 15 +- model/model_get_cashbook_entry_response.go | 15 +- model/model_get_client_response.go | 15 +- model/model_get_company_info_response.go | 15 +- ...get_e_invoice_rejection_reason_response.go | 15 +- model/model_get_email_data_response.go | 15 +- ...existing_issued_document_totals_request.go | 15 +- ...xisting_issued_document_totals_response.go | 15 +- ...isting_received_document_totals_request.go | 15 +- ...sting_received_document_totals_response.go | 15 +- model/model_get_f24_response.go | 15 +- ...ssued_document_pre_create_info_response.go | 15 +- model/model_get_issued_document_response.go | 15 +- ..._get_new_issued_document_totals_request.go | 15 +- ...get_new_issued_document_totals_response.go | 15 +- ...et_new_received_document_totals_request.go | 15 +- ...t_new_received_document_totals_response.go | 15 +- model/model_get_payment_account_response.go | 15 +- model/model_get_payment_method_response.go | 15 +- model/model_get_product_response.go | 15 +- ...el_get_receipt_pre_create_info_response.go | 15 +- model/model_get_receipt_response.go | 15 +- ...el_get_receipts_monthly_totals_response.go | 15 +- ...eived_document_pre_create_info_response.go | 15 +- model/model_get_received_document_response.go | 15 +- model/model_get_supplier_response.go | 15 +- model/model_get_user_info_response.go | 15 +- ..._info_response_email_confirmation_state.go | 15 +- model/model_get_user_info_response_info.go | 15 +- model/model_get_vat_type_response.go | 15 +- model/model_issued_document.go | 15 +- model/model_issued_document_ei_data.go | 15 +- model/model_issued_document_extra_data.go | 15 +- .../model_issued_document_items_list_item.go | 15 +- model/model_issued_document_options.go | 15 +- ...odel_issued_document_payments_list_item.go | 15 +- ...cument_payments_list_item_payment_terms.go | 15 +- .../model_issued_document_pre_create_info.go | 15 +- ...document_pre_create_info_default_values.go | 15 +- ...e_create_info_extra_data_default_values.go | 15 +- ...nt_pre_create_info_items_default_values.go | 15 +- model/model_issued_document_status.go | 2 +- model/model_issued_document_totals.go | 15 +- model/model_issued_document_type.go | 2 +- model/model_join_issued_documents_response.go | 15 +- model/model_language.go | 15 +- .../model_list_archive_categories_response.go | 15 +- .../model_list_archive_documents_response.go | 15 +- ...el_list_archive_documents_response_page.go | 15 +- model/model_list_cashbook_entries_response.go | 15 +- model/model_list_cities_response.go | 15 +- model/model_list_clients_response.go | 15 +- model/model_list_clients_response_page.go | 15 +- model/model_list_cost_centers_response.go | 15 +- model/model_list_countries_response.go | 15 +- model/model_list_currencies_response.go | 15 +- ...delivery_notes_default_causals_response.go | 15 +- .../model_list_detailed_countries_response.go | 15 +- model/model_list_emails_response.go | 15 +- model/model_list_emails_response_page.go | 15 +- model/model_list_f24_response.go | 15 +- ...model_list_f24_response_aggregated_data.go | 15 +- model/model_list_f24_response_aggregation.go | 15 +- model/model_list_f24_response_page.go | 15 +- model/model_list_issued_documents_response.go | 15 +- ...del_list_issued_documents_response_page.go | 15 +- model/model_list_languages_response.go | 15 +- model/model_list_payment_accounts_response.go | 15 +- model/model_list_payment_methods_response.go | 15 +- .../model_list_product_categories_response.go | 15 +- model/model_list_products_response.go | 15 +- model/model_list_products_response_page.go | 15 +- model/model_list_receipts_response.go | 15 +- model/model_list_receipts_response_page.go | 15 +- ...t_received_document_categories_response.go | 15 +- .../model_list_received_documents_response.go | 15 +- ...l_list_received_documents_response_page.go | 15 +- model/model_list_revenue_centers_response.go | 15 +- model/model_list_suppliers_response.go | 15 +- model/model_list_suppliers_response_page.go | 15 +- model/model_list_templates_response.go | 15 +- model/model_list_units_of_measure_response.go | 15 +- model/model_list_user_companies_response.go | 15 +- ...model_list_user_companies_response_data.go | 15 +- model/model_list_vat_types_response.go | 15 +- .../model_modify_archive_document_request.go | 15 +- .../model_modify_archive_document_response.go | 15 +- model/model_modify_cashbook_entry_request.go | 15 +- model/model_modify_cashbook_entry_response.go | 15 +- model/model_modify_client_request.go | 15 +- model/model_modify_client_response.go | 15 +- model/model_modify_f24_request.go | 15 +- model/model_modify_f24_response.go | 15 +- model/model_modify_issued_document_request.go | 15 +- .../model_modify_issued_document_response.go | 15 +- model/model_modify_payment_account_request.go | 15 +- .../model_modify_payment_account_response.go | 15 +- model/model_modify_payment_method_request.go | 15 +- model/model_modify_payment_method_response.go | 15 +- model/model_modify_product_request.go | 15 +- model/model_modify_product_response.go | 15 +- model/model_modify_receipt_request.go | 15 +- model/model_modify_receipt_response.go | 15 +- .../model_modify_received_document_request.go | 15 +- ...model_modify_received_document_response.go | 15 +- model/model_modify_supplier_request.go | 15 +- model/model_modify_supplier_response.go | 15 +- model/model_modify_vat_type_request.go | 15 +- model/model_modify_vat_type_response.go | 15 +- model/model_monthly_total.go | 15 +- model/model_original_document_type.go | 2 +- model/model_pagination.go | 15 +- model/model_payment_account.go | 15 +- model/model_payment_account_type.go | 2 +- model/model_payment_method.go | 15 +- model/model_payment_method_details.go | 15 +- model/model_payment_method_type.go | 2 +- model/model_payment_terms_type.go | 2 +- model/model_permission_level.go | 2 +- model/model_permissions.go | 15 +- ...rmissions_fic_issued_documents_detailed.go | 15 +- model/model_product.go | 15 +- model/model_receipt.go | 15 +- model/model_receipt_items_list_item.go | 15 +- model/model_receipt_pre_create_info.go | 15 +- model/model_receipt_type.go | 2 +- model/model_received_document.go | 64 ++++++- model/model_received_document_entity.go | 15 +- model/model_received_document_info.go | 15 +- ...l_received_document_info_default_values.go | 15 +- ...ived_document_info_items_default_values.go | 15 +- ...model_received_document_items_list_item.go | 15 +- ...el_received_document_payments_list_item.go | 15 +- ...cument_payments_list_item_payment_terms.go | 15 +- model/model_received_document_totals.go | 15 +- model/model_received_document_type.go | 2 +- model/model_schedule_email_request.go | 15 +- model/model_send_e_invoice_request.go | 63 ++++++- model/model_send_e_invoice_request_data.go | 15 +- model/model_send_e_invoice_request_options.go | 140 ++++++++++++++ model/model_send_e_invoice_response.go | 15 +- model/model_send_e_invoice_response_data.go | 15 +- model/model_sender_email.go | 15 +- model/model_show_totals_mode.go | 2 +- model/model_supplier.go | 15 +- model/model_supplier_type.go | 2 +- ...odel_transform_issued_document_response.go | 15 +- ...odel_upload_archive_attachment_response.go | 15 +- model/model_upload_f24_attachment_response.go | 15 +- ...oad_issued_document_attachment_response.go | 15 +- ...d_received_document_attachment_response.go | 15 +- model/model_user.go | 15 +- model/model_user_company_role.go | 2 +- model/model_vat_item.go | 15 +- model/model_vat_kind.go | 2 +- model/model_vat_type.go | 15 +- ...del_verify_e_invoice_xml_error_response.go | 15 +- ...rify_e_invoice_xml_error_response_error.go | 15 +- ..._error_response_error_validation_result.go | 15 +- ...rify_e_invoice_xml_error_response_extra.go | 15 +- model/model_verify_e_invoice_xml_response.go | 15 +- ...odel_verify_e_invoice_xml_response_data.go | 15 +- model/utils.go | 30 +-- response.go | 2 +- sdk-version.yaml | 2 +- ...del_send_e_invoice_request_options_test.go | 35 ++++ 249 files changed, 3559 insertions(+), 869 deletions(-) create mode 100644 docs/SendEInvoiceRequestOptions.md create mode 100644 model/model_send_e_invoice_request_options.go create mode 100644 test/model/model_send_e_invoice_request_options_test.go diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0e8fa97..588178c 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -227,6 +227,7 @@ docs/ReceivedDocumentsApi.md docs/ScheduleEmailRequest.md docs/SendEInvoiceRequest.md docs/SendEInvoiceRequestData.md +docs/SendEInvoiceRequestOptions.md docs/SendEInvoiceResponse.md docs/SendEInvoiceResponseData.md docs/SenderEmail.md @@ -453,6 +454,7 @@ model_received_document_type.go model_schedule_email_request.go model_send_e_invoice_request.go model_send_e_invoice_request_data.go +model_send_e_invoice_request_options.go model_send_e_invoice_response.go model_send_e_invoice_response_data.go model_sender_email.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 0df17dd..e7e42a4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.2.1 \ No newline at end of file +6.3.0 \ No newline at end of file diff --git a/README.md b/README.md index c542fff..7e79bdf 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ The Fatture in Cloud API is based on REST, and makes possible to interact with t ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 2.0.24 -- Package version: 2.0.3 +- API version: 2.0.26 +- Package version: 2.0.4 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://www.fattureincloud.it](https://www.fattureincloud.it) @@ -330,6 +330,7 @@ Class | Method | HTTP request | Description - [ScheduleEmailRequest](docs/ScheduleEmailRequest.md) - [SendEInvoiceRequest](docs/SendEInvoiceRequest.md) - [SendEInvoiceRequestData](docs/SendEInvoiceRequestData.md) + - [SendEInvoiceRequestOptions](docs/SendEInvoiceRequestOptions.md) - [SendEInvoiceResponse](docs/SendEInvoiceResponse.md) - [SendEInvoiceResponseData](docs/SendEInvoiceResponseData.md) - [SenderEmail](docs/SenderEmail.md) diff --git a/api/api_archive.go b/api/api_archive.go index 59c40e9..617f3ed 100644 --- a/api/api_archive.go +++ b/api/api_archive.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -67,7 +67,7 @@ func (a *ArchiveApiService) CreateArchiveDocumentExecute(r ApiCreateArchiveDocum localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateArchiveDocumentResponse + localVarReturnValue *CreateArchiveDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArchiveApiService.CreateArchiveDocument") @@ -76,7 +76,7 @@ func (a *ArchiveApiService) CreateArchiveDocumentExecute(r ApiCreateArchiveDocum } localVarPath := localBasePath + "/c/{company_id}/archive" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -182,8 +182,8 @@ func (a *ArchiveApiService) DeleteArchiveDocumentExecute(r ApiDeleteArchiveDocum } localVarPath := localBasePath + "/c/{company_id}/archive/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -285,7 +285,7 @@ func (a *ArchiveApiService) GetArchiveDocumentExecute(r ApiGetArchiveDocumentReq localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetArchiveDocumentResponse + localVarReturnValue *GetArchiveDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArchiveApiService.GetArchiveDocument") @@ -294,18 +294,18 @@ func (a *ArchiveApiService) GetArchiveDocumentExecute(r ApiGetArchiveDocumentReq } localVarPath := localBasePath + "/c/{company_id}/archive/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -437,7 +437,7 @@ func (a *ArchiveApiService) ListArchiveDocumentsExecute(r ApiListArchiveDocument localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListArchiveDocumentsResponse + localVarReturnValue *ListArchiveDocumentsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArchiveApiService.ListArchiveDocuments") @@ -446,29 +446,29 @@ func (a *ArchiveApiService) ListArchiveDocumentsExecute(r ApiListArchiveDocument } localVarPath := localBasePath + "/c/{company_id}/archive" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -568,7 +568,7 @@ func (a *ArchiveApiService) ModifyArchiveDocumentExecute(r ApiModifyArchiveDocum localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyArchiveDocumentResponse + localVarReturnValue *ModifyArchiveDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArchiveApiService.ModifyArchiveDocument") @@ -577,8 +577,8 @@ func (a *ArchiveApiService) ModifyArchiveDocumentExecute(r ApiModifyArchiveDocum } localVarPath := localBasePath + "/c/{company_id}/archive/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -645,7 +645,7 @@ type ApiUploadArchiveDocumentAttachmentRequest struct { ApiService *ArchiveApiService companyId int32 filename *string - attachment **os.File + attachment *os.File } // Name of the file. @@ -656,7 +656,7 @@ func (r ApiUploadArchiveDocumentAttachmentRequest) Filename(filename string) Api // Valid format: .png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx func (r ApiUploadArchiveDocumentAttachmentRequest) Attachment(attachment *os.File) ApiUploadArchiveDocumentAttachmentRequest { - r.attachment = &attachment + r.attachment = attachment return r } @@ -688,7 +688,7 @@ func (a *ArchiveApiService) UploadArchiveDocumentAttachmentExecute(r ApiUploadAr localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UploadArchiveAttachmentResponse + localVarReturnValue *UploadArchiveAttachmentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArchiveApiService.UploadArchiveDocumentAttachment") @@ -697,7 +697,7 @@ func (a *ArchiveApiService) UploadArchiveDocumentAttachmentExecute(r ApiUploadAr } localVarPath := localBasePath + "/c/{company_id}/archive/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -721,7 +721,7 @@ func (a *ArchiveApiService) UploadArchiveDocumentAttachmentExecute(r ApiUploadAr localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.filename != nil { - localVarFormParams.Add("filename", parameterToString(*r.filename, "")) + parameterAddToQuery(localVarFormParams, "filename", r.filename, "") } var attachmentLocalVarFormFileName string var attachmentLocalVarFileName string @@ -729,17 +729,17 @@ func (a *ArchiveApiService) UploadArchiveDocumentAttachmentExecute(r ApiUploadAr attachmentLocalVarFormFileName = "attachment" - var attachmentLocalVarFile *os.File - if r.attachment != nil { - attachmentLocalVarFile = *r.attachment - } + + attachmentLocalVarFile := r.attachment + if attachmentLocalVarFile != nil { fbs, _ := ioutil.ReadAll(attachmentLocalVarFile) + attachmentLocalVarFileBytes = fbs attachmentLocalVarFileName = attachmentLocalVarFile.Name() attachmentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api/api_cashbook.go b/api/api_cashbook.go index c1379fb..3a45e1a 100644 --- a/api/api_cashbook.go +++ b/api/api_cashbook.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -66,7 +66,7 @@ func (a *CashbookApiService) CreateCashbookEntryExecute(r ApiCreateCashbookEntry localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateCashbookEntryResponse + localVarReturnValue *CreateCashbookEntryResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CashbookApiService.CreateCashbookEntry") @@ -75,7 +75,7 @@ func (a *CashbookApiService) CreateCashbookEntryExecute(r ApiCreateCashbookEntry } localVarPath := localBasePath + "/c/{company_id}/cashbook" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -181,8 +181,8 @@ func (a *CashbookApiService) DeleteCashbookEntryExecute(r ApiDeleteCashbookEntry } localVarPath := localBasePath + "/c/{company_id}/cashbook/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -284,7 +284,7 @@ func (a *CashbookApiService) GetCashbookEntryExecute(r ApiGetCashbookEntryReques localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetCashbookEntryResponse + localVarReturnValue *GetCashbookEntryResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CashbookApiService.GetCashbookEntry") @@ -293,18 +293,18 @@ func (a *CashbookApiService) GetCashbookEntryExecute(r ApiGetCashbookEntryReques } localVarPath := localBasePath + "/c/{company_id}/cashbook/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -429,7 +429,7 @@ func (a *CashbookApiService) ListCashbookEntriesExecute(r ApiListCashbookEntries localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListCashbookEntriesResponse + localVarReturnValue *ListCashbookEntriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CashbookApiService.ListCashbookEntries") @@ -438,7 +438,7 @@ func (a *CashbookApiService) ListCashbookEntriesExecute(r ApiListCashbookEntries } localVarPath := localBasePath + "/c/{company_id}/cashbook" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -450,16 +450,16 @@ func (a *CashbookApiService) ListCashbookEntriesExecute(r ApiListCashbookEntries return localVarReturnValue, nil, reportError("dateTo is required and must be specified") } - localVarQueryParams.Add("date_from", parameterToString(*r.dateFrom, "")) - localVarQueryParams.Add("date_to", parameterToString(*r.dateTo, "")) + parameterAddToQuery(localVarQueryParams, "date_from", r.dateFrom, "") + parameterAddToQuery(localVarQueryParams, "date_to", r.dateTo, "") if r.year != nil { - localVarQueryParams.Add("year", parameterToString(*r.year, "")) + parameterAddToQuery(localVarQueryParams, "year", r.year, "") } if r.type_ != nil { - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") } if r.paymentAccountId != nil { - localVarQueryParams.Add("payment_account_id", parameterToString(*r.paymentAccountId, "")) + parameterAddToQuery(localVarQueryParams, "payment_account_id", r.paymentAccountId, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -559,7 +559,7 @@ func (a *CashbookApiService) ModifyCashbookEntryExecute(r ApiModifyCashbookEntry localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyCashbookEntryResponse + localVarReturnValue *ModifyCashbookEntryResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CashbookApiService.ModifyCashbookEntry") @@ -568,8 +568,8 @@ func (a *CashbookApiService) ModifyCashbookEntryExecute(r ApiModifyCashbookEntry } localVarPath := localBasePath + "/c/{company_id}/cashbook/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_clients.go b/api/api_clients.go index 2e1f8aa..d7aa9ef 100644 --- a/api/api_clients.go +++ b/api/api_clients.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -66,7 +66,7 @@ func (a *ClientsApiService) CreateClientExecute(r ApiCreateClientRequest) (*Crea localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateClientResponse + localVarReturnValue *CreateClientResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClientsApiService.CreateClient") @@ -75,7 +75,7 @@ func (a *ClientsApiService) CreateClientExecute(r ApiCreateClientRequest) (*Crea } localVarPath := localBasePath + "/c/{company_id}/entities/clients" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -181,8 +181,8 @@ func (a *ClientsApiService) DeleteClientExecute(r ApiDeleteClientRequest) (*http } localVarPath := localBasePath + "/c/{company_id}/entities/clients/{client_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterToString(r.clientId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -284,7 +284,7 @@ func (a *ClientsApiService) GetClientExecute(r ApiGetClientRequest) (*GetClientR localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetClientResponse + localVarReturnValue *GetClientResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClientsApiService.GetClient") @@ -293,18 +293,18 @@ func (a *ClientsApiService) GetClientExecute(r ApiGetClientRequest) (*GetClientR } localVarPath := localBasePath + "/c/{company_id}/entities/clients/{client_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterToString(r.clientId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -436,7 +436,7 @@ func (a *ClientsApiService) ListClientsExecute(r ApiListClientsRequest) (*ListCl localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListClientsResponse + localVarReturnValue *ListClientsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClientsApiService.ListClients") @@ -445,29 +445,29 @@ func (a *ClientsApiService) ListClientsExecute(r ApiListClientsRequest) (*ListCl } localVarPath := localBasePath + "/c/{company_id}/entities/clients" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -567,7 +567,7 @@ func (a *ClientsApiService) ModifyClientExecute(r ApiModifyClientRequest) (*Modi localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyClientResponse + localVarReturnValue *ModifyClientResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ClientsApiService.ModifyClient") @@ -576,8 +576,8 @@ func (a *ClientsApiService) ModifyClientExecute(r ApiModifyClientRequest) (*Modi } localVarPath := localBasePath + "/c/{company_id}/entities/clients/{client_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterToString(r.clientId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_companies.go b/api/api_companies.go index 5e8e803..e7250ba 100644 --- a/api/api_companies.go +++ b/api/api_companies.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -59,7 +59,7 @@ func (a *CompaniesApiService) GetCompanyInfoExecute(r ApiGetCompanyInfoRequest) localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetCompanyInfoResponse + localVarReturnValue *GetCompanyInfoResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CompaniesApiService.GetCompanyInfo") @@ -68,7 +68,7 @@ func (a *CompaniesApiService) GetCompanyInfoExecute(r ApiGetCompanyInfoRequest) } localVarPath := localBasePath + "/c/{company_id}/company/info" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_emails.go b/api/api_emails.go index 5372e56..f23617a 100644 --- a/api/api_emails.go +++ b/api/api_emails.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -59,7 +59,7 @@ func (a *EmailsApiService) ListEmailsExecute(r ApiListEmailsRequest) (*ListEmail localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListEmailsResponse + localVarReturnValue *ListEmailsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EmailsApiService.ListEmails") @@ -68,7 +68,7 @@ func (a *EmailsApiService) ListEmailsExecute(r ApiListEmailsRequest) (*ListEmail } localVarPath := localBasePath + "/c/{company_id}/emails" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_info.go b/api/api_info.go index cb268c2..095ac07 100644 --- a/api/api_info.go +++ b/api/api_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -59,7 +59,7 @@ func (a *InfoApiService) ListArchiveCategoriesExecute(r ApiListArchiveCategories localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListArchiveCategoriesResponse + localVarReturnValue *ListArchiveCategoriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListArchiveCategories") @@ -68,7 +68,7 @@ func (a *InfoApiService) ListArchiveCategoriesExecute(r ApiListArchiveCategories } localVarPath := localBasePath + "/c/{company_id}/info/archive_categories" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -173,7 +173,7 @@ func (a *InfoApiService) ListCitiesExecute(r ApiListCitiesRequest) (*ListCitiesR localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListCitiesResponse + localVarReturnValue *ListCitiesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListCities") @@ -188,10 +188,10 @@ func (a *InfoApiService) ListCitiesExecute(r ApiListCitiesRequest) (*ListCitiesR localVarFormParams := url.Values{} if r.postalCode != nil { - localVarQueryParams.Add("postal_code", parameterToString(*r.postalCode, "")) + parameterAddToQuery(localVarQueryParams, "postal_code", r.postalCode, "") } if r.city != nil { - localVarQueryParams.Add("city", parameterToString(*r.city, "")) + parameterAddToQuery(localVarQueryParams, "city", r.city, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -281,7 +281,7 @@ func (a *InfoApiService) ListCostCentersExecute(r ApiListCostCentersRequest) (*L localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListCostCentersResponse + localVarReturnValue *ListCostCentersResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListCostCenters") @@ -290,7 +290,7 @@ func (a *InfoApiService) ListCostCentersExecute(r ApiListCostCentersRequest) (*L } localVarPath := localBasePath + "/c/{company_id}/info/cost_centers" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -381,7 +381,7 @@ func (a *InfoApiService) ListCountriesExecute(r ApiListCountriesRequest) (*ListC localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListCountriesResponse + localVarReturnValue *ListCountriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListCountries") @@ -480,7 +480,7 @@ func (a *InfoApiService) ListCurrenciesExecute(r ApiListCurrenciesRequest) (*Lis localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListCurrenciesResponse + localVarReturnValue *ListCurrenciesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListCurrencies") @@ -579,7 +579,7 @@ func (a *InfoApiService) ListDeliveryNotesDefaultCausalsExecute(r ApiListDeliver localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListDeliveryNotesDefaultCausalsResponse + localVarReturnValue *ListDeliveryNotesDefaultCausalsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListDeliveryNotesDefaultCausals") @@ -678,7 +678,7 @@ func (a *InfoApiService) ListDetailedCountriesExecute(r ApiListDetailedCountries localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListDetailedCountriesResponse + localVarReturnValue *ListDetailedCountriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListDetailedCountries") @@ -777,7 +777,7 @@ func (a *InfoApiService) ListLanguagesExecute(r ApiListLanguagesRequest) (*ListL localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListLanguagesResponse + localVarReturnValue *ListLanguagesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListLanguages") @@ -900,7 +900,7 @@ func (a *InfoApiService) ListPaymentAccountsExecute(r ApiListPaymentAccountsRequ localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListPaymentAccountsResponse + localVarReturnValue *ListPaymentAccountsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListPaymentAccounts") @@ -909,20 +909,20 @@ func (a *InfoApiService) ListPaymentAccountsExecute(r ApiListPaymentAccountsRequ } localVarPath := localBasePath + "/c/{company_id}/info/payment_accounts" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1033,7 +1033,7 @@ func (a *InfoApiService) ListPaymentMethodsExecute(r ApiListPaymentMethodsReques localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListPaymentMethodsResponse + localVarReturnValue *ListPaymentMethodsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListPaymentMethods") @@ -1042,20 +1042,20 @@ func (a *InfoApiService) ListPaymentMethodsExecute(r ApiListPaymentMethodsReques } localVarPath := localBasePath + "/c/{company_id}/info/payment_methods" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1151,7 +1151,7 @@ func (a *InfoApiService) ListProductCategoriesExecute(r ApiListProductCategories localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListProductCategoriesResponse + localVarReturnValue *ListProductCategoriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListProductCategories") @@ -1160,7 +1160,7 @@ func (a *InfoApiService) ListProductCategoriesExecute(r ApiListProductCategories } localVarPath := localBasePath + "/c/{company_id}/info/product_categories" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1169,7 +1169,7 @@ func (a *InfoApiService) ListProductCategoriesExecute(r ApiListProductCategories return localVarReturnValue, nil, reportError("context is required and must be specified") } - localVarQueryParams.Add("context", parameterToString(*r.context, "")) + parameterAddToQuery(localVarQueryParams, "context", r.context, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1258,7 +1258,7 @@ func (a *InfoApiService) ListReceivedDocumentCategoriesExecute(r ApiListReceived localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListReceivedDocumentCategoriesResponse + localVarReturnValue *ListReceivedDocumentCategoriesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListReceivedDocumentCategories") @@ -1267,7 +1267,7 @@ func (a *InfoApiService) ListReceivedDocumentCategoriesExecute(r ApiListReceived } localVarPath := localBasePath + "/c/{company_id}/info/received_document_categories" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1361,7 +1361,7 @@ func (a *InfoApiService) ListRevenueCentersExecute(r ApiListRevenueCentersReques localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListRevenueCentersResponse + localVarReturnValue *ListRevenueCentersResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListRevenueCenters") @@ -1370,7 +1370,7 @@ func (a *InfoApiService) ListRevenueCentersExecute(r ApiListRevenueCentersReques } localVarPath := localBasePath + "/c/{company_id}/info/revenue_centers" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1475,7 +1475,7 @@ func (a *InfoApiService) ListTemplatesExecute(r ApiListTemplatesRequest) (*ListT localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListTemplatesResponse + localVarReturnValue *ListTemplatesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListTemplates") @@ -1490,10 +1490,10 @@ func (a *InfoApiService) ListTemplatesExecute(r ApiListTemplatesRequest) (*ListT localVarFormParams := url.Values{} if r.type_ != nil { - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") } if r.byType != nil { - localVarQueryParams.Add("by_type", parameterToString(*r.byType, "")) + parameterAddToQuery(localVarQueryParams, "by_type", r.byType, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1580,7 +1580,7 @@ func (a *InfoApiService) ListUnitsOfMeasureExecute(r ApiListUnitsOfMeasureReques localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListUnitsOfMeasureResponse + localVarReturnValue *ListUnitsOfMeasureResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListUnitsOfMeasure") @@ -1689,7 +1689,7 @@ func (a *InfoApiService) ListVatTypesExecute(r ApiListVatTypesRequest) (*ListVat localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListVatTypesResponse + localVarReturnValue *ListVatTypesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InfoApiService.ListVatTypes") @@ -1698,14 +1698,14 @@ func (a *InfoApiService) ListVatTypesExecute(r ApiListVatTypesRequest) (*ListVat } localVarPath := localBasePath + "/c/{company_id}/info/vat_types" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api/api_issued_documents.go b/api/api_issued_documents.go index 26548ac..f574202 100644 --- a/api/api_issued_documents.go +++ b/api/api_issued_documents.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -67,7 +67,7 @@ func (a *IssuedDocumentsApiService) CreateIssuedDocumentExecute(r ApiCreateIssue localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateIssuedDocumentResponse + localVarReturnValue *CreateIssuedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.CreateIssuedDocument") @@ -76,7 +76,7 @@ func (a *IssuedDocumentsApiService) CreateIssuedDocumentExecute(r ApiCreateIssue } localVarPath := localBasePath + "/c/{company_id}/issued_documents" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -182,8 +182,8 @@ func (a *IssuedDocumentsApiService) DeleteIssuedDocumentExecute(r ApiDeleteIssue } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -278,8 +278,8 @@ func (a *IssuedDocumentsApiService) DeleteIssuedDocumentAttachmentExecute(r ApiD } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -367,7 +367,7 @@ func (a *IssuedDocumentsApiService) GetEmailDataExecute(r ApiGetEmailDataRequest localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetEmailDataResponse + localVarReturnValue *GetEmailDataResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.GetEmailData") @@ -376,8 +376,8 @@ func (a *IssuedDocumentsApiService) GetEmailDataExecute(r ApiGetEmailDataRequest } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/email" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -480,7 +480,7 @@ func (a *IssuedDocumentsApiService) GetExistingIssuedDocumentTotalsExecute(r Api localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetExistingIssuedDocumentTotalsResponse + localVarReturnValue *GetExistingIssuedDocumentTotalsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.GetExistingIssuedDocumentTotals") @@ -489,8 +489,8 @@ func (a *IssuedDocumentsApiService) GetExistingIssuedDocumentTotalsExecute(r Api } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/totals" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -604,7 +604,7 @@ func (a *IssuedDocumentsApiService) GetIssuedDocumentExecute(r ApiGetIssuedDocum localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetIssuedDocumentResponse + localVarReturnValue *GetIssuedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.GetIssuedDocument") @@ -613,18 +613,18 @@ func (a *IssuedDocumentsApiService) GetIssuedDocumentExecute(r ApiGetIssuedDocum } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -721,7 +721,7 @@ func (a *IssuedDocumentsApiService) GetIssuedDocumentPreCreateInfoExecute(r ApiG localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetIssuedDocumentPreCreateInfoResponse + localVarReturnValue *GetIssuedDocumentPreCreateInfoResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.GetIssuedDocumentPreCreateInfo") @@ -730,7 +730,7 @@ func (a *IssuedDocumentsApiService) GetIssuedDocumentPreCreateInfoExecute(r ApiG } localVarPath := localBasePath + "/c/{company_id}/issued_documents/info" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -739,7 +739,7 @@ func (a *IssuedDocumentsApiService) GetIssuedDocumentPreCreateInfoExecute(r ApiG return localVarReturnValue, nil, reportError("type_ is required and must be specified") } - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -834,7 +834,7 @@ func (a *IssuedDocumentsApiService) GetNewIssuedDocumentTotalsExecute(r ApiGetNe localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetNewIssuedDocumentTotalsResponse + localVarReturnValue *GetNewIssuedDocumentTotalsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.GetNewIssuedDocumentTotals") @@ -843,7 +843,7 @@ func (a *IssuedDocumentsApiService) GetNewIssuedDocumentTotalsExecute(r ApiGetNe } localVarPath := localBasePath + "/c/{company_id}/issued_documents/totals" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -960,7 +960,7 @@ func (a *IssuedDocumentsApiService) JoinIssuedDocumentsExecute(r ApiJoinIssuedDo localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *JoinIssuedDocumentsResponse + localVarReturnValue *JoinIssuedDocumentsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.JoinIssuedDocuments") @@ -969,7 +969,7 @@ func (a *IssuedDocumentsApiService) JoinIssuedDocumentsExecute(r ApiJoinIssuedDo } localVarPath := localBasePath + "/c/{company_id}/issued_documents/join" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -978,12 +978,12 @@ func (a *IssuedDocumentsApiService) JoinIssuedDocumentsExecute(r ApiJoinIssuedDo return localVarReturnValue, nil, reportError("ids is required and must be specified") } - localVarQueryParams.Add("ids", parameterToString(*r.ids, "")) + parameterAddToQuery(localVarQueryParams, "ids", r.ids, "") if r.group != nil { - localVarQueryParams.Add("group", parameterToString(*r.group, "")) + parameterAddToQuery(localVarQueryParams, "group", r.group, "") } if r.eInvoice != nil { - localVarQueryParams.Add("e_invoice", parameterToString(*r.eInvoice, "")) + parameterAddToQuery(localVarQueryParams, "e_invoice", r.eInvoice, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1050,6 +1050,7 @@ type ApiListIssuedDocumentsRequest struct { page *int32 perPage *int32 q *string + inclusive *int32 } // The type of the issued document. @@ -1094,6 +1095,12 @@ func (r ApiListIssuedDocumentsRequest) Q(q string) ApiListIssuedDocumentsRequest return r } +// (Only for type = delivery_notes) Include invoices delivery notes. +func (r ApiListIssuedDocumentsRequest) Inclusive(inclusive int32) ApiListIssuedDocumentsRequest { + r.inclusive = &inclusive + return r +} + func (r ApiListIssuedDocumentsRequest) Execute() (*ListIssuedDocumentsResponse, *http.Response, error) { return r.ApiService.ListIssuedDocumentsExecute(r) } @@ -1122,7 +1129,7 @@ func (a *IssuedDocumentsApiService) ListIssuedDocumentsExecute(r ApiListIssuedDo localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListIssuedDocumentsResponse + localVarReturnValue *ListIssuedDocumentsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.ListIssuedDocuments") @@ -1131,7 +1138,7 @@ func (a *IssuedDocumentsApiService) ListIssuedDocumentsExecute(r ApiListIssuedDo } localVarPath := localBasePath + "/c/{company_id}/issued_documents" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1140,24 +1147,27 @@ func (a *IssuedDocumentsApiService) ListIssuedDocumentsExecute(r ApiListIssuedDo return localVarReturnValue, nil, reportError("type_ is required and must be specified") } - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") + } + if r.inclusive != nil { + parameterAddToQuery(localVarQueryParams, "inclusive", r.inclusive, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1257,7 +1267,7 @@ func (a *IssuedDocumentsApiService) ModifyIssuedDocumentExecute(r ApiModifyIssue localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyIssuedDocumentResponse + localVarReturnValue *ModifyIssuedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.ModifyIssuedDocument") @@ -1266,8 +1276,8 @@ func (a *IssuedDocumentsApiService) ModifyIssuedDocumentExecute(r ApiModifyIssue } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1380,8 +1390,8 @@ func (a *IssuedDocumentsApiService) ScheduleEmailExecute(r ApiScheduleEmailReque } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/email" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1496,7 +1506,7 @@ func (a *IssuedDocumentsApiService) TransformIssuedDocumentExecute(r ApiTransfor localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *TransformIssuedDocumentResponse + localVarReturnValue *TransformIssuedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.TransformIssuedDocument") @@ -1505,7 +1515,7 @@ func (a *IssuedDocumentsApiService) TransformIssuedDocumentExecute(r ApiTransfor } localVarPath := localBasePath + "/c/{company_id}/issued_documents/transform" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1517,13 +1527,13 @@ func (a *IssuedDocumentsApiService) TransformIssuedDocumentExecute(r ApiTransfor return localVarReturnValue, nil, reportError("newType is required and must be specified") } - localVarQueryParams.Add("original_document_id", parameterToString(*r.originalDocumentId, "")) - localVarQueryParams.Add("new_type", parameterToString(*r.newType, "")) + parameterAddToQuery(localVarQueryParams, "original_document_id", r.originalDocumentId, "") + parameterAddToQuery(localVarQueryParams, "new_type", r.newType, "") if r.eInvoice != nil { - localVarQueryParams.Add("e_invoice", parameterToString(*r.eInvoice, "")) + parameterAddToQuery(localVarQueryParams, "e_invoice", r.eInvoice, "") } if r.transformKeepCopy != nil { - localVarQueryParams.Add("transform_keep_copy", parameterToString(*r.transformKeepCopy, "")) + parameterAddToQuery(localVarQueryParams, "transform_keep_copy", r.transformKeepCopy, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1584,7 +1594,7 @@ type ApiUploadIssuedDocumentAttachmentRequest struct { ApiService *IssuedDocumentsApiService companyId int32 filename *string - attachment **os.File + attachment *os.File } // Name of the file. @@ -1595,7 +1605,7 @@ func (r ApiUploadIssuedDocumentAttachmentRequest) Filename(filename string) ApiU // Valid format: .png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx func (r ApiUploadIssuedDocumentAttachmentRequest) Attachment(attachment *os.File) ApiUploadIssuedDocumentAttachmentRequest { - r.attachment = &attachment + r.attachment = attachment return r } @@ -1627,7 +1637,7 @@ func (a *IssuedDocumentsApiService) UploadIssuedDocumentAttachmentExecute(r ApiU localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UploadIssuedDocumentAttachmentResponse + localVarReturnValue *UploadIssuedDocumentAttachmentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedDocumentsApiService.UploadIssuedDocumentAttachment") @@ -1636,7 +1646,7 @@ func (a *IssuedDocumentsApiService) UploadIssuedDocumentAttachmentExecute(r ApiU } localVarPath := localBasePath + "/c/{company_id}/issued_documents/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1660,7 +1670,7 @@ func (a *IssuedDocumentsApiService) UploadIssuedDocumentAttachmentExecute(r ApiU localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.filename != nil { - localVarFormParams.Add("filename", parameterToString(*r.filename, "")) + parameterAddToQuery(localVarFormParams, "filename", r.filename, "") } var attachmentLocalVarFormFileName string var attachmentLocalVarFileName string @@ -1668,17 +1678,17 @@ func (a *IssuedDocumentsApiService) UploadIssuedDocumentAttachmentExecute(r ApiU attachmentLocalVarFormFileName = "attachment" - var attachmentLocalVarFile *os.File - if r.attachment != nil { - attachmentLocalVarFile = *r.attachment - } + + attachmentLocalVarFile := r.attachment + if attachmentLocalVarFile != nil { fbs, _ := ioutil.ReadAll(attachmentLocalVarFile) + attachmentLocalVarFileBytes = fbs attachmentLocalVarFileName = attachmentLocalVarFile.Name() attachmentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api/api_issued_e_invoices.go b/api/api_issued_e_invoices.go index 35f6ed9..f0384d4 100644 --- a/api/api_issued_e_invoices.go +++ b/api/api_issued_e_invoices.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -62,7 +62,7 @@ func (a *IssuedEInvoicesApiService) GetEInvoiceRejectionReasonExecute(r ApiGetEI localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetEInvoiceRejectionReasonResponse + localVarReturnValue *GetEInvoiceRejectionReasonResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedEInvoicesApiService.GetEInvoiceRejectionReason") @@ -71,8 +71,8 @@ func (a *IssuedEInvoicesApiService) GetEInvoiceRejectionReasonExecute(r ApiGetEI } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/e_invoice/error_reason" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -176,7 +176,7 @@ func (a *IssuedEInvoicesApiService) GetEInvoiceXmlExecute(r ApiGetEInvoiceXmlReq localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue string + localVarReturnValue string ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedEInvoicesApiService.GetEInvoiceXml") @@ -185,15 +185,15 @@ func (a *IssuedEInvoicesApiService) GetEInvoiceXmlExecute(r ApiGetEInvoiceXmlReq } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/e_invoice/xml" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.includeAttachment != nil { - localVarQueryParams.Add("include_attachment", parameterToString(*r.includeAttachment, "")) + parameterAddToQuery(localVarQueryParams, "include_attachment", r.includeAttachment, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -293,7 +293,7 @@ func (a *IssuedEInvoicesApiService) SendEInvoiceExecute(r ApiSendEInvoiceRequest localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *SendEInvoiceResponse + localVarReturnValue *SendEInvoiceResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedEInvoicesApiService.SendEInvoice") @@ -302,8 +302,8 @@ func (a *IssuedEInvoicesApiService) SendEInvoiceExecute(r ApiSendEInvoiceRequest } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/e_invoice/send" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -402,7 +402,7 @@ func (a *IssuedEInvoicesApiService) VerifyEInvoiceXmlExecute(r ApiVerifyEInvoice localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *VerifyEInvoiceXmlResponse + localVarReturnValue *VerifyEInvoiceXmlResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IssuedEInvoicesApiService.VerifyEInvoiceXml") @@ -411,8 +411,8 @@ func (a *IssuedEInvoicesApiService) VerifyEInvoiceXmlExecute(r ApiVerifyEInvoice } localVarPath := localBasePath + "/c/{company_id}/issued_documents/{document_id}/e_invoice/xml_verify" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_products.go b/api/api_products.go index 3f7a608..fd2309f 100644 --- a/api/api_products.go +++ b/api/api_products.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -66,7 +66,7 @@ func (a *ProductsApiService) CreateProductExecute(r ApiCreateProductRequest) (*C localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateProductResponse + localVarReturnValue *CreateProductResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.CreateProduct") @@ -75,7 +75,7 @@ func (a *ProductsApiService) CreateProductExecute(r ApiCreateProductRequest) (*C } localVarPath := localBasePath + "/c/{company_id}/products" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -181,8 +181,8 @@ func (a *ProductsApiService) DeleteProductExecute(r ApiDeleteProductRequest) (*h } localVarPath := localBasePath + "/c/{company_id}/products/{product_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"product_id"+"}", url.PathEscape(parameterToString(r.productId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"product_id"+"}", url.PathEscape(parameterValueToString(r.productId, "productId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -284,7 +284,7 @@ func (a *ProductsApiService) GetProductExecute(r ApiGetProductRequest) (*GetProd localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetProductResponse + localVarReturnValue *GetProductResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.GetProduct") @@ -293,18 +293,18 @@ func (a *ProductsApiService) GetProductExecute(r ApiGetProductRequest) (*GetProd } localVarPath := localBasePath + "/c/{company_id}/products/{product_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"product_id"+"}", url.PathEscape(parameterToString(r.productId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"product_id"+"}", url.PathEscape(parameterValueToString(r.productId, "productId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -436,7 +436,7 @@ func (a *ProductsApiService) ListProductsExecute(r ApiListProductsRequest) (*Lis localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListProductsResponse + localVarReturnValue *ListProductsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.ListProducts") @@ -445,29 +445,29 @@ func (a *ProductsApiService) ListProductsExecute(r ApiListProductsRequest) (*Lis } localVarPath := localBasePath + "/c/{company_id}/products" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -567,7 +567,7 @@ func (a *ProductsApiService) ModifyProductExecute(r ApiModifyProductRequest) (*M localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyProductResponse + localVarReturnValue *ModifyProductResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.ModifyProduct") @@ -576,8 +576,8 @@ func (a *ProductsApiService) ModifyProductExecute(r ApiModifyProductRequest) (*M } localVarPath := localBasePath + "/c/{company_id}/products/{product_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"product_id"+"}", url.PathEscape(parameterToString(r.productId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"product_id"+"}", url.PathEscape(parameterValueToString(r.productId, "productId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_receipts.go b/api/api_receipts.go index 28dced4..36ad91c 100644 --- a/api/api_receipts.go +++ b/api/api_receipts.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -66,7 +66,7 @@ func (a *ReceiptsApiService) CreateReceiptExecute(r ApiCreateReceiptRequest) (*C localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateReceiptResponse + localVarReturnValue *CreateReceiptResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceiptsApiService.CreateReceipt") @@ -75,7 +75,7 @@ func (a *ReceiptsApiService) CreateReceiptExecute(r ApiCreateReceiptRequest) (*C } localVarPath := localBasePath + "/c/{company_id}/receipts" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -181,8 +181,8 @@ func (a *ReceiptsApiService) DeleteReceiptExecute(r ApiDeleteReceiptRequest) (*h } localVarPath := localBasePath + "/c/{company_id}/receipts/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -284,7 +284,7 @@ func (a *ReceiptsApiService) GetReceiptExecute(r ApiGetReceiptRequest) (*GetRece localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetReceiptResponse + localVarReturnValue *GetReceiptResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceiptsApiService.GetReceipt") @@ -293,18 +293,18 @@ func (a *ReceiptsApiService) GetReceiptExecute(r ApiGetReceiptRequest) (*GetRece } localVarPath := localBasePath + "/c/{company_id}/receipts/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -394,7 +394,7 @@ func (a *ReceiptsApiService) GetReceiptPreCreateInfoExecute(r ApiGetReceiptPreCr localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetReceiptPreCreateInfoResponse + localVarReturnValue *GetReceiptPreCreateInfoResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceiptsApiService.GetReceiptPreCreateInfo") @@ -403,7 +403,7 @@ func (a *ReceiptsApiService) GetReceiptPreCreateInfoExecute(r ApiGetReceiptPreCr } localVarPath := localBasePath + "/c/{company_id}/receipts/info" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -511,7 +511,7 @@ func (a *ReceiptsApiService) GetReceiptsMonthlyTotalsExecute(r ApiGetReceiptsMon localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetReceiptsMonthlyTotalsResponse + localVarReturnValue *GetReceiptsMonthlyTotalsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceiptsApiService.GetReceiptsMonthlyTotals") @@ -520,7 +520,7 @@ func (a *ReceiptsApiService) GetReceiptsMonthlyTotalsExecute(r ApiGetReceiptsMon } localVarPath := localBasePath + "/c/{company_id}/receipts/monthly_totals" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -532,8 +532,8 @@ func (a *ReceiptsApiService) GetReceiptsMonthlyTotalsExecute(r ApiGetReceiptsMon return localVarReturnValue, nil, reportError("year is required and must be specified") } - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) - localVarQueryParams.Add("year", parameterToString(*r.year, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") + parameterAddToQuery(localVarQueryParams, "year", r.year, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -664,7 +664,7 @@ func (a *ReceiptsApiService) ListReceiptsExecute(r ApiListReceiptsRequest) (*Lis localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListReceiptsResponse + localVarReturnValue *ListReceiptsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceiptsApiService.ListReceipts") @@ -673,29 +673,29 @@ func (a *ReceiptsApiService) ListReceiptsExecute(r ApiListReceiptsRequest) (*Lis } localVarPath := localBasePath + "/c/{company_id}/receipts" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -795,7 +795,7 @@ func (a *ReceiptsApiService) ModifyReceiptExecute(r ApiModifyReceiptRequest) (*M localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyReceiptResponse + localVarReturnValue *ModifyReceiptResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceiptsApiService.ModifyReceipt") @@ -804,8 +804,8 @@ func (a *ReceiptsApiService) ModifyReceiptExecute(r ApiModifyReceiptRequest) (*M } localVarPath := localBasePath + "/c/{company_id}/receipts/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_received_documents.go b/api/api_received_documents.go index 15ff93a..ed107c4 100644 --- a/api/api_received_documents.go +++ b/api/api_received_documents.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -67,7 +67,7 @@ func (a *ReceivedDocumentsApiService) CreateReceivedDocumentExecute(r ApiCreateR localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateReceivedDocumentResponse + localVarReturnValue *CreateReceivedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.CreateReceivedDocument") @@ -76,7 +76,7 @@ func (a *ReceivedDocumentsApiService) CreateReceivedDocumentExecute(r ApiCreateR } localVarPath := localBasePath + "/c/{company_id}/received_documents" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -182,8 +182,8 @@ func (a *ReceivedDocumentsApiService) DeleteReceivedDocumentExecute(r ApiDeleteR } localVarPath := localBasePath + "/c/{company_id}/received_documents/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -278,8 +278,8 @@ func (a *ReceivedDocumentsApiService) DeleteReceivedDocumentAttachmentExecute(r } localVarPath := localBasePath + "/c/{company_id}/received_documents/{document_id}/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -374,7 +374,7 @@ func (a *ReceivedDocumentsApiService) GetExistingReceivedDocumentTotalsExecute(r localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetExistingReceivedDocumentTotalsResponse + localVarReturnValue *GetExistingReceivedDocumentTotalsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.GetExistingReceivedDocumentTotals") @@ -383,8 +383,8 @@ func (a *ReceivedDocumentsApiService) GetExistingReceivedDocumentTotalsExecute(r } localVarPath := localBasePath + "/c/{company_id}/received_documents/{document_id}/totals" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -487,7 +487,7 @@ func (a *ReceivedDocumentsApiService) GetNewReceivedDocumentTotalsExecute(r ApiG localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetNewReceivedDocumentTotalsResponse + localVarReturnValue *GetNewReceivedDocumentTotalsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.GetNewReceivedDocumentTotals") @@ -496,7 +496,7 @@ func (a *ReceivedDocumentsApiService) GetNewReceivedDocumentTotalsExecute(r ApiG } localVarPath := localBasePath + "/c/{company_id}/received_documents/totals" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -609,7 +609,7 @@ func (a *ReceivedDocumentsApiService) GetReceivedDocumentExecute(r ApiGetReceive localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetReceivedDocumentResponse + localVarReturnValue *GetReceivedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.GetReceivedDocument") @@ -618,18 +618,18 @@ func (a *ReceivedDocumentsApiService) GetReceivedDocumentExecute(r ApiGetReceive } localVarPath := localBasePath + "/c/{company_id}/received_documents/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -726,7 +726,7 @@ func (a *ReceivedDocumentsApiService) GetReceivedDocumentPreCreateInfoExecute(r localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetReceivedDocumentPreCreateInfoResponse + localVarReturnValue *GetReceivedDocumentPreCreateInfoResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.GetReceivedDocumentPreCreateInfo") @@ -735,7 +735,7 @@ func (a *ReceivedDocumentsApiService) GetReceivedDocumentPreCreateInfoExecute(r } localVarPath := localBasePath + "/c/{company_id}/received_documents/info" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -744,7 +744,7 @@ func (a *ReceivedDocumentsApiService) GetReceivedDocumentPreCreateInfoExecute(r return localVarReturnValue, nil, reportError("type_ is required and must be specified") } - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -882,7 +882,7 @@ func (a *ReceivedDocumentsApiService) ListReceivedDocumentsExecute(r ApiListRece localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListReceivedDocumentsResponse + localVarReturnValue *ListReceivedDocumentsResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.ListReceivedDocuments") @@ -891,7 +891,7 @@ func (a *ReceivedDocumentsApiService) ListReceivedDocumentsExecute(r ApiListRece } localVarPath := localBasePath + "/c/{company_id}/received_documents" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -900,24 +900,24 @@ func (a *ReceivedDocumentsApiService) ListReceivedDocumentsExecute(r ApiListRece return localVarReturnValue, nil, reportError("type_ is required and must be specified") } - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + parameterAddToQuery(localVarQueryParams, "type", r.type_, "") if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1017,7 +1017,7 @@ func (a *ReceivedDocumentsApiService) ModifyReceivedDocumentExecute(r ApiModifyR localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyReceivedDocumentResponse + localVarReturnValue *ModifyReceivedDocumentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.ModifyReceivedDocument") @@ -1026,8 +1026,8 @@ func (a *ReceivedDocumentsApiService) ModifyReceivedDocumentExecute(r ApiModifyR } localVarPath := localBasePath + "/c/{company_id}/received_documents/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1094,7 +1094,7 @@ type ApiUploadReceivedDocumentAttachmentRequest struct { ApiService *ReceivedDocumentsApiService companyId int32 filename *string - attachment **os.File + attachment *os.File } // Name of the file. @@ -1105,7 +1105,7 @@ func (r ApiUploadReceivedDocumentAttachmentRequest) Filename(filename string) Ap // Valid format: .png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx func (r ApiUploadReceivedDocumentAttachmentRequest) Attachment(attachment *os.File) ApiUploadReceivedDocumentAttachmentRequest { - r.attachment = &attachment + r.attachment = attachment return r } @@ -1137,7 +1137,7 @@ func (a *ReceivedDocumentsApiService) UploadReceivedDocumentAttachmentExecute(r localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UploadReceivedDocumentAttachmentResponse + localVarReturnValue *UploadReceivedDocumentAttachmentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReceivedDocumentsApiService.UploadReceivedDocumentAttachment") @@ -1146,7 +1146,7 @@ func (a *ReceivedDocumentsApiService) UploadReceivedDocumentAttachmentExecute(r } localVarPath := localBasePath + "/c/{company_id}/received_documents/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1170,7 +1170,7 @@ func (a *ReceivedDocumentsApiService) UploadReceivedDocumentAttachmentExecute(r localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.filename != nil { - localVarFormParams.Add("filename", parameterToString(*r.filename, "")) + parameterAddToQuery(localVarFormParams, "filename", r.filename, "") } var attachmentLocalVarFormFileName string var attachmentLocalVarFileName string @@ -1178,17 +1178,17 @@ func (a *ReceivedDocumentsApiService) UploadReceivedDocumentAttachmentExecute(r attachmentLocalVarFormFileName = "attachment" - var attachmentLocalVarFile *os.File - if r.attachment != nil { - attachmentLocalVarFile = *r.attachment - } + + attachmentLocalVarFile := r.attachment + if attachmentLocalVarFile != nil { fbs, _ := ioutil.ReadAll(attachmentLocalVarFile) + attachmentLocalVarFileBytes = fbs attachmentLocalVarFileName = attachmentLocalVarFile.Name() attachmentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api/api_settings.go b/api/api_settings.go index d7ab5e0..c28cce1 100644 --- a/api/api_settings.go +++ b/api/api_settings.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -65,7 +65,7 @@ func (a *SettingsApiService) CreatePaymentAccountExecute(r ApiCreatePaymentAccou localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreatePaymentAccountResponse + localVarReturnValue *CreatePaymentAccountResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.CreatePaymentAccount") @@ -74,7 +74,7 @@ func (a *SettingsApiService) CreatePaymentAccountExecute(r ApiCreatePaymentAccou } localVarPath := localBasePath + "/c/{company_id}/settings/payment_accounts" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -176,7 +176,7 @@ func (a *SettingsApiService) CreatePaymentMethodExecute(r ApiCreatePaymentMethod localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreatePaymentMethodResponse + localVarReturnValue *CreatePaymentMethodResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.CreatePaymentMethod") @@ -185,7 +185,7 @@ func (a *SettingsApiService) CreatePaymentMethodExecute(r ApiCreatePaymentMethod } localVarPath := localBasePath + "/c/{company_id}/settings/payment_methods" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -288,7 +288,7 @@ func (a *SettingsApiService) CreateVatTypeExecute(r ApiCreateVatTypeRequest) (*C localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateVatTypeResponse + localVarReturnValue *CreateVatTypeResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.CreateVatType") @@ -297,7 +297,7 @@ func (a *SettingsApiService) CreateVatTypeExecute(r ApiCreateVatTypeRequest) (*C } localVarPath := localBasePath + "/c/{company_id}/settings/vat_types" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -403,8 +403,8 @@ func (a *SettingsApiService) DeletePaymentAccountExecute(r ApiDeletePaymentAccou } localVarPath := localBasePath + "/c/{company_id}/settings/payment_accounts/{payment_account_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"payment_account_id"+"}", url.PathEscape(parameterToString(r.paymentAccountId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"payment_account_id"+"}", url.PathEscape(parameterValueToString(r.paymentAccountId, "paymentAccountId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -499,8 +499,8 @@ func (a *SettingsApiService) DeletePaymentMethodExecute(r ApiDeletePaymentMethod } localVarPath := localBasePath + "/c/{company_id}/settings/payment_methods/{payment_method_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"payment_method_id"+"}", url.PathEscape(parameterToString(r.paymentMethodId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"payment_method_id"+"}", url.PathEscape(parameterValueToString(r.paymentMethodId, "paymentMethodId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -595,8 +595,8 @@ func (a *SettingsApiService) DeleteVatTypeExecute(r ApiDeleteVatTypeRequest) (*h } localVarPath := localBasePath + "/c/{company_id}/settings/vat_types/{vat_type_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vat_type_id"+"}", url.PathEscape(parameterToString(r.vatTypeId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"vat_type_id"+"}", url.PathEscape(parameterValueToString(r.vatTypeId, "vatTypeId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -698,7 +698,7 @@ func (a *SettingsApiService) GetPaymentAccountExecute(r ApiGetPaymentAccountRequ localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetPaymentAccountResponse + localVarReturnValue *GetPaymentAccountResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.GetPaymentAccount") @@ -707,18 +707,18 @@ func (a *SettingsApiService) GetPaymentAccountExecute(r ApiGetPaymentAccountRequ } localVarPath := localBasePath + "/c/{company_id}/settings/payment_accounts/{payment_account_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"payment_account_id"+"}", url.PathEscape(parameterToString(r.paymentAccountId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"payment_account_id"+"}", url.PathEscape(parameterValueToString(r.paymentAccountId, "paymentAccountId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -825,7 +825,7 @@ func (a *SettingsApiService) GetPaymentMethodExecute(r ApiGetPaymentMethodReques localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetPaymentMethodResponse + localVarReturnValue *GetPaymentMethodResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.GetPaymentMethod") @@ -834,18 +834,18 @@ func (a *SettingsApiService) GetPaymentMethodExecute(r ApiGetPaymentMethodReques } localVarPath := localBasePath + "/c/{company_id}/settings/payment_methods/{payment_method_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"payment_method_id"+"}", url.PathEscape(parameterToString(r.paymentMethodId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"payment_method_id"+"}", url.PathEscape(parameterValueToString(r.paymentMethodId, "paymentMethodId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -938,7 +938,7 @@ func (a *SettingsApiService) GetVatTypeExecute(r ApiGetVatTypeRequest) (*GetVatT localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetVatTypeResponse + localVarReturnValue *GetVatTypeResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.GetVatType") @@ -947,8 +947,8 @@ func (a *SettingsApiService) GetVatTypeExecute(r ApiGetVatTypeRequest) (*GetVatT } localVarPath := localBasePath + "/c/{company_id}/settings/vat_types/{vat_type_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vat_type_id"+"}", url.PathEscape(parameterToString(r.vatTypeId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"vat_type_id"+"}", url.PathEscape(parameterValueToString(r.vatTypeId, "vatTypeId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1051,7 +1051,7 @@ func (a *SettingsApiService) ModifyPaymentAccountExecute(r ApiModifyPaymentAccou localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyPaymentAccountResponse + localVarReturnValue *ModifyPaymentAccountResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.ModifyPaymentAccount") @@ -1060,8 +1060,8 @@ func (a *SettingsApiService) ModifyPaymentAccountExecute(r ApiModifyPaymentAccou } localVarPath := localBasePath + "/c/{company_id}/settings/payment_accounts/{payment_account_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"payment_account_id"+"}", url.PathEscape(parameterToString(r.paymentAccountId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"payment_account_id"+"}", url.PathEscape(parameterValueToString(r.paymentAccountId, "paymentAccountId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1167,7 +1167,7 @@ func (a *SettingsApiService) ModifyPaymentMethodExecute(r ApiModifyPaymentMethod localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyPaymentMethodResponse + localVarReturnValue *ModifyPaymentMethodResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.ModifyPaymentMethod") @@ -1176,8 +1176,8 @@ func (a *SettingsApiService) ModifyPaymentMethodExecute(r ApiModifyPaymentMethod } localVarPath := localBasePath + "/c/{company_id}/settings/payment_methods/{payment_method_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"payment_method_id"+"}", url.PathEscape(parameterToString(r.paymentMethodId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"payment_method_id"+"}", url.PathEscape(parameterValueToString(r.paymentMethodId, "paymentMethodId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1282,7 +1282,7 @@ func (a *SettingsApiService) ModifyVatTypeExecute(r ApiModifyVatTypeRequest) (*M localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyVatTypeResponse + localVarReturnValue *ModifyVatTypeResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SettingsApiService.ModifyVatType") @@ -1291,8 +1291,8 @@ func (a *SettingsApiService) ModifyVatTypeExecute(r ApiModifyVatTypeRequest) (*M } localVarPath := localBasePath + "/c/{company_id}/settings/vat_types/{vat_type_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"vat_type_id"+"}", url.PathEscape(parameterToString(r.vatTypeId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"vat_type_id"+"}", url.PathEscape(parameterValueToString(r.vatTypeId, "vatTypeId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_suppliers.go b/api/api_suppliers.go index 7949f61..eb535aa 100644 --- a/api/api_suppliers.go +++ b/api/api_suppliers.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -66,7 +66,7 @@ func (a *SuppliersApiService) CreateSupplierExecute(r ApiCreateSupplierRequest) localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateSupplierResponse + localVarReturnValue *CreateSupplierResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuppliersApiService.CreateSupplier") @@ -75,7 +75,7 @@ func (a *SuppliersApiService) CreateSupplierExecute(r ApiCreateSupplierRequest) } localVarPath := localBasePath + "/c/{company_id}/entities/suppliers" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -181,8 +181,8 @@ func (a *SuppliersApiService) DeleteSupplierExecute(r ApiDeleteSupplierRequest) } localVarPath := localBasePath + "/c/{company_id}/entities/suppliers/{supplier_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"supplier_id"+"}", url.PathEscape(parameterToString(r.supplierId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"supplier_id"+"}", url.PathEscape(parameterValueToString(r.supplierId, "supplierId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -284,7 +284,7 @@ func (a *SuppliersApiService) GetSupplierExecute(r ApiGetSupplierRequest) (*GetS localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetSupplierResponse + localVarReturnValue *GetSupplierResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuppliersApiService.GetSupplier") @@ -293,18 +293,18 @@ func (a *SuppliersApiService) GetSupplierExecute(r ApiGetSupplierRequest) (*GetS } localVarPath := localBasePath + "/c/{company_id}/entities/suppliers/{supplier_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"supplier_id"+"}", url.PathEscape(parameterToString(r.supplierId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"supplier_id"+"}", url.PathEscape(parameterValueToString(r.supplierId, "supplierId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -436,7 +436,7 @@ func (a *SuppliersApiService) ListSuppliersExecute(r ApiListSuppliersRequest) (* localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListSuppliersResponse + localVarReturnValue *ListSuppliersResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuppliersApiService.ListSuppliers") @@ -445,29 +445,29 @@ func (a *SuppliersApiService) ListSuppliersExecute(r ApiListSuppliersRequest) (* } localVarPath := localBasePath + "/c/{company_id}/entities/suppliers" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -567,7 +567,7 @@ func (a *SuppliersApiService) ModifySupplierExecute(r ApiModifySupplierRequest) localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifySupplierResponse + localVarReturnValue *ModifySupplierResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuppliersApiService.ModifySupplier") @@ -576,8 +576,8 @@ func (a *SuppliersApiService) ModifySupplierExecute(r ApiModifySupplierRequest) } localVarPath := localBasePath + "/c/{company_id}/entities/suppliers/{supplier_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"supplier_id"+"}", url.PathEscape(parameterToString(r.supplierId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"supplier_id"+"}", url.PathEscape(parameterValueToString(r.supplierId, "supplierId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api/api_taxes.go b/api/api_taxes.go index d8e8f26..d127451 100644 --- a/api/api_taxes.go +++ b/api/api_taxes.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -67,7 +67,7 @@ func (a *TaxesApiService) CreateF24Execute(r ApiCreateF24Request) (*CreateF24Res localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateF24Response + localVarReturnValue *CreateF24Response ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.CreateF24") @@ -76,7 +76,7 @@ func (a *TaxesApiService) CreateF24Execute(r ApiCreateF24Request) (*CreateF24Res } localVarPath := localBasePath + "/c/{company_id}/taxes" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -182,8 +182,8 @@ func (a *TaxesApiService) DeleteF24Execute(r ApiDeleteF24Request) (*http.Respons } localVarPath := localBasePath + "/c/{company_id}/taxes/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -278,8 +278,8 @@ func (a *TaxesApiService) DeleteF24AttachmentExecute(r ApiDeleteF24AttachmentReq } localVarPath := localBasePath + "/c/{company_id}/taxes/{document_id}/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -381,7 +381,7 @@ func (a *TaxesApiService) GetF24Execute(r ApiGetF24Request) (*GetF24Response, *h localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetF24Response + localVarReturnValue *GetF24Response ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.GetF24") @@ -390,18 +390,18 @@ func (a *TaxesApiService) GetF24Execute(r ApiGetF24Request) (*GetF24Response, *h } localVarPath := localBasePath + "/c/{company_id}/taxes/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -533,7 +533,7 @@ func (a *TaxesApiService) ListF24Execute(r ApiListF24Request) (*ListF24Response, localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListF24Response + localVarReturnValue *ListF24Response ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.ListF24") @@ -542,29 +542,29 @@ func (a *TaxesApiService) ListF24Execute(r ApiListF24Request) (*ListF24Response, } localVarPath := localBasePath + "/c/{company_id}/taxes" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") } if r.fieldset != nil { - localVarQueryParams.Add("fieldset", parameterToString(*r.fieldset, "")) + parameterAddToQuery(localVarQueryParams, "fieldset", r.fieldset, "") } if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + parameterAddToQuery(localVarQueryParams, "sort", r.sort, "") } if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) + parameterAddToQuery(localVarQueryParams, "page", r.page, "") } if r.perPage != nil { - localVarQueryParams.Add("per_page", parameterToString(*r.perPage, "")) + parameterAddToQuery(localVarQueryParams, "per_page", r.perPage, "") } if r.q != nil { - localVarQueryParams.Add("q", parameterToString(*r.q, "")) + parameterAddToQuery(localVarQueryParams, "q", r.q, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -664,7 +664,7 @@ func (a *TaxesApiService) ModifyF24Execute(r ApiModifyF24Request) (*ModifyF24Res localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ModifyF24Response + localVarReturnValue *ModifyF24Response ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.ModifyF24") @@ -673,8 +673,8 @@ func (a *TaxesApiService) ModifyF24Execute(r ApiModifyF24Request) (*ModifyF24Res } localVarPath := localBasePath + "/c/{company_id}/taxes/{document_id}" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterToString(r.documentId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -741,7 +741,7 @@ type ApiUploadF24AttachmentRequest struct { ApiService *TaxesApiService companyId int32 filename *string - attachment **os.File + attachment *os.File } // Name of the file. @@ -752,7 +752,7 @@ func (r ApiUploadF24AttachmentRequest) Filename(filename string) ApiUploadF24Att // Valid format: .png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx func (r ApiUploadF24AttachmentRequest) Attachment(attachment *os.File) ApiUploadF24AttachmentRequest { - r.attachment = &attachment + r.attachment = attachment return r } @@ -784,7 +784,7 @@ func (a *TaxesApiService) UploadF24AttachmentExecute(r ApiUploadF24AttachmentReq localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *UploadF24AttachmentResponse + localVarReturnValue *UploadF24AttachmentResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.UploadF24Attachment") @@ -793,7 +793,7 @@ func (a *TaxesApiService) UploadF24AttachmentExecute(r ApiUploadF24AttachmentReq } localVarPath := localBasePath + "/c/{company_id}/taxes/attachment" - localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterToString(r.companyId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"company_id"+"}", url.PathEscape(parameterValueToString(r.companyId, "companyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -817,7 +817,7 @@ func (a *TaxesApiService) UploadF24AttachmentExecute(r ApiUploadF24AttachmentReq localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.filename != nil { - localVarFormParams.Add("filename", parameterToString(*r.filename, "")) + parameterAddToQuery(localVarFormParams, "filename", r.filename, "") } var attachmentLocalVarFormFileName string var attachmentLocalVarFileName string @@ -825,17 +825,17 @@ func (a *TaxesApiService) UploadF24AttachmentExecute(r ApiUploadF24AttachmentReq attachmentLocalVarFormFileName = "attachment" - var attachmentLocalVarFile *os.File - if r.attachment != nil { - attachmentLocalVarFile = *r.attachment - } + + attachmentLocalVarFile := r.attachment + if attachmentLocalVarFile != nil { fbs, _ := ioutil.ReadAll(attachmentLocalVarFile) + attachmentLocalVarFileBytes = fbs attachmentLocalVarFileName = attachmentLocalVarFile.Name() attachmentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) } - formFiles = append(formFiles, formFile{fileBytes: attachmentLocalVarFileBytes, fileName: attachmentLocalVarFileName, formFileName: attachmentLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/api/api_user.go b/api/api_user.go index 5e02a8f..43bb19f 100644 --- a/api/api_user.go +++ b/api/api_user.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -55,7 +55,7 @@ func (a *UserApiService) GetUserInfoExecute(r ApiGetUserInfoRequest) (*GetUserIn localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *GetUserInfoResponse + localVarReturnValue *GetUserInfoResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserInfo") @@ -154,7 +154,7 @@ func (a *UserApiService) ListUserCompaniesExecute(r ApiListUserCompaniesRequest) localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListUserCompaniesResponse + localVarReturnValue *ListUserCompaniesResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.ListUserCompanies") diff --git a/api/client.go b/api/client.go index eb0370e..c1de19b 100644 --- a/api/client.go +++ b/api/client.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -33,16 +33,18 @@ import ( "strings" "time" "unicode/utf8" - + . "github.com/fattureincloud/fattureincloud-go-sdk/v2/model" "golang.org/x/oauth2" ) var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) -// APIClient manages communication with the Fatture in Cloud API v2 - API Reference API v2.0.24 +// APIClient manages communication with the Fatture in Cloud API v2 - API Reference API v2.0.26 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -168,28 +170,105 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string - - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToQuery adds the provided object to the url query supporting deep object syntax +func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } else if t, ok := obj.(time.Time); ok { - return t.Format(time.RFC3339) + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i ListIssuedDocumentsResponse ListIssuedDocuments(ctx, companyId).Type_(type_).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Execute() +> ListIssuedDocumentsResponse ListIssuedDocuments(ctx, companyId).Type_(type_).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Inclusive(inclusive).Execute() List Issued Documents @@ -738,11 +738,12 @@ func main() { page := int32(56) // int32 | The page to retrieve. (optional) (default to 1) perPage := int32(56) // int32 | The size of the page. (optional) (default to 5) q := "q_example" // string | Query for filtering the results. (optional) + inclusive := int32(56) // int32 | (Only for type = delivery_notes) Include invoices delivery notes. (optional) auth := context.WithValue(context.Background(), fattureincloudapi.ContextAccessToken, "ACCESS_TOKEN") configuration := fattureincloudapi.NewConfiguration() apiClient := fattureincloudapi.NewAPIClient(configuration) - resp, r, err := apiClient.IssuedDocumentsApi.ListIssuedDocuments(auth, companyId).Type_(type_).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Execute() + resp, r, err := apiClient.IssuedDocumentsApi.ListIssuedDocuments(auth, companyId).Type_(type_).Fields(fields).Fieldset(fieldset).Sort(sort).Page(page).PerPage(perPage).Q(q).Inclusive(inclusive).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `IssuedDocumentsApi.ListIssuedDocuments``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -775,6 +776,7 @@ Name | Type | Description | Notes **page** | **int32** | The page to retrieve. | [default to 1] **perPage** | **int32** | The size of the page. | [default to 5] **q** | **string** | Query for filtering the results. | + **inclusive** | **int32** | (Only for type = delivery_notes) Include invoices delivery notes. | ### Return type diff --git a/docs/ReceivedDocument.md b/docs/ReceivedDocument.md index 0a67204..073a529 100644 --- a/docs/ReceivedDocument.md +++ b/docs/ReceivedDocument.md @@ -29,6 +29,7 @@ Name | Type | Description | Notes **PaymentsList** | Pointer to [**[]ReceivedDocumentPaymentsListItem**](ReceivedDocumentPaymentsListItem.md) | | [optional] **AttachmentUrl** | Pointer to **NullableString** | [Temporary] [Read Only] Public url of the attached file. Authomatically set if a valid attachment token is passed via POST /received_documents or PUT /received_documents/{documentId}. | [optional] [readonly] **AttachmentPreviewUrl** | Pointer to **NullableString** | [Temporary] [Read Only] Attachment preview url. | [optional] [readonly] +**AutoCalculate** | Pointer to **NullableBool** | If set to false total items amount and total payments amount can be different. | [optional] **AttachmentToken** | Pointer to **NullableString** | Uploaded attachement token. | [optional] **CreatedAt** | Pointer to **NullableString** | | [optional] **UpdatedAt** | Pointer to **NullableString** | | [optional] @@ -907,6 +908,41 @@ HasAttachmentPreviewUrl returns a boolean if a field has been set. `func (o *ReceivedDocument) UnsetAttachmentPreviewUrl()` UnsetAttachmentPreviewUrl ensures that no value is present for AttachmentPreviewUrl, not even an explicit nil +### GetAutoCalculate + +`func (o *ReceivedDocument) GetAutoCalculate() bool` + +GetAutoCalculate returns the AutoCalculate field if non-nil, zero value otherwise. + +### GetAutoCalculateOk + +`func (o *ReceivedDocument) GetAutoCalculateOk() (*bool, bool)` + +GetAutoCalculateOk returns a tuple with the AutoCalculate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAutoCalculate + +`func (o *ReceivedDocument) SetAutoCalculate(v bool)` + +SetAutoCalculate sets AutoCalculate field to given value. + +### HasAutoCalculate + +`func (o *ReceivedDocument) HasAutoCalculate() bool` + +HasAutoCalculate returns a boolean if a field has been set. + +### SetAutoCalculateNil + +`func (o *ReceivedDocument) SetAutoCalculateNil(b bool)` + + SetAutoCalculateNil sets the value for AutoCalculate to be an explicit nil + +### UnsetAutoCalculate +`func (o *ReceivedDocument) UnsetAutoCalculate()` + +UnsetAutoCalculate ensures that no value is present for AutoCalculate, not even an explicit nil ### GetAttachmentToken `func (o *ReceivedDocument) GetAttachmentToken() string` diff --git a/docs/SendEInvoiceRequest.md b/docs/SendEInvoiceRequest.md index 5090c40..c2ee201 100644 --- a/docs/SendEInvoiceRequest.md +++ b/docs/SendEInvoiceRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Data** | Pointer to [**NullableSendEInvoiceRequestData**](SendEInvoiceRequestData.md) | | [optional] +**Options** | Pointer to [**NullableSendEInvoiceRequestOptions**](SendEInvoiceRequestOptions.md) | | [optional] ## Methods @@ -60,6 +61,41 @@ HasData returns a boolean if a field has been set. `func (o *SendEInvoiceRequest) UnsetData()` UnsetData ensures that no value is present for Data, not even an explicit nil +### GetOptions + +`func (o *SendEInvoiceRequest) GetOptions() SendEInvoiceRequestOptions` + +GetOptions returns the Options field if non-nil, zero value otherwise. + +### GetOptionsOk + +`func (o *SendEInvoiceRequest) GetOptionsOk() (*SendEInvoiceRequestOptions, bool)` + +GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOptions + +`func (o *SendEInvoiceRequest) SetOptions(v SendEInvoiceRequestOptions)` + +SetOptions sets Options field to given value. + +### HasOptions + +`func (o *SendEInvoiceRequest) HasOptions() bool` + +HasOptions returns a boolean if a field has been set. + +### SetOptionsNil + +`func (o *SendEInvoiceRequest) SetOptionsNil(b bool)` + + SetOptionsNil sets the value for Options to be an explicit nil + +### UnsetOptions +`func (o *SendEInvoiceRequest) UnsetOptions()` + +UnsetOptions ensures that no value is present for Options, not even an explicit nil [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SendEInvoiceRequestOptions.md b/docs/SendEInvoiceRequestOptions.md new file mode 100644 index 0000000..c2b518d --- /dev/null +++ b/docs/SendEInvoiceRequestOptions.md @@ -0,0 +1,66 @@ +# SendEInvoiceRequestOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DryRun** | Pointer to **NullableBool** | If set to true the e-invoice will not be sent to the SDI. | [optional] + +## Methods + +### NewSendEInvoiceRequestOptions + +`func NewSendEInvoiceRequestOptions() *SendEInvoiceRequestOptions` + +NewSendEInvoiceRequestOptions instantiates a new SendEInvoiceRequestOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSendEInvoiceRequestOptionsWithDefaults + +`func NewSendEInvoiceRequestOptionsWithDefaults() *SendEInvoiceRequestOptions` + +NewSendEInvoiceRequestOptionsWithDefaults instantiates a new SendEInvoiceRequestOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDryRun + +`func (o *SendEInvoiceRequestOptions) GetDryRun() bool` + +GetDryRun returns the DryRun field if non-nil, zero value otherwise. + +### GetDryRunOk + +`func (o *SendEInvoiceRequestOptions) GetDryRunOk() (*bool, bool)` + +GetDryRunOk returns a tuple with the DryRun field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDryRun + +`func (o *SendEInvoiceRequestOptions) SetDryRun(v bool)` + +SetDryRun sets DryRun field to given value. + +### HasDryRun + +`func (o *SendEInvoiceRequestOptions) HasDryRun() bool` + +HasDryRun returns a boolean if a field has been set. + +### SetDryRunNil + +`func (o *SendEInvoiceRequestOptions) SetDryRunNil(b bool)` + + SetDryRunNil sets the value for DryRun to be an explicit nil + +### UnsetDryRun +`func (o *SendEInvoiceRequestOptions) UnsetDryRun()` + +UnsetDryRun ensures that no value is present for DryRun, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/model/model_archive_document.go b/model/model_archive_document.go index 6d95fd9..d3f9b48 100644 --- a/model/model_archive_document.go +++ b/model/model_archive_document.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ArchiveDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArchiveDocument{} + // ArchiveDocument struct for ArchiveDocument type ArchiveDocument struct { // Archive document unique identifier. @@ -313,6 +316,14 @@ func (o *ArchiveDocument) UnsetAttachmentToken() { } func (o ArchiveDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArchiveDocument) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -332,7 +343,7 @@ func (o ArchiveDocument) MarshalJSON() ([]byte, error) { if o.AttachmentToken.IsSet() { toSerialize["attachment_token"] = o.AttachmentToken.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableArchiveDocument struct { diff --git a/model/model_attachment_data.go b/model/model_attachment_data.go index a76414f..8321e3c 100644 --- a/model/model_attachment_data.go +++ b/model/model_attachment_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the AttachmentData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AttachmentData{} + // AttachmentData struct for AttachmentData type AttachmentData struct { // Uploaded attachment token. @@ -83,11 +86,19 @@ func (o *AttachmentData) UnsetAttachmentToken() { } func (o AttachmentData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AttachmentData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.AttachmentToken.IsSet() { toSerialize["attachment_token"] = o.AttachmentToken.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAttachmentData struct { diff --git a/model/model_cashbook_entry.go b/model/model_cashbook_entry.go index 93cddca..05a9618 100644 --- a/model/model_cashbook_entry.go +++ b/model/model_cashbook_entry.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CashbookEntry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CashbookEntry{} + // CashbookEntry struct for CashbookEntry type CashbookEntry struct { // Cashbook unique identifier. @@ -527,6 +530,14 @@ func (o *CashbookEntry) UnsetPaymentAccountOut() { } func (o CashbookEntry) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CashbookEntry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -561,7 +572,7 @@ func (o CashbookEntry) MarshalJSON() ([]byte, error) { if o.PaymentAccountOut.IsSet() { toSerialize["payment_account_out"] = o.PaymentAccountOut.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCashbookEntry struct { diff --git a/model/model_cashbook_entry_document.go b/model/model_cashbook_entry_document.go index fb6415a..0d74694 100644 --- a/model/model_cashbook_entry_document.go +++ b/model/model_cashbook_entry_document.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CashbookEntryDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CashbookEntryDocument{} + // CashbookEntryDocument struct for CashbookEntryDocument type CashbookEntryDocument struct { // Document unique identifier. @@ -175,6 +178,14 @@ func (o *CashbookEntryDocument) UnsetPath() { } func (o CashbookEntryDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CashbookEntryDocument) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -185,7 +196,7 @@ func (o CashbookEntryDocument) MarshalJSON() ([]byte, error) { if o.Path.IsSet() { toSerialize["path"] = o.Path.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCashbookEntryDocument struct { diff --git a/model/model_cashbook_entry_kind.go b/model/model_cashbook_entry_kind.go index 5d46587..c4c1940 100644 --- a/model/model_cashbook_entry_kind.go +++ b/model/model_cashbook_entry_kind.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_cashbook_entry_type.go b/model/model_cashbook_entry_type.go index 9b673ad..38f55e0 100644 --- a/model/model_cashbook_entry_type.go +++ b/model/model_cashbook_entry_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_city.go b/model/model_city.go index d8999eb..8028138 100644 --- a/model/model_city.go +++ b/model/model_city.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the City type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &City{} + // City struct for City type City struct { // City postal code. @@ -175,6 +178,14 @@ func (o *City) UnsetProvince() { } func (o City) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o City) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.PostalCode.IsSet() { toSerialize["postal_code"] = o.PostalCode.Get() @@ -185,7 +196,7 @@ func (o City) MarshalJSON() ([]byte, error) { if o.Province.IsSet() { toSerialize["province"] = o.Province.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCity struct { diff --git a/model/model_client.go b/model/model_client.go index 32c5b78..656dfc7 100644 --- a/model/model_client.go +++ b/model/model_client.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Client type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Client{} + // Client type Client struct { // Unique identifier @@ -1711,6 +1714,14 @@ func (o *Client) UnsetUpdatedAt() { } func (o Client) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Client) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -1823,7 +1834,7 @@ func (o Client) MarshalJSON() ([]byte, error) { if o.UpdatedAt.IsSet() { toSerialize["updated_at"] = o.UpdatedAt.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableClient struct { diff --git a/model/model_client_type.go b/model/model_client_type.go index 491a58e..b26e78b 100644 --- a/model/model_client_type.go +++ b/model/model_client_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_company.go b/model/model_company.go index 5a840c1..53419f7 100644 --- a/model/model_company.go +++ b/model/model_company.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Company type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Company{} + // Company type Company struct { // Company unique identifier. @@ -337,6 +340,14 @@ func (o *Company) UnsetTaxCode() { } func (o Company) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Company) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -359,7 +370,7 @@ func (o Company) MarshalJSON() ([]byte, error) { if o.TaxCode.IsSet() { toSerialize["tax_code"] = o.TaxCode.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompany struct { diff --git a/model/model_company_info.go b/model/model_company_info.go index 01bccf5..284e1d8 100644 --- a/model/model_company_info.go +++ b/model/model_company_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CompanyInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInfo{} + // CompanyInfo type CompanyInfo struct { // Company unique identifier. @@ -391,6 +394,14 @@ func (o *CompanyInfo) UnsetIsAccountant() { } func (o CompanyInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -416,7 +427,7 @@ func (o CompanyInfo) MarshalJSON() ([]byte, error) { if o.IsAccountant.IsSet() { toSerialize["is_accountant"] = o.IsAccountant.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompanyInfo struct { diff --git a/model/model_company_info_access_info.go b/model/model_company_info_access_info.go index 65c44d0..fe2eeef 100644 --- a/model/model_company_info_access_info.go +++ b/model/model_company_info_access_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CompanyInfoAccessInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInfoAccessInfo{} + // CompanyInfoAccessInfo struct for CompanyInfoAccessInfo type CompanyInfoAccessInfo struct { Role *UserCompanyRole `json:"role,omitempty"` @@ -150,6 +153,14 @@ func (o *CompanyInfoAccessInfo) UnsetThroughAccountant() { } func (o CompanyInfoAccessInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInfoAccessInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Role) { toSerialize["role"] = o.Role @@ -160,7 +171,7 @@ func (o CompanyInfoAccessInfo) MarshalJSON() ([]byte, error) { if o.ThroughAccountant.IsSet() { toSerialize["through_accountant"] = o.ThroughAccountant.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompanyInfoAccessInfo struct { diff --git a/model/model_company_info_plan_info.go b/model/model_company_info_plan_info.go index 4489101..826ad79 100644 --- a/model/model_company_info_plan_info.go +++ b/model/model_company_info_plan_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CompanyInfoPlanInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInfoPlanInfo{} + // CompanyInfoPlanInfo struct for CompanyInfoPlanInfo type CompanyInfoPlanInfo struct { Limits NullableCompanyInfoPlanInfoLimits `json:"limits,omitempty"` @@ -172,6 +175,14 @@ func (o *CompanyInfoPlanInfo) UnsetFunctionsStatus() { } func (o CompanyInfoPlanInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInfoPlanInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Limits.IsSet() { toSerialize["limits"] = o.Limits.Get() @@ -182,7 +193,7 @@ func (o CompanyInfoPlanInfo) MarshalJSON() ([]byte, error) { if o.FunctionsStatus.IsSet() { toSerialize["functions_status"] = o.FunctionsStatus.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompanyInfoPlanInfo struct { diff --git a/model/model_company_info_plan_info_functions.go b/model/model_company_info_plan_info_functions.go index 2720da0..357e1ff 100644 --- a/model/model_company_info_plan_info_functions.go +++ b/model/model_company_info_plan_info_functions.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CompanyInfoPlanInfoFunctions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInfoPlanInfoFunctions{} + // CompanyInfoPlanInfoFunctions Access to functions for this company. type CompanyInfoPlanInfoFunctions struct { Archive NullableBool `json:"archive,omitempty"` @@ -847,6 +850,14 @@ func (o *CompanyInfoPlanInfoFunctions) UnsetTsPay() { } func (o CompanyInfoPlanInfoFunctions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInfoPlanInfoFunctions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Archive.IsSet() { toSerialize["archive"] = o.Archive.Get() @@ -902,7 +913,7 @@ func (o CompanyInfoPlanInfoFunctions) MarshalJSON() ([]byte, error) { if o.TsPay.IsSet() { toSerialize["ts_pay"] = o.TsPay.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompanyInfoPlanInfoFunctions struct { diff --git a/model/model_company_info_plan_info_functions_status.go b/model/model_company_info_plan_info_functions_status.go index 540b23f..971d2d6 100644 --- a/model/model_company_info_plan_info_functions_status.go +++ b/model/model_company_info_plan_info_functions_status.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CompanyInfoPlanInfoFunctionsStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInfoPlanInfoFunctionsStatus{} + // CompanyInfoPlanInfoFunctionsStatus struct for CompanyInfoPlanInfoFunctionsStatus type CompanyInfoPlanInfoFunctionsStatus struct { TsDigital *FunctionStatus `json:"ts_digital,omitempty"` @@ -105,6 +108,14 @@ func (o *CompanyInfoPlanInfoFunctionsStatus) SetTsPay(v FunctionStatus) *Company } func (o CompanyInfoPlanInfoFunctionsStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInfoPlanInfoFunctionsStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.TsDigital) { toSerialize["ts_digital"] = o.TsDigital @@ -112,7 +123,7 @@ func (o CompanyInfoPlanInfoFunctionsStatus) MarshalJSON() ([]byte, error) { if !isNil(o.TsPay) { toSerialize["ts_pay"] = o.TsPay } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompanyInfoPlanInfoFunctionsStatus struct { diff --git a/model/model_company_info_plan_info_limits.go b/model/model_company_info_plan_info_limits.go index 745d328..8ec0ba4 100644 --- a/model/model_company_info_plan_info_limits.go +++ b/model/model_company_info_plan_info_limits.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CompanyInfoPlanInfoLimits type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CompanyInfoPlanInfoLimits{} + // CompanyInfoPlanInfoLimits Limits for this company. type CompanyInfoPlanInfoLimits struct { Clients NullableInt32 `json:"clients,omitempty"` @@ -217,6 +220,14 @@ func (o *CompanyInfoPlanInfoLimits) UnsetDocuments() { } func (o CompanyInfoPlanInfoLimits) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CompanyInfoPlanInfoLimits) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Clients.IsSet() { toSerialize["clients"] = o.Clients.Get() @@ -230,7 +241,7 @@ func (o CompanyInfoPlanInfoLimits) MarshalJSON() ([]byte, error) { if o.Documents.IsSet() { toSerialize["documents"] = o.Documents.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCompanyInfoPlanInfoLimits struct { diff --git a/model/model_company_type.go b/model/model_company_type.go index d65e528..9280ab4 100644 --- a/model/model_company_type.go +++ b/model/model_company_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_controlled_company.go b/model/model_controlled_company.go index fdf08b6..59019cd 100644 --- a/model/model_controlled_company.go +++ b/model/model_controlled_company.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ControlledCompany type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ControlledCompany{} + // ControlledCompany type ControlledCompany struct { // Company unique identifier. @@ -301,6 +304,14 @@ func (o *ControlledCompany) UnsetTaxCode() { } func (o ControlledCompany) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ControlledCompany) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -320,7 +331,7 @@ func (o ControlledCompany) MarshalJSON() ([]byte, error) { if o.TaxCode.IsSet() { toSerialize["tax_code"] = o.TaxCode.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableControlledCompany struct { diff --git a/model/model_create_archive_document_request.go b/model/model_create_archive_document_request.go index 9bb0f3f..b1e92ca 100644 --- a/model/model_create_archive_document_request.go +++ b/model/model_create_archive_document_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateArchiveDocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateArchiveDocumentRequest{} + // CreateArchiveDocumentRequest type CreateArchiveDocumentRequest struct { Data *ArchiveDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateArchiveDocumentRequest) SetData(v ArchiveDocument) *CreateArchive } func (o CreateArchiveDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateArchiveDocumentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateArchiveDocumentRequest struct { diff --git a/model/model_create_archive_document_response.go b/model/model_create_archive_document_response.go index 56993b8..5e8974b 100644 --- a/model/model_create_archive_document_response.go +++ b/model/model_create_archive_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateArchiveDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateArchiveDocumentResponse{} + // CreateArchiveDocumentResponse type CreateArchiveDocumentResponse struct { Data *ArchiveDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateArchiveDocumentResponse) SetData(v ArchiveDocument) *CreateArchiv } func (o CreateArchiveDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateArchiveDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateArchiveDocumentResponse struct { diff --git a/model/model_create_cashbook_entry_request.go b/model/model_create_cashbook_entry_request.go index 26de8e0..9c60865 100644 --- a/model/model_create_cashbook_entry_request.go +++ b/model/model_create_cashbook_entry_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateCashbookEntryRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCashbookEntryRequest{} + // CreateCashbookEntryRequest type CreateCashbookEntryRequest struct { Data *CashbookEntry `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateCashbookEntryRequest) SetData(v CashbookEntry) *CreateCashbookEnt } func (o CreateCashbookEntryRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCashbookEntryRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateCashbookEntryRequest struct { diff --git a/model/model_create_cashbook_entry_response.go b/model/model_create_cashbook_entry_response.go index f64699a..6c17a76 100644 --- a/model/model_create_cashbook_entry_response.go +++ b/model/model_create_cashbook_entry_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateCashbookEntryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCashbookEntryResponse{} + // CreateCashbookEntryResponse type CreateCashbookEntryResponse struct { Data *CashbookEntry `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateCashbookEntryResponse) SetData(v CashbookEntry) *CreateCashbookEn } func (o CreateCashbookEntryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCashbookEntryResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateCashbookEntryResponse struct { diff --git a/model/model_create_client_request.go b/model/model_create_client_request.go index 6c92c42..86da16d 100644 --- a/model/model_create_client_request.go +++ b/model/model_create_client_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateClientRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateClientRequest{} + // CreateClientRequest struct for CreateClientRequest type CreateClientRequest struct { Data *Client `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateClientRequest) SetData(v Client) *CreateClientRequest { } func (o CreateClientRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateClientRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateClientRequest struct { diff --git a/model/model_create_client_response.go b/model/model_create_client_response.go index df743e5..1f134a5 100644 --- a/model/model_create_client_response.go +++ b/model/model_create_client_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateClientResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateClientResponse{} + // CreateClientResponse struct for CreateClientResponse type CreateClientResponse struct { Data *Client `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateClientResponse) SetData(v Client) *CreateClientResponse { } func (o CreateClientResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateClientResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateClientResponse struct { diff --git a/model/model_create_f24_request.go b/model/model_create_f24_request.go index 080880e..67fe1ac 100644 --- a/model/model_create_f24_request.go +++ b/model/model_create_f24_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateF24Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateF24Request{} + // CreateF24Request type CreateF24Request struct { Data *F24 `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateF24Request) SetData(v F24) *CreateF24Request { } func (o CreateF24Request) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateF24Request) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateF24Request struct { diff --git a/model/model_create_f24_response.go b/model/model_create_f24_response.go index d30eea7..dccb86e 100644 --- a/model/model_create_f24_response.go +++ b/model/model_create_f24_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateF24Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateF24Response{} + // CreateF24Response type CreateF24Response struct { Data *F24 `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateF24Response) SetData(v F24) *CreateF24Response { } func (o CreateF24Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateF24Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateF24Response struct { diff --git a/model/model_create_issued_document_request.go b/model/model_create_issued_document_request.go index 0f9d3a8..f7d254f 100644 --- a/model/model_create_issued_document_request.go +++ b/model/model_create_issued_document_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateIssuedDocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateIssuedDocumentRequest{} + // CreateIssuedDocumentRequest struct for CreateIssuedDocumentRequest type CreateIssuedDocumentRequest struct { Data *IssuedDocument `json:"data,omitempty"` @@ -105,6 +108,14 @@ func (o *CreateIssuedDocumentRequest) SetOptions(v IssuedDocumentOptions) *Creat } func (o CreateIssuedDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateIssuedDocumentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data @@ -112,7 +123,7 @@ func (o CreateIssuedDocumentRequest) MarshalJSON() ([]byte, error) { if !isNil(o.Options) { toSerialize["options"] = o.Options } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateIssuedDocumentRequest struct { diff --git a/model/model_create_issued_document_response.go b/model/model_create_issued_document_response.go index 74598c1..7ca70b8 100644 --- a/model/model_create_issued_document_response.go +++ b/model/model_create_issued_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateIssuedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateIssuedDocumentResponse{} + // CreateIssuedDocumentResponse struct for CreateIssuedDocumentResponse type CreateIssuedDocumentResponse struct { Data *IssuedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateIssuedDocumentResponse) SetData(v IssuedDocument) *CreateIssuedDo } func (o CreateIssuedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateIssuedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateIssuedDocumentResponse struct { diff --git a/model/model_create_payment_account_request.go b/model/model_create_payment_account_request.go index 4fa9d6c..3541e78 100644 --- a/model/model_create_payment_account_request.go +++ b/model/model_create_payment_account_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreatePaymentAccountRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePaymentAccountRequest{} + // CreatePaymentAccountRequest struct for CreatePaymentAccountRequest type CreatePaymentAccountRequest struct { Data NullablePaymentAccount `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *CreatePaymentAccountRequest) UnsetData() { } func (o CreatePaymentAccountRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePaymentAccountRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreatePaymentAccountRequest struct { diff --git a/model/model_create_payment_account_response.go b/model/model_create_payment_account_response.go index 23cc2f2..8e4c499 100644 --- a/model/model_create_payment_account_response.go +++ b/model/model_create_payment_account_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreatePaymentAccountResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePaymentAccountResponse{} + // CreatePaymentAccountResponse struct for CreatePaymentAccountResponse type CreatePaymentAccountResponse struct { Data NullablePaymentAccount `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *CreatePaymentAccountResponse) UnsetData() { } func (o CreatePaymentAccountResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePaymentAccountResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreatePaymentAccountResponse struct { diff --git a/model/model_create_payment_method_request.go b/model/model_create_payment_method_request.go index 8305ddd..5074eae 100644 --- a/model/model_create_payment_method_request.go +++ b/model/model_create_payment_method_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreatePaymentMethodRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePaymentMethodRequest{} + // CreatePaymentMethodRequest struct for CreatePaymentMethodRequest type CreatePaymentMethodRequest struct { Data *PaymentMethod `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreatePaymentMethodRequest) SetData(v PaymentMethod) *CreatePaymentMeth } func (o CreatePaymentMethodRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePaymentMethodRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreatePaymentMethodRequest struct { diff --git a/model/model_create_payment_method_response.go b/model/model_create_payment_method_response.go index c3776a0..366d3ac 100644 --- a/model/model_create_payment_method_response.go +++ b/model/model_create_payment_method_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreatePaymentMethodResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePaymentMethodResponse{} + // CreatePaymentMethodResponse struct for CreatePaymentMethodResponse type CreatePaymentMethodResponse struct { Data *PaymentMethod `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreatePaymentMethodResponse) SetData(v PaymentMethod) *CreatePaymentMet } func (o CreatePaymentMethodResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePaymentMethodResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreatePaymentMethodResponse struct { diff --git a/model/model_create_product_request.go b/model/model_create_product_request.go index 6fb5957..f299f54 100644 --- a/model/model_create_product_request.go +++ b/model/model_create_product_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateProductRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateProductRequest{} + // CreateProductRequest struct for CreateProductRequest type CreateProductRequest struct { Data *Product `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateProductRequest) SetData(v Product) *CreateProductRequest { } func (o CreateProductRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateProductRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateProductRequest struct { diff --git a/model/model_create_product_response.go b/model/model_create_product_response.go index 802b3ae..b9182b9 100644 --- a/model/model_create_product_response.go +++ b/model/model_create_product_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateProductResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateProductResponse{} + // CreateProductResponse struct for CreateProductResponse type CreateProductResponse struct { Data *Product `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateProductResponse) SetData(v Product) *CreateProductResponse { } func (o CreateProductResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateProductResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateProductResponse struct { diff --git a/model/model_create_receipt_request.go b/model/model_create_receipt_request.go index b87dcb9..df68de7 100644 --- a/model/model_create_receipt_request.go +++ b/model/model_create_receipt_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateReceiptRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateReceiptRequest{} + // CreateReceiptRequest type CreateReceiptRequest struct { Data *Receipt `json:"data,omitempty"` @@ -117,6 +120,14 @@ func (o *CreateReceiptRequest) UnsetAutocompleteNumber() { } func (o CreateReceiptRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateReceiptRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data @@ -124,7 +135,7 @@ func (o CreateReceiptRequest) MarshalJSON() ([]byte, error) { if o.AutocompleteNumber.IsSet() { toSerialize["autocomplete_number"] = o.AutocompleteNumber.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateReceiptRequest struct { diff --git a/model/model_create_receipt_response.go b/model/model_create_receipt_response.go index 0324dbc..6bc0fab 100644 --- a/model/model_create_receipt_response.go +++ b/model/model_create_receipt_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateReceiptResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateReceiptResponse{} + // CreateReceiptResponse type CreateReceiptResponse struct { Data *Receipt `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateReceiptResponse) SetData(v Receipt) *CreateReceiptResponse { } func (o CreateReceiptResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateReceiptResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateReceiptResponse struct { diff --git a/model/model_create_received_document_request.go b/model/model_create_received_document_request.go index 30d3e45..0870668 100644 --- a/model/model_create_received_document_request.go +++ b/model/model_create_received_document_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateReceivedDocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateReceivedDocumentRequest{} + // CreateReceivedDocumentRequest type CreateReceivedDocumentRequest struct { // Pending received document id of the document from which the new document is created. @@ -117,6 +120,14 @@ func (o *CreateReceivedDocumentRequest) SetData(v ReceivedDocument) *CreateRecei } func (o CreateReceivedDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateReceivedDocumentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.PendingId.IsSet() { toSerialize["pending_id"] = o.PendingId.Get() @@ -124,7 +135,7 @@ func (o CreateReceivedDocumentRequest) MarshalJSON() ([]byte, error) { if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateReceivedDocumentRequest struct { diff --git a/model/model_create_received_document_response.go b/model/model_create_received_document_response.go index 8d67e0a..aac8554 100644 --- a/model/model_create_received_document_response.go +++ b/model/model_create_received_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateReceivedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateReceivedDocumentResponse{} + // CreateReceivedDocumentResponse type CreateReceivedDocumentResponse struct { Data *ReceivedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateReceivedDocumentResponse) SetData(v ReceivedDocument) *CreateRece } func (o CreateReceivedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateReceivedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateReceivedDocumentResponse struct { diff --git a/model/model_create_supplier_request.go b/model/model_create_supplier_request.go index 2a2b1ba..b977ea6 100644 --- a/model/model_create_supplier_request.go +++ b/model/model_create_supplier_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateSupplierRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSupplierRequest{} + // CreateSupplierRequest struct for CreateSupplierRequest type CreateSupplierRequest struct { Data *Supplier `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateSupplierRequest) SetData(v Supplier) *CreateSupplierRequest { } func (o CreateSupplierRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateSupplierRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateSupplierRequest struct { diff --git a/model/model_create_supplier_response.go b/model/model_create_supplier_response.go index 8e1c3cc..2fc773e 100644 --- a/model/model_create_supplier_response.go +++ b/model/model_create_supplier_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateSupplierResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSupplierResponse{} + // CreateSupplierResponse struct for CreateSupplierResponse type CreateSupplierResponse struct { Data *Supplier `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *CreateSupplierResponse) SetData(v Supplier) *CreateSupplierResponse { } func (o CreateSupplierResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateSupplierResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateSupplierResponse struct { diff --git a/model/model_create_vat_type_request.go b/model/model_create_vat_type_request.go index b498458..c4407bb 100644 --- a/model/model_create_vat_type_request.go +++ b/model/model_create_vat_type_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateVatTypeRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateVatTypeRequest{} + // CreateVatTypeRequest struct for CreateVatTypeRequest type CreateVatTypeRequest struct { Data NullableVatType `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *CreateVatTypeRequest) UnsetData() { } func (o CreateVatTypeRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateVatTypeRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateVatTypeRequest struct { diff --git a/model/model_create_vat_type_response.go b/model/model_create_vat_type_response.go index f3ab1ea..eb7a602 100644 --- a/model/model_create_vat_type_response.go +++ b/model/model_create_vat_type_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the CreateVatTypeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateVatTypeResponse{} + // CreateVatTypeResponse struct for CreateVatTypeResponse type CreateVatTypeResponse struct { Data NullableVatType `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *CreateVatTypeResponse) UnsetData() { } func (o CreateVatTypeResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateVatTypeResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCreateVatTypeResponse struct { diff --git a/model/model_currency.go b/model/model_currency.go index 40083a6..fa56c97 100644 --- a/model/model_currency.go +++ b/model/model_currency.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Currency type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Currency{} + // Currency type Currency struct { // Currency code. @@ -221,6 +224,14 @@ func (o *Currency) UnsetHtmlSymbol() { } func (o Currency) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Currency) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -234,7 +245,7 @@ func (o Currency) MarshalJSON() ([]byte, error) { if o.HtmlSymbol.IsSet() { toSerialize["html_symbol"] = o.HtmlSymbol.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCurrency struct { diff --git a/model/model_detailed_country.go b/model/model_detailed_country.go index ad65092..ca1cca1 100644 --- a/model/model_detailed_country.go +++ b/model/model_detailed_country.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DetailedCountry type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DetailedCountry{} + // DetailedCountry struct for DetailedCountry type DetailedCountry struct { // Country name. @@ -265,6 +268,14 @@ func (o *DetailedCountry) UnsetUic() { } func (o DetailedCountry) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DetailedCountry) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Name.IsSet() { toSerialize["name"] = o.Name.Get() @@ -281,7 +292,7 @@ func (o DetailedCountry) MarshalJSON() ([]byte, error) { if o.Uic.IsSet() { toSerialize["uic"] = o.Uic.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDetailedCountry struct { diff --git a/model/model_document_template.go b/model/model_document_template.go index 095c647..f5d6c5f 100644 --- a/model/model_document_template.go +++ b/model/model_document_template.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the DocumentTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DocumentTemplate{} + // DocumentTemplate struct for DocumentTemplate type DocumentTemplate struct { // Unique identifier. @@ -175,6 +178,14 @@ func (o *DocumentTemplate) UnsetType() { } func (o DocumentTemplate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DocumentTemplate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -185,7 +196,7 @@ func (o DocumentTemplate) MarshalJSON() ([]byte, error) { if o.Type.IsSet() { toSerialize["type"] = o.Type.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDocumentTemplate struct { diff --git a/model/model_e_invoice_rejection_reason.go b/model/model_e_invoice_rejection_reason.go index 646fd9c..b7c2e1c 100644 --- a/model/model_e_invoice_rejection_reason.go +++ b/model/model_e_invoice_rejection_reason.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the EInvoiceRejectionReason type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EInvoiceRejectionReason{} + // EInvoiceRejectionReason struct for EInvoiceRejectionReason type EInvoiceRejectionReason struct { // Rejection reason. @@ -268,6 +271,14 @@ func (o *EInvoiceRejectionReason) UnsetDate() { } func (o EInvoiceRejectionReason) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EInvoiceRejectionReason) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Reason.IsSet() { toSerialize["reason"] = o.Reason.Get() @@ -284,7 +295,7 @@ func (o EInvoiceRejectionReason) MarshalJSON() ([]byte, error) { if o.Date.IsSet() { toSerialize["date"] = o.Date.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEInvoiceRejectionReason struct { diff --git a/model/model_email.go b/model/model_email.go index 0bbd961..b39637d 100644 --- a/model/model_email.go +++ b/model/model_email.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the Email type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Email{} + // Email type Email struct { // Email unique identifier. @@ -594,6 +597,14 @@ func (o *Email) SetAttachments(v []EmailAttachment) *Email { } func (o Email) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Email) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Id) { toSerialize["id"] = o.Id @@ -643,7 +654,7 @@ func (o Email) MarshalJSON() ([]byte, error) { if !isNil(o.Attachments) { toSerialize["attachments"] = o.Attachments } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmail struct { diff --git a/model/model_email_attachment.go b/model/model_email_attachment.go index 4837c41..2112c17 100644 --- a/model/model_email_attachment.go +++ b/model/model_email_attachment.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailAttachment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailAttachment{} + // EmailAttachment struct for EmailAttachment type EmailAttachment struct { // Email attachment filename. @@ -107,6 +110,14 @@ func (o *EmailAttachment) SetUrl(v string) *EmailAttachment { } func (o EmailAttachment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailAttachment) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Filename) { toSerialize["filename"] = o.Filename @@ -114,7 +125,7 @@ func (o EmailAttachment) MarshalJSON() ([]byte, error) { if !isNil(o.Url) { toSerialize["url"] = o.Url } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailAttachment struct { diff --git a/model/model_email_data.go b/model/model_email_data.go index 7d281dd..c3a47c1 100644 --- a/model/model_email_data.go +++ b/model/model_email_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailData{} + // EmailData type EmailData struct { // Recipient's email @@ -532,6 +535,14 @@ func (o *EmailData) UnsetDefaultAttachPdf() { } func (o EmailData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.RecipientEmail.IsSet() { toSerialize["recipient_email"] = o.RecipientEmail.Get() @@ -566,7 +577,7 @@ func (o EmailData) MarshalJSON() ([]byte, error) { if o.DefaultAttachPdf.IsSet() { toSerialize["default_attach_pdf"] = o.DefaultAttachPdf.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailData struct { diff --git a/model/model_email_data_default_sender_email.go b/model/model_email_data_default_sender_email.go index 12fa87a..a9a7ca2 100644 --- a/model/model_email_data_default_sender_email.go +++ b/model/model_email_data_default_sender_email.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailDataDefaultSenderEmail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailDataDefaultSenderEmail{} + // EmailDataDefaultSenderEmail Default sender email. (Other emails can be found in `sender_emails_list`) type EmailDataDefaultSenderEmail struct { // Id @@ -129,6 +132,14 @@ func (o *EmailDataDefaultSenderEmail) UnsetEmail() { } func (o EmailDataDefaultSenderEmail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailDataDefaultSenderEmail) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -136,7 +147,7 @@ func (o EmailDataDefaultSenderEmail) MarshalJSON() ([]byte, error) { if o.Email.IsSet() { toSerialize["email"] = o.Email.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailDataDefaultSenderEmail struct { diff --git a/model/model_email_recipient_status.go b/model/model_email_recipient_status.go index 0f4c127..de9398d 100644 --- a/model/model_email_recipient_status.go +++ b/model/model_email_recipient_status.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_email_schedule.go b/model/model_email_schedule.go index 0717476..852b374 100644 --- a/model/model_email_schedule.go +++ b/model/model_email_schedule.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailSchedule{} + // EmailSchedule struct for EmailSchedule type EmailSchedule struct { // Sender id. Required if `sender_email` is not specified @@ -404,6 +407,14 @@ func (o *EmailSchedule) UnsetSendCopy() { } func (o EmailSchedule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailSchedule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.SenderId.IsSet() { toSerialize["sender_id"] = o.SenderId.Get() @@ -429,7 +440,7 @@ func (o EmailSchedule) MarshalJSON() ([]byte, error) { if o.SendCopy.IsSet() { toSerialize["send_copy"] = o.SendCopy.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailSchedule struct { diff --git a/model/model_email_schedule_include.go b/model/model_email_schedule_include.go index 7d23530..e348720 100644 --- a/model/model_email_schedule_include.go +++ b/model/model_email_schedule_include.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the EmailScheduleInclude type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailScheduleInclude{} + // EmailScheduleInclude struct for EmailScheduleInclude type EmailScheduleInclude struct { // If set to true, the email will have a button to view the document @@ -221,6 +224,14 @@ func (o *EmailScheduleInclude) UnsetAccompanyingInvoice() { } func (o EmailScheduleInclude) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailScheduleInclude) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Document.IsSet() { toSerialize["document"] = o.Document.Get() @@ -234,7 +245,7 @@ func (o EmailScheduleInclude) MarshalJSON() ([]byte, error) { if o.AccompanyingInvoice.IsSet() { toSerialize["accompanying_invoice"] = o.AccompanyingInvoice.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEmailScheduleInclude struct { diff --git a/model/model_email_status.go b/model/model_email_status.go index 4b1296b..8027a13 100644 --- a/model/model_email_status.go +++ b/model/model_email_status.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_entity.go b/model/model_entity.go index 0aa43f2..25a6d69 100644 --- a/model/model_entity.go +++ b/model/model_entity.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Entity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Entity{} + // Entity type Entity struct { // Unique identifier @@ -1666,6 +1669,14 @@ func (o *Entity) UnsetUpdatedAt() { } func (o Entity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Entity) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -1775,7 +1786,7 @@ func (o Entity) MarshalJSON() ([]byte, error) { if o.UpdatedAt.IsSet() { toSerialize["updated_at"] = o.UpdatedAt.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableEntity struct { diff --git a/model/model_entity_type.go b/model/model_entity_type.go index a65d694..34244ff 100644 --- a/model/model_entity_type.go +++ b/model/model_entity_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_f24.go b/model/model_f24.go index 979bf37..8000099 100644 --- a/model/model_f24.go +++ b/model/model_f24.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the F24 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &F24{} + // F24 struct for F24 type F24 struct { // Unique F24 identifier. @@ -392,6 +395,14 @@ func (o *F24) UnsetDescription() { } func (o F24) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o F24) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -417,7 +428,7 @@ func (o F24) MarshalJSON() ([]byte, error) { if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableF24 struct { diff --git a/model/model_f24_status.go b/model/model_f24_status.go index 76f4349..4bd6af8 100644 --- a/model/model_f24_status.go +++ b/model/model_f24_status.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_function_status.go b/model/model_function_status.go index 6f701fb..a527a2f 100644 --- a/model/model_function_status.go +++ b/model/model_function_status.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the FunctionStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionStatus{} + // FunctionStatus struct for FunctionStatus type FunctionStatus struct { Active NullableBool `json:"active,omitempty"` @@ -82,11 +85,19 @@ func (o *FunctionStatus) UnsetActive() { } func (o FunctionStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Active.IsSet() { toSerialize["active"] = o.Active.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableFunctionStatus struct { diff --git a/model/model_get_archive_document_response.go b/model/model_get_archive_document_response.go index 75542fb..483f214 100644 --- a/model/model_get_archive_document_response.go +++ b/model/model_get_archive_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetArchiveDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetArchiveDocumentResponse{} + // GetArchiveDocumentResponse type GetArchiveDocumentResponse struct { Data *ArchiveDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetArchiveDocumentResponse) SetData(v ArchiveDocument) *GetArchiveDocum } func (o GetArchiveDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetArchiveDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetArchiveDocumentResponse struct { diff --git a/model/model_get_cashbook_entry_response.go b/model/model_get_cashbook_entry_response.go index 66d924a..c91cb0f 100644 --- a/model/model_get_cashbook_entry_response.go +++ b/model/model_get_cashbook_entry_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetCashbookEntryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCashbookEntryResponse{} + // GetCashbookEntryResponse type GetCashbookEntryResponse struct { Data *CashbookEntry `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetCashbookEntryResponse) SetData(v CashbookEntry) *GetCashbookEntryRes } func (o GetCashbookEntryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCashbookEntryResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetCashbookEntryResponse struct { diff --git a/model/model_get_client_response.go b/model/model_get_client_response.go index 100eebc..419955a 100644 --- a/model/model_get_client_response.go +++ b/model/model_get_client_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetClientResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetClientResponse{} + // GetClientResponse struct for GetClientResponse type GetClientResponse struct { Data *Client `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetClientResponse) SetData(v Client) *GetClientResponse { } func (o GetClientResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetClientResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetClientResponse struct { diff --git a/model/model_get_company_info_response.go b/model/model_get_company_info_response.go index 8b348aa..5dd328f 100644 --- a/model/model_get_company_info_response.go +++ b/model/model_get_company_info_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetCompanyInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCompanyInfoResponse{} + // GetCompanyInfoResponse type GetCompanyInfoResponse struct { Data *CompanyInfo `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetCompanyInfoResponse) SetData(v CompanyInfo) *GetCompanyInfoResponse } func (o GetCompanyInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCompanyInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetCompanyInfoResponse struct { diff --git a/model/model_get_e_invoice_rejection_reason_response.go b/model/model_get_e_invoice_rejection_reason_response.go index 6b13a9b..b490345 100644 --- a/model/model_get_e_invoice_rejection_reason_response.go +++ b/model/model_get_e_invoice_rejection_reason_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetEInvoiceRejectionReasonResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEInvoiceRejectionReasonResponse{} + // GetEInvoiceRejectionReasonResponse struct for GetEInvoiceRejectionReasonResponse type GetEInvoiceRejectionReasonResponse struct { Data *EInvoiceRejectionReason `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetEInvoiceRejectionReasonResponse) SetData(v EInvoiceRejectionReason) } func (o GetEInvoiceRejectionReasonResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEInvoiceRejectionReasonResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetEInvoiceRejectionReasonResponse struct { diff --git a/model/model_get_email_data_response.go b/model/model_get_email_data_response.go index 0213754..672c951 100644 --- a/model/model_get_email_data_response.go +++ b/model/model_get_email_data_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetEmailDataResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEmailDataResponse{} + // GetEmailDataResponse struct for GetEmailDataResponse type GetEmailDataResponse struct { Data *EmailData `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetEmailDataResponse) SetData(v EmailData) *GetEmailDataResponse { } func (o GetEmailDataResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEmailDataResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetEmailDataResponse struct { diff --git a/model/model_get_existing_issued_document_totals_request.go b/model/model_get_existing_issued_document_totals_request.go index 7a10b26..d3fdcf1 100644 --- a/model/model_get_existing_issued_document_totals_request.go +++ b/model/model_get_existing_issued_document_totals_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetExistingIssuedDocumentTotalsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetExistingIssuedDocumentTotalsRequest{} + // GetExistingIssuedDocumentTotalsRequest struct for GetExistingIssuedDocumentTotalsRequest type GetExistingIssuedDocumentTotalsRequest struct { Data *IssuedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetExistingIssuedDocumentTotalsRequest) SetData(v IssuedDocument) *GetE } func (o GetExistingIssuedDocumentTotalsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetExistingIssuedDocumentTotalsRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetExistingIssuedDocumentTotalsRequest struct { diff --git a/model/model_get_existing_issued_document_totals_response.go b/model/model_get_existing_issued_document_totals_response.go index 980e467..8bf074f 100644 --- a/model/model_get_existing_issued_document_totals_response.go +++ b/model/model_get_existing_issued_document_totals_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetExistingIssuedDocumentTotalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetExistingIssuedDocumentTotalsResponse{} + // GetExistingIssuedDocumentTotalsResponse type GetExistingIssuedDocumentTotalsResponse struct { Data *IssuedDocumentTotals `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetExistingIssuedDocumentTotalsResponse) SetData(v IssuedDocumentTotals } func (o GetExistingIssuedDocumentTotalsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetExistingIssuedDocumentTotalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetExistingIssuedDocumentTotalsResponse struct { diff --git a/model/model_get_existing_received_document_totals_request.go b/model/model_get_existing_received_document_totals_request.go index ee14b93..cf95626 100644 --- a/model/model_get_existing_received_document_totals_request.go +++ b/model/model_get_existing_received_document_totals_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetExistingReceivedDocumentTotalsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetExistingReceivedDocumentTotalsRequest{} + // GetExistingReceivedDocumentTotalsRequest type GetExistingReceivedDocumentTotalsRequest struct { Data *ReceivedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetExistingReceivedDocumentTotalsRequest) SetData(v ReceivedDocument) * } func (o GetExistingReceivedDocumentTotalsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetExistingReceivedDocumentTotalsRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetExistingReceivedDocumentTotalsRequest struct { diff --git a/model/model_get_existing_received_document_totals_response.go b/model/model_get_existing_received_document_totals_response.go index 2e0a71a..f51c476 100644 --- a/model/model_get_existing_received_document_totals_response.go +++ b/model/model_get_existing_received_document_totals_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetExistingReceivedDocumentTotalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetExistingReceivedDocumentTotalsResponse{} + // GetExistingReceivedDocumentTotalsResponse type GetExistingReceivedDocumentTotalsResponse struct { Data *ReceivedDocumentTotals `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetExistingReceivedDocumentTotalsResponse) SetData(v ReceivedDocumentTo } func (o GetExistingReceivedDocumentTotalsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetExistingReceivedDocumentTotalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetExistingReceivedDocumentTotalsResponse struct { diff --git a/model/model_get_f24_response.go b/model/model_get_f24_response.go index 1211dc3..1fed0a2 100644 --- a/model/model_get_f24_response.go +++ b/model/model_get_f24_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetF24Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetF24Response{} + // GetF24Response struct for GetF24Response type GetF24Response struct { Data *F24 `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetF24Response) SetData(v F24) *GetF24Response { } func (o GetF24Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetF24Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetF24Response struct { diff --git a/model/model_get_issued_document_pre_create_info_response.go b/model/model_get_issued_document_pre_create_info_response.go index c96cfed..40dd34c 100644 --- a/model/model_get_issued_document_pre_create_info_response.go +++ b/model/model_get_issued_document_pre_create_info_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetIssuedDocumentPreCreateInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetIssuedDocumentPreCreateInfoResponse{} + // GetIssuedDocumentPreCreateInfoResponse struct for GetIssuedDocumentPreCreateInfoResponse type GetIssuedDocumentPreCreateInfoResponse struct { Data *IssuedDocumentPreCreateInfo `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetIssuedDocumentPreCreateInfoResponse) SetData(v IssuedDocumentPreCrea } func (o GetIssuedDocumentPreCreateInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetIssuedDocumentPreCreateInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetIssuedDocumentPreCreateInfoResponse struct { diff --git a/model/model_get_issued_document_response.go b/model/model_get_issued_document_response.go index 9dc2938..e8ad8f2 100644 --- a/model/model_get_issued_document_response.go +++ b/model/model_get_issued_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetIssuedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetIssuedDocumentResponse{} + // GetIssuedDocumentResponse struct for GetIssuedDocumentResponse type GetIssuedDocumentResponse struct { Data *IssuedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetIssuedDocumentResponse) SetData(v IssuedDocument) *GetIssuedDocument } func (o GetIssuedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetIssuedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetIssuedDocumentResponse struct { diff --git a/model/model_get_new_issued_document_totals_request.go b/model/model_get_new_issued_document_totals_request.go index e41f30a..fb77e38 100644 --- a/model/model_get_new_issued_document_totals_request.go +++ b/model/model_get_new_issued_document_totals_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetNewIssuedDocumentTotalsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetNewIssuedDocumentTotalsRequest{} + // GetNewIssuedDocumentTotalsRequest struct for GetNewIssuedDocumentTotalsRequest type GetNewIssuedDocumentTotalsRequest struct { Data *IssuedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetNewIssuedDocumentTotalsRequest) SetData(v IssuedDocument) *GetNewIss } func (o GetNewIssuedDocumentTotalsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetNewIssuedDocumentTotalsRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetNewIssuedDocumentTotalsRequest struct { diff --git a/model/model_get_new_issued_document_totals_response.go b/model/model_get_new_issued_document_totals_response.go index 2e66930..c06818f 100644 --- a/model/model_get_new_issued_document_totals_response.go +++ b/model/model_get_new_issued_document_totals_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetNewIssuedDocumentTotalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetNewIssuedDocumentTotalsResponse{} + // GetNewIssuedDocumentTotalsResponse type GetNewIssuedDocumentTotalsResponse struct { Data *IssuedDocumentTotals `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetNewIssuedDocumentTotalsResponse) SetData(v IssuedDocumentTotals) *Ge } func (o GetNewIssuedDocumentTotalsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetNewIssuedDocumentTotalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetNewIssuedDocumentTotalsResponse struct { diff --git a/model/model_get_new_received_document_totals_request.go b/model/model_get_new_received_document_totals_request.go index 76a239b..be1d7a2 100644 --- a/model/model_get_new_received_document_totals_request.go +++ b/model/model_get_new_received_document_totals_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetNewReceivedDocumentTotalsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetNewReceivedDocumentTotalsRequest{} + // GetNewReceivedDocumentTotalsRequest type GetNewReceivedDocumentTotalsRequest struct { Data *ReceivedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetNewReceivedDocumentTotalsRequest) SetData(v ReceivedDocument) *GetNe } func (o GetNewReceivedDocumentTotalsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetNewReceivedDocumentTotalsRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetNewReceivedDocumentTotalsRequest struct { diff --git a/model/model_get_new_received_document_totals_response.go b/model/model_get_new_received_document_totals_response.go index 579cd1b..ae67617 100644 --- a/model/model_get_new_received_document_totals_response.go +++ b/model/model_get_new_received_document_totals_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetNewReceivedDocumentTotalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetNewReceivedDocumentTotalsResponse{} + // GetNewReceivedDocumentTotalsResponse type GetNewReceivedDocumentTotalsResponse struct { Data *ReceivedDocumentTotals `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetNewReceivedDocumentTotalsResponse) SetData(v ReceivedDocumentTotals) } func (o GetNewReceivedDocumentTotalsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetNewReceivedDocumentTotalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetNewReceivedDocumentTotalsResponse struct { diff --git a/model/model_get_payment_account_response.go b/model/model_get_payment_account_response.go index 6388cfe..9505fc8 100644 --- a/model/model_get_payment_account_response.go +++ b/model/model_get_payment_account_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetPaymentAccountResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetPaymentAccountResponse{} + // GetPaymentAccountResponse struct for GetPaymentAccountResponse type GetPaymentAccountResponse struct { Data NullablePaymentAccount `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *GetPaymentAccountResponse) UnsetData() { } func (o GetPaymentAccountResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetPaymentAccountResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetPaymentAccountResponse struct { diff --git a/model/model_get_payment_method_response.go b/model/model_get_payment_method_response.go index 013f070..eb0999b 100644 --- a/model/model_get_payment_method_response.go +++ b/model/model_get_payment_method_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetPaymentMethodResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetPaymentMethodResponse{} + // GetPaymentMethodResponse struct for GetPaymentMethodResponse type GetPaymentMethodResponse struct { Data *PaymentMethod `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetPaymentMethodResponse) SetData(v PaymentMethod) *GetPaymentMethodRes } func (o GetPaymentMethodResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetPaymentMethodResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetPaymentMethodResponse struct { diff --git a/model/model_get_product_response.go b/model/model_get_product_response.go index 3144f15..8fc0ec7 100644 --- a/model/model_get_product_response.go +++ b/model/model_get_product_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetProductResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetProductResponse{} + // GetProductResponse struct for GetProductResponse type GetProductResponse struct { Data *Product `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetProductResponse) SetData(v Product) *GetProductResponse { } func (o GetProductResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetProductResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetProductResponse struct { diff --git a/model/model_get_receipt_pre_create_info_response.go b/model/model_get_receipt_pre_create_info_response.go index 1394060..0568f1a 100644 --- a/model/model_get_receipt_pre_create_info_response.go +++ b/model/model_get_receipt_pre_create_info_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetReceiptPreCreateInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetReceiptPreCreateInfoResponse{} + // GetReceiptPreCreateInfoResponse type GetReceiptPreCreateInfoResponse struct { Data *ReceiptPreCreateInfo `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetReceiptPreCreateInfoResponse) SetData(v ReceiptPreCreateInfo) *GetRe } func (o GetReceiptPreCreateInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetReceiptPreCreateInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetReceiptPreCreateInfoResponse struct { diff --git a/model/model_get_receipt_response.go b/model/model_get_receipt_response.go index 76b4fd7..c558cba 100644 --- a/model/model_get_receipt_response.go +++ b/model/model_get_receipt_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetReceiptResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetReceiptResponse{} + // GetReceiptResponse type GetReceiptResponse struct { Data *Receipt `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetReceiptResponse) SetData(v Receipt) *GetReceiptResponse { } func (o GetReceiptResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetReceiptResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetReceiptResponse struct { diff --git a/model/model_get_receipts_monthly_totals_response.go b/model/model_get_receipts_monthly_totals_response.go index 72ffcb3..cd65320 100644 --- a/model/model_get_receipts_monthly_totals_response.go +++ b/model/model_get_receipts_monthly_totals_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetReceiptsMonthlyTotalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetReceiptsMonthlyTotalsResponse{} + // GetReceiptsMonthlyTotalsResponse type GetReceiptsMonthlyTotalsResponse struct { Data []MonthlyTotal `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *GetReceiptsMonthlyTotalsResponse) SetData(v []MonthlyTotal) *GetReceipt } func (o GetReceiptsMonthlyTotalsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetReceiptsMonthlyTotalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetReceiptsMonthlyTotalsResponse struct { diff --git a/model/model_get_received_document_pre_create_info_response.go b/model/model_get_received_document_pre_create_info_response.go index 329fe4d..2c9867d 100644 --- a/model/model_get_received_document_pre_create_info_response.go +++ b/model/model_get_received_document_pre_create_info_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetReceivedDocumentPreCreateInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetReceivedDocumentPreCreateInfoResponse{} + // GetReceivedDocumentPreCreateInfoResponse type GetReceivedDocumentPreCreateInfoResponse struct { Data *ReceivedDocumentInfo `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetReceivedDocumentPreCreateInfoResponse) SetData(v ReceivedDocumentInf } func (o GetReceivedDocumentPreCreateInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetReceivedDocumentPreCreateInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetReceivedDocumentPreCreateInfoResponse struct { diff --git a/model/model_get_received_document_response.go b/model/model_get_received_document_response.go index 96c5f39..4b0fa71 100644 --- a/model/model_get_received_document_response.go +++ b/model/model_get_received_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetReceivedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetReceivedDocumentResponse{} + // GetReceivedDocumentResponse type GetReceivedDocumentResponse struct { Data *ReceivedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetReceivedDocumentResponse) SetData(v ReceivedDocument) *GetReceivedDo } func (o GetReceivedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetReceivedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetReceivedDocumentResponse struct { diff --git a/model/model_get_supplier_response.go b/model/model_get_supplier_response.go index 5591a66..381011e 100644 --- a/model/model_get_supplier_response.go +++ b/model/model_get_supplier_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetSupplierResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetSupplierResponse{} + // GetSupplierResponse struct for GetSupplierResponse type GetSupplierResponse struct { Data *Supplier `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *GetSupplierResponse) SetData(v Supplier) *GetSupplierResponse { } func (o GetSupplierResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetSupplierResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetSupplierResponse struct { diff --git a/model/model_get_user_info_response.go b/model/model_get_user_info_response.go index 96b3bc3..23dacb7 100644 --- a/model/model_get_user_info_response.go +++ b/model/model_get_user_info_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetUserInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserInfoResponse{} + // GetUserInfoResponse type GetUserInfoResponse struct { Data *User `json:"data,omitempty"` @@ -161,6 +164,14 @@ func (o *GetUserInfoResponse) UnsetEmailConfirmationState() { } func (o GetUserInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserInfoResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data @@ -171,7 +182,7 @@ func (o GetUserInfoResponse) MarshalJSON() ([]byte, error) { if o.EmailConfirmationState.IsSet() { toSerialize["email_confirmation_state"] = o.EmailConfirmationState.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetUserInfoResponse struct { diff --git a/model/model_get_user_info_response_email_confirmation_state.go b/model/model_get_user_info_response_email_confirmation_state.go index dacbaf2..3be5442 100644 --- a/model/model_get_user_info_response_email_confirmation_state.go +++ b/model/model_get_user_info_response_email_confirmation_state.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetUserInfoResponseEmailConfirmationState type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserInfoResponseEmailConfirmationState{} + // GetUserInfoResponseEmailConfirmationState struct for GetUserInfoResponseEmailConfirmationState type GetUserInfoResponseEmailConfirmationState struct { NeedConfirmation NullableBool `json:"need_confirmation,omitempty"` @@ -82,11 +85,19 @@ func (o *GetUserInfoResponseEmailConfirmationState) UnsetNeedConfirmation() { } func (o GetUserInfoResponseEmailConfirmationState) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserInfoResponseEmailConfirmationState) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.NeedConfirmation.IsSet() { toSerialize["need_confirmation"] = o.NeedConfirmation.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetUserInfoResponseEmailConfirmationState struct { diff --git a/model/model_get_user_info_response_info.go b/model/model_get_user_info_response_info.go index 30507b9..c97553a 100644 --- a/model/model_get_user_info_response_info.go +++ b/model/model_get_user_info_response_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetUserInfoResponseInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserInfoResponseInfo{} + // GetUserInfoResponseInfo struct for GetUserInfoResponseInfo type GetUserInfoResponseInfo struct { NeedMarketingConsentsConfirmation NullableBool `json:"need_marketing_consents_confirmation,omitempty"` @@ -172,6 +175,14 @@ func (o *GetUserInfoResponseInfo) UnsetNeedTermsOfServiceConfirmation() { } func (o GetUserInfoResponseInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserInfoResponseInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.NeedMarketingConsentsConfirmation.IsSet() { toSerialize["need_marketing_consents_confirmation"] = o.NeedMarketingConsentsConfirmation.Get() @@ -182,7 +193,7 @@ func (o GetUserInfoResponseInfo) MarshalJSON() ([]byte, error) { if o.NeedTermsOfServiceConfirmation.IsSet() { toSerialize["need_terms_of_service_confirmation"] = o.NeedTermsOfServiceConfirmation.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetUserInfoResponseInfo struct { diff --git a/model/model_get_vat_type_response.go b/model/model_get_vat_type_response.go index 0bfaee3..6ba543d 100644 --- a/model/model_get_vat_type_response.go +++ b/model/model_get_vat_type_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the GetVatTypeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetVatTypeResponse{} + // GetVatTypeResponse struct for GetVatTypeResponse type GetVatTypeResponse struct { Data NullableVatType `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *GetVatTypeResponse) UnsetData() { } func (o GetVatTypeResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetVatTypeResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetVatTypeResponse struct { diff --git a/model/model_issued_document.go b/model/model_issued_document.go index 7cb71c2..f4276b2 100644 --- a/model/model_issued_document.go +++ b/model/model_issued_document.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocument{} + // IssuedDocument type IssuedDocument struct { // Unique identifier of the document. @@ -3806,6 +3809,14 @@ func (o *IssuedDocument) UnsetUpdatedAt() { } func (o IssuedDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocument) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -4062,7 +4073,7 @@ func (o IssuedDocument) MarshalJSON() ([]byte, error) { if o.UpdatedAt.IsSet() { toSerialize["updated_at"] = o.UpdatedAt.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocument struct { diff --git a/model/model_issued_document_ei_data.go b/model/model_issued_document_ei_data.go index 25a1e62..301aea7 100644 --- a/model/model_issued_document_ei_data.go +++ b/model/model_issued_document_ei_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentEiData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentEiData{} + // IssuedDocumentEiData E-invoice data. [Only if e_invoice=true] type IssuedDocumentEiData struct { VatKind NullableVatKind `json:"vat_kind,omitempty"` @@ -589,6 +592,14 @@ func (o *IssuedDocumentEiData) UnsetInvoiceDate() { } func (o IssuedDocumentEiData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentEiData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.VatKind.IsSet() { toSerialize["vat_kind"] = o.VatKind.Get() @@ -626,7 +637,7 @@ func (o IssuedDocumentEiData) MarshalJSON() ([]byte, error) { if o.InvoiceDate.IsSet() { toSerialize["invoice_date"] = o.InvoiceDate.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentEiData struct { diff --git a/model/model_issued_document_extra_data.go b/model/model_issued_document_extra_data.go index f05f7fb..6bf400d 100644 --- a/model/model_issued_document_extra_data.go +++ b/model/model_issued_document_extra_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentExtraData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentExtraData{} + // IssuedDocumentExtraData Extra data. TS fields follow the technical specifications provided by \"Sistema Tessera Sanitaria\". type IssuedDocumentExtraData struct { ShowSofortButton NullableBool `json:"show_sofort_button,omitempty"` @@ -624,6 +627,14 @@ func (o *IssuedDocumentExtraData) UnsetTsSingleSending() { } func (o IssuedDocumentExtraData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentExtraData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.ShowSofortButton.IsSet() { toSerialize["show_sofort_button"] = o.ShowSofortButton.Get() @@ -664,7 +675,7 @@ func (o IssuedDocumentExtraData) MarshalJSON() ([]byte, error) { if o.TsSingleSending.IsSet() { toSerialize["ts_single_sending"] = o.TsSingleSending.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentExtraData struct { diff --git a/model/model_issued_document_items_list_item.go b/model/model_issued_document_items_list_item.go index 9322eee..89abb9b 100644 --- a/model/model_issued_document_items_list_item.go +++ b/model/model_issued_document_items_list_item.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentItemsListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentItemsListItem{} + // IssuedDocumentItemsListItem struct for IssuedDocumentItemsListItem type IssuedDocumentItemsListItem struct { // Unique identifier. @@ -850,6 +853,14 @@ func (o *IssuedDocumentItemsListItem) SetEiRaw(v map[string]interface{}) *Issued } func (o IssuedDocumentItemsListItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentItemsListItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -905,7 +916,7 @@ func (o IssuedDocumentItemsListItem) MarshalJSON() ([]byte, error) { if o.EiRaw != nil { toSerialize["ei_raw"] = o.EiRaw } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentItemsListItem struct { diff --git a/model/model_issued_document_options.go b/model/model_issued_document_options.go index 4eea331..9403071 100644 --- a/model/model_issued_document_options.go +++ b/model/model_issued_document_options.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentOptions{} + // IssuedDocumentOptions struct for IssuedDocumentOptions type IssuedDocumentOptions struct { // Fixes your last payment amount to match your document total @@ -257,6 +260,14 @@ func (o *IssuedDocumentOptions) UnsetJoinType() { } func (o IssuedDocumentOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentOptions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.FixPayments.IsSet() { toSerialize["fix_payments"] = o.FixPayments.Get() @@ -273,7 +284,7 @@ func (o IssuedDocumentOptions) MarshalJSON() ([]byte, error) { if o.JoinType.IsSet() { toSerialize["join_type"] = o.JoinType.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentOptions struct { diff --git a/model/model_issued_document_payments_list_item.go b/model/model_issued_document_payments_list_item.go index a01b932..3eabd93 100644 --- a/model/model_issued_document_payments_list_item.go +++ b/model/model_issued_document_payments_list_item.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentPaymentsListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentPaymentsListItem{} + // IssuedDocumentPaymentsListItem struct for IssuedDocumentPaymentsListItem type IssuedDocumentPaymentsListItem struct { // Unique identifier. @@ -372,6 +375,14 @@ func (o *IssuedDocumentPaymentsListItem) SetPaymentTerms(v IssuedDocumentPayment } func (o IssuedDocumentPaymentsListItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentPaymentsListItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -397,7 +408,7 @@ func (o IssuedDocumentPaymentsListItem) MarshalJSON() ([]byte, error) { if !isNil(o.PaymentTerms) { toSerialize["payment_terms"] = o.PaymentTerms } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentPaymentsListItem struct { diff --git a/model/model_issued_document_payments_list_item_payment_terms.go b/model/model_issued_document_payments_list_item_payment_terms.go index 25f378b..ef20c43 100644 --- a/model/model_issued_document_payments_list_item_payment_terms.go +++ b/model/model_issued_document_payments_list_item_payment_terms.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentPaymentsListItemPaymentTerms type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentPaymentsListItemPaymentTerms{} + // IssuedDocumentPaymentsListItemPaymentTerms struct for IssuedDocumentPaymentsListItemPaymentTerms type IssuedDocumentPaymentsListItemPaymentTerms struct { // The number of days by which the payment must be made. @@ -119,6 +122,14 @@ func (o *IssuedDocumentPaymentsListItemPaymentTerms) SetType(v PaymentTermsType) } func (o IssuedDocumentPaymentsListItemPaymentTerms) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentPaymentsListItemPaymentTerms) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Days.IsSet() { toSerialize["days"] = o.Days.Get() @@ -126,7 +137,7 @@ func (o IssuedDocumentPaymentsListItemPaymentTerms) MarshalJSON() ([]byte, error if !isNil(o.Type) { toSerialize["type"] = o.Type } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentPaymentsListItemPaymentTerms struct { diff --git a/model/model_issued_document_pre_create_info.go b/model/model_issued_document_pre_create_info.go index a994e58..c919817 100644 --- a/model/model_issued_document_pre_create_info.go +++ b/model/model_issued_document_pre_create_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentPreCreateInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentPreCreateInfo{} + // IssuedDocumentPreCreateInfo struct for IssuedDocumentPreCreateInfo type IssuedDocumentPreCreateInfo struct { Numerations map[string]map[string]int32 `json:"numerations,omitempty"` @@ -564,6 +567,14 @@ func (o *IssuedDocumentPreCreateInfo) SetLanguagesList(v []Language) *IssuedDocu } func (o IssuedDocumentPreCreateInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentPreCreateInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Numerations) { toSerialize["numerations"] = o.Numerations @@ -607,7 +618,7 @@ func (o IssuedDocumentPreCreateInfo) MarshalJSON() ([]byte, error) { if o.LanguagesList != nil { toSerialize["languages_list"] = o.LanguagesList } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentPreCreateInfo struct { diff --git a/model/model_issued_document_pre_create_info_default_values.go b/model/model_issued_document_pre_create_info_default_values.go index 90218fe..dc0dc1f 100644 --- a/model/model_issued_document_pre_create_info_default_values.go +++ b/model/model_issued_document_pre_create_info_default_values.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentPreCreateInfoDefaultValues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentPreCreateInfoDefaultValues{} + // IssuedDocumentPreCreateInfoDefaultValues Default values for the document. type IssuedDocumentPreCreateInfoDefaultValues struct { DefaultTemplate *DocumentTemplate `json:"default_template,omitempty"` @@ -495,6 +498,14 @@ func (o *IssuedDocumentPreCreateInfoDefaultValues) SetPaymentMethod(v PaymentMet } func (o IssuedDocumentPreCreateInfoDefaultValues) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentPreCreateInfoDefaultValues) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.DefaultTemplate) { toSerialize["default_template"] = o.DefaultTemplate @@ -529,7 +540,7 @@ func (o IssuedDocumentPreCreateInfoDefaultValues) MarshalJSON() ([]byte, error) if !isNil(o.PaymentMethod) { toSerialize["payment_method"] = o.PaymentMethod } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentPreCreateInfoDefaultValues struct { diff --git a/model/model_issued_document_pre_create_info_extra_data_default_values.go b/model/model_issued_document_pre_create_info_extra_data_default_values.go index a585dbc..abdfaab 100644 --- a/model/model_issued_document_pre_create_info_extra_data_default_values.go +++ b/model/model_issued_document_pre_create_info_extra_data_default_values.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentPreCreateInfoExtraDataDefaultValues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentPreCreateInfoExtraDataDefaultValues{} + // IssuedDocumentPreCreateInfoExtraDataDefaultValues struct for IssuedDocumentPreCreateInfoExtraDataDefaultValues type IssuedDocumentPreCreateInfoExtraDataDefaultValues struct { TsCommunication NullableBool `json:"ts_communication,omitempty"` @@ -217,6 +220,14 @@ func (o *IssuedDocumentPreCreateInfoExtraDataDefaultValues) UnsetTsPagamentoTrac } func (o IssuedDocumentPreCreateInfoExtraDataDefaultValues) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentPreCreateInfoExtraDataDefaultValues) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.TsCommunication.IsSet() { toSerialize["ts_communication"] = o.TsCommunication.Get() @@ -230,7 +241,7 @@ func (o IssuedDocumentPreCreateInfoExtraDataDefaultValues) MarshalJSON() ([]byte if o.TsPagamentoTracciato.IsSet() { toSerialize["ts_pagamento_tracciato"] = o.TsPagamentoTracciato.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentPreCreateInfoExtraDataDefaultValues struct { diff --git a/model/model_issued_document_pre_create_info_items_default_values.go b/model/model_issued_document_pre_create_info_items_default_values.go index 8b9ca98..d142613 100644 --- a/model/model_issued_document_pre_create_info_items_default_values.go +++ b/model/model_issued_document_pre_create_info_items_default_values.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentPreCreateInfoItemsDefaultValues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentPreCreateInfoItemsDefaultValues{} + // IssuedDocumentPreCreateInfoItemsDefaultValues Default values for the document items. type IssuedDocumentPreCreateInfoItemsDefaultValues struct { Vat NullableVatType `json:"vat,omitempty"` @@ -82,11 +85,19 @@ func (o *IssuedDocumentPreCreateInfoItemsDefaultValues) UnsetVat() { } func (o IssuedDocumentPreCreateInfoItemsDefaultValues) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentPreCreateInfoItemsDefaultValues) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Vat.IsSet() { toSerialize["vat"] = o.Vat.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentPreCreateInfoItemsDefaultValues struct { diff --git a/model/model_issued_document_status.go b/model/model_issued_document_status.go index 207977a..c098a70 100644 --- a/model/model_issued_document_status.go +++ b/model/model_issued_document_status.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_issued_document_totals.go b/model/model_issued_document_totals.go index dc49fd9..01b3269 100644 --- a/model/model_issued_document_totals.go +++ b/model/model_issued_document_totals.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the IssuedDocumentTotals type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IssuedDocumentTotals{} + // IssuedDocumentTotals struct for IssuedDocumentTotals type IssuedDocumentTotals struct { // Total net amount. @@ -806,6 +809,14 @@ func (o *IssuedDocumentTotals) SetVatList(v map[string]VatItem) *IssuedDocumentT } func (o IssuedDocumentTotals) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedDocumentTotals) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.AmountNet.IsSet() { toSerialize["amount_net"] = o.AmountNet.Get() @@ -858,7 +869,7 @@ func (o IssuedDocumentTotals) MarshalJSON() ([]byte, error) { if !isNil(o.VatList) { toSerialize["vat_list"] = o.VatList } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableIssuedDocumentTotals struct { diff --git a/model/model_issued_document_type.go b/model/model_issued_document_type.go index a3452f7..86a8602 100644 --- a/model/model_issued_document_type.go +++ b/model/model_issued_document_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_join_issued_documents_response.go b/model/model_join_issued_documents_response.go index e82cbb8..fa70238 100644 --- a/model/model_join_issued_documents_response.go +++ b/model/model_join_issued_documents_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the JoinIssuedDocumentsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JoinIssuedDocumentsResponse{} + // JoinIssuedDocumentsResponse struct for JoinIssuedDocumentsResponse type JoinIssuedDocumentsResponse struct { Data *IssuedDocument `json:"data,omitempty"` @@ -105,6 +108,14 @@ func (o *JoinIssuedDocumentsResponse) SetOptions(v IssuedDocumentOptions) *JoinI } func (o JoinIssuedDocumentsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JoinIssuedDocumentsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data @@ -112,7 +123,7 @@ func (o JoinIssuedDocumentsResponse) MarshalJSON() ([]byte, error) { if !isNil(o.Options) { toSerialize["options"] = o.Options } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableJoinIssuedDocumentsResponse struct { diff --git a/model/model_language.go b/model/model_language.go index 0ad36b5..9c20645 100644 --- a/model/model_language.go +++ b/model/model_language.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Language type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Language{} + // Language struct for Language type Language struct { // Language code. @@ -129,6 +132,14 @@ func (o *Language) UnsetName() { } func (o Language) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Language) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Code.IsSet() { toSerialize["code"] = o.Code.Get() @@ -136,7 +147,7 @@ func (o Language) MarshalJSON() ([]byte, error) { if o.Name.IsSet() { toSerialize["name"] = o.Name.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableLanguage struct { diff --git a/model/model_list_archive_categories_response.go b/model/model_list_archive_categories_response.go index 0e21d59..3e17070 100644 --- a/model/model_list_archive_categories_response.go +++ b/model/model_list_archive_categories_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListArchiveCategoriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListArchiveCategoriesResponse{} + // ListArchiveCategoriesResponse struct for ListArchiveCategoriesResponse type ListArchiveCategoriesResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListArchiveCategoriesResponse) SetData(v []string) *ListArchiveCategori } func (o ListArchiveCategoriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListArchiveCategoriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListArchiveCategoriesResponse struct { diff --git a/model/model_list_archive_documents_response.go b/model/model_list_archive_documents_response.go index edf940a..f1ca4bd 100644 --- a/model/model_list_archive_documents_response.go +++ b/model/model_list_archive_documents_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListArchiveDocumentsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListArchiveDocumentsResponse{} + // ListArchiveDocumentsResponse type ListArchiveDocumentsResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListArchiveDocumentsResponse) SetData(v []ArchiveDocument) *ListArchive } func (o ListArchiveDocumentsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListArchiveDocumentsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListArchiveDocumentsResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListArchiveDocumentsResponse struct { diff --git a/model/model_list_archive_documents_response_page.go b/model/model_list_archive_documents_response_page.go index 487223b..663af11 100644 --- a/model/model_list_archive_documents_response_page.go +++ b/model/model_list_archive_documents_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListArchiveDocumentsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListArchiveDocumentsResponsePage{} + // ListArchiveDocumentsResponsePage struct for ListArchiveDocumentsResponsePage type ListArchiveDocumentsResponsePage struct { Data []ArchiveDocument `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListArchiveDocumentsResponsePage) SetData(v []ArchiveDocument) *ListArc } func (o ListArchiveDocumentsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListArchiveDocumentsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListArchiveDocumentsResponsePage struct { diff --git a/model/model_list_cashbook_entries_response.go b/model/model_list_cashbook_entries_response.go index 268366a..fd2e707 100644 --- a/model/model_list_cashbook_entries_response.go +++ b/model/model_list_cashbook_entries_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListCashbookEntriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCashbookEntriesResponse{} + // ListCashbookEntriesResponse type ListCashbookEntriesResponse struct { Data []CashbookEntry `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListCashbookEntriesResponse) SetData(v []CashbookEntry) *ListCashbookEn } func (o ListCashbookEntriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCashbookEntriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListCashbookEntriesResponse struct { diff --git a/model/model_list_cities_response.go b/model/model_list_cities_response.go index 33dc3ec..5daabd1 100644 --- a/model/model_list_cities_response.go +++ b/model/model_list_cities_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListCitiesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCitiesResponse{} + // ListCitiesResponse type ListCitiesResponse struct { Data []City `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListCitiesResponse) SetData(v []City) *ListCitiesResponse { } func (o ListCitiesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCitiesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListCitiesResponse struct { diff --git a/model/model_list_clients_response.go b/model/model_list_clients_response.go index a251b5a..1e986ce 100644 --- a/model/model_list_clients_response.go +++ b/model/model_list_clients_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListClientsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListClientsResponse{} + // ListClientsResponse struct for ListClientsResponse type ListClientsResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListClientsResponse) SetData(v []Client) *ListClientsResponse { } func (o ListClientsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListClientsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListClientsResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListClientsResponse struct { diff --git a/model/model_list_clients_response_page.go b/model/model_list_clients_response_page.go index a65719e..e219e48 100644 --- a/model/model_list_clients_response_page.go +++ b/model/model_list_clients_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListClientsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListClientsResponsePage{} + // ListClientsResponsePage struct for ListClientsResponsePage type ListClientsResponsePage struct { Data []Client `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListClientsResponsePage) SetData(v []Client) *ListClientsResponsePage { } func (o ListClientsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListClientsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListClientsResponsePage struct { diff --git a/model/model_list_cost_centers_response.go b/model/model_list_cost_centers_response.go index d773b91..06acc70 100644 --- a/model/model_list_cost_centers_response.go +++ b/model/model_list_cost_centers_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListCostCentersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCostCentersResponse{} + // ListCostCentersResponse struct for ListCostCentersResponse type ListCostCentersResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListCostCentersResponse) SetData(v []string) *ListCostCentersResponse { } func (o ListCostCentersResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCostCentersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListCostCentersResponse struct { diff --git a/model/model_list_countries_response.go b/model/model_list_countries_response.go index 52a2fae..5606511 100644 --- a/model/model_list_countries_response.go +++ b/model/model_list_countries_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListCountriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCountriesResponse{} + // ListCountriesResponse type ListCountriesResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListCountriesResponse) SetData(v []string) *ListCountriesResponse { } func (o ListCountriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCountriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListCountriesResponse struct { diff --git a/model/model_list_currencies_response.go b/model/model_list_currencies_response.go index b25cb1a..d6ab131 100644 --- a/model/model_list_currencies_response.go +++ b/model/model_list_currencies_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListCurrenciesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListCurrenciesResponse{} + // ListCurrenciesResponse type ListCurrenciesResponse struct { Data []Currency `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListCurrenciesResponse) SetData(v []Currency) *ListCurrenciesResponse { } func (o ListCurrenciesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListCurrenciesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListCurrenciesResponse struct { diff --git a/model/model_list_delivery_notes_default_causals_response.go b/model/model_list_delivery_notes_default_causals_response.go index 88dd996..be136af 100644 --- a/model/model_list_delivery_notes_default_causals_response.go +++ b/model/model_list_delivery_notes_default_causals_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListDeliveryNotesDefaultCausalsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDeliveryNotesDefaultCausalsResponse{} + // ListDeliveryNotesDefaultCausalsResponse type ListDeliveryNotesDefaultCausalsResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListDeliveryNotesDefaultCausalsResponse) SetData(v []string) *ListDeliv } func (o ListDeliveryNotesDefaultCausalsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListDeliveryNotesDefaultCausalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListDeliveryNotesDefaultCausalsResponse struct { diff --git a/model/model_list_detailed_countries_response.go b/model/model_list_detailed_countries_response.go index 5a6993a..7e7d332 100644 --- a/model/model_list_detailed_countries_response.go +++ b/model/model_list_detailed_countries_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListDetailedCountriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListDetailedCountriesResponse{} + // ListDetailedCountriesResponse struct for ListDetailedCountriesResponse type ListDetailedCountriesResponse struct { Data []DetailedCountry `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ListDetailedCountriesResponse) SetData(v []DetailedCountry) *ListDetail } func (o ListDetailedCountriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListDetailedCountriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListDetailedCountriesResponse struct { diff --git a/model/model_list_emails_response.go b/model/model_list_emails_response.go index eed538a..302d247 100644 --- a/model/model_list_emails_response.go +++ b/model/model_list_emails_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListEmailsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListEmailsResponse{} + // ListEmailsResponse struct for ListEmailsResponse type ListEmailsResponse struct { // Current page number. @@ -577,6 +580,14 @@ func (o *ListEmailsResponse) SetData(v []Email) *ListEmailsResponse { } func (o ListEmailsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListEmailsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -614,7 +625,7 @@ func (o ListEmailsResponse) MarshalJSON() ([]byte, error) { if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListEmailsResponse struct { diff --git a/model/model_list_emails_response_page.go b/model/model_list_emails_response_page.go index 512caac..6e3bf91 100644 --- a/model/model_list_emails_response_page.go +++ b/model/model_list_emails_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListEmailsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListEmailsResponsePage{} + // ListEmailsResponsePage struct for ListEmailsResponsePage type ListEmailsResponsePage struct { Data []Email `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ListEmailsResponsePage) SetData(v []Email) *ListEmailsResponsePage { } func (o ListEmailsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListEmailsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListEmailsResponsePage struct { diff --git a/model/model_list_f24_response.go b/model/model_list_f24_response.go index 0166366..dc07c95 100644 --- a/model/model_list_f24_response.go +++ b/model/model_list_f24_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListF24Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListF24Response{} + // ListF24Response type ListF24Response struct { // Current page number. @@ -612,6 +615,14 @@ func (o *ListF24Response) SetAggregatedData(v ListF24ResponseAggregatedData) *Li } func (o ListF24Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListF24Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -652,7 +663,7 @@ func (o ListF24Response) MarshalJSON() ([]byte, error) { if !isNil(o.AggregatedData) { toSerialize["aggregated_data"] = o.AggregatedData } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListF24Response struct { diff --git a/model/model_list_f24_response_aggregated_data.go b/model/model_list_f24_response_aggregated_data.go index 351195d..d53fedb 100644 --- a/model/model_list_f24_response_aggregated_data.go +++ b/model/model_list_f24_response_aggregated_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListF24ResponseAggregatedData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListF24ResponseAggregatedData{} + // ListF24ResponseAggregatedData struct for ListF24ResponseAggregatedData type ListF24ResponseAggregatedData struct { // Total amount. @@ -83,11 +86,19 @@ func (o *ListF24ResponseAggregatedData) UnsetAmount() { } func (o ListF24ResponseAggregatedData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListF24ResponseAggregatedData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Amount.IsSet() { toSerialize["amount"] = o.Amount.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListF24ResponseAggregatedData struct { diff --git a/model/model_list_f24_response_aggregation.go b/model/model_list_f24_response_aggregation.go index c2f25d6..0f0a456 100644 --- a/model/model_list_f24_response_aggregation.go +++ b/model/model_list_f24_response_aggregation.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListF24ResponseAggregation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListF24ResponseAggregation{} + // ListF24ResponseAggregation struct for ListF24ResponseAggregation type ListF24ResponseAggregation struct { AggregatedData *ListF24ResponseAggregatedData `json:"aggregated_data,omitempty"` @@ -71,11 +74,19 @@ func (o *ListF24ResponseAggregation) SetAggregatedData(v ListF24ResponseAggregat } func (o ListF24ResponseAggregation) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListF24ResponseAggregation) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.AggregatedData) { toSerialize["aggregated_data"] = o.AggregatedData } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListF24ResponseAggregation struct { diff --git a/model/model_list_f24_response_page.go b/model/model_list_f24_response_page.go index e5ff6f5..4157da0 100644 --- a/model/model_list_f24_response_page.go +++ b/model/model_list_f24_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListF24ResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListF24ResponsePage{} + // ListF24ResponsePage struct for ListF24ResponsePage type ListF24ResponsePage struct { Data []F24 `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListF24ResponsePage) SetData(v []F24) *ListF24ResponsePage { } func (o ListF24ResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListF24ResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListF24ResponsePage struct { diff --git a/model/model_list_issued_documents_response.go b/model/model_list_issued_documents_response.go index e07a9f3..872ab89 100644 --- a/model/model_list_issued_documents_response.go +++ b/model/model_list_issued_documents_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListIssuedDocumentsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListIssuedDocumentsResponse{} + // ListIssuedDocumentsResponse struct for ListIssuedDocumentsResponse type ListIssuedDocumentsResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListIssuedDocumentsResponse) SetData(v []IssuedDocument) *ListIssuedDoc } func (o ListIssuedDocumentsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListIssuedDocumentsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListIssuedDocumentsResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListIssuedDocumentsResponse struct { diff --git a/model/model_list_issued_documents_response_page.go b/model/model_list_issued_documents_response_page.go index 305a5b1..165d4fa 100644 --- a/model/model_list_issued_documents_response_page.go +++ b/model/model_list_issued_documents_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListIssuedDocumentsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListIssuedDocumentsResponsePage{} + // ListIssuedDocumentsResponsePage struct for ListIssuedDocumentsResponsePage type ListIssuedDocumentsResponsePage struct { Data []IssuedDocument `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListIssuedDocumentsResponsePage) SetData(v []IssuedDocument) *ListIssue } func (o ListIssuedDocumentsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListIssuedDocumentsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListIssuedDocumentsResponsePage struct { diff --git a/model/model_list_languages_response.go b/model/model_list_languages_response.go index 8eb0664..3d7dad5 100644 --- a/model/model_list_languages_response.go +++ b/model/model_list_languages_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListLanguagesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListLanguagesResponse{} + // ListLanguagesResponse type ListLanguagesResponse struct { Data []Language `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListLanguagesResponse) SetData(v []Language) *ListLanguagesResponse { } func (o ListLanguagesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListLanguagesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListLanguagesResponse struct { diff --git a/model/model_list_payment_accounts_response.go b/model/model_list_payment_accounts_response.go index 141fc70..26062ae 100644 --- a/model/model_list_payment_accounts_response.go +++ b/model/model_list_payment_accounts_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListPaymentAccountsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPaymentAccountsResponse{} + // ListPaymentAccountsResponse type ListPaymentAccountsResponse struct { Data []PaymentAccount `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListPaymentAccountsResponse) SetData(v []PaymentAccount) *ListPaymentAc } func (o ListPaymentAccountsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPaymentAccountsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListPaymentAccountsResponse struct { diff --git a/model/model_list_payment_methods_response.go b/model/model_list_payment_methods_response.go index 5ed2d98..67ce663 100644 --- a/model/model_list_payment_methods_response.go +++ b/model/model_list_payment_methods_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListPaymentMethodsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPaymentMethodsResponse{} + // ListPaymentMethodsResponse type ListPaymentMethodsResponse struct { Data []PaymentMethod `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListPaymentMethodsResponse) SetData(v []PaymentMethod) *ListPaymentMeth } func (o ListPaymentMethodsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPaymentMethodsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListPaymentMethodsResponse struct { diff --git a/model/model_list_product_categories_response.go b/model/model_list_product_categories_response.go index 2c63a9c..f88e88e 100644 --- a/model/model_list_product_categories_response.go +++ b/model/model_list_product_categories_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListProductCategoriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListProductCategoriesResponse{} + // ListProductCategoriesResponse type ListProductCategoriesResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListProductCategoriesResponse) SetData(v []string) *ListProductCategori } func (o ListProductCategoriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListProductCategoriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListProductCategoriesResponse struct { diff --git a/model/model_list_products_response.go b/model/model_list_products_response.go index 595b18e..e582869 100644 --- a/model/model_list_products_response.go +++ b/model/model_list_products_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListProductsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListProductsResponse{} + // ListProductsResponse struct for ListProductsResponse type ListProductsResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListProductsResponse) SetData(v []Product) *ListProductsResponse { } func (o ListProductsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListProductsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListProductsResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListProductsResponse struct { diff --git a/model/model_list_products_response_page.go b/model/model_list_products_response_page.go index a49ee05..76c89ed 100644 --- a/model/model_list_products_response_page.go +++ b/model/model_list_products_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListProductsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListProductsResponsePage{} + // ListProductsResponsePage struct for ListProductsResponsePage type ListProductsResponsePage struct { Data []Product `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListProductsResponsePage) SetData(v []Product) *ListProductsResponsePag } func (o ListProductsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListProductsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListProductsResponsePage struct { diff --git a/model/model_list_receipts_response.go b/model/model_list_receipts_response.go index e247fcd..870fdcb 100644 --- a/model/model_list_receipts_response.go +++ b/model/model_list_receipts_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListReceiptsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListReceiptsResponse{} + // ListReceiptsResponse type ListReceiptsResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListReceiptsResponse) SetData(v []Receipt) *ListReceiptsResponse { } func (o ListReceiptsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListReceiptsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListReceiptsResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListReceiptsResponse struct { diff --git a/model/model_list_receipts_response_page.go b/model/model_list_receipts_response_page.go index 71bda0c..1e78472 100644 --- a/model/model_list_receipts_response_page.go +++ b/model/model_list_receipts_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListReceiptsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListReceiptsResponsePage{} + // ListReceiptsResponsePage struct for ListReceiptsResponsePage type ListReceiptsResponsePage struct { Data []Receipt `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListReceiptsResponsePage) SetData(v []Receipt) *ListReceiptsResponsePag } func (o ListReceiptsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListReceiptsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListReceiptsResponsePage struct { diff --git a/model/model_list_received_document_categories_response.go b/model/model_list_received_document_categories_response.go index 0846f40..3c89902 100644 --- a/model/model_list_received_document_categories_response.go +++ b/model/model_list_received_document_categories_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListReceivedDocumentCategoriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListReceivedDocumentCategoriesResponse{} + // ListReceivedDocumentCategoriesResponse type ListReceivedDocumentCategoriesResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListReceivedDocumentCategoriesResponse) SetData(v []string) *ListReceiv } func (o ListReceivedDocumentCategoriesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListReceivedDocumentCategoriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListReceivedDocumentCategoriesResponse struct { diff --git a/model/model_list_received_documents_response.go b/model/model_list_received_documents_response.go index 054e148..785eff2 100644 --- a/model/model_list_received_documents_response.go +++ b/model/model_list_received_documents_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListReceivedDocumentsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListReceivedDocumentsResponse{} + // ListReceivedDocumentsResponse type ListReceivedDocumentsResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListReceivedDocumentsResponse) SetData(v []ReceivedDocument) *ListRecei } func (o ListReceivedDocumentsResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListReceivedDocumentsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListReceivedDocumentsResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListReceivedDocumentsResponse struct { diff --git a/model/model_list_received_documents_response_page.go b/model/model_list_received_documents_response_page.go index cfc1fd4..a8f9896 100644 --- a/model/model_list_received_documents_response_page.go +++ b/model/model_list_received_documents_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListReceivedDocumentsResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListReceivedDocumentsResponsePage{} + // ListReceivedDocumentsResponsePage struct for ListReceivedDocumentsResponsePage type ListReceivedDocumentsResponsePage struct { Data []ReceivedDocument `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListReceivedDocumentsResponsePage) SetData(v []ReceivedDocument) *ListR } func (o ListReceivedDocumentsResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListReceivedDocumentsResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListReceivedDocumentsResponsePage struct { diff --git a/model/model_list_revenue_centers_response.go b/model/model_list_revenue_centers_response.go index 282ee0a..df06d01 100644 --- a/model/model_list_revenue_centers_response.go +++ b/model/model_list_revenue_centers_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListRevenueCentersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRevenueCentersResponse{} + // ListRevenueCentersResponse type ListRevenueCentersResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListRevenueCentersResponse) SetData(v []string) *ListRevenueCentersResp } func (o ListRevenueCentersResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRevenueCentersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListRevenueCentersResponse struct { diff --git a/model/model_list_suppliers_response.go b/model/model_list_suppliers_response.go index 5645be1..1e2b57b 100644 --- a/model/model_list_suppliers_response.go +++ b/model/model_list_suppliers_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListSuppliersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListSuppliersResponse{} + // ListSuppliersResponse struct for ListSuppliersResponse type ListSuppliersResponse struct { // Current page number. @@ -578,6 +581,14 @@ func (o *ListSuppliersResponse) SetData(v []Supplier) *ListSuppliersResponse { } func (o ListSuppliersResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListSuppliersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -615,7 +626,7 @@ func (o ListSuppliersResponse) MarshalJSON() ([]byte, error) { if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListSuppliersResponse struct { diff --git a/model/model_list_suppliers_response_page.go b/model/model_list_suppliers_response_page.go index 9f4064d..497949b 100644 --- a/model/model_list_suppliers_response_page.go +++ b/model/model_list_suppliers_response_page.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListSuppliersResponsePage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListSuppliersResponsePage{} + // ListSuppliersResponsePage struct for ListSuppliersResponsePage type ListSuppliersResponsePage struct { Data []Supplier `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListSuppliersResponsePage) SetData(v []Supplier) *ListSuppliersResponse } func (o ListSuppliersResponsePage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListSuppliersResponsePage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListSuppliersResponsePage struct { diff --git a/model/model_list_templates_response.go b/model/model_list_templates_response.go index 9668866..8adc936 100644 --- a/model/model_list_templates_response.go +++ b/model/model_list_templates_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListTemplatesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListTemplatesResponse{} + // ListTemplatesResponse type ListTemplatesResponse struct { Data []DocumentTemplate `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListTemplatesResponse) SetData(v []DocumentTemplate) *ListTemplatesResp } func (o ListTemplatesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListTemplatesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListTemplatesResponse struct { diff --git a/model/model_list_units_of_measure_response.go b/model/model_list_units_of_measure_response.go index d504d65..46f7afe 100644 --- a/model/model_list_units_of_measure_response.go +++ b/model/model_list_units_of_measure_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListUnitsOfMeasureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUnitsOfMeasureResponse{} + // ListUnitsOfMeasureResponse type ListUnitsOfMeasureResponse struct { Data []string `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListUnitsOfMeasureResponse) SetData(v []string) *ListUnitsOfMeasureResp } func (o ListUnitsOfMeasureResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUnitsOfMeasureResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListUnitsOfMeasureResponse struct { diff --git a/model/model_list_user_companies_response.go b/model/model_list_user_companies_response.go index 78967bc..78ae175 100644 --- a/model/model_list_user_companies_response.go +++ b/model/model_list_user_companies_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListUserCompaniesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUserCompaniesResponse{} + // ListUserCompaniesResponse type ListUserCompaniesResponse struct { Data NullableListUserCompaniesResponseData `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *ListUserCompaniesResponse) UnsetData() { } func (o ListUserCompaniesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUserCompaniesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListUserCompaniesResponse struct { diff --git a/model/model_list_user_companies_response_data.go b/model/model_list_user_companies_response_data.go index 59c0411..a1475b3 100644 --- a/model/model_list_user_companies_response_data.go +++ b/model/model_list_user_companies_response_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListUserCompaniesResponseData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUserCompaniesResponseData{} + // ListUserCompaniesResponseData struct for ListUserCompaniesResponseData type ListUserCompaniesResponseData struct { Companies []Company `json:"companies,omitempty"` @@ -72,11 +75,19 @@ func (o *ListUserCompaniesResponseData) SetCompanies(v []Company) *ListUserCompa } func (o ListUserCompaniesResponseData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUserCompaniesResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Companies != nil { toSerialize["companies"] = o.Companies } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListUserCompaniesResponseData struct { diff --git a/model/model_list_vat_types_response.go b/model/model_list_vat_types_response.go index 1c3faf5..fd82dfc 100644 --- a/model/model_list_vat_types_response.go +++ b/model/model_list_vat_types_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ListVatTypesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListVatTypesResponse{} + // ListVatTypesResponse type ListVatTypesResponse struct { Data []VatType `json:"data,omitempty"` @@ -72,11 +75,19 @@ func (o *ListVatTypesResponse) SetData(v []VatType) *ListVatTypesResponse { } func (o ListVatTypesResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListVatTypesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data != nil { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListVatTypesResponse struct { diff --git a/model/model_modify_archive_document_request.go b/model/model_modify_archive_document_request.go index 914ca4c..b313525 100644 --- a/model/model_modify_archive_document_request.go +++ b/model/model_modify_archive_document_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyArchiveDocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyArchiveDocumentRequest{} + // ModifyArchiveDocumentRequest type ModifyArchiveDocumentRequest struct { Data *ArchiveDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyArchiveDocumentRequest) SetData(v ArchiveDocument) *ModifyArchive } func (o ModifyArchiveDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyArchiveDocumentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyArchiveDocumentRequest struct { diff --git a/model/model_modify_archive_document_response.go b/model/model_modify_archive_document_response.go index 9359f7b..288e951 100644 --- a/model/model_modify_archive_document_response.go +++ b/model/model_modify_archive_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyArchiveDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyArchiveDocumentResponse{} + // ModifyArchiveDocumentResponse type ModifyArchiveDocumentResponse struct { Data *ArchiveDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyArchiveDocumentResponse) SetData(v ArchiveDocument) *ModifyArchiv } func (o ModifyArchiveDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyArchiveDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyArchiveDocumentResponse struct { diff --git a/model/model_modify_cashbook_entry_request.go b/model/model_modify_cashbook_entry_request.go index 89d7157..30b75ae 100644 --- a/model/model_modify_cashbook_entry_request.go +++ b/model/model_modify_cashbook_entry_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyCashbookEntryRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyCashbookEntryRequest{} + // ModifyCashbookEntryRequest type ModifyCashbookEntryRequest struct { Data *CashbookEntry `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyCashbookEntryRequest) SetData(v CashbookEntry) *ModifyCashbookEnt } func (o ModifyCashbookEntryRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyCashbookEntryRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyCashbookEntryRequest struct { diff --git a/model/model_modify_cashbook_entry_response.go b/model/model_modify_cashbook_entry_response.go index b11825a..248fe02 100644 --- a/model/model_modify_cashbook_entry_response.go +++ b/model/model_modify_cashbook_entry_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyCashbookEntryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyCashbookEntryResponse{} + // ModifyCashbookEntryResponse type ModifyCashbookEntryResponse struct { Data *CashbookEntry `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyCashbookEntryResponse) SetData(v CashbookEntry) *ModifyCashbookEn } func (o ModifyCashbookEntryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyCashbookEntryResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyCashbookEntryResponse struct { diff --git a/model/model_modify_client_request.go b/model/model_modify_client_request.go index 275671a..162d505 100644 --- a/model/model_modify_client_request.go +++ b/model/model_modify_client_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyClientRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyClientRequest{} + // ModifyClientRequest type ModifyClientRequest struct { Data *Client `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyClientRequest) SetData(v Client) *ModifyClientRequest { } func (o ModifyClientRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyClientRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyClientRequest struct { diff --git a/model/model_modify_client_response.go b/model/model_modify_client_response.go index 4ccfd08..e8746f2 100644 --- a/model/model_modify_client_response.go +++ b/model/model_modify_client_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyClientResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyClientResponse{} + // ModifyClientResponse struct for ModifyClientResponse type ModifyClientResponse struct { Data *Client `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyClientResponse) SetData(v Client) *ModifyClientResponse { } func (o ModifyClientResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyClientResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyClientResponse struct { diff --git a/model/model_modify_f24_request.go b/model/model_modify_f24_request.go index 2d0af16..87f47d7 100644 --- a/model/model_modify_f24_request.go +++ b/model/model_modify_f24_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyF24Request type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyF24Request{} + // ModifyF24Request type ModifyF24Request struct { Data *F24 `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyF24Request) SetData(v F24) *ModifyF24Request { } func (o ModifyF24Request) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyF24Request) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyF24Request struct { diff --git a/model/model_modify_f24_response.go b/model/model_modify_f24_response.go index fa40e19..6a3f8e9 100644 --- a/model/model_modify_f24_response.go +++ b/model/model_modify_f24_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyF24Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyF24Response{} + // ModifyF24Response type ModifyF24Response struct { Data *F24 `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyF24Response) SetData(v F24) *ModifyF24Response { } func (o ModifyF24Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyF24Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyF24Response struct { diff --git a/model/model_modify_issued_document_request.go b/model/model_modify_issued_document_request.go index b85ba9f..65b572d 100644 --- a/model/model_modify_issued_document_request.go +++ b/model/model_modify_issued_document_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyIssuedDocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyIssuedDocumentRequest{} + // ModifyIssuedDocumentRequest type ModifyIssuedDocumentRequest struct { Data *IssuedDocument `json:"data,omitempty"` @@ -105,6 +108,14 @@ func (o *ModifyIssuedDocumentRequest) SetOptions(v IssuedDocumentOptions) *Modif } func (o ModifyIssuedDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyIssuedDocumentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data @@ -112,7 +123,7 @@ func (o ModifyIssuedDocumentRequest) MarshalJSON() ([]byte, error) { if !isNil(o.Options) { toSerialize["options"] = o.Options } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyIssuedDocumentRequest struct { diff --git a/model/model_modify_issued_document_response.go b/model/model_modify_issued_document_response.go index d2e3d8d..72d3090 100644 --- a/model/model_modify_issued_document_response.go +++ b/model/model_modify_issued_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyIssuedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyIssuedDocumentResponse{} + // ModifyIssuedDocumentResponse struct for ModifyIssuedDocumentResponse type ModifyIssuedDocumentResponse struct { Data *IssuedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyIssuedDocumentResponse) SetData(v IssuedDocument) *ModifyIssuedDo } func (o ModifyIssuedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyIssuedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyIssuedDocumentResponse struct { diff --git a/model/model_modify_payment_account_request.go b/model/model_modify_payment_account_request.go index 6bc138a..883cc00 100644 --- a/model/model_modify_payment_account_request.go +++ b/model/model_modify_payment_account_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyPaymentAccountRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyPaymentAccountRequest{} + // ModifyPaymentAccountRequest struct for ModifyPaymentAccountRequest type ModifyPaymentAccountRequest struct { Data NullablePaymentAccount `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *ModifyPaymentAccountRequest) UnsetData() { } func (o ModifyPaymentAccountRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyPaymentAccountRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyPaymentAccountRequest struct { diff --git a/model/model_modify_payment_account_response.go b/model/model_modify_payment_account_response.go index 7ce66b2..ac2828e 100644 --- a/model/model_modify_payment_account_response.go +++ b/model/model_modify_payment_account_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyPaymentAccountResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyPaymentAccountResponse{} + // ModifyPaymentAccountResponse struct for ModifyPaymentAccountResponse type ModifyPaymentAccountResponse struct { Data NullablePaymentAccount `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *ModifyPaymentAccountResponse) UnsetData() { } func (o ModifyPaymentAccountResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyPaymentAccountResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyPaymentAccountResponse struct { diff --git a/model/model_modify_payment_method_request.go b/model/model_modify_payment_method_request.go index 3d630b6..4ee335e 100644 --- a/model/model_modify_payment_method_request.go +++ b/model/model_modify_payment_method_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyPaymentMethodRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyPaymentMethodRequest{} + // ModifyPaymentMethodRequest struct for ModifyPaymentMethodRequest type ModifyPaymentMethodRequest struct { Data *PaymentMethod `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyPaymentMethodRequest) SetData(v PaymentMethod) *ModifyPaymentMeth } func (o ModifyPaymentMethodRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyPaymentMethodRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyPaymentMethodRequest struct { diff --git a/model/model_modify_payment_method_response.go b/model/model_modify_payment_method_response.go index 84c69f7..ae3aff3 100644 --- a/model/model_modify_payment_method_response.go +++ b/model/model_modify_payment_method_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyPaymentMethodResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyPaymentMethodResponse{} + // ModifyPaymentMethodResponse struct for ModifyPaymentMethodResponse type ModifyPaymentMethodResponse struct { Data *PaymentMethod `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyPaymentMethodResponse) SetData(v PaymentMethod) *ModifyPaymentMet } func (o ModifyPaymentMethodResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyPaymentMethodResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyPaymentMethodResponse struct { diff --git a/model/model_modify_product_request.go b/model/model_modify_product_request.go index cf55786..ad07dd6 100644 --- a/model/model_modify_product_request.go +++ b/model/model_modify_product_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyProductRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyProductRequest{} + // ModifyProductRequest struct for ModifyProductRequest type ModifyProductRequest struct { Data *Product `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyProductRequest) SetData(v Product) *ModifyProductRequest { } func (o ModifyProductRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyProductRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyProductRequest struct { diff --git a/model/model_modify_product_response.go b/model/model_modify_product_response.go index 3f7d2a5..ea1656e 100644 --- a/model/model_modify_product_response.go +++ b/model/model_modify_product_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyProductResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyProductResponse{} + // ModifyProductResponse struct for ModifyProductResponse type ModifyProductResponse struct { Data *Product `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyProductResponse) SetData(v Product) *ModifyProductResponse { } func (o ModifyProductResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyProductResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyProductResponse struct { diff --git a/model/model_modify_receipt_request.go b/model/model_modify_receipt_request.go index 8822af2..8ad04d0 100644 --- a/model/model_modify_receipt_request.go +++ b/model/model_modify_receipt_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyReceiptRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyReceiptRequest{} + // ModifyReceiptRequest type ModifyReceiptRequest struct { Data *Receipt `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyReceiptRequest) SetData(v Receipt) *ModifyReceiptRequest { } func (o ModifyReceiptRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyReceiptRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyReceiptRequest struct { diff --git a/model/model_modify_receipt_response.go b/model/model_modify_receipt_response.go index e900846..ae10510 100644 --- a/model/model_modify_receipt_response.go +++ b/model/model_modify_receipt_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyReceiptResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyReceiptResponse{} + // ModifyReceiptResponse type ModifyReceiptResponse struct { Data *Receipt `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyReceiptResponse) SetData(v Receipt) *ModifyReceiptResponse { } func (o ModifyReceiptResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyReceiptResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyReceiptResponse struct { diff --git a/model/model_modify_received_document_request.go b/model/model_modify_received_document_request.go index b7027dd..b95c3f4 100644 --- a/model/model_modify_received_document_request.go +++ b/model/model_modify_received_document_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyReceivedDocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyReceivedDocumentRequest{} + // ModifyReceivedDocumentRequest type ModifyReceivedDocumentRequest struct { Data *ReceivedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyReceivedDocumentRequest) SetData(v ReceivedDocument) *ModifyRecei } func (o ModifyReceivedDocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyReceivedDocumentRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyReceivedDocumentRequest struct { diff --git a/model/model_modify_received_document_response.go b/model/model_modify_received_document_response.go index e3497e8..cf61856 100644 --- a/model/model_modify_received_document_response.go +++ b/model/model_modify_received_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyReceivedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyReceivedDocumentResponse{} + // ModifyReceivedDocumentResponse type ModifyReceivedDocumentResponse struct { Data *ReceivedDocument `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifyReceivedDocumentResponse) SetData(v ReceivedDocument) *ModifyRece } func (o ModifyReceivedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyReceivedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyReceivedDocumentResponse struct { diff --git a/model/model_modify_supplier_request.go b/model/model_modify_supplier_request.go index 6ed5128..a607c19 100644 --- a/model/model_modify_supplier_request.go +++ b/model/model_modify_supplier_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifySupplierRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifySupplierRequest{} + // ModifySupplierRequest struct for ModifySupplierRequest type ModifySupplierRequest struct { Data *Supplier `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifySupplierRequest) SetData(v Supplier) *ModifySupplierRequest { } func (o ModifySupplierRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifySupplierRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifySupplierRequest struct { diff --git a/model/model_modify_supplier_response.go b/model/model_modify_supplier_response.go index ed4b338..917e19b 100644 --- a/model/model_modify_supplier_response.go +++ b/model/model_modify_supplier_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifySupplierResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifySupplierResponse{} + // ModifySupplierResponse struct for ModifySupplierResponse type ModifySupplierResponse struct { Data *Supplier `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ModifySupplierResponse) SetData(v Supplier) *ModifySupplierResponse { } func (o ModifySupplierResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifySupplierResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifySupplierResponse struct { diff --git a/model/model_modify_vat_type_request.go b/model/model_modify_vat_type_request.go index f627c72..8b25f6a 100644 --- a/model/model_modify_vat_type_request.go +++ b/model/model_modify_vat_type_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyVatTypeRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyVatTypeRequest{} + // ModifyVatTypeRequest struct for ModifyVatTypeRequest type ModifyVatTypeRequest struct { Data NullableVatType `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *ModifyVatTypeRequest) UnsetData() { } func (o ModifyVatTypeRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyVatTypeRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyVatTypeRequest struct { diff --git a/model/model_modify_vat_type_response.go b/model/model_modify_vat_type_response.go index cd13b45..f1f2826 100644 --- a/model/model_modify_vat_type_response.go +++ b/model/model_modify_vat_type_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ModifyVatTypeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ModifyVatTypeResponse{} + // ModifyVatTypeResponse struct for ModifyVatTypeResponse type ModifyVatTypeResponse struct { Data NullableVatType `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *ModifyVatTypeResponse) UnsetData() { } func (o ModifyVatTypeResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ModifyVatTypeResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableModifyVatTypeResponse struct { diff --git a/model/model_monthly_total.go b/model/model_monthly_total.go index c5772d3..9df866e 100644 --- a/model/model_monthly_total.go +++ b/model/model_monthly_total.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the MonthlyTotal type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MonthlyTotal{} + // MonthlyTotal type MonthlyTotal struct { // Monthly total net amount. @@ -175,6 +178,14 @@ func (o *MonthlyTotal) UnsetCount() { } func (o MonthlyTotal) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MonthlyTotal) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Net.IsSet() { toSerialize["net"] = o.Net.Get() @@ -185,7 +196,7 @@ func (o MonthlyTotal) MarshalJSON() ([]byte, error) { if o.Count.IsSet() { toSerialize["count"] = o.Count.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableMonthlyTotal struct { diff --git a/model/model_original_document_type.go b/model/model_original_document_type.go index eed4eb1..27f0cce 100644 --- a/model/model_original_document_type.go +++ b/model/model_original_document_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_pagination.go b/model/model_pagination.go index fb68a7a..16165bb 100644 --- a/model/model_pagination.go +++ b/model/model_pagination.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Pagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pagination{} + // Pagination type Pagination struct { // Current page number. @@ -543,6 +546,14 @@ func (o *Pagination) UnsetTotal() { } func (o Pagination) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pagination) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CurrentPage.IsSet() { toSerialize["current_page"] = o.CurrentPage.Get() @@ -577,7 +588,7 @@ func (o Pagination) MarshalJSON() ([]byte, error) { if o.Total.IsSet() { toSerialize["total"] = o.Total.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePagination struct { diff --git a/model/model_payment_account.go b/model/model_payment_account.go index c9f9bb2..6e1593c 100644 --- a/model/model_payment_account.go +++ b/model/model_payment_account.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaymentAccount type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentAccount{} + // PaymentAccount type PaymentAccount struct { // Unique identifier @@ -349,6 +352,14 @@ func (o *PaymentAccount) UnsetVirtual() { } func (o PaymentAccount) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentAccount) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -371,7 +382,7 @@ func (o PaymentAccount) MarshalJSON() ([]byte, error) { if o.Virtual.IsSet() { toSerialize["virtual"] = o.Virtual.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePaymentAccount struct { diff --git a/model/model_payment_account_type.go b/model/model_payment_account_type.go index 3a5335d..b49844f 100644 --- a/model/model_payment_account_type.go +++ b/model/model_payment_account_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_payment_method.go b/model/model_payment_method.go index f6290e1..edc41bc 100644 --- a/model/model_payment_method.go +++ b/model/model_payment_method.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaymentMethod type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentMethod{} + // PaymentMethod struct for PaymentMethod type PaymentMethod struct { // Unique identifier @@ -476,6 +479,14 @@ func (o *PaymentMethod) UnsetEiPaymentMethod() { } func (o PaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethod) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -507,7 +518,7 @@ func (o PaymentMethod) MarshalJSON() ([]byte, error) { if o.EiPaymentMethod.IsSet() { toSerialize["ei_payment_method"] = o.EiPaymentMethod.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePaymentMethod struct { diff --git a/model/model_payment_method_details.go b/model/model_payment_method_details.go index 7f2206c..5a4011f 100644 --- a/model/model_payment_method_details.go +++ b/model/model_payment_method_details.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PaymentMethodDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentMethodDetails{} + // PaymentMethodDetails struct for PaymentMethodDetails type PaymentMethodDetails struct { // Details title. @@ -129,6 +132,14 @@ func (o *PaymentMethodDetails) UnsetDescription() { } func (o PaymentMethodDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethodDetails) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Title.IsSet() { toSerialize["title"] = o.Title.Get() @@ -136,7 +147,7 @@ func (o PaymentMethodDetails) MarshalJSON() ([]byte, error) { if o.Description.IsSet() { toSerialize["description"] = o.Description.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePaymentMethodDetails struct { diff --git a/model/model_payment_method_type.go b/model/model_payment_method_type.go index c4159dc..c613739 100644 --- a/model/model_payment_method_type.go +++ b/model/model_payment_method_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_payment_terms_type.go b/model/model_payment_terms_type.go index d4982dd..4a04a09 100644 --- a/model/model_payment_terms_type.go +++ b/model/model_payment_terms_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_permission_level.go b/model/model_permission_level.go index 3ce0917..35952aa 100644 --- a/model/model_permission_level.go +++ b/model/model_permission_level.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_permissions.go b/model/model_permissions.go index c2d07d9..d40e0bb 100644 --- a/model/model_permissions.go +++ b/model/model_permissions.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Permissions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Permissions{} + // Permissions type Permissions struct { FicSituation *PermissionLevel `json:"fic_situation,omitempty"` @@ -898,6 +901,14 @@ func (o *Permissions) UnsetFicIssuedDocumentsDetailed() { } func (o Permissions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Permissions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.FicSituation) { toSerialize["fic_situation"] = o.FicSituation @@ -974,7 +985,7 @@ func (o Permissions) MarshalJSON() ([]byte, error) { if o.FicIssuedDocumentsDetailed.IsSet() { toSerialize["fic_issued_documents_detailed"] = o.FicIssuedDocumentsDetailed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePermissions struct { diff --git a/model/model_permissions_fic_issued_documents_detailed.go b/model/model_permissions_fic_issued_documents_detailed.go index 6df876c..64e2039 100644 --- a/model/model_permissions_fic_issued_documents_detailed.go +++ b/model/model_permissions_fic_issued_documents_detailed.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the PermissionsFicIssuedDocumentsDetailed type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PermissionsFicIssuedDocumentsDetailed{} + // PermissionsFicIssuedDocumentsDetailed struct for PermissionsFicIssuedDocumentsDetailed type PermissionsFicIssuedDocumentsDetailed struct { Quotes *PermissionLevel `json:"quotes,omitempty"` @@ -377,6 +380,14 @@ func (o *PermissionsFicIssuedDocumentsDetailed) SetSelfInvoices(v PermissionLeve } func (o PermissionsFicIssuedDocumentsDetailed) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PermissionsFicIssuedDocumentsDetailed) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Quotes) { toSerialize["quotes"] = o.Quotes @@ -408,7 +419,7 @@ func (o PermissionsFicIssuedDocumentsDetailed) MarshalJSON() ([]byte, error) { if !isNil(o.SelfInvoices) { toSerialize["self_invoices"] = o.SelfInvoices } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullablePermissionsFicIssuedDocumentsDetailed struct { diff --git a/model/model_product.go b/model/model_product.go index 64d6083..96270c3 100644 --- a/model/model_product.go +++ b/model/model_product.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Product type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Product{} + // Product struct for Product type Product struct { // Unique identifier. @@ -908,6 +911,14 @@ func (o *Product) UnsetUpdatedAt() { } func (o Product) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Product) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -966,7 +977,7 @@ func (o Product) MarshalJSON() ([]byte, error) { if o.UpdatedAt.IsSet() { toSerialize["updated_at"] = o.UpdatedAt.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableProduct struct { diff --git a/model/model_receipt.go b/model/model_receipt.go index 4139856..f345e40 100644 --- a/model/model_receipt.go +++ b/model/model_receipt.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Receipt type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Receipt{} + // Receipt type Receipt struct { // Receipt unique identifier. @@ -700,6 +703,14 @@ func (o *Receipt) SetItemsList(v []ReceiptItemsListItem) *Receipt { } func (o Receipt) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Receipt) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -746,7 +757,7 @@ func (o Receipt) MarshalJSON() ([]byte, error) { if o.ItemsList != nil { toSerialize["items_list"] = o.ItemsList } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceipt struct { diff --git a/model/model_receipt_items_list_item.go b/model/model_receipt_items_list_item.go index 2d90bc3..c8705c4 100644 --- a/model/model_receipt_items_list_item.go +++ b/model/model_receipt_items_list_item.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceiptItemsListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceiptItemsListItem{} + // ReceiptItemsListItem struct for ReceiptItemsListItem type ReceiptItemsListItem struct { // Item unique identifier. @@ -266,6 +269,14 @@ func (o *ReceiptItemsListItem) UnsetVat() { } func (o ReceiptItemsListItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceiptItemsListItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -282,7 +293,7 @@ func (o ReceiptItemsListItem) MarshalJSON() ([]byte, error) { if o.Vat.IsSet() { toSerialize["vat"] = o.Vat.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceiptItemsListItem struct { diff --git a/model/model_receipt_pre_create_info.go b/model/model_receipt_pre_create_info.go index be07f7f..061ace5 100644 --- a/model/model_receipt_pre_create_info.go +++ b/model/model_receipt_pre_create_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceiptPreCreateInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceiptPreCreateInfo{} + // ReceiptPreCreateInfo type ReceiptPreCreateInfo struct { Numerations map[string]map[string]int32 `json:"numerations,omitempty"` @@ -251,6 +254,14 @@ func (o *ReceiptPreCreateInfo) SetVatTypesList(v []VatType) *ReceiptPreCreateInf } func (o ReceiptPreCreateInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceiptPreCreateInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Numerations) { toSerialize["numerations"] = o.Numerations @@ -270,7 +281,7 @@ func (o ReceiptPreCreateInfo) MarshalJSON() ([]byte, error) { if o.VatTypesList != nil { toSerialize["vat_types_list"] = o.VatTypesList } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceiptPreCreateInfo struct { diff --git a/model/model_receipt_type.go b/model/model_receipt_type.go index 3b42452..ba56857 100644 --- a/model/model_receipt_type.go +++ b/model/model_receipt_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_received_document.go b/model/model_received_document.go index fa4f795..904e40d 100644 --- a/model/model_received_document.go +++ b/model/model_received_document.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocument{} + // ReceivedDocument struct for ReceivedDocument type ReceivedDocument struct { // Unique identifier of the document. @@ -60,6 +63,8 @@ type ReceivedDocument struct { AttachmentUrl NullableString `json:"attachment_url,omitempty"` // [Temporary] [Read Only] Attachment preview url. AttachmentPreviewUrl NullableString `json:"attachment_preview_url,omitempty"` + // If set to false total items amount and total payments amount can be different. + AutoCalculate NullableBool `json:"auto_calculate,omitempty"` // Uploaded attachement token. AttachmentToken NullableString `json:"attachment_token,omitempty"` CreatedAt NullableString `json:"created_at,omitempty"` @@ -1143,6 +1148,50 @@ func (o *ReceivedDocument) UnsetAttachmentPreviewUrl() { o.AttachmentPreviewUrl.Unset() } +// GetAutoCalculate returns the AutoCalculate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ReceivedDocument) GetAutoCalculate() bool { + if o == nil || isNil(o.AutoCalculate.Get()) { + var ret bool + return ret + } + return *o.AutoCalculate.Get() +} + +// GetAutoCalculateOk returns a tuple with the AutoCalculate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ReceivedDocument) GetAutoCalculateOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.AutoCalculate.Get(), o.AutoCalculate.IsSet() +} + +// HasAutoCalculate returns a boolean if a field has been set. +func (o *ReceivedDocument) HasAutoCalculate() bool { + if o != nil && o.AutoCalculate.IsSet() { + return true + } + + return false +} + +// SetAutoCalculate gets a reference to the given NullableBool and assigns it to the AutoCalculate field. +func (o *ReceivedDocument) SetAutoCalculate(v bool) *ReceivedDocument { + o.AutoCalculate.Set(&v) + return o +} +// SetAutoCalculateNil sets the value for AutoCalculate to be an explicit nil +func (o *ReceivedDocument) SetAutoCalculateNil() *ReceivedDocument { + o.AutoCalculate.Set(nil) + return o +} + +// UnsetAutoCalculate ensures that no value is present for AutoCalculate, not even an explicit nil +func (o *ReceivedDocument) UnsetAutoCalculate() { + o.AutoCalculate.Unset() +} + // GetAttachmentToken returns the AttachmentToken field value if set, zero value otherwise (both if not set or set to explicit null). func (o *ReceivedDocument) GetAttachmentToken() string { if o == nil || isNil(o.AttachmentToken.Get()) { @@ -1276,6 +1325,14 @@ func (o *ReceivedDocument) UnsetUpdatedAt() { } func (o ReceivedDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocument) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -1352,6 +1409,9 @@ func (o ReceivedDocument) MarshalJSON() ([]byte, error) { if o.AttachmentPreviewUrl.IsSet() { toSerialize["attachment_preview_url"] = o.AttachmentPreviewUrl.Get() } + if o.AutoCalculate.IsSet() { + toSerialize["auto_calculate"] = o.AutoCalculate.Get() + } if o.AttachmentToken.IsSet() { toSerialize["attachment_token"] = o.AttachmentToken.Get() } @@ -1361,7 +1421,7 @@ func (o ReceivedDocument) MarshalJSON() ([]byte, error) { if o.UpdatedAt.IsSet() { toSerialize["updated_at"] = o.UpdatedAt.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocument struct { diff --git a/model/model_received_document_entity.go b/model/model_received_document_entity.go index 0b7473e..85c1a2b 100644 --- a/model/model_received_document_entity.go +++ b/model/model_received_document_entity.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentEntity type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentEntity{} + // ReceivedDocumentEntity struct for ReceivedDocumentEntity type ReceivedDocumentEntity struct { // Entity unique identifier. @@ -129,6 +132,14 @@ func (o *ReceivedDocumentEntity) UnsetName() { } func (o ReceivedDocumentEntity) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentEntity) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -136,7 +147,7 @@ func (o ReceivedDocumentEntity) MarshalJSON() ([]byte, error) { if o.Name.IsSet() { toSerialize["name"] = o.Name.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentEntity struct { diff --git a/model/model_received_document_info.go b/model/model_received_document_info.go index f34e283..674095e 100644 --- a/model/model_received_document_info.go +++ b/model/model_received_document_info.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentInfo{} + // ReceivedDocumentInfo type ReceivedDocumentInfo struct { DefaultValues NullableReceivedDocumentInfoDefaultValues `json:"default_values,omitempty"` @@ -302,6 +305,14 @@ func (o *ReceivedDocumentInfo) SetVatTypesList(v []VatType) *ReceivedDocumentInf } func (o ReceivedDocumentInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.DefaultValues.IsSet() { toSerialize["default_values"] = o.DefaultValues.Get() @@ -324,7 +335,7 @@ func (o ReceivedDocumentInfo) MarshalJSON() ([]byte, error) { if o.VatTypesList != nil { toSerialize["vat_types_list"] = o.VatTypesList } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentInfo struct { diff --git a/model/model_received_document_info_default_values.go b/model/model_received_document_info_default_values.go index 60741b7..1f933ac 100644 --- a/model/model_received_document_info_default_values.go +++ b/model/model_received_document_info_default_values.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentInfoDefaultValues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentInfoDefaultValues{} + // ReceivedDocumentInfoDefaultValues Default values for the document. type ReceivedDocumentInfoDefaultValues struct { Detailed NullableBool `json:"detailed,omitempty"` @@ -82,11 +85,19 @@ func (o *ReceivedDocumentInfoDefaultValues) UnsetDetailed() { } func (o ReceivedDocumentInfoDefaultValues) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentInfoDefaultValues) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Detailed.IsSet() { toSerialize["detailed"] = o.Detailed.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentInfoDefaultValues struct { diff --git a/model/model_received_document_info_items_default_values.go b/model/model_received_document_info_items_default_values.go index 66960d9..eec92d6 100644 --- a/model/model_received_document_info_items_default_values.go +++ b/model/model_received_document_info_items_default_values.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentInfoItemsDefaultValues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentInfoItemsDefaultValues{} + // ReceivedDocumentInfoItemsDefaultValues Default values for the document items. type ReceivedDocumentInfoItemsDefaultValues struct { // Default vat value. @@ -83,11 +86,19 @@ func (o *ReceivedDocumentInfoItemsDefaultValues) UnsetVat() { } func (o ReceivedDocumentInfoItemsDefaultValues) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentInfoItemsDefaultValues) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Vat.IsSet() { toSerialize["vat"] = o.Vat.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentInfoItemsDefaultValues struct { diff --git a/model/model_received_document_items_list_item.go b/model/model_received_document_items_list_item.go index 37f38b1..a6f7a96 100644 --- a/model/model_received_document_items_list_item.go +++ b/model/model_received_document_items_list_item.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentItemsListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentItemsListItem{} + // ReceivedDocumentItemsListItem struct for ReceivedDocumentItemsListItem type ReceivedDocumentItemsListItem struct { // Unique identifier. @@ -496,6 +499,14 @@ func (o *ReceivedDocumentItemsListItem) UnsetStock() { } func (o ReceivedDocumentItemsListItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentItemsListItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -527,7 +538,7 @@ func (o ReceivedDocumentItemsListItem) MarshalJSON() ([]byte, error) { if o.Stock.IsSet() { toSerialize["stock"] = o.Stock.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentItemsListItem struct { diff --git a/model/model_received_document_payments_list_item.go b/model/model_received_document_payments_list_item.go index c4a2179..0c45e8d 100644 --- a/model/model_received_document_payments_list_item.go +++ b/model/model_received_document_payments_list_item.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentPaymentsListItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentPaymentsListItem{} + // ReceivedDocumentPaymentsListItem struct for ReceivedDocumentPaymentsListItem type ReceivedDocumentPaymentsListItem struct { // Unique identifier. @@ -357,6 +360,14 @@ func (o *ReceivedDocumentPaymentsListItem) UnsetPaymentAccount() { } func (o ReceivedDocumentPaymentsListItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentPaymentsListItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -379,7 +390,7 @@ func (o ReceivedDocumentPaymentsListItem) MarshalJSON() ([]byte, error) { if o.PaymentAccount.IsSet() { toSerialize["payment_account"] = o.PaymentAccount.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentPaymentsListItem struct { diff --git a/model/model_received_document_payments_list_item_payment_terms.go b/model/model_received_document_payments_list_item_payment_terms.go index 022f43f..dd04665 100644 --- a/model/model_received_document_payments_list_item_payment_terms.go +++ b/model/model_received_document_payments_list_item_payment_terms.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentPaymentsListItemPaymentTerms type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentPaymentsListItemPaymentTerms{} + // ReceivedDocumentPaymentsListItemPaymentTerms struct for ReceivedDocumentPaymentsListItemPaymentTerms type ReceivedDocumentPaymentsListItemPaymentTerms struct { // Number of days. @@ -128,6 +131,14 @@ func (o *ReceivedDocumentPaymentsListItemPaymentTerms) UnsetType() { } func (o ReceivedDocumentPaymentsListItemPaymentTerms) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentPaymentsListItemPaymentTerms) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Days.IsSet() { toSerialize["days"] = o.Days.Get() @@ -135,7 +146,7 @@ func (o ReceivedDocumentPaymentsListItemPaymentTerms) MarshalJSON() ([]byte, err if o.Type.IsSet() { toSerialize["type"] = o.Type.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentPaymentsListItemPaymentTerms struct { diff --git a/model/model_received_document_totals.go b/model/model_received_document_totals.go index 3586e82..c9c9f0c 100644 --- a/model/model_received_document_totals.go +++ b/model/model_received_document_totals.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ReceivedDocumentTotals type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReceivedDocumentTotals{} + // ReceivedDocumentTotals type ReceivedDocumentTotals struct { // Total net amount. @@ -359,6 +362,14 @@ func (o *ReceivedDocumentTotals) UnsetPaymentsSum() { } func (o ReceivedDocumentTotals) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReceivedDocumentTotals) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.AmountNet.IsSet() { toSerialize["amount_net"] = o.AmountNet.Get() @@ -381,7 +392,7 @@ func (o ReceivedDocumentTotals) MarshalJSON() ([]byte, error) { if o.PaymentsSum.IsSet() { toSerialize["payments_sum"] = o.PaymentsSum.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableReceivedDocumentTotals struct { diff --git a/model/model_received_document_type.go b/model/model_received_document_type.go index 00717f2..1586eeb 100644 --- a/model/model_received_document_type.go +++ b/model/model_received_document_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_schedule_email_request.go b/model/model_schedule_email_request.go index ec25e6e..37b79b6 100644 --- a/model/model_schedule_email_request.go +++ b/model/model_schedule_email_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the ScheduleEmailRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ScheduleEmailRequest{} + // ScheduleEmailRequest type ScheduleEmailRequest struct { Data *EmailSchedule `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *ScheduleEmailRequest) SetData(v EmailSchedule) *ScheduleEmailRequest { } func (o ScheduleEmailRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScheduleEmailRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableScheduleEmailRequest struct { diff --git a/model/model_send_e_invoice_request.go b/model/model_send_e_invoice_request.go index 4ef4449..22a5c85 100644 --- a/model/model_send_e_invoice_request.go +++ b/model/model_send_e_invoice_request.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,9 +15,13 @@ import ( "encoding/json" ) +// checks if the SendEInvoiceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendEInvoiceRequest{} + // SendEInvoiceRequest struct for SendEInvoiceRequest type SendEInvoiceRequest struct { Data NullableSendEInvoiceRequestData `json:"data,omitempty"` + Options NullableSendEInvoiceRequestOptions `json:"options,omitempty"` } // NewSendEInvoiceRequest instantiates a new SendEInvoiceRequest object @@ -81,12 +85,67 @@ func (o *SendEInvoiceRequest) UnsetData() { o.Data.Unset() } +// GetOptions returns the Options field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SendEInvoiceRequest) GetOptions() SendEInvoiceRequestOptions { + if o == nil || isNil(o.Options.Get()) { + var ret SendEInvoiceRequestOptions + return ret + } + return *o.Options.Get() +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SendEInvoiceRequest) GetOptionsOk() (*SendEInvoiceRequestOptions, bool) { + if o == nil { + return nil, false + } + return o.Options.Get(), o.Options.IsSet() +} + +// HasOptions returns a boolean if a field has been set. +func (o *SendEInvoiceRequest) HasOptions() bool { + if o != nil && o.Options.IsSet() { + return true + } + + return false +} + +// SetOptions gets a reference to the given NullableSendEInvoiceRequestOptions and assigns it to the Options field. +func (o *SendEInvoiceRequest) SetOptions(v SendEInvoiceRequestOptions) *SendEInvoiceRequest { + o.Options.Set(&v) + return o +} +// SetOptionsNil sets the value for Options to be an explicit nil +func (o *SendEInvoiceRequest) SetOptionsNil() *SendEInvoiceRequest { + o.Options.Set(nil) + return o +} + +// UnsetOptions ensures that no value is present for Options, not even an explicit nil +func (o *SendEInvoiceRequest) UnsetOptions() { + o.Options.Unset() +} + func (o SendEInvoiceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendEInvoiceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + if o.Options.IsSet() { + toSerialize["options"] = o.Options.Get() + } + return toSerialize, nil } type NullableSendEInvoiceRequest struct { diff --git a/model/model_send_e_invoice_request_data.go b/model/model_send_e_invoice_request_data.go index 72903ca..1cbd9f2 100644 --- a/model/model_send_e_invoice_request_data.go +++ b/model/model_send_e_invoice_request_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SendEInvoiceRequestData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendEInvoiceRequestData{} + // SendEInvoiceRequestData struct for SendEInvoiceRequestData type SendEInvoiceRequestData struct { // Value of TipoCassa used (optional, override the company default value). @@ -129,6 +132,14 @@ func (o *SendEInvoiceRequestData) UnsetWithholdingTaxCausal() { } func (o SendEInvoiceRequestData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendEInvoiceRequestData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.CassaType.IsSet() { toSerialize["cassa_type"] = o.CassaType.Get() @@ -136,7 +147,7 @@ func (o SendEInvoiceRequestData) MarshalJSON() ([]byte, error) { if o.WithholdingTaxCausal.IsSet() { toSerialize["withholding_tax_causal"] = o.WithholdingTaxCausal.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSendEInvoiceRequestData struct { diff --git a/model/model_send_e_invoice_request_options.go b/model/model_send_e_invoice_request_options.go new file mode 100644 index 0000000..addfa3b --- /dev/null +++ b/model/model_send_e_invoice_request_options.go @@ -0,0 +1,140 @@ +/* +Fatture in Cloud API v2 - API Reference + +Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. + +API version: 2.0.26 +Contact: info@fattureincloud.it +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package model + +import ( + "encoding/json" +) + +// checks if the SendEInvoiceRequestOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendEInvoiceRequestOptions{} + +// SendEInvoiceRequestOptions struct for SendEInvoiceRequestOptions +type SendEInvoiceRequestOptions struct { + // If set to true the e-invoice will not be sent to the SDI. + DryRun NullableBool `json:"dry_run,omitempty"` +} + +// NewSendEInvoiceRequestOptions instantiates a new SendEInvoiceRequestOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSendEInvoiceRequestOptions() *SendEInvoiceRequestOptions { + this := SendEInvoiceRequestOptions{} + return &this +} + +// NewSendEInvoiceRequestOptionsWithDefaults instantiates a new SendEInvoiceRequestOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSendEInvoiceRequestOptionsWithDefaults() *SendEInvoiceRequestOptions { + this := SendEInvoiceRequestOptions{} + return &this +} + +// GetDryRun returns the DryRun field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *SendEInvoiceRequestOptions) GetDryRun() bool { + if o == nil || isNil(o.DryRun.Get()) { + var ret bool + return ret + } + return *o.DryRun.Get() +} + +// GetDryRunOk returns a tuple with the DryRun field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SendEInvoiceRequestOptions) GetDryRunOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.DryRun.Get(), o.DryRun.IsSet() +} + +// HasDryRun returns a boolean if a field has been set. +func (o *SendEInvoiceRequestOptions) HasDryRun() bool { + if o != nil && o.DryRun.IsSet() { + return true + } + + return false +} + +// SetDryRun gets a reference to the given NullableBool and assigns it to the DryRun field. +func (o *SendEInvoiceRequestOptions) SetDryRun(v bool) *SendEInvoiceRequestOptions { + o.DryRun.Set(&v) + return o +} +// SetDryRunNil sets the value for DryRun to be an explicit nil +func (o *SendEInvoiceRequestOptions) SetDryRunNil() *SendEInvoiceRequestOptions { + o.DryRun.Set(nil) + return o +} + +// UnsetDryRun ensures that no value is present for DryRun, not even an explicit nil +func (o *SendEInvoiceRequestOptions) UnsetDryRun() { + o.DryRun.Unset() +} + +func (o SendEInvoiceRequestOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendEInvoiceRequestOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DryRun.IsSet() { + toSerialize["dry_run"] = o.DryRun.Get() + } + return toSerialize, nil +} + +type NullableSendEInvoiceRequestOptions struct { + value *SendEInvoiceRequestOptions + isSet bool +} + +func (v NullableSendEInvoiceRequestOptions) Get() *SendEInvoiceRequestOptions { + return v.value +} + +func (v *NullableSendEInvoiceRequestOptions) Set(val *SendEInvoiceRequestOptions) { + v.value = val + v.isSet = true +} + +func (v NullableSendEInvoiceRequestOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableSendEInvoiceRequestOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSendEInvoiceRequestOptions(val *SendEInvoiceRequestOptions) *NullableSendEInvoiceRequestOptions { + return &NullableSendEInvoiceRequestOptions{value: val, isSet: true} +} + +func (v NullableSendEInvoiceRequestOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSendEInvoiceRequestOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model/model_send_e_invoice_response.go b/model/model_send_e_invoice_response.go index fafd489..13206f5 100644 --- a/model/model_send_e_invoice_response.go +++ b/model/model_send_e_invoice_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SendEInvoiceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendEInvoiceResponse{} + // SendEInvoiceResponse struct for SendEInvoiceResponse type SendEInvoiceResponse struct { Data NullableSendEInvoiceResponseData `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *SendEInvoiceResponse) UnsetData() { } func (o SendEInvoiceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendEInvoiceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSendEInvoiceResponse struct { diff --git a/model/model_send_e_invoice_response_data.go b/model/model_send_e_invoice_response_data.go index 4153f51..3d5b856 100644 --- a/model/model_send_e_invoice_response_data.go +++ b/model/model_send_e_invoice_response_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SendEInvoiceResponseData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendEInvoiceResponseData{} + // SendEInvoiceResponseData struct for SendEInvoiceResponseData type SendEInvoiceResponseData struct { // Response message. @@ -129,6 +132,14 @@ func (o *SendEInvoiceResponseData) UnsetDate() { } func (o SendEInvoiceResponseData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendEInvoiceResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Name.IsSet() { toSerialize["name"] = o.Name.Get() @@ -136,7 +147,7 @@ func (o SendEInvoiceResponseData) MarshalJSON() ([]byte, error) { if o.Date.IsSet() { toSerialize["date"] = o.Date.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSendEInvoiceResponseData struct { diff --git a/model/model_sender_email.go b/model/model_sender_email.go index b70bcad..eba79a4 100644 --- a/model/model_sender_email.go +++ b/model/model_sender_email.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the SenderEmail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SenderEmail{} + // SenderEmail struct for SenderEmail type SenderEmail struct { // Id @@ -129,6 +132,14 @@ func (o *SenderEmail) UnsetEmail() { } func (o SenderEmail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SenderEmail) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -136,7 +147,7 @@ func (o SenderEmail) MarshalJSON() ([]byte, error) { if o.Email.IsSet() { toSerialize["email"] = o.Email.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSenderEmail struct { diff --git a/model/model_show_totals_mode.go b/model/model_show_totals_mode.go index 6278000..bb4bf3a 100644 --- a/model/model_show_totals_mode.go +++ b/model/model_show_totals_mode.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_supplier.go b/model/model_supplier.go index 1eab629..9f50015 100644 --- a/model/model_supplier.go +++ b/model/model_supplier.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the Supplier type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Supplier{} + // Supplier type Supplier struct { // Unique identifier @@ -1091,6 +1094,14 @@ func (o *Supplier) UnsetUpdatedAt() { } func (o Supplier) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Supplier) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -1161,7 +1172,7 @@ func (o Supplier) MarshalJSON() ([]byte, error) { if o.UpdatedAt.IsSet() { toSerialize["updated_at"] = o.UpdatedAt.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSupplier struct { diff --git a/model/model_supplier_type.go b/model/model_supplier_type.go index 4210c5b..ff4b8b3 100644 --- a/model/model_supplier_type.go +++ b/model/model_supplier_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_transform_issued_document_response.go b/model/model_transform_issued_document_response.go index e0d5b43..ad1ff06 100644 --- a/model/model_transform_issued_document_response.go +++ b/model/model_transform_issued_document_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the TransformIssuedDocumentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformIssuedDocumentResponse{} + // TransformIssuedDocumentResponse struct for TransformIssuedDocumentResponse type TransformIssuedDocumentResponse struct { Data *IssuedDocument `json:"data,omitempty"` @@ -105,6 +108,14 @@ func (o *TransformIssuedDocumentResponse) SetOptions(v IssuedDocumentOptions) *T } func (o TransformIssuedDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformIssuedDocumentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data @@ -112,7 +123,7 @@ func (o TransformIssuedDocumentResponse) MarshalJSON() ([]byte, error) { if !isNil(o.Options) { toSerialize["options"] = o.Options } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableTransformIssuedDocumentResponse struct { diff --git a/model/model_upload_archive_attachment_response.go b/model/model_upload_archive_attachment_response.go index 2eb6002..dc7e845 100644 --- a/model/model_upload_archive_attachment_response.go +++ b/model/model_upload_archive_attachment_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UploadArchiveAttachmentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadArchiveAttachmentResponse{} + // UploadArchiveAttachmentResponse struct for UploadArchiveAttachmentResponse type UploadArchiveAttachmentResponse struct { Data *AttachmentData `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *UploadArchiveAttachmentResponse) SetData(v AttachmentData) *UploadArchi } func (o UploadArchiveAttachmentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadArchiveAttachmentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUploadArchiveAttachmentResponse struct { diff --git a/model/model_upload_f24_attachment_response.go b/model/model_upload_f24_attachment_response.go index 159ed94..010e174 100644 --- a/model/model_upload_f24_attachment_response.go +++ b/model/model_upload_f24_attachment_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UploadF24AttachmentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadF24AttachmentResponse{} + // UploadF24AttachmentResponse struct for UploadF24AttachmentResponse type UploadF24AttachmentResponse struct { Data *AttachmentData `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *UploadF24AttachmentResponse) SetData(v AttachmentData) *UploadF24Attach } func (o UploadF24AttachmentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadF24AttachmentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUploadF24AttachmentResponse struct { diff --git a/model/model_upload_issued_document_attachment_response.go b/model/model_upload_issued_document_attachment_response.go index 8d73bfa..2515738 100644 --- a/model/model_upload_issued_document_attachment_response.go +++ b/model/model_upload_issued_document_attachment_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UploadIssuedDocumentAttachmentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadIssuedDocumentAttachmentResponse{} + // UploadIssuedDocumentAttachmentResponse struct for UploadIssuedDocumentAttachmentResponse type UploadIssuedDocumentAttachmentResponse struct { Data *AttachmentData `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *UploadIssuedDocumentAttachmentResponse) SetData(v AttachmentData) *Uplo } func (o UploadIssuedDocumentAttachmentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadIssuedDocumentAttachmentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUploadIssuedDocumentAttachmentResponse struct { diff --git a/model/model_upload_received_document_attachment_response.go b/model/model_upload_received_document_attachment_response.go index 9d09c64..c2033f2 100644 --- a/model/model_upload_received_document_attachment_response.go +++ b/model/model_upload_received_document_attachment_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the UploadReceivedDocumentAttachmentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UploadReceivedDocumentAttachmentResponse{} + // UploadReceivedDocumentAttachmentResponse struct for UploadReceivedDocumentAttachmentResponse type UploadReceivedDocumentAttachmentResponse struct { Data *AttachmentData `json:"data,omitempty"` @@ -71,11 +74,19 @@ func (o *UploadReceivedDocumentAttachmentResponse) SetData(v AttachmentData) *Up } func (o UploadReceivedDocumentAttachmentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadReceivedDocumentAttachmentResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUploadReceivedDocumentAttachmentResponse struct { diff --git a/model/model_user.go b/model/model_user.go index 5d73904..d26a36c 100644 --- a/model/model_user.go +++ b/model/model_user.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + // User type User struct { // User identifier. @@ -358,6 +361,14 @@ func (o *User) UnsetPicture() { } func (o User) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -380,7 +391,7 @@ func (o User) MarshalJSON() ([]byte, error) { if o.Picture.IsSet() { toSerialize["picture"] = o.Picture.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUser struct { diff --git a/model/model_user_company_role.go b/model/model_user_company_role.go index f595379..85a82ab 100644 --- a/model/model_user_company_role.go +++ b/model/model_user_company_role.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_vat_item.go b/model/model_vat_item.go index 1300c12..69eebab 100644 --- a/model/model_vat_item.go +++ b/model/model_vat_item.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VatItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VatItem{} + // VatItem struct for VatItem type VatItem struct { AmountNet NullableFloat32 `json:"amount_net,omitempty"` @@ -127,6 +130,14 @@ func (o *VatItem) UnsetAmountVat() { } func (o VatItem) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VatItem) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.AmountNet.IsSet() { toSerialize["amount_net"] = o.AmountNet.Get() @@ -134,7 +145,7 @@ func (o VatItem) MarshalJSON() ([]byte, error) { if o.AmountVat.IsSet() { toSerialize["amount_vat"] = o.AmountVat.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVatItem struct { diff --git a/model/model_vat_kind.go b/model/model_vat_kind.go index 4b2abc5..3fa4a06 100644 --- a/model/model_vat_kind.go +++ b/model/model_vat_kind.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/model/model_vat_type.go b/model/model_vat_type.go index 5feaf4c..1b87f0b 100644 --- a/model/model_vat_type.go +++ b/model/model_vat_type.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VatType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VatType{} + // VatType type VatType struct { // Unique identifier @@ -451,6 +454,14 @@ func (o *VatType) UnsetIsDisabled() { } func (o VatType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VatType) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Id.IsSet() { toSerialize["id"] = o.Id.Get() @@ -479,7 +490,7 @@ func (o VatType) MarshalJSON() ([]byte, error) { if o.IsDisabled.IsSet() { toSerialize["is_disabled"] = o.IsDisabled.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVatType struct { diff --git a/model/model_verify_e_invoice_xml_error_response.go b/model/model_verify_e_invoice_xml_error_response.go index 3a277a0..0b29bae 100644 --- a/model/model_verify_e_invoice_xml_error_response.go +++ b/model/model_verify_e_invoice_xml_error_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VerifyEInvoiceXmlErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyEInvoiceXmlErrorResponse{} + // VerifyEInvoiceXmlErrorResponse struct for VerifyEInvoiceXmlErrorResponse type VerifyEInvoiceXmlErrorResponse struct { Error NullableVerifyEInvoiceXmlErrorResponseError `json:"error,omitempty"` @@ -127,6 +130,14 @@ func (o *VerifyEInvoiceXmlErrorResponse) UnsetExtra() { } func (o VerifyEInvoiceXmlErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyEInvoiceXmlErrorResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Error.IsSet() { toSerialize["error"] = o.Error.Get() @@ -134,7 +145,7 @@ func (o VerifyEInvoiceXmlErrorResponse) MarshalJSON() ([]byte, error) { if o.Extra.IsSet() { toSerialize["extra"] = o.Extra.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVerifyEInvoiceXmlErrorResponse struct { diff --git a/model/model_verify_e_invoice_xml_error_response_error.go b/model/model_verify_e_invoice_xml_error_response_error.go index 968386e..aa112cc 100644 --- a/model/model_verify_e_invoice_xml_error_response_error.go +++ b/model/model_verify_e_invoice_xml_error_response_error.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VerifyEInvoiceXmlErrorResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyEInvoiceXmlErrorResponseError{} + // VerifyEInvoiceXmlErrorResponseError struct for VerifyEInvoiceXmlErrorResponseError type VerifyEInvoiceXmlErrorResponseError struct { Message NullableString `json:"message,omitempty"` @@ -127,6 +130,14 @@ func (o *VerifyEInvoiceXmlErrorResponseError) UnsetValidationResult() { } func (o VerifyEInvoiceXmlErrorResponseError) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyEInvoiceXmlErrorResponseError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Message.IsSet() { toSerialize["message"] = o.Message.Get() @@ -134,7 +145,7 @@ func (o VerifyEInvoiceXmlErrorResponseError) MarshalJSON() ([]byte, error) { if o.ValidationResult.IsSet() { toSerialize["validation_result"] = o.ValidationResult.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVerifyEInvoiceXmlErrorResponseError struct { diff --git a/model/model_verify_e_invoice_xml_error_response_error_validation_result.go b/model/model_verify_e_invoice_xml_error_response_error_validation_result.go index f002b6f..4fa3e9f 100644 --- a/model/model_verify_e_invoice_xml_error_response_error_validation_result.go +++ b/model/model_verify_e_invoice_xml_error_response_error_validation_result.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VerifyEInvoiceXmlErrorResponseErrorValidationResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyEInvoiceXmlErrorResponseErrorValidationResult{} + // VerifyEInvoiceXmlErrorResponseErrorValidationResult struct for VerifyEInvoiceXmlErrorResponseErrorValidationResult type VerifyEInvoiceXmlErrorResponseErrorValidationResult struct { XmlErrors []string `json:"xml_errors,omitempty"` @@ -72,11 +75,19 @@ func (o *VerifyEInvoiceXmlErrorResponseErrorValidationResult) SetXmlErrors(v []s } func (o VerifyEInvoiceXmlErrorResponseErrorValidationResult) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyEInvoiceXmlErrorResponseErrorValidationResult) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.XmlErrors != nil { toSerialize["xml_errors"] = o.XmlErrors } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVerifyEInvoiceXmlErrorResponseErrorValidationResult struct { diff --git a/model/model_verify_e_invoice_xml_error_response_extra.go b/model/model_verify_e_invoice_xml_error_response_extra.go index a6a115e..31d66b7 100644 --- a/model/model_verify_e_invoice_xml_error_response_extra.go +++ b/model/model_verify_e_invoice_xml_error_response_extra.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VerifyEInvoiceXmlErrorResponseExtra type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyEInvoiceXmlErrorResponseExtra{} + // VerifyEInvoiceXmlErrorResponseExtra struct for VerifyEInvoiceXmlErrorResponseExtra type VerifyEInvoiceXmlErrorResponseExtra struct { Errors []string `json:"errors,omitempty"` @@ -72,11 +75,19 @@ func (o *VerifyEInvoiceXmlErrorResponseExtra) SetErrors(v []string) *VerifyEInvo } func (o VerifyEInvoiceXmlErrorResponseExtra) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyEInvoiceXmlErrorResponseExtra) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Errors != nil { toSerialize["errors"] = o.Errors } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVerifyEInvoiceXmlErrorResponseExtra struct { diff --git a/model/model_verify_e_invoice_xml_response.go b/model/model_verify_e_invoice_xml_response.go index 5ec09f1..dc7de17 100644 --- a/model/model_verify_e_invoice_xml_response.go +++ b/model/model_verify_e_invoice_xml_response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VerifyEInvoiceXmlResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyEInvoiceXmlResponse{} + // VerifyEInvoiceXmlResponse struct for VerifyEInvoiceXmlResponse type VerifyEInvoiceXmlResponse struct { Data NullableVerifyEInvoiceXmlResponseData `json:"data,omitempty"` @@ -82,11 +85,19 @@ func (o *VerifyEInvoiceXmlResponse) UnsetData() { } func (o VerifyEInvoiceXmlResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyEInvoiceXmlResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Data.IsSet() { toSerialize["data"] = o.Data.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVerifyEInvoiceXmlResponse struct { diff --git a/model/model_verify_e_invoice_xml_response_data.go b/model/model_verify_e_invoice_xml_response_data.go index cf33cd9..0353e37 100644 --- a/model/model_verify_e_invoice_xml_response_data.go +++ b/model/model_verify_e_invoice_xml_response_data.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -15,6 +15,9 @@ import ( "encoding/json" ) +// checks if the VerifyEInvoiceXmlResponseData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyEInvoiceXmlResponseData{} + // VerifyEInvoiceXmlResponseData struct for VerifyEInvoiceXmlResponseData type VerifyEInvoiceXmlResponseData struct { // Determine if the invoice XML is valid. @@ -83,11 +86,19 @@ func (o *VerifyEInvoiceXmlResponseData) UnsetSuccess() { } func (o VerifyEInvoiceXmlResponseData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyEInvoiceXmlResponseData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Success.IsSet() { toSerialize["success"] = o.Success.Get() } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableVerifyEInvoiceXmlResponseData struct { diff --git a/model/utils.go b/model/utils.go index 94c4691..1ef9f25 100644 --- a/model/utils.go +++ b/model/utils.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ @@ -13,7 +13,7 @@ package model import ( "encoding/json" - "reflect" + "reflect" "time" ) @@ -331,14 +331,18 @@ func (v *NullableTime) UnmarshalJSON(src []byte) error { // isNil checks if an input is nil func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} \ No newline at end of file + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} diff --git a/response.go b/response.go index 357c5fc..6d29230 100644 --- a/response.go +++ b/response.go @@ -3,7 +3,7 @@ Fatture in Cloud API v2 - API Reference Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. -API version: 2.0.24 +API version: 2.0.26 Contact: info@fattureincloud.it */ diff --git a/sdk-version.yaml b/sdk-version.yaml index 5908d44..04af5ad 100644 --- a/sdk-version.yaml +++ b/sdk-version.yaml @@ -1,2 +1,2 @@ info: - version: 2.0.3 + version: 2.0.4 diff --git a/test/model/model_send_e_invoice_request_options_test.go b/test/model/model_send_e_invoice_request_options_test.go new file mode 100644 index 0000000..7f2106f --- /dev/null +++ b/test/model/model_send_e_invoice_request_options_test.go @@ -0,0 +1,35 @@ +/* +Fatture in Cloud API v2 - API Reference + +Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol. + +API version: 2.0.19 +Contact: info@fattureincloud.it +*/ + +package model + +import ( + "encoding/json" + "reflect" + "testing" + + . "github.com/fattureincloud/fattureincloud-go-sdk/v2/model" + "github.com/stretchr/testify/assert" +) + +var SendEInvoiceRequestOptionsJsonStr string = "{\"dry_run\":true}" + +func TestSendEInvoiceRequestOptions(t *testing.T) { + obj := NewSendEInvoiceRequestOptions() + json.Unmarshal([]byte(SendEInvoiceRequestOptionsJsonStr), obj) + jsonStr2, _ := json.Marshal(obj) + + assert.JSONEq(t, SendEInvoiceRequestOptionsJsonStr, string(jsonStr2), "they should be equal") + + newObj := NewSendEInvoiceRequestOptions() + newObj.SetDryRun(obj.GetDryRun()) + assert.True(t, reflect.DeepEqual(obj.GetDryRun(), newObj.GetDryRun())) + newObj.SetDryRun(obj.GetDryRun()) + assert.True(t, reflect.DeepEqual(obj.GetDryRun(), newObj.GetDryRun())) +}