com.paypal.sdk.models.CustomerRequest 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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
/**
* This is a model class for CustomerRequest type.
*/
public class CustomerRequest {
private String id;
private String merchantCustomerId;
/**
* Default constructor.
*/
public CustomerRequest() {
}
/**
* Initialization constructor.
* @param id String value for id.
* @param merchantCustomerId String value for merchantCustomerId.
*/
public CustomerRequest(
String id,
String merchantCustomerId) {
this.id = id;
this.merchantCustomerId = merchantCustomerId;
}
/**
* Getter for Id.
* The unique ID for a customer generated by PayPal.
* @return Returns the String
*/
@JsonGetter("id")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getId() {
return id;
}
/**
* Setter for Id.
* The unique ID for a customer generated by PayPal.
* @param id Value for String
*/
@JsonSetter("id")
public void setId(String id) {
this.id = id;
}
/**
* Getter for MerchantCustomerId.
* Merchants and partners may already have a data-store where their customer information is
* persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your
* representation of a customer.
* @return Returns the String
*/
@JsonGetter("merchant_customer_id")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getMerchantCustomerId() {
return merchantCustomerId;
}
/**
* Setter for MerchantCustomerId.
* Merchants and partners may already have a data-store where their customer information is
* persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your
* representation of a customer.
* @param merchantCustomerId Value for String
*/
@JsonSetter("merchant_customer_id")
public void setMerchantCustomerId(String merchantCustomerId) {
this.merchantCustomerId = merchantCustomerId;
}
/**
* Converts this CustomerRequest into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "CustomerRequest [" + "id=" + id + ", merchantCustomerId=" + merchantCustomerId
+ "]";
}
/**
* Builds a new {@link CustomerRequest.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link CustomerRequest.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.id(getId())
.merchantCustomerId(getMerchantCustomerId());
return builder;
}
/**
* Class to build instances of {@link CustomerRequest}.
*/
public static class Builder {
private String id;
private String merchantCustomerId;
/**
* Setter for id.
* @param id String value for id.
* @return Builder
*/
public Builder id(String id) {
this.id = id;
return this;
}
/**
* Setter for merchantCustomerId.
* @param merchantCustomerId String value for merchantCustomerId.
* @return Builder
*/
public Builder merchantCustomerId(String merchantCustomerId) {
this.merchantCustomerId = merchantCustomerId;
return this;
}
/**
* Builds a new {@link CustomerRequest} object using the set fields.
* @return {@link CustomerRequest}
*/
public CustomerRequest build() {
return new CustomerRequest(id, merchantCustomerId);
}
}
}