Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.paypal.api.payments;
  
  import  com.paypal.core.rest.JSONFormatter;
  
  public class Item  {

Number of items.
  
 	private String quantity;

Name of the item.
 
 	private String name;

Cost of the item.
 
 	private String price;

    
Tax associated with the item.
 
     private String tax;

3-letter Currency Code
 
 	private String currency;

Number or code to identify the item in your catalog/records.
 
 	private String sku;

Default Constructor
 
 	public Item() {
 	}

Parameterized Constructor
 
 	public Item(String quantityString nameString priceString currency) {
 		this. = quantity;
 		this. = name;
 		this. = price;
 		this. = currency;
 	}


Setter for quantity
 
 	public Item setQuantity(String quantity) {
 		this. = quantity;
 		return this;
 	}

Getter for quantity
 
 	public String getQuantity() {
 		return this.;
 	}


Setter for name
 
 	public Item setName(String name) {
 		this. = name;
 		return this;
 	}

Getter for name
 
 	public String getName() {
 		return this.;
 	}


Setter for price
 
 	public Item setPrice(String price) {
 		this. = price;
 		return this;
 	}

Getter for price
 
 	public String getPrice() {
 		return this.;
 	}

    
Getter for tax
    public String getTax() {
        return ;
    }

    
Setter for tax
    public void setTax(String tax) {
        this. = tax;
    }

    
Setter for currency
	public Item setCurrency(String currency) {
		this. = currency;
		return this;
	}

Getter for currency
	public String getCurrency() {
		return this.;
	}


Setter for sku
	public Item setSku(String sku) {
		this. = sku;
		return this;
	}

Getter for sku
	public String getSku() {
		return this.;
	}

Returns a JSON string corresponding to object state

Returns:
JSON representation
	public String toJSON() {
		return JSONFormatter.toJSON(this);
	}
	public String toString() {
		return toJSON();
	}
New to GrepCode? Check out our FAQ X