Skip to content

Commit

Permalink
test: updated tests to 2.0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
barcigabri authored May 27, 2024
1 parent 6af9dba commit 3ac5f9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.google.gson.JsonElement;
import java.io.IOException;
import java.io.Serializable;
import java.math.BigDecimal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private static IssuedDocumentsApi mockApi(final String serializedBody, final Cal
@Test
public void createIssuedDocumentTest() throws ApiException, IOException {
String result =
"{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
"{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso"
+ " impero,"
+ " 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit"
Expand Down Expand Up @@ -205,7 +205,7 @@ public void getExistingIssuedDocumentTotalsTest() throws ApiException, IOExcepti
@Test
public void getIssuedDocumentTest() throws ApiException, IOException {
String result =
"{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
"{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso"
+ " impero,"
+ " 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit"
Expand Down Expand Up @@ -318,7 +318,7 @@ public void getNewIssuedDocumentTotalsTest() throws ApiException, IOException {
.paymentsSum((BigDecimal.valueOf(10)));

String issuedDocumentJson =
"{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
"{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso"
+ " impero,"
+ " 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit"
Expand Down Expand Up @@ -347,12 +347,12 @@ public void getNewIssuedDocumentTotalsTest() throws ApiException, IOException {
@Test
public void listIssuedDocumentsTest() throws ApiException, IOException {
String result =
"{\"data\":[{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
"{\"data\":[{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso"
+ " impero,"
+ " 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit"
+ " card\"},\"use_split_payment\":false,\"items_list\":[{\"product_id\":5432,\"code\":\"SG3\",\"name\":\"Soggiorno\",\"measure\":\"\",\"net_price\":68.18182,\"category\":\"\",\"id\":277876033,\"gross_price\":75,\"apply_withholding_taxes\":true,\"discount\":0,\"discount_highlight\":false,\"qty\":1,\"vat\":{\"id\":3,\"value\":10,\"description\":\"\"},\"stock\":false,\"description\":\"\",\"not_taxable\":false}],\"payments_list\":[{\"amount\":75,\"due_date\":\"2020-08-23\",\"paid_date\":null,\"id\":69078013,\"status\":\"not_paid\",\"payment_account\":null}],\"attachment_url\":\"kdijrnf893hnwkfk45f50f.pdf\",\"seen_date\":null,\"next_due_date\":\"2020-08-23\",\"template\":{\"id\":2821,\"name\":\"Light"
+ " Smoke\"},\"extra_data\":null,\"url\":\"y12h45rn9yf2mse0p43t7ec90vr.pdf\",\"show_tspay_button\":false},{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Smoke\"},\"extra_data\":null,\"url\":\"y12h45rn9yf2mse0p43t7ec90vr.pdf\",\"show_tspay_button\":false},{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso"
+ " impero,"
+ " 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit"
Expand Down Expand Up @@ -388,7 +388,7 @@ public void listIssuedDocumentsTest() throws ApiException, IOException {
@Test
public void modifyIssuedDocumentTest() throws ApiException, IOException {
String result =
"{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_paypal_button\":true,\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
"{\"data\":{\"id\":12345,\"type\":\"receipt\",\"year\":2021,\"numeration\":\"rec123\",\"subject\":\"\",\"visible_subject\":\"\",\"rc_center\":\"\",\"ei_cassa_type\":null,\"ei_withholding_tax_causal\":null,\"ei_other_withholding_tax_type\":null,\"ei_other_withholding_tax_causal\":null,\"stamp_duty\":0,\"use_gross_prices\":false,\"e_invoice\":false,\"delivery_note\":false,\"accompanying_invoice\":false,\"amount_net\":68.18,\"amount_vat\":6.82,\"amount_gross\":75,\"amount_due_discount\":0,\"amount_rivalsa\":0,\"amount_cassa\":0,\"amount_withholding_tax\":0,\"amount_other_withholding_tax\":0,\"h_margins\":15,\"v_margins\":16,\"show_payment_method\":false,\"show_payments\":true,\"show_totals\":\"all\",\"show_notification_button\":false,\"is_marked\":false,\"entity\":{\"id\":54321,\"name\":\"Mary"
+ " Red S.r.L.\",\"vat_number\":\"IT05432181211\",\"tax_code\":\"IT05432181211\",\"address_street\":\"Corso"
+ " impero,"
+ " 66\",\"address_postal_code\":\"20900\",\"address_city\":\"Milano\",\"address_province\":\"MI\",\"address_extra\":\"\",\"country\":\"Italia\",\"certified_email\":\"[email protected]\",\"ei_code\":\"ABCXCR1\"},\"date\":\"2021-08-20\",\"number\":1,\"currency\":{\"id\":\"EUR\",\"exchange_rate\":\"1.00000\",\"symbol\":\"\\u20ac\"},\"language\":{\"code\":\"it\",\"name\":\"Italiano\"},\"notes\":\"\",\"rivalsa\":0,\"cassa\":0,\"withholding_tax\":0,\"withholding_tax_taxable\":100,\"other_withholding_tax\":0,\"payment_method\":{\"id\":4,\"name\":\"Credit"
Expand Down
Loading

0 comments on commit 3ac5f9c

Please sign in to comment.