Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

Amount being collected.
 
 	private Amount amount;

Recepient of the funds in this transaction.
 
 	private Payee payee;

Description of what is being paid for.
 
 	private String description;

List of items being paid for.
 
 	private ItemList itemList;

List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
 
Additional transactions for complex payment (Parallel and Chained) scenarios.
 
Default Constructor
 
 	public Transaction() {
 	}

Parameterized Constructor
 
 	public Transaction(Amount amount) {
 		this. = amount;
 	}


Setter for amount
 
 	public Transaction setAmount(Amount amount) {
 		this. = amount;
 		return this;
 	}

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


Setter for payee
 
 	public Transaction setPayee(Payee payee) {
 		this. = payee;
 		return this;
 	}

Getter for payee
 
 	public Payee getPayee() {
 		return this.;
 	}


Setter for description
 
 	public Transaction setDescription(String description) {
 		this. = description;
 		return this;
 	}

Getter for description
 
 	public String getDescription() {
		return this.;
	}


Setter for itemList
	public Transaction setItemList(ItemList itemList) {
		this. = itemList;
		return this;
	}

Getter for itemList
	public ItemList getItemList() {
		return this.;
	}


Setter for relatedResources
	public Transaction setRelatedResources(List<RelatedResourcesrelatedResources) {
		this. = relatedResources;
		return this;
	}

Getter for relatedResources
		return this.;
	}


Setter for transactions
	public Transaction setTransactions(List<Transactiontransactions) {
		this. = transactions;
		return this;
	}

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