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

com.univapay.sdk.models.request.charge.ChargesReq Maven / Gradle / Ivy

There is a newer version: 0.2.35
Show newest version
package com.univapay.sdk.models.request.charge;

import com.google.gson.annotations.SerializedName;
import com.univapay.sdk.models.common.MoneyLike;
import com.univapay.sdk.models.common.TransactionTokenId;
import com.univapay.sdk.types.MetadataMap;
import java.math.BigInteger;
import java.time.OffsetDateTime;
import java.util.UUID;

@SuppressWarnings("FieldCanBeLocal")
public class ChargesReq {
  @SerializedName("transaction_token_id")
  private UUID transactionTokenId;

  @SerializedName("amount")
  private BigInteger amount;

  @SerializedName("currency")
  private String currency;

  @SerializedName("only_direct_currency")
  private Boolean onlyDirectCurrency;

  @SerializedName("capture")
  private Boolean capture;

  @SerializedName("capture_at")
  private OffsetDateTime captureAt;

  @SerializedName("descriptor")
  private String descriptor;

  @SerializedName("metadata")
  private MetadataMap metadata;

  public ChargesReq(
      TransactionTokenId transactionTokenId,
      MoneyLike money,
      Boolean capture,
      OffsetDateTime captureAt,
      MetadataMap metadata,
      Boolean onlyDirectCurrency,
      String descriptor) {
    this.transactionTokenId = transactionTokenId.toUUID();
    this.amount = money.getAmount();
    this.currency = money.getCurrency();
    this.onlyDirectCurrency = onlyDirectCurrency;
    this.capture = capture;
    this.captureAt = captureAt;
    this.descriptor = descriptor;
    this.metadata = metadata;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy