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

com.univapay.sdk.models.response.cancel.Cancel Maven / Gradle / Ivy

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

import com.google.gson.annotations.SerializedName;
import com.univapay.sdk.models.common.CancelId;
import com.univapay.sdk.models.common.ChargeId;
import com.univapay.sdk.models.common.StoreId;
import com.univapay.sdk.models.response.PaymentError;
import com.univapay.sdk.models.response.SimpleModel;
import com.univapay.sdk.models.response.UnivapayResponse;
import com.univapay.sdk.types.CancelStatus;
import com.univapay.sdk.types.MetadataMap;
import com.univapay.sdk.types.ProcessingMode;
import com.univapay.sdk.utils.MetadataAdapter;
import java.time.OffsetDateTime;
import java.util.UUID;

public class Cancel extends UnivapayResponse implements SimpleModel {

  @SerializedName("id")
  private UUID cancelId;

  @SerializedName("charge_id")
  private UUID chargeId;

  @SerializedName("store_id")
  private UUID storeId;

  @SerializedName("status")
  private CancelStatus cancelStatus;

  @SerializedName("error")
  private PaymentError error;

  @SerializedName("metadata")
  private MetadataMap metadata;

  @SerializedName("mode")
  private ProcessingMode mode;

  @SerializedName("created_on")
  private OffsetDateTime createdOn;

  public CancelId getCancelId() {
    return new CancelId(cancelId);
  }

  public ChargeId getChargeId() {
    return new ChargeId(chargeId);
  }

  public StoreId getStoreId() {
    return new StoreId(storeId);
  }

  public CancelStatus getCancelStatus() {
    return cancelStatus;
  }

  public PaymentError getError() {
    return error;
  }

  public MetadataMap getMetadata() {
    return metadata;
  }

  public  T getMetadata(MetadataAdapter deserializer) {
    return deserializer.deserialize(metadata);
  }

  public ProcessingMode getMode() {
    return mode;
  }

  public OffsetDateTime getCreatedOn() {
    return createdOn;
  }

  @Override
  public CancelId getId() {
    return new CancelId(cancelId);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy