Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.paypal.api.payments;
  
  
  import java.util.List;
  
  public class PaymentDefinition  {

Identifier of the payment_definition. 128 characters max.
 
 	private String id;

Name of the payment definition. 128 characters max.
 
 	private String name;

Type of the payment definition. Allowed values: `TRIAL`, `REGULAR`.
 
 	private String type;

How frequently the customer should be charged.
 
Frequency of the payment definition offered. Allowed values: `WEEK`, `DAY`, `YEAR`, `MONTH`.
 
 	private String frequency;

Number of cycles in this payment definition.
 
 	private String cycles;

Amount that will be charged at the end of each cycle for this payment definition.
 
 	private Currency amount;

Array of charge_models for this payment definition.
 
Default Constructor
 
 	public PaymentDefinition() {
 	}

Parameterized Constructor
 
 	public PaymentDefinition(String nameString typeString frequencyIntervalString frequencyString cyclesCurrency amount) {
 		this. = name;
 		this. = type;
 		this. = frequencyInterval;
 		this. = frequency;
 		this. = cycles;
 		this. = amount;
 	}


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

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


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

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


Setter for type
	public PaymentDefinition setType(String type) {
		this. = type;
		return this;
	}

Getter for type
	public String getType() {
		return this.;
	}


Setter for frequencyInterval
	public PaymentDefinition setFrequencyInterval(String frequencyInterval) {
		this. = frequencyInterval;
		return this;
	}

Getter for frequencyInterval
		return this.;
	}


Setter for frequency
	public PaymentDefinition setFrequency(String frequency) {
		this. = frequency;
		return this;
	}

Getter for frequency
	public String getFrequency() {
		return this.;
	}


Setter for cycles
	public PaymentDefinition setCycles(String cycles) {
		this. = cycles;
		return this;
	}

Getter for cycles
	public String getCycles() {
		return this.;
	}


Setter for amount
		this. = amount;
		return this;
	}

Getter for amount
	public Currency getAmount() {
		return this.;
	}


Setter for chargeModels
		this. = chargeModels;
		return this;
	}

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