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

Country code (from in E.164 format)
 
	private String countryCode;

In-country phone number (from in E.164 format)
Phone extension
	private String extension;

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.;
	}


Setter for extension
	public Phone setExtension(String extension) {
		this. = extension;
		return this;
	}

Getter for extension
	public String getExtension() {
		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