All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cardpay.sdk.model.PaymentRequestMerchantOrder Maven / Gradle / Ivy

The newest version!
/*
 * CardPay REST API
 * Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.
 *
 * OpenAPI spec version: 3.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.cardpay.sdk.model;

import com.google.gson.annotations.SerializedName;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;

@Data

public class PaymentRequestMerchantOrder {
  @SerializedName("cryptocurrency_indicator")
  private Boolean cryptocurrencyIndicator = null;
  @SerializedName("description")
  private String description = null;
  @SerializedName("expire_at")
  private OffsetDateTime expireAt = null;
  @SerializedName("flights")
  private Flights flights = null;
  @SerializedName("id")
  private String id = null;
  @SerializedName("items")
  private List items = null;
  @SerializedName("shipping_address")
  private ShippingAddress shippingAddress = null;
  
  public void setCryptocurrencyIndicator(Boolean cryptocurrencyIndicator) {
      this.cryptocurrencyIndicator = cryptocurrencyIndicator;
  }

  /**
   * @param cryptocurrencyIndicator Indicator should be added if there will be cryptocurrency purchase in transaction
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder cryptocurrencyIndicator(Boolean cryptocurrencyIndicator) {
      this.cryptocurrencyIndicator = cryptocurrencyIndicator;
      return this;
  }

  
  public void setDescription(String description) {
      this.description = description;
  }

  /**
   * @param description Description of product/service being sold
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder description(String description) {
      this.description = description;
      return this;
  }

  
  public void setExpireAt(OffsetDateTime expireAt) {
      this.expireAt = expireAt;
  }

  /**
   * @param expireAt Payment expiration date and time in ISO 8601 format (example of format - yyyy-MM-dd'T'HH:mm:ss'Z') Should be UTC time.  Not all payment methods support this options, contact the Unlimit manager for details.
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder expireAt(OffsetDateTime expireAt) {
      this.expireAt = expireAt;
      return this;
  }

  
  public void setFlights(Flights flights) {
      this.flights = flights;
  }

  /**
   * @param flights Flights data *(for BANKCARD payment method only)*
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder flights(Flights flights) {
      this.flights = flights;
      return this;
  }

  
  public void setId(String id) {
      this.id = id;
  }

  /**
   * @param id Order ID used by Merchant's shopping cart
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder id(String id) {
      this.id = id;
      return this;
  }

  
  public void setItems(List items) {
      this.items = items;
  }

  /**
   * @param items Array of items (in the shopping cart)
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder items(List items) {
      this.items = items;
      return this;
  }

  public PaymentRequestMerchantOrder addItemsItem(Item itemsItem) {
    if (this.items == null) {
      this.items = new ArrayList<>();
    }
    this.items.add(itemsItem);
    return this;
  }

  
  public void setShippingAddress(ShippingAddress shippingAddress) {
      this.shippingAddress = shippingAddress;
  }

  /**
   * @param shippingAddress Shipping Address
   * @return bean instance
   **/
  public PaymentRequestMerchantOrder shippingAddress(ShippingAddress shippingAddress) {
      this.shippingAddress = shippingAddress;
      return this;
  }


  @Override
  public String toString() {
     StringBuilder sb = new StringBuilder();
     sb.append("PaymentRequestMerchantOrder( ");
     
     if (cryptocurrencyIndicator != null) sb.append("cryptocurrencyIndicator=").append(cryptocurrencyIndicator.toString()).append("; ");
     if (description != null) sb.append("description=").append(description.toString()).append("; ");
     if (expireAt != null) sb.append("expireAt=").append(expireAt.toString()).append("; ");
     if (flights != null) sb.append("flights=").append(flights.toString()).append("; ");
     if (id != null) sb.append("id=").append(id.toString()).append("; ");
     if (items != null) sb.append("items=").append(items.toString()).append("; ");
     if (shippingAddress != null) sb.append("shippingAddress=").append(shippingAddress.toString()).append("; ");
     sb.append(")");
     return sb.toString();
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy