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 CustomAmount  {

Custom amount label. 25 characters max.
	private String label;

Custom amount value. Range of 0 to 999999.99.
	private Currency amount;

Default Constructor
	public CustomAmount() {
	}


Setter for label
	public CustomAmount setLabel(String label) {
		this. = label;
		return this;
	}

Getter for label
	public String getLabel() {
		return this.;
	}


Setter for amount
	public CustomAmount 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