package com.red.circle.order.app.dto.clientobject.pay;

import com.red.circle.framework.dto.DTO;
import java.util.HashMap;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author pengliang on 2022/10/24
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class PlaceAnOrderResponseCO extends DTO {

  private static final long serialVersionUID = 1L;

  /**
   * 第三方平台订单号.
   */
  private String tradeNo;

  /**
   * 商户订单号.
   */
  private String orderId;

  /**
   * 厂商code.
   */
  private String factoryCode;

  /**
   * 厂商渠道code.
   */
  private String factoryChannelCode;

  /**
   * 货币.
   */
  private String currency;

  /**
   * 国家code.
   */
  private String countryCode;

  /**
   * 跳转链接.
   */
  private String requestUrl;

  /**
   * 扩张信息.
   */
  private Object expand;

  /**
   * 扩展数据.
   */
  private Map<String, Object> extra;

  public PlaceAnOrderResponseCO putRequestParam(Object param) {
    if (extra == null) {
      extra = new HashMap<>();
    }
    extra.put("Request", param);
    return this;
  }

  public PlaceAnOrderResponseCO putResponseParam(Object param) {
    if (extra == null) {
      extra = new HashMap<>();
    }
    extra.put("Response", param);
    return this;
  }

  public Map<String, Object> extra() {
    return extra;
  }

}
