/*
 * Copyright (c) 2015. hp.weber GmbH & Co secucard KG (www.secucard.com)
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.secucard.connect.product.payment.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.secucard.connect.product.common.model.SecuObject;

import java.util.Currency;

public abstract class Transaction extends SecuObject {
  public static final String STATUS_ACCEPTED = "accepted";
  public static final String STATUS_CANCELED = "canceled";
  public static final String STATUS_PROCEED = "proceed";

  protected Customer customer;

  protected Contract contract;

  protected long amount;

  protected Currency currency;

  protected String purpose;

  @JsonProperty("order_id")
  protected String orderId;

  @JsonProperty("trans_id")
  protected String transId;

  protected String status;

  @JsonProperty("transaction_status")
  protected String transactionStatus;

  public Customer getCustomer() {
    return customer;
  }

  public void setCustomer(Customer customer) {
    this.customer = customer;
  }

  public Contract getContract() {
    return contract;
  }

  public void setContract(Contract contract) {
    this.contract = contract;
  }

  public long getAmount() {
    return amount;
  }

  public void setAmount(long amount) {
    this.amount = amount;
  }

  public Currency getCurrency() {
    return currency;
  }

  public void setCurrency(Currency currency) {
    this.currency = currency;
  }

  public String getPurpose() {
    return purpose;
  }

  public void setPurpose(String purpose) {
    this.purpose = purpose;
  }

  public String getOrderId() {
    return orderId;
  }

  public void setOrderId(String orderId) {
    this.orderId = orderId;
  }

  public String getTransId() {
    return transId;
  }

  public void setTransId(String transId) {
    this.transId = transId;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public String getTransactionStatus() {
    return transactionStatus;
  }

  public void setTransactionStatus(String transactionStatus) {
    this.transactionStatus = transactionStatus;
  }

}

@@ -931,124 +931,1059 @@
 ed%22;
-%0A  public static final String STATUS_CANCELED = %22canceled%22;%0A  public static final String STATUS_PROCEED = %22proceed%22;
+ // status for accepted debit transactions and finished prepay transactions%0A  public static final String STATUS_AUTHORIZED = %22authorized%22; // prepay transaction after creation , before payment arrives%0A  public static final String STATUS_DENIED = %22denied%22; // when scoring for debit transaction denies the payer%0A  public static final String STATUS_ISSUE = %22issue%22; // then ruecklastschrift happens, or some other issue type%0A  public static final String STATUS_VOID = %22void%22; // when transaction is cancelled by creator (it is not possible to cancel transactions any time, so the debit transaction is possible to cancel until it is cleared out)%0A  public static final String STATUS_ISSUE_RESOLVED = %22issue_resolved%22; // when issue for transaction is resolved%0A  public static final String STATUS_REFUND = %22refund%22; // special status, saying that transaction was paid back (for some reason)%0A  public static final String STATUS_INTERNAL_SERVER_STATUS = %22internal_server_status%22; // should not happen, but only when status would be empty, this status is used
 %0A%0A  

Correct payment transaction status constants.