// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/vo/Currency.java
// public enum Currency {
// 
//     NONE(""),
// 
//     EUR("EUR"),
// 
//     USD("USD");
// 
//     private final String value;
// 
//     /**
//      * Instantiates a new currency.
//      *
//      * @param currency
//      *            currency value
//      */
//     Currency(final String currency) {
//         value = currency;
//     }
// 
//     /**
//      * Get enum value.
//      *
//      * @return enum value
//      */
//     public String value() {
//         return value;
//     }
// 
//     /*
//      * (non-Javadoc)
//      *
//      * @see java.lang.Enum#toString()
//      */
//     @Override
//     public String toString() {
//         return value;
//     }
// 
//     /**
//      * Parse currency value to {@link Currency} enum.
//      *
//      * @param value
//      *            currency value
//      * @return {@link Currency} enum object or throws {@link IllegalArgumentException} if no corresponding
//      *         {@link Currency} enum object found
//      */
//     public static Currency parseValue(final String value) {
//         for (final Currency currency : Currency.values()) {
//             if (currency.value.equalsIgnoreCase(value)) {
//                 return currency;
//             }
//         }
//         if ((value != null) && StringUtils.isBlank(value)) {
//             return NONE;
//         }
//         throw new IllegalArgumentException(value);
//     }
// 
//     /**
//      * Parse currency value to {@link Currency} enum, nothrow version.
//      *
//      * @param value
//      *            licenseType value as string
//      * @return {@link Currency} enum object or {@code null} if argument doesn't match any of the enum values
//      */
//     public static Currency parseValueSafe(final String value) {
//         try {
//             return parseValue(value);
//         } catch (final IllegalArgumentException e) {
//             return null;
//         }
//     }
// 
// }
// 
// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/vo/TransactionSource.java
// public enum TransactionSource {
// 
//     /**
//      * Shop transaction.
//      */
//     SHOP,
// 
//     /**
//      * Auto transaction for license create.
//      */
//     AUTO_LICENSE_CREATE,
// 
//     /**
//      * Auto transaction for license update.
//      */
//     AUTO_LICENSE_UPDATE,
// 
//     /**
//      * Auto transaction for license delete.
//      */
//     AUTO_LICENSE_DELETE,
// 
//     /**
//      * Auto transaction for licensee create (with automatic licenses).
//      */
//     AUTO_LICENSEE_CREATE,
// 
//     /**
//      * Auto transaction for licensee delete with forceCascade.
//      */
//     AUTO_LICENSEE_DELETE,
// 
//     /**
//      * Transaction for update license during validate
//      */
//     AUTO_LICENSEE_VALIDATE,
// 
//     /**
//      * Auto transaction for license template delete with forceCascade.
//      */
//     AUTO_LICENSETEMPLATE_DELETE,
// 
//     /**
//      * Auto transaction for product module delete with forceCascade.
//      */
//     AUTO_PRODUCTMODULE_DELETE,
// 
//     /**
//      * Auto transaction for product delete with forceCascade.
//      */
//     AUTO_PRODUCT_DELETE,
// 
//     /**
//      * Auto transaction for transfer licenses between licensee.
//      */
//     AUTO_LICENSES_TRANSFER,
// 
//     /**
//      * Transaction for update licenses (inactive with PT LM, Subscription).
//      */
//     SUBSCRIPTION_UPDATE,
// 
//     /**
//      * Transaction for cancel recurring payment.
//      */
//     CANCEL_RECURRING_PAYMENT
// }
// 
// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/vo/TransactionStatus.java
// public enum TransactionStatus {
// 
//     /**
//      * Transaction still running.
//      */
//     PENDING,
// 
//     /**
//      * Transaction is closed.
//      */
//     CLOSED,
// 
//     /**
//      * Transaction is cancelled.
//      */
//     CANCELLED
// 
// }


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;
/* 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;



/**
 * Transaction entity used internally by NetLicensing.
 * <p>
 * Properties visible via NetLicensing API:
 * <p>
 * <b>number</b> - Unique number (across all products of a vendor) that identifies the transaction. This number is
 * always generated by NetLicensing.
 * <p>
 * <b>active</b> - always true for transactions
 * <p>
 * <b>status</b> - see {@link TransactionStatus}
 * <p>
 * <b>source</b> - see {@link TransactionSource}
 * <p>
 * <b>grandTotal</b> - grand total for SHOP transaction (see source).
 * <p>
 * <b>discount</b> - discount for SHOP transaction (see source).
 * <p>
 * <b>currency</b> - 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();

// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/vo/Currency.java
// public enum Currency {
// 
//     NONE(""),
// 
//     EUR("EUR"),
// 
//     USD("USD");
// 
//     private final String value;
// 
//     /**
//      * Instantiates a new currency.
//      *
//      * @param currency
//      *            currency value
//      */
//     Currency(final String currency) {
//         value = currency;
//     }
// 
//     /**
//      * Get enum value.
//      *
//      * @return enum value
//      */
//     public String value() {
//         return value;
//     }
// 
//     /*
//      * (non-Javadoc)
//      *
//      * @see java.lang.Enum#toString()
//      */
//     @Override
//     public String toString() {
//         return value;
//     }
// 
//     /**
//      * Parse currency value to {@link Currency} enum.
//      *
//      * @param value
//      *            currency value
//      * @return {@link Currency} enum object or throws {@link IllegalArgumentException} if no corresponding
//      *         {@link Currency} enum object found
//      */
//     public static Currency parseValue(final String value) {
//         for (final Currency currency : Currency.values()) {
//             if (currency.value.equalsIgnoreCase(value)) {
//                 return currency;
//             }
//         }
//         if ((value != null) && StringUtils.isBlank(value)) {
//             return NONE;
//         }
//         throw new IllegalArgumentException(value);
//     }
// 
//     /**
//      * Parse currency value to {@link Currency} enum, nothrow version.
//      *
//      * @param value
//      *            licenseType value as string
//      * @return {@link Currency} enum object or {@code null} if argument doesn't match any of the enum values
//      */
//     public static Currency parseValueSafe(final String value) {
//         try {
//             return parseValue(value);
//         } catch (final IllegalArgumentException e) {
//             return null;
//         }
//     }
// 
// }
// 
// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/vo/TransactionSource.java
// public enum TransactionSource {
// 
//     /**
//      * Shop transaction.
//      */
//     SHOP,
// 
//     /**
//      * Auto transaction for license create.
//      */
//     AUTO_LICENSE_CREATE,
// 
//     /**
//      * Auto transaction for license update.
//      */
//     AUTO_LICENSE_UPDATE,
// 
//     /**
//      * Auto transaction for license delete.
//      */
//     AUTO_LICENSE_DELETE,
// 
//     /**
//      * Auto transaction for licensee create (with automatic licenses).
//      */
//     AUTO_LICENSEE_CREATE,
// 
//     /**
//      * Auto transaction for licensee delete with forceCascade.
//      */
//     AUTO_LICENSEE_DELETE,
// 
//     /**
//      * Transaction for update license during validate
//      */
//     AUTO_LICENSEE_VALIDATE,
// 
//     /**
//      * Auto transaction for license template delete with forceCascade.
//      */
//     AUTO_LICENSETEMPLATE_DELETE,
// 
//     /**
//      * Auto transaction for product module delete with forceCascade.
//      */
//     AUTO_PRODUCTMODULE_DELETE,
// 
//     /**
//      * Auto transaction for product delete with forceCascade.
//      */
//     AUTO_PRODUCT_DELETE,
// 
//     /**
//      * Auto transaction for transfer licenses between licensee.
//      */
//     AUTO_LICENSES_TRANSFER,
// 
//     /**
//      * Transaction for update licenses (inactive with PT LM, Subscription).
//      */
//     SUBSCRIPTION_UPDATE,
// 
//     /**
//      * Transaction for cancel recurring payment.
//      */
//     CANCEL_RECURRING_PAYMENT
// }
// 
// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/vo/TransactionStatus.java
// public enum TransactionStatus {
// 
//     /**
//      * Transaction still running.
//      */
//     PENDING,
// 
//     /**
//      * Transaction is closed.
//      */
//     CLOSED,
// 
//     /**
//      * Transaction is cancelled.
//      */
//     CANCELLED
// 
// }


// Path: NetLicensingClient/src/main/java/com/labs64/netlicensing/domain/entity/Transaction.java
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;

/* 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;



/**
 * Transaction entity used internally by NetLicensing.
 * <p>
 * Properties visible via NetLicensing API:
 * <p>
 * <b>number</b> - Unique number (across all products of a vendor) that identifies the transaction. This number is
 * always generated by NetLicensing.
 * <p>
 * <b>active</b> - always true for transactions
 * <p>
 * <b>status</b> - see {@link TransactionStatus}
 * <p>
 * <b>source</b> - see {@link TransactionSource}
 * <p>
 * <b>grandTotal</b> - grand total for SHOP transaction (see source).
 * <p>
 * <b>discount</b> - discount for SHOP transaction (see source).
 * <p>
 * <b>currency</b> - 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);