com.labs64.netlicensing.domain.entity.Transaction Maven / Gradle / Ivy
Show all versions of netlicensing-client Show documentation
/* 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
*
* https://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.labs64.netlicensing.domain.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.labs64.netlicensing.domain.vo.Currency;
import com.labs64.netlicensing.domain.vo.TransactionSource;
import com.labs64.netlicensing.domain.vo.TransactionStatus;
/**
* Transaction entity used internally by NetLicensing.
*
* Properties visible via NetLicensing API:
*
* number - Unique number (across all products of a vendor) that identifies the transaction. This number is
* always generated by NetLicensing.
*
* active - always true for transactions
*
* status - see {@link TransactionStatus}
*
* source - see {@link TransactionSource}
*
* grandTotal - grand total for SHOP transaction (see source).
*
* discount - discount for SHOP transaction (see source).
*
* currency - specifies currency for money fields (grandTotal and discount). Check data types to discover which
* currencies are supported.
*/
public interface Transaction extends BaseEntity {
// Methods for working with properties
TransactionStatus getStatus();
void setStatus(TransactionStatus status);
TransactionSource getSource();
void setSource(TransactionSource source);
BigDecimal getGrandTotal();
void setGrandTotal(BigDecimal grandTotal);
BigDecimal getDiscount();
void setDiscount(BigDecimal discount);
Currency getCurrency();
void setCurrency(Currency currency);
Date getDateCreated();
void setDateCreated(Date dateCreated);
Date getDateClosed();
void setDateClosed(Date dateClosed);
List getLicenseTransactionJoins();
void setLicenseTransactionJoins(List licenseTransactionJoins);
// Methods for working with custom properties
@Deprecated
Map getTransactionProperties();
}