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.28.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");
        }

    }

    //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) throws IOException {
        String uri = uri("exports", nullCheck(id));
        return new Request(Method.GET, uri);
    }

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

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

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

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

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

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

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

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

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

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

    public static OrdersRequest orders() throws IOException {
        String uri = uri("exports", "orders");
        return new OrdersRequest(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 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 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 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);        
        }

        @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 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 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 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);        
        }

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

    public static class PlansRequest extends Request {

        private PlansRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        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);        
        }

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

    public static class AddonsRequest extends Request {

        private AddonsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        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);        
        }

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

    public static class CouponsRequest extends Request {

        private CouponsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        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 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);        
        }

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

    public static class SubscriptionsRequest extends Request {

        private SubscriptionsRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        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);        
        }

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

    public static class InvoicesRequest extends Request {

        private InvoicesRequest(Method httpMeth, String uri) {
            super(httpMeth, uri);
        }
    
        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);        
        }

        @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);        
        }

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

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

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

        @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);        
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy