All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.chargebee.models.Export Maven / Gradle / Ivy

There is a newer version: 3.26.0
Show newest version
package com.chargebee.models;

import com.chargebee.*;
import com.chargebee.internal.*;
import com.chargebee.filters.*;
import com.chargebee.filters.enums.SortOrder;
import com.chargebee.internal.HttpUtil.Method;
import com.chargebee.models.enums.*;
import org.json.*;
import java.io.*;
import java.sql.Timestamp;
import java.util.*;

public class Export extends Resource {

    public enum MimeType {
        PDF,
        ZIP,
        _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
        java-client version incompatibility. We suggest you to upgrade to the latest version */
    }

    public enum Status {
        IN_PROCESS,
        COMPLETED,
        FAILED,
        _UNKNOWN; /*Indicates unexpected value for this enum. You can get this when there is a
        java-client version incompatibility. We suggest you to upgrade to the latest version */
    }

    public static class Download extends Resource {
        public Download(JSONObject jsonObj) {
            super(jsonObj);
        }

        public String downloadUrl() {
            return reqString("download_url");
        }

        public Timestamp validTill() {
            return reqTimestamp("valid_till");
        }

        public String mimeType() {
            return optString("mime_type");
        }

    }

    //Constructors
    //============

    public Export(String jsonStr) {
        super(jsonStr);
    }

    public Export(JSONObject jsonObj) {
        super(jsonObj);
    }

    // Fields
    //=======

    public String id() {
        return reqString("id");
    }

    public String operationType() {
        return reqString("operation_type");
    }

    public MimeType mimeType() {
        return reqEnum("mime_type", MimeType.class);
    }

    public Status status() {
        return reqEnum("status", Status.class);
    }

    public Timestamp createdAt() {
        return reqTimestamp("created_at");
    }

    public Export.Download download() {
        return optSubResource("download", Export.Download.class);
    }

    // Operations
    //===========

    public static Request retrieve(String id) {
        String uri = uri("exports", nullCheck(id));
        return new Request(Method.GET, uri);
    }

    public static RevenueRecognitionRequest revenueRecognition() {
        String uri = uri("exports", "revenue_recognition");
        return new RevenueRecognitionRequest(Method.POST, uri);
    }

    public static DeferredRevenueRequest deferredRevenue() {
        String uri = uri("exports", "deferred_revenue");
        return new DeferredRevenueRequest(Method.POST, uri);
    }

    public static PlansRequest plans() {
        String uri = uri("exports", "plans");
        return new PlansRequest(Method.POST, uri);
    }

    public static AddonsRequest addons() {
        String uri = uri("exports", "addons");
        return new AddonsRequest(Method.POST, uri);
    }

    public static CouponsRequest coupons() {
        String uri = uri("exports", "coupons");
        return new CouponsRequest(Method.POST, uri);
    }

    public static CustomersRequest customers() {
        String uri = uri("exports", "customers");
        return new CustomersRequest(Method.POST, uri);
    }

    public static SubscriptionsRequest subscriptions() {
        String uri = uri("exports", "subscriptions");
        return new SubscriptionsRequest(Method.POST, uri);
    }

    public static InvoicesRequest invoices() {
        String uri = uri("exports", "invoices");
        return new InvoicesRequest(Method.POST, uri);
    }

    public static CreditNotesRequest creditNotes() {
        String uri = uri("exports", "credit_notes");
        return new CreditNotesRequest(Method.POST, uri);
    }

    public static TransactionsRequest transactions() {
        String uri = uri("exports", "transactions");
        return new TransactionsRequest(Method.POST, uri);
    }

    public static OrdersRequest orders() {
        String uri = uri("exports", "orders");
        return new OrdersRequest(Method.POST, uri);
    }

    public static ItemFamiliesRequest itemFamilies() {
        String uri = uri("exports", "item_families");
        return new ItemFamiliesRequest(Method.POST, uri);
    }

    public static ItemsRequest items() {
        String uri = uri("exports", "items");
        return new ItemsRequest(Method.POST, uri);
    }

    public static ItemPricesRequest itemPrices() {
        String uri = uri("exports", "item_prices");
        return new ItemPricesRequest(Method.POST, uri);
    }

    public static AttachedItemsRequest attachedItems() {
        String uri = uri("exports", "attached_items");
        return new AttachedItemsRequest(Method.POST, uri);
    }

    public static DifferentialPricesRequest differentialPrices() {
        String uri = uri("exports", "differential_prices");
        return new DifferentialPricesRequest(Method.POST, uri);
    }

    public static PriceVariantsRequest priceVariants() {
        String uri = uri("exports", "price_variants");
        return new PriceVariantsRequest(Method.POST, uri);
    }


public Export waitForExportCompletion()
            throws Exception {
        int count = 0;
        int sleepTime = Integer.getInteger("cb.java.export.sleep.millis", 10000);
        while(status() == Status.IN_PROCESS){
            if(count++ > 50){
                throw new RuntimeException("Export is taking too long");
            }
            Thread.sleep(sleepTime);
            Request req = retrieve(id());
            jsonObj = req.request().export().jsonObj;
        }
        return this;
    }
    // Operation Request Classes
    //==========================

