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


import com.labs64.netlicensing.domain.vo.Currency;
import java.math.BigDecimal;
import java.util.Map;
/* 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;



/**
 * License entity used internally by NetLicensing.
 * <p>
 * Properties visible via NetLicensing API:
 * <p>
 * <b>number</b> - Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can
 * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation
 * transaction status is set to closed.
 * <p>
 * <b>name</b> - Name for the licensed item. Set from license template on creation, if not specified explicitly.
 * <p>
 * <b>active</b> - If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,
 * the license is excluded from the validation process.
 * <p>
 * <b>price</b> - price for the license. If more than 0, it must always be accompanied by the currency specification.
 * Read-only, set from license template on creation.
 * <p>
 * <b>currency</b> - specifies currency for the license price. Check data types to discover which currencies are
 * supported. Read-only, set from license template on creation.
 * <p>
 * <b>hidden</b> - If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license
 * template on creation, if not specified explicitly.
 * <p>
 * Arbitrary additional user properties of string type may be associated with each license. The name of user property
 * must not be equal to any of the fixed property names listed above and must be none of <b>id, licenseeNumber,
 * licenseTemplateNumber</b>. See {@link com.labs64.netlicensing.schema.context.Property} for details.
 */
public interface License extends BaseEntity {

    // Methods for working with properties

    String getName();

    void setName(String name);

    BigDecimal getPrice();

    void setPrice(BigDecimal price);

// 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/entity/License.java
import com.labs64.netlicensing.domain.vo.Currency;
import java.math.BigDecimal;
import java.util.Map;

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



/**
 * License entity used internally by NetLicensing.
 * <p>
 * Properties visible via NetLicensing API:
 * <p>
 * <b>number</b> - Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can
 * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation
 * transaction status is set to closed.
 * <p>
 * <b>name</b> - Name for the licensed item. Set from license template on creation, if not specified explicitly.
 * <p>
 * <b>active</b> - If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,
 * the license is excluded from the validation process.
 * <p>
 * <b>price</b> - price for the license. If more than 0, it must always be accompanied by the currency specification.
 * Read-only, set from license template on creation.
 * <p>
 * <b>currency</b> - specifies currency for the license price. Check data types to discover which currencies are
 * supported. Read-only, set from license template on creation.
 * <p>
 * <b>hidden</b> - If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license
 * template on creation, if not specified explicitly.
 * <p>
 * Arbitrary additional user properties of string type may be associated with each license. The name of user property
 * must not be equal to any of the fixed property names listed above and must be none of <b>id, licenseeNumber,
 * licenseTemplateNumber</b>. See {@link com.labs64.netlicensing.schema.context.Property} for details.
 */
public interface License extends BaseEntity {

    // Methods for working with properties

    String getName();

    void setName(String name);

    BigDecimal getPrice();

    void setPrice(BigDecimal price);

    Currency getCurrency();