com.paypal.sdk.models.PayPalWalletAttributes 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 PayPalWalletAttributes type.
*/
public class PayPalWalletAttributes {
private PayPalWalletCustomerRequest customer;
private PayPalWalletVaultInstruction vault;
/**
* Default constructor.
*/
public PayPalWalletAttributes() {
}
/**
* Initialization constructor.
* @param customer PayPalWalletCustomerRequest value for customer.
* @param vault PayPalWalletVaultInstruction value for vault.
*/
public PayPalWalletAttributes(
PayPalWalletCustomerRequest customer,
PayPalWalletVaultInstruction vault) {
this.customer = customer;
this.vault = vault;
}
/**
* Getter for Customer.
* @return Returns the PayPalWalletCustomerRequest
*/
@JsonGetter("customer")
@JsonInclude(JsonInclude.Include.NON_NULL)
public PayPalWalletCustomerRequest getCustomer() {
return customer;
}
/**
* Setter for Customer.
* @param customer Value for PayPalWalletCustomerRequest
*/
@JsonSetter("customer")
public void setCustomer(PayPalWalletCustomerRequest customer) {
this.customer = customer;
}
/**
* Getter for Vault.
* @return Returns the PayPalWalletVaultInstruction
*/
@JsonGetter("vault")
@JsonInclude(JsonInclude.Include.NON_NULL)
public PayPalWalletVaultInstruction getVault() {
return vault;
}
/**
* Setter for Vault.
* @param vault Value for PayPalWalletVaultInstruction
*/
@JsonSetter("vault")
public void setVault(PayPalWalletVaultInstruction vault) {
this.vault = vault;
}
/**
* Converts this PayPalWalletAttributes into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "PayPalWalletAttributes [" + "customer=" + customer + ", vault=" + vault + "]";
}
/**
* Builds a new {@link PayPalWalletAttributes.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link PayPalWalletAttributes.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.customer(getCustomer())
.vault(getVault());
return builder;
}
/**
* Class to build instances of {@link PayPalWalletAttributes}.
*/
public static class Builder {
private PayPalWalletCustomerRequest customer;
private PayPalWalletVaultInstruction vault;
/**
* Setter for customer.
* @param customer PayPalWalletCustomerRequest value for customer.
* @return Builder
*/
public Builder customer(PayPalWalletCustomerRequest customer) {
this.customer = customer;
return this;
}
/**
* Setter for vault.
* @param vault PayPalWalletVaultInstruction value for vault.
* @return Builder
*/
public Builder vault(PayPalWalletVaultInstruction vault) {
this.vault = vault;
return this;
}
/**
* Builds a new {@link PayPalWalletAttributes} object using the set fields.
* @return {@link PayPalWalletAttributes}
*/
public PayPalWalletAttributes build() {
return new PayPalWalletAttributes(customer, vault);
}
}
}