    public static class RevenueRecognitionRequest extends Request {

        private RevenueRecognitionRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public RevenueRecognitionRequest reportBy(com.chargebee.models.enums.ReportBy reportBy) {
            params.add("report_by", reportBy);
            return this;
        }


        public RevenueRecognitionRequest currencyCode(String currencyCode) {
            params.addOpt("currency_code", currencyCode);
            return this;
        }


        public RevenueRecognitionRequest reportFromMonth(Integer reportFromMonth) {
            params.add("report_from_month", reportFromMonth);
            return this;
        }


        public RevenueRecognitionRequest reportFromYear(Integer reportFromYear) {
            params.add("report_from_year", reportFromYear);
            return this;
        }


        public RevenueRecognitionRequest reportToMonth(Integer reportToMonth) {
            params.add("report_to_month", reportToMonth);
            return this;
        }


        public RevenueRecognitionRequest reportToYear(Integer reportToYear) {
            params.add("report_to_year", reportToYear);
            return this;
        }


        public RevenueRecognitionRequest includeDiscounts(Boolean includeDiscounts) {
            params.addOpt("include_discounts", includeDiscounts);
            return this;
        }


        public StringFilter paymentOwner() {
            return new StringFilter("payment_owner",this).supportsMultiOperators(true);        
        }


        public StringFilter itemId() {
            return new StringFilter("item_id",this).supportsMultiOperators(true);        
        }


        public StringFilter itemPriceId() {
            return new StringFilter("item_price_id",this).supportsMultiOperators(true);        
        }


        public StringFilter cancelReasonCode() {
            return new StringFilter("cancel_reason_code",this).supportsMultiOperators(true);        
        }


        public StringFilter businessEntityId() {
            return new StringFilter("business_entity_id",this);        
        }


        public StringFilter invoiceId() {
            return new StringFilter("invoice[id]",this).supportsMultiOperators(true);        
        }


        public BooleanFilter invoiceRecurring() {
            return new BooleanFilter("invoice[recurring]",this);        
        }


        public EnumFilter invoiceStatus() {
            return new EnumFilter("invoice[status]",this);        
        }


        public EnumFilter invoicePriceType() {
            return new EnumFilter("invoice[price_type]",this);        
        }


        public TimestampFilter invoiceDate() {
            return new TimestampFilter("invoice[date]",this);        
        }


        public TimestampFilter invoicePaidAt() {
            return new TimestampFilter("invoice[paid_at]",this);        
        }


        public NumberFilter invoiceTotal() {
            return new NumberFilter("invoice[total]",this);        
        }


        public NumberFilter invoiceAmountPaid() {
            return new NumberFilter("invoice[amount_paid]",this);        
        }


        public NumberFilter invoiceAmountAdjusted() {
            return new NumberFilter("invoice[amount_adjusted]",this);        
        }


        public NumberFilter invoiceCreditsApplied() {
            return new NumberFilter("invoice[credits_applied]",this);        
        }


        public NumberFilter invoiceAmountDue() {
            return new NumberFilter("invoice[amount_due]",this);        
        }


