I am unable to add this object to my intent:
public void addItem(View view) {
    Item item = new Item();
    item.setName("Test");
    item.setDescription("testDescription");
    item.setQuantity(1.0);
    item.setTaxName("testTexName");
    item.setTaxRate("testTaxRate");
    item.setUnitPrice(5.99);
    ItemList itemList = new ItemList();
    itemList.setItem((List<Item>) item);
    Invoice invoice = new Invoice("due", "0", "USD", "test@mail.com", "testPayer@mail.com",
            "123123", itemList);
    Intent intent = getIntent();
    intent.putExtra("invoice", invoice);
    this.setResult(RESULT_OK, intent);
    finish();
}
Other classes:
public Invoice(String paymentTerms, String discountPercent, String currencyCode, String merchantEmail, String payerEmail, String number, ItemList itemList) {
    this.paymentTerms = paymentTerms;
    this.discountPercent = discountPercent;
    this.currencyCode = currencyCode;
    this.merchantEmail = merchantEmail;
    this.payerEmail = payerEmail;
    this.number = number;
    this.itemList = itemList;
}
public class ItemList {
    @SerializedName("item")
    @Expose
    private List<Item> item = null;
    /**
     * No args constructor for use in serialization
     *
     */
    public ItemList() {
    }
    /**
     *
     * @param item
     */
    public ItemList(List<Item> item) {
        super();
        this.item = item;
    }
    public List<Item> getItem() {
        return item;
    }
    public void setItem(List<Item> item) {
        this.item = item;
    }
    public ItemList withItem(List<Item> item) {
        this.item = item;
        return this;
    }
}
public class Item implements Serializable {
    @SerializedName("name")
    private String _name;
    @SerializedName("description")
    private String _description;
    @SerializedName("quantity")
    private Double _quantity;
    @SerializedName("taxName")
    private String _taxName;
    @SerializedName("taxRate")
    private String _taxRate;
    @SerializedName("unitPrice")
    private Double _unitPrice;
    public Item(String name, String description, Double quantity, String taxRate, String taxName, Double unitPrice) {
        _name = name;
        _description = description;
        _quantity = quantity;
        _taxRate = taxRate;
        _taxName = taxName;
        _unitPrice = unitPrice;
    }
    public Item(String name, String description, Double quantity, Double unitPrice) {
        _name = name;
        _description = description;
        _quantity = quantity;
        _unitPrice = unitPrice;
        _taxName = null;
        _taxRate = null;
    }
}
It is presenting the following error:
cannot resolve method 'putExtra(Java.lang.String, (packagename).Invoice)'.
I am trying to create the following JSON Object:
{
    "paymentTerms": "DueOnReceipt",
    "discountPercent": "0",
    "currencyCode": "USD",
    "number": "1457",
    "payerEmail": "foo@bar.com",
    "itemList": {
        "item": [
            {
                "taxRate": "8.5000",
                "name": "Curtains",
                "description": "Blue curtains",
                "unitPrice": "29.99",
                "taxName": "Tax",
                "quantity": "1"
            },
            {
                "taxRate": "0",
                "name": "Delivery Fee",
                "description": "Delivery Fee",
                "unitPrice": "5.0",
                "taxName": "Tax",
                "quantity": "1"
            }
        ]
    }
}
Can anyone point me in the direction of the correct way of doing this?
Thank you so much for your help, After your suggestions, I have modified the code: Here is the AddItem class:
public void addItem(View view) {
if(validateFields()) {
    Log.d(LOG_TAG, "addItem");
  Intent intent = getIntent();
  intent.putExtra("item", _item);
//  intent.putExtra("item", _item);
  this.setResult(RESULT_OK, intent);
  finish();
  Log.d(LOG_TAG, _item.toString());
} else {
    Toast toast = Toast.makeText(this, "Required field missing!", Toast.LENGTH_SHORT);
    toast.show();
    }
}
public Boolean validateFields() {
    String name = _name.getText().toString();
    String description = _desc.getText().toString();
    String unitPrice = _unitPrice.getText().toString();
    String taxName = _taxName.getText().toString();
    String taxRate = _taxRate.getText().toString();
    String quantity = _quantity.getText().toString();
    if(TextUtils.isEmpty(name) || TextUtils.isEmpty(unitPrice) || TextUtils.isEmpty(quantity)) {
        return false;
    }
    if(TextUtils.isEmpty(taxName) || TextUtils.isEmpty(taxRate)) {
        _item = new Item(name, description, Double.valueOf(quantity), Double.valueOf(unitPrice));
    } else {
        _item = new Item(name, description, Double.valueOf(quantity), taxRate, taxName, Double.valueOf(unitPrice));
    }
    return true;
}
}
Here is the PayPalHereLauncher class, where I receive resultCode=-1 and no data in the intent:
public void addItem(View view) {
    Intent intent = new Intent(this, AddItem.class);
    startActivityForResult(intent, ADD_ITEM_REQUEST_CODE);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if(requestCode == ADD_ITEM_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
        Intent intent = getIntent();
        Item item = (Item)intent.getSerializableExtra("item");
        String name = item.getName();
        String quantity = item.getQuantity().toString();
        Gson gson = new Gson();
        String test = gson.toJson(item);
    }
}
 
    