sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" siteId: ").append(toIndentedString(siteId)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" subtitle: ").append(toIndentedString(subtitle)).append("\n"); sb.append(" sellerId: ").append(toIndentedString(sellerId)).append("\n"); sb.append(" categoryId: ").append(toIndentedString(categoryId)).append("\n"); sb.append(" officialStoreId: ").append(toIndentedString(officialStoreId)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" basePrice: ").append(toIndentedString(basePrice)).append("\n"); sb.append(" originalPrice: ").append(toIndentedString(originalPrice)).append("\n"); sb.append(" currencyId: ").append(toIndentedString(currencyId)).append("\n"); sb.append(" initialQuantity: ").append(toIndentedString(initialQuantity)).append("\n"); sb.append(" availableQuantity: ").append(toIndentedString(availableQuantity)).append("\n"); sb.append(" soldQuantity: ").append(toIndentedString(soldQuantity)).append("\n"); sb.append(" saleTerms: ").append(toIndentedString(saleTerms)).append("\n"); sb.append(" buyingMode: ").append(toIndentedString(buyingMode)).append("\n"); sb.append(" listingTypeId: ").append(toIndentedString(listingTypeId)).append("\n"); sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); sb.append(" stopTime: ").append(toIndentedString(stopTime)).append("\n"); sb.append(" endTime: ").append(toIndentedString(endTime)).append("\n"); sb.append(" expirationTime: ").append(toIndentedString(expirationTime)).append("\n"); sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); sb.append(" permalink: ").append(toIndentedString(permalink)).append("\n"); sb.append(" pictures: ").append(toIndentedString(pictures)).append("\n"); sb.append(" videoId: ").append(toIndentedString(videoId)).append("\n"); sb.append(" descriptions: ").append(toIndentedString(descriptions)).append("\n"); sb.append(" acceptsMercadopago: ").append(toIndentedString(acceptsMercadopago)).append("\n"); sb.append(" nonMercadoPagoPaymentMethods: ").append(toIndentedString(nonMercadoPagoPaymentMethods)).append("\n"); sb.append(" shipping: ").append(toIndentedString(shipping)).append("\n");
/** * List an item. * * @throws ApiException if the Api call fails */ @Test public void itemsPostTest() throws ApiException { ItemJson body = new ItemJson(); body.title("TEST TITLE"); body.listingTypeId("gold_special"); body.price(10); body.categoryId("MLA3530"); body.buyingMode("buy_it_now"); body.currencyId("ARS"); body.condition("new"); body.availableQuantity(2); body.siteId("MLA"); ItemResponse response = api.itemsPost(accessToken, body); assertNotNull(response); assertEquals(body.getTitle().toLowerCase(), (response.getTitle().toLowerCase())); assertEquals(body.getSiteId(), response.getSiteId()); assertEquals(body.getPrice(), response.getPrice()); assertEquals(body.getCategoryId(), response.getCategoryId()); }
/** * Update an item. * * @throws ApiException if the Api call fails */ @Test public void itemsItemIdPutTest() throws ApiException { String itemId = "MLA742781879"; ItemJson body = new ItemJson(); body.price(10); ItemResponse response = api.itemsItemIdPut(itemId, accessToken, body); assertNotNull(response); assertEquals(itemId, response.getId()); assertEquals(body.getPrice(), response.getPrice()); }
/** * Return item infromation. * * @throws ApiException if the Api call fails */ @Test public void itemsItemIdGetTest() throws ApiException { String itemId = "MLA742781879"; ItemResponse response = api.itemsItemIdGet(itemId, accessToken); assertNotNull(response); assertEquals(itemId, response.getId()); }