com.klarna.rest.api.payments.model.PaymentsCustomerTokenCreationResponse Maven / Gradle / Ivy
The newest version!
/*
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.klarna.rest.api.payments.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.klarna.rest.api.payments.model.PaymentsAddress;
import com.klarna.rest.api.payments.model.PaymentsCustomer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* PaymentsCustomerTokenCreationResponse
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-20T11:12:59.490Z")
public class PaymentsCustomerTokenCreationResponse {
@JsonProperty("billing_address")
private PaymentsAddress billingAddress = null;
@JsonProperty("customer")
private PaymentsCustomer customer = null;
@JsonProperty("payment_method_reference")
private String paymentMethodReference = null;
@JsonProperty("redirect_url")
private String redirectUrl = null;
@JsonProperty("token_id")
private String tokenId = null;
public PaymentsCustomerTokenCreationResponse billingAddress(PaymentsAddress billingAddress) {
this.billingAddress = billingAddress;
return this;
}
/**
* Billing address of the customer.
* @return billingAddress
**/
@ApiModelProperty(value = "Billing address of the customer.")
public PaymentsAddress getBillingAddress() {
return billingAddress;
}
public void setBillingAddress(PaymentsAddress billingAddress) {
this.billingAddress = billingAddress;
}
public PaymentsCustomerTokenCreationResponse customer(PaymentsCustomer customer) {
this.customer = customer;
return this;
}
/**
* Customer specific information.
* @return customer
**/
@ApiModelProperty(value = "Customer specific information.")
public PaymentsCustomer getCustomer() {
return customer;
}
public void setCustomer(PaymentsCustomer customer) {
this.customer = customer;
}
public PaymentsCustomerTokenCreationResponse paymentMethodReference(String paymentMethodReference) {
this.paymentMethodReference = paymentMethodReference;
return this;
}
/**
* Used to connect customer with payment method when it is present.
* @return paymentMethodReference
**/
@ApiModelProperty(example = "0b1d9815-165e-42e2-8867-35bc03789e00", value = "Used to connect customer with payment method when it is present.")
public String getPaymentMethodReference() {
return paymentMethodReference;
}
public void setPaymentMethodReference(String paymentMethodReference) {
this.paymentMethodReference = paymentMethodReference;
}
public PaymentsCustomerTokenCreationResponse redirectUrl(String redirectUrl) {
this.redirectUrl = redirectUrl;
return this;
}
/**
* URL to redirect the customer to after placing the order.
* @return redirectUrl
**/
@ApiModelProperty(example = "https://credit.klarna.com/v1/sessions/0b1d9815-165e-42e2-8867-35bc03789e00/redirect", required = true, value = "URL to redirect the customer to after placing the order.")
public String getRedirectUrl() {
return redirectUrl;
}
public void setRedirectUrl(String redirectUrl) {
this.redirectUrl = redirectUrl;
}
public PaymentsCustomerTokenCreationResponse tokenId(String tokenId) {
this.tokenId = tokenId;
return this;
}
/**
* Used when placing the order
* @return tokenId
**/
@ApiModelProperty(example = "0b1d9815-165e-42e2-8867-35bc03789e00", required = true, value = "Used when placing the order")
public String getTokenId() {
return tokenId;
}
public void setTokenId(String tokenId) {
this.tokenId = tokenId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PaymentsCustomerTokenCreationResponse customerTokenCreationResponse = (PaymentsCustomerTokenCreationResponse) o;
return Objects.equals(this.billingAddress, customerTokenCreationResponse.billingAddress) &&
Objects.equals(this.customer, customerTokenCreationResponse.customer) &&
Objects.equals(this.paymentMethodReference, customerTokenCreationResponse.paymentMethodReference) &&
Objects.equals(this.redirectUrl, customerTokenCreationResponse.redirectUrl) &&
Objects.equals(this.tokenId, customerTokenCreationResponse.tokenId);
}
@Override
public int hashCode() {
return Objects.hash(billingAddress, customer, paymentMethodReference, redirectUrl, tokenId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PaymentsCustomerTokenCreationResponse {\n");
sb.append(" billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
sb.append(" paymentMethodReference: ").append(toIndentedString(paymentMethodReference)).append("\n");
sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n");
sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}