@@ -84,13 +84,13 @@ public void tearDown() {
8484 accountingApi = null ;
8585 defaultClient = null ;
8686 }
87- /*
87+
8888 @ Test
8989 public void createCreditNoteTest () throws IOException {
9090 System .out .println ("@Test - createCreditNote" );
91- Boolean summarizeErrors = null ;
92- CreditNote creditNote = new CreditNote ();
93- CreditNotes response = accountingApi.createCreditNote (accessToken,xeroTenantId,creditNote );
91+ Boolean summarizeErrors = false ;
92+ CreditNotes creditNotes = new CreditNotes ();
93+ CreditNotes response = accountingApi .createCreditNotes (accessToken ,xeroTenantId ,creditNotes , summarizeErrors );
9494
9595 assertThat (response .getCreditNotes ().get (0 ).getType (), is (equalTo (com .xero .models .accounting .CreditNote .TypeEnum .ACCPAYCREDIT )));
9696 assertThat (response .getCreditNotes ().get (0 ).getStatus (), is (equalTo (com .xero .models .accounting .CreditNote .StatusEnum .DRAFT )));
@@ -119,7 +119,7 @@ public void createCreditNoteTest() throws IOException {
119119
120120 //System.out.println(response.getCreditNotes().get(0).toString());
121121 }
122- */
122+
123123 @ Test
124124 public void createCreditNoteAllocationTest () throws IOException {
125125 System .out .println ("@Test - createCreditNoteAllocation" );
@@ -137,7 +137,7 @@ public void createCreditNoteAttachmentByFileNameTest() throws IOException {
137137 System .out .println ("@Test - createCreditNoteAttachmentByFileName" );
138138 UUID creditNoteID = UUID .fromString ("8138a266-fb42-49b2-a104-014b7045753d" );
139139 String fileName = "sample5.jpg" ;
140- Attachments response = accountingApi .createCreditNoteAttachmentByFileName (accessToken ,xeroTenantId ,creditNoteID , fileName , body );
140+ Attachments response = accountingApi .createCreditNoteAttachmentByFileName (accessToken ,xeroTenantId ,creditNoteID , fileName , false , body );
141141
142142 assertThat (response .getAttachments ().get (0 ).getAttachmentID (), is (equalTo (UUID .fromString ("91bbae3f-5de5-4e3d-875f-8662f25897bd" ))));
143143 assertThat (response .getAttachments ().get (0 ).getFileName (), is (equalTo ("sample5.jpg" )));
0 commit comments