com.paypal.sdk.models.PaymentTokensCreateInput Maven / Gradle / Ivy
/*
* PaypalServerSDKLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
package com.paypal.sdk.models;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for PaymentTokensCreateInput type.
*/
public class PaymentTokensCreateInput {
private String payPalRequestId;
private String contentType;
private PaymentTokenRequest body;
/**
* Default constructor.
*/
public PaymentTokensCreateInput() {
contentType = "application/json";
}
/**
* Initialization constructor.
* @param payPalRequestId String value for payPalRequestId.
* @param contentType String value for contentType.
* @param body PaymentTokenRequest value for body.
*/
public PaymentTokensCreateInput(
String payPalRequestId,
String contentType,
PaymentTokenRequest body) {
this.payPalRequestId = payPalRequestId;
this.contentType = contentType;
this.body = body;
}
/**
* Getter for PayPalRequestId.
* The server stores keys for 3 hours.
* @return Returns the String
*/
@JsonGetter("PayPal-Request-Id")
public String getPayPalRequestId() {
return payPalRequestId;
}
/**
* Setter for PayPalRequestId.
* The server stores keys for 3 hours.
* @param payPalRequestId Value for String
*/
@JsonSetter("PayPal-Request-Id")
public void setPayPalRequestId(String payPalRequestId) {
this.payPalRequestId = payPalRequestId;
}
/**
* Getter for ContentType.
* @return Returns the String
*/
@JsonGetter("Content-Type")
public String getContentType() {
return contentType;
}
/**
* Setter for ContentType.
* @param contentType Value for String
*/
@JsonSetter("Content-Type")
private void setContentType(String contentType) {
this.contentType = contentType;
}
/**
* Getter for Body.
* Payment Token creation with a financial instrument and an optional customer_id.
* @return Returns the PaymentTokenRequest
*/
@JsonGetter("body")
public PaymentTokenRequest getBody() {
return body;
}
/**
* Setter for Body.
* Payment Token creation with a financial instrument and an optional customer_id.
* @param body Value for PaymentTokenRequest
*/
@JsonSetter("body")
public void setBody(PaymentTokenRequest body) {
this.body = body;
}
/**
* Converts this PaymentTokensCreateInput into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "PaymentTokensCreateInput [" + "payPalRequestId=" + payPalRequestId
+ ", contentType=" + contentType + ", body=" + body + "]";
}
/**
* Builds a new {@link PaymentTokensCreateInput.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link PaymentTokensCreateInput.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder(payPalRequestId, contentType, body);
return builder;
}
/**
* Class to build instances of {@link PaymentTokensCreateInput}.
*/
public static class Builder {
private String payPalRequestId;
private String contentType = "application/json";
private PaymentTokenRequest body;
/**
* Initialization constructor.
*/
public Builder() {
}
/**
* Initialization constructor.
* @param payPalRequestId String value for payPalRequestId.
* @param contentType String value for contentType.
* @param body PaymentTokenRequest value for body.
*/
public Builder(String payPalRequestId, String contentType, PaymentTokenRequest body) {
this.payPalRequestId = payPalRequestId;
this.contentType = contentType;
this.body = body;
}
/**
* Setter for payPalRequestId.
* @param payPalRequestId String value for payPalRequestId.
* @return Builder
*/
public Builder payPalRequestId(String payPalRequestId) {
this.payPalRequestId = payPalRequestId;
return this;
}
/**
* Setter for contentType.
* @param contentType String value for contentType.
* @return Builder
*/
public Builder contentType(String contentType) {
this.contentType = contentType;
return this;
}
/**
* Setter for body.
* @param body PaymentTokenRequest value for body.
* @return Builder
*/
public Builder body(PaymentTokenRequest body) {
this.body = body;
return this;
}
/**
* Builds a new {@link PaymentTokensCreateInput} object using the set fields.
* @return {@link PaymentTokensCreateInput}
*/
public PaymentTokensCreateInput build() {
return new PaymentTokensCreateInput(payPalRequestId, contentType, body);
}
}
}