1 package com.atlassian.marketplace.client.api;
2
3 import com.atlassian.marketplace.client.model.PaymentModel;
4
5 /**
6 * Constants for querying add-ons according to their paid/free attributes.
7 */
8 public enum Cost implements EnumWithKey
9 {
10 /**
11 * Restricts the query to add-ons whose payment model is {@link PaymentModel#FREE}.
12 */
13 FREE ("free"),
14 /**
15 * Restricts the query to add-ons whose payment model is either
16 * {@link PaymentModel#PAID_VIA_VENDOR} or {@link PaymentModel#PAID_VIA_ATLASSIAN}.
17 */
18 ALL_PAID ("paid"),
19 /**
20 * Restricts the query to add-ons whose payment model is
21 * {@link PaymentModel#PAID_VIA_ATLASSIAN}.
22 */
23 PAID_VIA_ATLASSIAN ("marketplace");
24
25 private final String key;
26
27 private Cost(String key)
28 {
29 this.key = key;
30 }
31
32 @Override
33 public String getKey()
34 {
35 return key;
36 }
37 }