From 386795f07241eb12041c8a867cc75036a4be6ff1 Mon Sep 17 00:00:00 2001 From: Krisna Pranav <68631244+krishpranav@users.noreply.github.com> Date: Wed, 8 Jan 2025 18:56:13 +0530 Subject: [PATCH] thunderpay-api: billing[util(tag - ControlTagType)] --- .../billing/util/tag/ControlTagType.java | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 thunderpay-api/src/main/java/org/thunderpay/billing/util/tag/ControlTagType.java diff --git a/thunderpay-api/src/main/java/org/thunderpay/billing/util/tag/ControlTagType.java b/thunderpay-api/src/main/java/org/thunderpay/billing/util/tag/ControlTagType.java new file mode 100644 index 0000000..b65a4f9 --- /dev/null +++ b/thunderpay-api/src/main/java/org/thunderpay/billing/util/tag/ControlTagType.java @@ -0,0 +1,49 @@ +/** + * @file ControlTagType.java + * @author Krisna Pranav + * @brief Control Tag Type + * @version 1.0 + * @date 2024-11-25 + * + * @copyright Copyright (c) 2024 ThunderPayment Developers, Krisna Pranav + * + */ + +package org.thunderpay.billing.util.tag; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.UUID; +import org.thunderpay.billing.ObjectType; + +public enum ControlTagType { + AUTO_PAY_OFF(new UUID(0, 1), "Suspends payments until removed.", true, false, Collections.singletonList(ObjectType.ACCOUNT)), + AUTO_INVOICING_OFF(new UUID(0, 2), "Suspends invoicing until removed.", false, true, Collections.singletonList(ObjectType.ACCOUNT)), + OVERDUE_ENFORCEMENT_OFF(new UUID(0, 3), "Suspends overdue enforcement behaviour until removed.", false, false, Collections.singletonList(ObjectType.ACCOUNT)), + WRITTEN_OFF(new UUID(0, 4), "Indicates that an invoice is written off. No billing or payment effect.", false, false, Collections.singletonList(ObjectType.INVOICE)), + MANUAL_PAY(new UUID(0, 5), "Indicates that Killbill doesn't process payments for that account (external payments only)", true, false, Collections.singletonList(ObjectType.ACCOUNT)), + TEST(new UUID(0, 6), "Indicates that this is a test account", false, false, Collections.singletonList(org.killbill.billing.ObjectType.ACCOUNT)), + PARTNER(new UUID(0, 7), "Indicates that this is a partner account", false, false, Collections.singletonList(org.killbill.billing.ObjectType.ACCOUNT)), + AUTO_INVOICING_DRAFT(new UUID(0, 8), "Generate account invoices in DRAFT mode.", false, false, Collections.singletonList(org.killbill.billing.ObjectType.ACCOUNT)), + AUTO_INVOICING_REUSE_DRAFT(new UUID(0, 9), "Use existing draft invoice if exists.", false, false, Collections.singletonList(org.killbill.billing.ObjectType.ACCOUNT)); + + private final UUID id; + private final String description; + private final boolean autoPaymentOff; + private final boolean autoInvoicingOff; + private final List applicableObjectType; + + ControlTagType(final UUID id, final String description, final boolean autoPaymentOff, final boolean autoInvoicingOff, final List applicableObjectType) { + this.id = id; + this.description = description; + this.autoPaymentOff = autoPaymentOff; + this.autoInvoicingOff = autoInvoicingOff; + this.applicableObjectType = applicableObjectType; + } + + public UUID getId() { + return id; + } + +}