package io.paymenthighway.model.response;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.UUID;

/**
 * Tokenization response POJO
 */
public class TokenizationResponse extends Response {

  @JsonProperty("card_token")
  UUID cardToken;
  TokenizationResponse.Card card;
  Customer customer;
  @JsonProperty("cardholder_authentication")
  String cardholderAuthentication;
  @JsonProperty("recurring")
  Boolean recurring;

  public UUID getCardToken() {
    return cardToken;
  }

  public TokenizationResponse.Card getCard() {
    return this.card;
  }

  public Customer getCustomer() {
    return customer;
  }

  public String getCardholderAuthentication() {
    return cardholderAuthentication;
  }

  public Boolean getRecurring() { return recurring; }

  public static class Card {
    String type;
    @JsonProperty("partial_pan")
    String partialPan;
    @JsonProperty("expire_year")
    String expireYear;
    @JsonProperty("expire_month")
    String expireMonth;
    @JsonProperty("cvc_required")
    String cvcRequired;
    String bin;
    String funding;
    String category;
    @JsonProperty("country_code")
    String countryCode;

    public String getType() {
      return type;
    }

    public String getPartialPan() {
      return partialPan;
    }

    public String getExpireMonth() {
      return expireMonth;
    }

    public String getExpireYear() {
      return expireYear;
    }

    public String getCvcRequired() {
      return cvcRequired;
    }

    public String getBin() {
      return bin;
    }

    public String getFunding() {
      return funding;
    }

    public String getCategory() {
      return category;
    }

    public String getCountryCode() {
      return countryCode;
    }
  }
}

@@ -257,37 +257,23 @@
 oken;%0A  
-TokenizationResponse.
+Partial
 Card car
@@ -498,29 +498,15 @@
 lic 
-TokenizationResponse.
+Partial
 Card
@@ -754,981 +754,6 @@
  %7D%0A%0A
-  public static class Card %7B%0A    String type;%0A    @JsonProperty(%22partial_pan%22)%0A    String partialPan;%0A    @JsonProperty(%22expire_year%22)%0A    String expireYear;%0A    @JsonProperty(%22expire_month%22)%0A    String expireMonth;%0A    @JsonProperty(%22cvc_required%22)%0A    String cvcRequired;%0A    String bin;%0A    String funding;%0A    String category;%0A    @JsonProperty(%22country_code%22)%0A    String countryCode;%0A%0A    public String getType() %7B%0A      return type;%0A    %7D%0A%0A    public String getPartialPan() %7B%0A      return partialPan;%0A    %7D%0A%0A    public String getExpireMonth() %7B%0A      return expireMonth;%0A    %7D%0A%0A    public String getExpireYear() %7B%0A      return expireYear;%0A    %7D%0A%0A    public String getCvcRequired() %7B%0A      return cvcRequired;%0A    %7D%0A%0A    public String getBin() %7B%0A      return bin;%0A    %7D%0A%0A    public String getFunding() %7B%0A      return funding;%0A    %7D%0A%0A    public String getCategory() %7B%0A      return category;%0A    %7D%0A%0A    public String getCountryCode() %7B%0A      return countryCode;%0A    %7D%0A  %7D%0A
 %7D%0A

remove TokenizationResponse card object, use PartialCard instead