        public EnumFilter invoiceDunningStatus() {
            return new EnumFilter("invoice[dunning_status]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter invoiceUpdatedAt() {
            return new TimestampFilter("invoice[updated_at]",this);        
        }


        public EnumFilter invoiceChannel() {
            return new EnumFilter("invoice[channel]",this);        
        }


        public StringFilter subscriptionId() {
            return new StringFilter("subscription[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionCustomerId() {
            return new StringFilter("subscription[customer_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionPlanId() {
            return new StringFilter("subscription[plan_id]",this).supportsMultiOperators(true);        
        }


        public EnumFilter subscriptionStatus() {
            return new EnumFilter("subscription[status]",this);        
        }


        public EnumFilter subscriptionCancelReason() {
            return new EnumFilter("subscription[cancel_reason]",this).supportsPresenceOperator(true);        
        }


        public NumberFilter subscriptionRemainingBillingCycles() {
            return new NumberFilter("subscription[remaining_billing_cycles]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter subscriptionCreatedAt() {
            return new TimestampFilter("subscription[created_at]",this);        
        }


        public TimestampFilter subscriptionActivatedAt() {
            return new TimestampFilter("subscription[activated_at]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter subscriptionNextBillingAt() {
            return new TimestampFilter("subscription[next_billing_at]",this);        
        }


        public TimestampFilter subscriptionCancelledAt() {
            return new TimestampFilter("subscription[cancelled_at]",this);        
        }


        public BooleanFilter subscriptionHasScheduledChanges() {
            return new BooleanFilter("subscription[has_scheduled_changes]",this);        
        }


        public TimestampFilter subscriptionUpdatedAt() {
            return new TimestampFilter("subscription[updated_at]",this);        
        }


        public EnumFilter subscriptionOfflinePaymentMethod() {
            return new EnumFilter("subscription[offline_payment_method]",this);        
        }


        public BooleanFilter subscriptionAutoCloseInvoices() {
            return new BooleanFilter("subscription[auto_close_invoices]",this);        
        }


        public EnumFilter subscriptionChannel() {
            return new EnumFilter("subscription[channel]",this);        
        }


        public StringFilter customerId() {
            return new StringFilter("customer[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter customerFirstName() {
            return new StringFilter("customer[first_name]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerLastName() {
            return new StringFilter("customer[last_name]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerEmail() {
            return new StringFilter("customer[email]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerCompany() {
            return new StringFilter("customer[company]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerPhone() {
            return new StringFilter("customer[phone]",this).supportsPresenceOperator(true);        
        }


        public EnumFilter customerAutoCollection() {
            return new EnumFilter("customer[auto_collection]",this);        
        }


        public EnumFilter customerTaxability() {
            return new EnumFilter("customer[taxability]",this);        
        }


        public TimestampFilter customerCreatedAt() {
            return new TimestampFilter("customer[created_at]",this);        
        }


        public TimestampFilter customerUpdatedAt() {
            return new TimestampFilter("customer[updated_at]",this);        
        }


        public StringFilter relationshipParentId() {
            return new StringFilter("relationship[parent_id]",this);        
        }


        public StringFilter relationshipPaymentOwnerId() {
            return new StringFilter("relationship[payment_owner_id]",this);        
        }


        public StringFilter relationshipInvoiceOwnerId() {
            return new StringFilter("relationship[invoice_owner_id]",this);        
        }


        public EnumFilter customerOfflinePaymentMethod() {
            return new EnumFilter("customer[offline_payment_method]",this);        
        }


        public BooleanFilter customerAutoCloseInvoices() {
            return new BooleanFilter("customer[auto_close_invoices]",this);        
        }


        public EnumFilter customerChannel() {
            return new EnumFilter("customer[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class DeferredRevenueRequest extends Request {

        private DeferredRevenueRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public DeferredRevenueRequest reportBy(com.chargebee.models.enums.ReportBy reportBy) {
            params.add("report_by", reportBy);
            return this;
        }


        public DeferredRevenueRequest currencyCode(String currencyCode) {
            params.addOpt("currency_code", currencyCode);
            return this;
        }


        public DeferredRevenueRequest reportFromMonth(Integer reportFromMonth) {
            params.add("report_from_month", reportFromMonth);
            return this;
        }


        public DeferredRevenueRequest reportFromYear(Integer reportFromYear) {
            params.add("report_from_year", reportFromYear);
            return this;
        }


        public DeferredRevenueRequest reportToMonth(Integer reportToMonth) {
            params.add("report_to_month", reportToMonth);
            return this;
        }


        public DeferredRevenueRequest reportToYear(Integer reportToYear) {
            params.add("report_to_year", reportToYear);
            return this;
        }


        public DeferredRevenueRequest includeDiscounts(Boolean includeDiscounts) {
            params.addOpt("include_discounts", includeDiscounts);
            return this;
        }


        public StringFilter paymentOwner() {
            return new StringFilter("payment_owner",this).supportsMultiOperators(true);        
        }


        public StringFilter itemId() {
            return new StringFilter("item_id",this).supportsMultiOperators(true);        
        }


        public StringFilter itemPriceId() {
            return new StringFilter("item_price_id",this).supportsMultiOperators(true);        
        }


        public StringFilter cancelReasonCode() {
            return new StringFilter("cancel_reason_code",this).supportsMultiOperators(true);        
        }


        public StringFilter businessEntityId() {
            return new StringFilter("business_entity_id",this);        
        }


        public StringFilter invoiceId() {
            return new StringFilter("invoice[id]",this).supportsMultiOperators(true);        
        }


        public BooleanFilter invoiceRecurring() {
            return new BooleanFilter("invoice[recurring]",this);        
        }


        public EnumFilter invoiceStatus() {
            return new EnumFilter("invoice[status]",this);        
        }


        public EnumFilter invoicePriceType() {
            return new EnumFilter("invoice[price_type]",this);        
        }


        public TimestampFilter invoiceDate() {
            return new TimestampFilter("invoice[date]",this);        
        }


        public TimestampFilter invoicePaidAt() {
            return new TimestampFilter("invoice[paid_at]",this);        
        }


        public NumberFilter invoiceTotal() {
            return new NumberFilter("invoice[total]",this);        
        }


        public NumberFilter invoiceAmountPaid() {
            return new NumberFilter("invoice[amount_paid]",this);        
        }


        public NumberFilter invoiceAmountAdjusted() {
            return new NumberFilter("invoice[amount_adjusted]",this);        
        }


        public NumberFilter invoiceCreditsApplied() {
            return new NumberFilter("invoice[credits_applied]",this);        
        }


        public NumberFilter invoiceAmountDue() {
            return new NumberFilter("invoice[amount_due]",this);        
        }


        public EnumFilter invoiceDunningStatus() {
            return new EnumFilter("invoice[dunning_status]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter invoiceUpdatedAt() {
            return new TimestampFilter("invoice[updated_at]",this);        
        }


        public EnumFilter invoiceChannel() {
            return new EnumFilter("invoice[channel]",this);        
        }


        public StringFilter subscriptionId() {
            return new StringFilter("subscription[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionCustomerId() {
            return new StringFilter("subscription[customer_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionPlanId() {
            return new StringFilter("subscription[plan_id]",this).supportsMultiOperators(true);        
        }


        public EnumFilter subscriptionStatus() {
            return new EnumFilter("subscription[status]",this);        
        }


        public EnumFilter subscriptionCancelReason() {
            return new EnumFilter("subscription[cancel_reason]",this).supportsPresenceOperator(true);        
        }


        public NumberFilter subscriptionRemainingBillingCycles() {
            return new NumberFilter("subscription[remaining_billing_cycles]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter subscriptionCreatedAt() {
            return new TimestampFilter("subscription[created_at]",this);        
        }


        public TimestampFilter subscriptionActivatedAt() {
            return new TimestampFilter("subscription[activated_at]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter subscriptionNextBillingAt() {
            return new TimestampFilter("subscription[next_billing_at]",this);        
        }


        public TimestampFilter subscriptionCancelledAt() {
            return new TimestampFilter("subscription[cancelled_at]",this);        
        }


        public BooleanFilter subscriptionHasScheduledChanges() {
            return new BooleanFilter("subscription[has_scheduled_changes]",this);        
        }


        public TimestampFilter subscriptionUpdatedAt() {
            return new TimestampFilter("subscription[updated_at]",this);        
        }


        public EnumFilter subscriptionOfflinePaymentMethod() {
            return new EnumFilter("subscription[offline_payment_method]",this);        
        }


        public BooleanFilter subscriptionAutoCloseInvoices() {
            return new BooleanFilter("subscription[auto_close_invoices]",this);        
        }


        public EnumFilter subscriptionChannel() {
            return new EnumFilter("subscription[channel]",this);        
        }


        public StringFilter customerId() {
            return new StringFilter("customer[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter customerFirstName() {
            return new StringFilter("customer[first_name]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerLastName() {
            return new StringFilter("customer[last_name]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerEmail() {
            return new StringFilter("customer[email]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerCompany() {
            return new StringFilter("customer[company]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerPhone() {
            return new StringFilter("customer[phone]",this).supportsPresenceOperator(true);        
        }


        public EnumFilter customerAutoCollection() {
            return new EnumFilter("customer[auto_collection]",this);        
        }


        public EnumFilter customerTaxability() {
            return new EnumFilter("customer[taxability]",this);        
        }


        public TimestampFilter customerCreatedAt() {
            return new TimestampFilter("customer[created_at]",this);        
        }


        public TimestampFilter customerUpdatedAt() {
            return new TimestampFilter("customer[updated_at]",this);        
        }


        public StringFilter relationshipParentId() {
            return new StringFilter("relationship[parent_id]",this);        
        }


        public StringFilter relationshipPaymentOwnerId() {
            return new StringFilter("relationship[payment_owner_id]",this);        
        }


        public StringFilter relationshipInvoiceOwnerId() {
            return new StringFilter("relationship[invoice_owner_id]",this);        
        }


        public EnumFilter customerOfflinePaymentMethod() {
            return new EnumFilter("customer[offline_payment_method]",this);        
        }


        public BooleanFilter customerAutoCloseInvoices() {
            return new BooleanFilter("customer[auto_close_invoices]",this);        
        }


        public EnumFilter customerChannel() {
            return new EnumFilter("customer[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class PlansRequest extends Request {

        private PlansRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter currencyCode() {
            return new StringFilter("currency_code",this).supportsMultiOperators(true);        
        }


        public StringFilter planId() {
            return new StringFilter("plan[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter planName() {
            return new StringFilter("plan[name]",this).supportsMultiOperators(true);        
        }


        public NumberFilter planPrice() {
            return new NumberFilter("plan[price]",this);        
        }


        public NumberFilter planPeriod() {
            return new NumberFilter("plan[period]",this);        
        }


        public EnumFilter planPeriodUnit() {
            return new EnumFilter("plan[period_unit]",this);        
        }


        public NumberFilter planTrialPeriod() {
            return new NumberFilter("plan[trial_period]",this).supportsPresenceOperator(true);        
        }


        public EnumFilter planTrialPeriodUnit() {
            return new EnumFilter("plan[trial_period_unit]",this);        
        }


        public EnumFilter planAddonApplicability() {
            return new EnumFilter("plan[addon_applicability]",this);        
        }


        public BooleanFilter planGiftable() {
            return new BooleanFilter("plan[giftable]",this);        
        }


        public EnumFilter planStatus() {
            return new EnumFilter("plan[status]",this);        
        }


        public TimestampFilter planUpdatedAt() {
            return new TimestampFilter("plan[updated_at]",this);        
        }


        public EnumFilter planChannel() {
            return new EnumFilter("plan[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class AddonsRequest extends Request {

        private AddonsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter currencyCode() {
            return new StringFilter("currency_code",this).supportsMultiOperators(true);        
        }


        public StringFilter addonId() {
            return new StringFilter("addon[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter addonName() {
            return new StringFilter("addon[name]",this).supportsMultiOperators(true);        
        }


        public EnumFilter addonChargeType() {
            return new EnumFilter("addon[charge_type]",this);        
        }


        public NumberFilter addonPrice() {
            return new NumberFilter("addon[price]",this);        
        }


        public NumberFilter addonPeriod() {
            return new NumberFilter("addon[period]",this);        
        }


        public EnumFilter addonPeriodUnit() {
            return new EnumFilter("addon[period_unit]",this);        
        }


        public EnumFilter addonStatus() {
            return new EnumFilter("addon[status]",this);        
        }


        public TimestampFilter addonUpdatedAt() {
            return new TimestampFilter("addon[updated_at]",this);        
        }


        public EnumFilter addonChannel() {
            return new EnumFilter("addon[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class CouponsRequest extends Request {

        private CouponsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter currencyCode() {
            return new StringFilter("currency_code",this).supportsMultiOperators(true);        
        }


        public StringFilter couponId() {
            return new StringFilter("coupon[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter couponName() {
            return new StringFilter("coupon[name]",this).supportsMultiOperators(true);        
        }


        public EnumFilter couponDiscountType() {
            return new EnumFilter("coupon[discount_type]",this);        
        }


        public EnumFilter couponDurationType() {
            return new EnumFilter("coupon[duration_type]",this);        
        }


        public EnumFilter couponStatus() {
            return new EnumFilter("coupon[status]",this);        
        }


        public EnumFilter couponApplyOn() {
            return new EnumFilter("coupon[apply_on]",this);        
        }


        public TimestampFilter couponCreatedAt() {
            return new TimestampFilter("coupon[created_at]",this);        
        }


        public TimestampFilter couponUpdatedAt() {
            return new TimestampFilter("coupon[updated_at]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class CustomersRequest extends Request {

        private CustomersRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public CustomersRequest exportType(com.chargebee.models.enums.ExportType exportType) {
            params.addOpt("export_type", exportType);
            return this;
        }


        public StringFilter businessEntityId() {
            return new StringFilter("business_entity_id",this);        
        }


        public StringFilter customerId() {
            return new StringFilter("customer[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter customerFirstName() {
            return new StringFilter("customer[first_name]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerLastName() {
            return new StringFilter("customer[last_name]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerEmail() {
            return new StringFilter("customer[email]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerCompany() {
            return new StringFilter("customer[company]",this).supportsPresenceOperator(true);        
        }


        public StringFilter customerPhone() {
            return new StringFilter("customer[phone]",this).supportsPresenceOperator(true);        
        }


        public EnumFilter customerAutoCollection() {
            return new EnumFilter("customer[auto_collection]",this);        
        }


        public EnumFilter customerTaxability() {
            return new EnumFilter("customer[taxability]",this);        
        }


        public TimestampFilter customerCreatedAt() {
            return new TimestampFilter("customer[created_at]",this);        
        }


        public TimestampFilter customerUpdatedAt() {
            return new TimestampFilter("customer[updated_at]",this);        
        }


        public StringFilter relationshipParentId() {
            return new StringFilter("relationship[parent_id]",this);        
        }


        public StringFilter relationshipPaymentOwnerId() {
            return new StringFilter("relationship[payment_owner_id]",this);        
        }


        public StringFilter relationshipInvoiceOwnerId() {
            return new StringFilter("relationship[invoice_owner_id]",this);        
        }


        public EnumFilter customerOfflinePaymentMethod() {
            return new EnumFilter("customer[offline_payment_method]",this);        
        }


        public BooleanFilter customerAutoCloseInvoices() {
            return new BooleanFilter("customer[auto_close_invoices]",this);        
        }


        public EnumFilter customerChannel() {
            return new EnumFilter("customer[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class SubscriptionsRequest extends Request {

        private SubscriptionsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public SubscriptionsRequest exportType(com.chargebee.models.enums.ExportType exportType) {
            params.addOpt("export_type", exportType);
            return this;
        }


        public StringFilter itemId() {
            return new StringFilter("item_id",this).supportsMultiOperators(true);        
        }


        public StringFilter itemPriceId() {
            return new StringFilter("item_price_id",this).supportsMultiOperators(true);        
        }


        public StringFilter cancelReasonCode() {
            return new StringFilter("cancel_reason_code",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionId() {
            return new StringFilter("subscription[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionCustomerId() {
            return new StringFilter("subscription[customer_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter subscriptionPlanId() {
            return new StringFilter("subscription[plan_id]",this).supportsMultiOperators(true);        
        }


        public EnumFilter subscriptionStatus() {
            return new EnumFilter("subscription[status]",this);        
        }


        public EnumFilter subscriptionCancelReason() {
            return new EnumFilter("subscription[cancel_reason]",this).supportsPresenceOperator(true);        
        }


        public NumberFilter subscriptionRemainingBillingCycles() {
            return new NumberFilter("subscription[remaining_billing_cycles]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter subscriptionCreatedAt() {
            return new TimestampFilter("subscription[created_at]",this);        
        }


        public TimestampFilter subscriptionActivatedAt() {
            return new TimestampFilter("subscription[activated_at]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter subscriptionNextBillingAt() {
            return new TimestampFilter("subscription[next_billing_at]",this);        
        }


        public TimestampFilter subscriptionCancelledAt() {
            return new TimestampFilter("subscription[cancelled_at]",this);        
        }


        public BooleanFilter subscriptionHasScheduledChanges() {
            return new BooleanFilter("subscription[has_scheduled_changes]",this);        
        }


        public TimestampFilter subscriptionUpdatedAt() {
            return new TimestampFilter("subscription[updated_at]",this);        
        }


        public EnumFilter subscriptionOfflinePaymentMethod() {
            return new EnumFilter("subscription[offline_payment_method]",this);        
        }


        public BooleanFilter subscriptionAutoCloseInvoices() {
            return new BooleanFilter("subscription[auto_close_invoices]",this);        
        }


        public EnumFilter subscriptionChannel() {
            return new EnumFilter("subscription[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class InvoicesRequest extends Request {

        private InvoicesRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter paymentOwner() {
            return new StringFilter("payment_owner",this).supportsMultiOperators(true);        
        }


        public StringFilter invoiceId() {
            return new StringFilter("invoice[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter invoiceSubscriptionId() {
            return new StringFilter("invoice[subscription_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public StringFilter invoiceCustomerId() {
            return new StringFilter("invoice[customer_id]",this).supportsMultiOperators(true);        
        }


        public BooleanFilter invoiceRecurring() {
            return new BooleanFilter("invoice[recurring]",this);        
        }


        public EnumFilter invoiceStatus() {
            return new EnumFilter("invoice[status]",this);        
        }


        public EnumFilter invoicePriceType() {
            return new EnumFilter("invoice[price_type]",this);        
        }


        public TimestampFilter invoiceDate() {
            return new TimestampFilter("invoice[date]",this);        
        }


        public TimestampFilter invoicePaidAt() {
            return new TimestampFilter("invoice[paid_at]",this);        
        }


        public NumberFilter invoiceTotal() {
            return new NumberFilter("invoice[total]",this);        
        }


        public NumberFilter invoiceAmountPaid() {
            return new NumberFilter("invoice[amount_paid]",this);        
        }


        public NumberFilter invoiceAmountAdjusted() {
            return new NumberFilter("invoice[amount_adjusted]",this);        
        }


        public NumberFilter invoiceCreditsApplied() {
            return new NumberFilter("invoice[credits_applied]",this);        
        }


        public NumberFilter invoiceAmountDue() {
            return new NumberFilter("invoice[amount_due]",this);        
        }


        public EnumFilter invoiceDunningStatus() {
            return new EnumFilter("invoice[dunning_status]",this).supportsPresenceOperator(true);        
        }


        public TimestampFilter invoiceUpdatedAt() {
            return new TimestampFilter("invoice[updated_at]",this);        
        }


        public EnumFilter invoiceChannel() {
            return new EnumFilter("invoice[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class CreditNotesRequest extends Request {

        private CreditNotesRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter creditNoteId() {
            return new StringFilter("credit_note[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter creditNoteCustomerId() {
            return new StringFilter("credit_note[customer_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter creditNoteSubscriptionId() {
            return new StringFilter("credit_note[subscription_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public StringFilter creditNoteReferenceInvoiceId() {
            return new StringFilter("credit_note[reference_invoice_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public EnumFilter creditNoteType() {
            return new EnumFilter("credit_note[type]",this);        
        }


        public EnumFilter creditNoteReasonCode() {
            return new EnumFilter("credit_note[reason_code]",this);        
        }


        public StringFilter creditNoteCreateReasonCode() {
            return new StringFilter("credit_note[create_reason_code]",this).supportsMultiOperators(true);        
        }


        public EnumFilter creditNoteStatus() {
            return new EnumFilter("credit_note[status]",this);        
        }


        public TimestampFilter creditNoteDate() {
            return new TimestampFilter("credit_note[date]",this);        
        }


        public NumberFilter creditNoteTotal() {
            return new NumberFilter("credit_note[total]",this);        
        }


        public EnumFilter creditNotePriceType() {
            return new EnumFilter("credit_note[price_type]",this);        
        }


        public NumberFilter creditNoteAmountAllocated() {
            return new NumberFilter("credit_note[amount_allocated]",this);        
        }


        public NumberFilter creditNoteAmountRefunded() {
            return new NumberFilter("credit_note[amount_refunded]",this);        
        }


        public NumberFilter creditNoteAmountAvailable() {
            return new NumberFilter("credit_note[amount_available]",this);        
        }


        public TimestampFilter creditNoteVoidedAt() {
            return new TimestampFilter("credit_note[voided_at]",this);        
        }


        public TimestampFilter creditNoteUpdatedAt() {
            return new TimestampFilter("credit_note[updated_at]",this);        
        }


        public EnumFilter creditNoteChannel() {
            return new EnumFilter("credit_note[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class TransactionsRequest extends Request {

        private TransactionsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter transactionId() {
            return new StringFilter("transaction[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter transactionCustomerId() {
            return new StringFilter("transaction[customer_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public StringFilter transactionSubscriptionId() {
            return new StringFilter("transaction[subscription_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public StringFilter transactionPaymentSourceId() {
            return new StringFilter("transaction[payment_source_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public EnumFilter transactionPaymentMethod() {
            return new EnumFilter("transaction[payment_method]",this);        
        }


        public EnumFilter transactionGateway() {
            return new EnumFilter("transaction[gateway]",this);        
        }


        public StringFilter transactionGatewayAccountId() {
            return new StringFilter("transaction[gateway_account_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter transactionIdAtGateway() {
            return new StringFilter("transaction[id_at_gateway]",this);        
        }


        public StringFilter transactionReferenceNumber() {
            return new StringFilter("transaction[reference_number]",this).supportsPresenceOperator(true);        
        }


        public EnumFilter transactionType() {
            return new EnumFilter("transaction[type]",this);        
        }


        public TimestampFilter transactionDate() {
            return new TimestampFilter("transaction[date]",this);        
        }


        public NumberFilter transactionAmount() {
            return new NumberFilter("transaction[amount]",this);        
        }


        public NumberFilter transactionAmountCapturable() {
            return new NumberFilter("transaction[amount_capturable]",this);        
        }


        public EnumFilter transactionStatus() {
            return new EnumFilter("transaction[status]",this);        
        }


        public TimestampFilter transactionUpdatedAt() {
            return new TimestampFilter("transaction[updated_at]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class OrdersRequest extends Request {

        private OrdersRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public NumberFilter total() {
            return new NumberFilter("total",this);        
        }


        public StringFilter orderId() {
            return new StringFilter("order[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter orderSubscriptionId() {
            return new StringFilter("order[subscription_id]",this).supportsMultiOperators(true).supportsPresenceOperator(true);        
        }


        public StringFilter orderCustomerId() {
            return new StringFilter("order[customer_id]",this).supportsMultiOperators(true);        
        }


        public EnumFilter orderStatus() {
            return new EnumFilter("order[status]",this);        
        }


        public EnumFilter orderPriceType() {
            return new EnumFilter("order[price_type]",this);        
        }


        public TimestampFilter orderOrderDate() {
            return new TimestampFilter("order[order_date]",this);        
        }


        public TimestampFilter orderShippingDate() {
            return new TimestampFilter("order[shipping_date]",this);        
        }


        public TimestampFilter orderShippedAt() {
            return new TimestampFilter("order[shipped_at]",this);        
        }


        public TimestampFilter orderDeliveredAt() {
            return new TimestampFilter("order[delivered_at]",this);        
        }


        public TimestampFilter orderCancelledAt() {
            return new TimestampFilter("order[cancelled_at]",this);        
        }


        public NumberFilter orderAmountPaid() {
            return new NumberFilter("order[amount_paid]",this);        
        }


        public NumberFilter orderRefundableCredits() {
            return new NumberFilter("order[refundable_credits]",this);        
        }


        public NumberFilter orderRefundableCreditsIssued() {
            return new NumberFilter("order[refundable_credits_issued]",this);        
        }


        public TimestampFilter orderUpdatedAt() {
            return new TimestampFilter("order[updated_at]",this);        
        }


        public EnumFilter orderResentStatus() {
            return new EnumFilter("order[resent_status]",this);        
        }


        public BooleanFilter orderIsResent() {
            return new BooleanFilter("order[is_resent]",this);        
        }


        public StringFilter orderOriginalOrderId() {
            return new StringFilter("order[original_order_id]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class ItemFamiliesRequest extends Request {

        private ItemFamiliesRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter itemFamilyId() {
            return new StringFilter("item_family[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter itemFamilyName() {
            return new StringFilter("item_family[name]",this);        
        }


        public TimestampFilter itemFamilyUpdatedAt() {
            return new TimestampFilter("item_family[updated_at]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class ItemsRequest extends Request {

        private ItemsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter itemId() {
            return new StringFilter("item[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter itemItemFamilyId() {
            return new StringFilter("item[item_family_id]",this).supportsMultiOperators(true);        
        }


        public EnumFilter itemType() {
            return new EnumFilter("item[type]",this);        
        }


        public StringFilter itemName() {
            return new StringFilter("item[name]",this);        
        }


        public EnumFilter itemItemApplicability() {
            return new EnumFilter("item[item_applicability]",this);        
        }


        public EnumFilter itemStatus() {
            return new EnumFilter("item[status]",this);        
        }


        public BooleanFilter itemIsGiftable() {
            return new BooleanFilter("item[is_giftable]",this);        
        }


        public TimestampFilter itemUpdatedAt() {
            return new TimestampFilter("item[updated_at]",this);        
        }


        public BooleanFilter itemEnabledForCheckout() {
            return new BooleanFilter("item[enabled_for_checkout]",this);        
        }


        public BooleanFilter itemEnabledInPortal() {
            return new BooleanFilter("item[enabled_in_portal]",this);        
        }


        public BooleanFilter itemMetered() {
            return new BooleanFilter("item[metered]",this);        
        }


        public EnumFilter itemUsageCalculation() {
            return new EnumFilter("item[usage_calculation]",this);        
        }


        public EnumFilter itemChannel() {
            return new EnumFilter("item[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class ItemPricesRequest extends Request {

        private ItemPricesRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter itemFamilyId() {
            return new StringFilter("item_family_id",this).supportsMultiOperators(true);        
        }


        public EnumFilter itemType() {
            return new EnumFilter("item_type",this);        
        }


        public StringFilter currencyCode() {
            return new StringFilter("currency_code",this).supportsMultiOperators(true);        
        }


        public StringFilter itemPriceId() {
            return new StringFilter("item_price[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter itemPriceName() {
            return new StringFilter("item_price[name]",this).supportsMultiOperators(true);        
        }


        public EnumFilter itemPricePricingModel() {
            return new EnumFilter("item_price[pricing_model]",this);        
        }


        public StringFilter itemPriceItemId() {
            return new StringFilter("item_price[item_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter itemPricePriceVariantId() {
            return new StringFilter("item_price[price_variant_id]",this).supportsMultiOperators(true);        
        }


        public NumberFilter itemPriceTrialPeriod() {
            return new NumberFilter("item_price[trial_period]",this);        
        }


        public EnumFilter itemPriceTrialPeriodUnit() {
            return new EnumFilter("item_price[trial_period_unit]",this);        
        }


        public EnumFilter itemPriceStatus() {
            return new EnumFilter("item_price[status]",this);        
        }


        public TimestampFilter itemPriceUpdatedAt() {
            return new TimestampFilter("item_price[updated_at]",this);        
        }


        public EnumFilter itemPricePeriodUnit() {
            return new EnumFilter("item_price[period_unit]",this);        
        }


        public NumberFilter itemPricePeriod() {
            return new NumberFilter("item_price[period]",this);        
        }


        public EnumFilter itemPriceChannel() {
            return new EnumFilter("item_price[channel]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class AttachedItemsRequest extends Request {

        private AttachedItemsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public EnumFilter itemType() {
            return new EnumFilter("item_type",this);        
        }


        public StringFilter attachedItemId() {
            return new StringFilter("attached_item[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter attachedItemItemId() {
            return new StringFilter("attached_item[item_id]",this).supportsMultiOperators(true);        
        }


        public EnumFilter attachedItemType() {
            return new EnumFilter("attached_item[type]",this);        
        }


        public EnumFilter attachedItemChargeOnEvent() {
            return new EnumFilter("attached_item[charge_on_event]",this);        
        }


        public TimestampFilter attachedItemUpdatedAt() {
            return new TimestampFilter("attached_item[updated_at]",this);        
        }


        public StringFilter attachedItemParentItemId() {
            return new StringFilter("attached_item[parent_item_id]",this).supportsMultiOperators(true);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class DifferentialPricesRequest extends Request {

        private DifferentialPricesRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter itemId() {
            return new StringFilter("item_id",this).supportsMultiOperators(true);        
        }


        public StringFilter differentialPriceItemPriceId() {
            return new StringFilter("differential_price[item_price_id]",this).supportsMultiOperators(true);        
        }


        public StringFilter differentialPriceId() {
            return new StringFilter("differential_price[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter differentialPriceParentItemId() {
            return new StringFilter("differential_price[parent_item_id]",this).supportsMultiOperators(true);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

    public static class PriceVariantsRequest extends Request {

        private PriceVariantsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        public StringFilter priceVariantId() {
            return new StringFilter("price_variant[id]",this).supportsMultiOperators(true);        
        }


        public StringFilter priceVariantName() {
            return new StringFilter("price_variant[name]",this).supportsMultiOperators(true);        
        }


        public EnumFilter priceVariantStatus() {
            return new EnumFilter("price_variant[status]",this);        
        }


        public TimestampFilter priceVariantUpdatedAt() {
            return new TimestampFilter("price_variant[updated_at]",this);        
        }


        public TimestampFilter priceVariantCreatedAt() {
            return new TimestampFilter("price_variant[created_at]",this);        
        }


        @Override
        public Params params() {
            return params;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy