Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.paypal.api.payments;
  
  
  public class Tax  {

Identifier of the resource.
 
 	private String id;

Name of the tax. 10 characters max.
 
 	private String name;

Rate of the specified tax. Range of 0.001 to 99.999.
 
 	private float percent;

Tax in the form of money. Cannot be specified in a request.
 
 	private Currency amount;

Default Constructor
 
 	public Tax() {
 	}

Parameterized Constructor
 
 	public Tax(String namefloat percent) {
 		this. = name;
 		this. = percent;
 	}


Setter for id
 
 	public Tax setId(String id) {
 		this. = id;
 		return this;
 	}

Getter for id
 
 	public String getId() {
 		return this.;
 	}


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

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


Setter for percent
 
 	public Tax setPercent(float percent) {
 		this. = percent;
 		return this;
 	}

Getter for percent
 
 	public float getPercent() {
 		return this.;
 	}


Setter for amount
 
 	public Tax setAmount(Currency amount) {
 		this. = amount;
 		return this;
 	}

Getter for amount
	public Currency getAmount() {
		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