Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Country code (in E.164 format). Assume length is n.
 
	private String countryCode;

In-country phone number (in E.164 format). Maximum (15 - n) digits.
Default Constructor
	public Phone() {
	}

Parameterized Constructor
	public Phone(String countryCodeString nationalNumber) {
		this. = countryCode;
		this. = nationalNumber;
	}


Setter for countryCode
	public Phone setCountryCode(String countryCode) {
		this. = countryCode;
		return this;
	}

Getter for countryCode
	public String getCountryCode() {
		return this.;
	}


Setter for nationalNumber
	public Phone setNationalNumber(String nationalNumber) {
		this. = nationalNumber;
		return this;
	}

Getter for nationalNumber
		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