Package com.chargebee.internal
Class Resource<T>
java.lang.Object
com.chargebee.internal.Resource<T>
- Type Parameters:
T- The concrete type of the model
- Direct Known Subclasses:
Addon,Addon.TaxProvidersField,Addon.Tier,Address,AdvanceInvoiceSchedule,AdvanceInvoiceSchedule.FixedIntervalSchedule,AdvanceInvoiceSchedule.SpecificDatesSchedule,AttachedItem,Attribute,BillingConfiguration,BillingConfiguration.BillingDate,Brand,BusinessEntity,BusinessEntityTransfer,Card,Comment,Configuration,Contact,ContractTerm,Coupon,Coupon.CouponConstraint,Coupon.ItemConstraint,Coupon.ItemConstraintCriteria,CouponCode,CouponSet,CreditNote,CreditNote.Allocation,CreditNote.BillingAddress,CreditNote.Discount,CreditNote.Einvoice,CreditNote.LineItem,CreditNote.LineItemAddress,CreditNote.LineItemDiscount,CreditNote.LineItemTax,CreditNote.LineItemTier,CreditNote.LinkedRefund,CreditNote.ShippingAddress,CreditNote.SiteDetailsAtCreation,CreditNote.Tax,CreditNote.TaxOrigin,CreditNoteEstimate,CreditNoteEstimate.Discount,CreditNoteEstimate.LineItem,CreditNoteEstimate.LineItemDiscount,CreditNoteEstimate.LineItemTax,CreditNoteEstimate.LineItemTier,CreditNoteEstimate.Tax,CsvTaxRule,Currency,Customer,Customer.Balance,Customer.BillingAddress,Customer.ChildAccountAccess,Customer.Contact,Customer.EntityIdentifier,Customer.ParentAccountAccess,Customer.PaymentMethod,Customer.ReferralUrl,Customer.Relationship,Customer.TaxProvidersField,CustomerEntitlement,DifferentialPrice,DifferentialPrice.ParentPeriod,DifferentialPrice.Tier,Discount,Download,Einvoice,Entitlement,EntitlementOverride,Estimate,Event,Event.Webhook,Export,Export.Download,Feature,Feature.Level,GatewayErrorDetail,Gift,Gift.Gifter,Gift.GiftReceiver,Gift.GiftTimeline,Hierarchy,HostedPage,ImpactedCustomer,ImpactedCustomer.Download,ImpactedItem,ImpactedItem.Download,ImpactedItemPrice,ImpactedItemPrice.Download,ImpactedSubscription,ImpactedSubscription.Download,InAppSubscription,Invoice,Invoice.AdjustmentCreditNote,Invoice.AppliedCredit,Invoice.BillingAddress,Invoice.Discount,Invoice.DunningAttempt,Invoice.Einvoice,Invoice.IssuedCreditNote,Invoice.LineItem,Invoice.LineItemAddress,Invoice.LineItemCredit,Invoice.LineItemDiscount,Invoice.LineItemTax,Invoice.LineItemTier,Invoice.LinkedOrder,Invoice.LinkedPayment,Invoice.Note,Invoice.ReferenceTransaction,Invoice.ShippingAddress,Invoice.SiteDetailsAtCreation,Invoice.StatementDescriptor,Invoice.Tax,Invoice.TaxOrigin,InvoiceEstimate,InvoiceEstimate.Discount,InvoiceEstimate.LineItem,InvoiceEstimate.LineItemAddress,InvoiceEstimate.LineItemCredit,InvoiceEstimate.LineItemDiscount,InvoiceEstimate.LineItemTax,InvoiceEstimate.LineItemTier,InvoiceEstimate.Tax,Item,Item.ApplicableItem,Item.BundleConfiguration,Item.BundleItem,ItemEntitlement,ItemFamily,ItemPrice,ItemPrice.AccountingDetail,ItemPrice.TaxDetail,ItemPrice.TaxProvidersField,ItemPrice.Tier,Metadata,OfferEvent,OfferFulfillment,OfferFulfillment.Error,OmnichannelOneTimeOrder,OmnichannelOneTimeOrderItem,OmnichannelSubscription,OmnichannelSubscriptionItem,OmnichannelSubscriptionItem.LinkedItem,OmnichannelSubscriptionItem.UpcomingRenewal,OmnichannelSubscriptionItemOffer,OmnichannelSubscriptionItemScheduledChange,OmnichannelSubscriptionItemScheduledChange.CurrentState,OmnichannelSubscriptionItemScheduledChange.ScheduledState,OmnichannelTransaction,OmnichannelTransaction.LinkedOmnichannelOneTimeOrder,OmnichannelTransaction.LinkedOmnichannelSubscription,Order,Order.BillingAddress,Order.LineItemDiscount,Order.LineItemTax,Order.LinkedCreditNote,Order.OrderLineItem,Order.ResentOrder,Order.ShippingAddress,PaymentIntent,PaymentIntent.PaymentAttempt,PaymentReferenceNumber,PaymentSchedule,PaymentSchedule.ScheduleEntry,PaymentScheduleEstimate,PaymentScheduleEstimate.ScheduleEntry,PaymentScheduleScheme,PaymentScheduleScheme.PreferredSchedule,PaymentSource,PaymentSource.AmazonPayment,PaymentSource.BankAccount,PaymentSource.BillingAddress,PaymentSource.Card,PaymentSource.CustVoucherSource,PaymentSource.KlarnaPayNow,PaymentSource.Mandate,PaymentSource.Paypal,PaymentSource.Upi,PaymentSource.Venmo,PaymentVoucher,PaymentVoucher.LinkedInvoice,PersonalizedOffer,PersonalizedOffer.Content,PersonalizedOffer.Option,Plan,Plan.ApplicableAddon,Plan.AttachedAddon,Plan.EventBasedAddon,Plan.TaxProvidersField,Plan.Tier,PortalSession,PortalSession.LinkedCustomer,PriceVariant,PriceVariant.Attribute,PricingPageSession,PromotionalCredit,Purchase,Quote,Quote.BillingAddress,Quote.Discount,Quote.LineItem,Quote.LineItemDiscount,Quote.LineItemTax,Quote.LineItemTier,Quote.ShippingAddress,Quote.Tax,QuotedCharge,QuotedCharge.Addon,QuotedCharge.Charge,QuotedCharge.Coupon,QuotedCharge.CouponApplicabilityMapping,QuotedCharge.InvoiceItem,QuotedCharge.ItemTier,QuotedDeltaRamp,QuotedDeltaRamp.LineItem,QuotedRamp,QuotedRamp.CouponApplicabilityMapping,QuotedRamp.Discount,QuotedRamp.ItemTier,QuotedRamp.LineItem,QuotedSubscription,QuotedSubscription.Addon,QuotedSubscription.Coupon,QuotedSubscription.EventBasedAddon,QuotedSubscription.ItemTier,QuotedSubscription.QuotedContractTerm,QuotedSubscription.SubscriptionItem,QuoteLineGroup,QuoteLineGroup.Discount,QuoteLineGroup.LineItem,QuoteLineGroup.LineItemDiscount,QuoteLineGroup.LineItemTax,QuoteLineGroup.Tax,Ramp,Ramp.ContractTerm,Ramp.CouponsToAdd,Ramp.DiscountsToAdd,Ramp.ItemsToAdd,Ramp.ItemsToUpdate,Ramp.ItemTier,Ramp.StatusTransitionReason,RecordedPurchase,RecordedPurchase.ErrorDetail,RecordedPurchase.LinkedOmnichannelOneTimeOrder,RecordedPurchase.LinkedOmnichannelSubscription,ResourceMigration,Rule,SiteMigrationDetail,Subscription,Subscription.Addon,Subscription.BillingOverride,Subscription.ChargedEventBasedAddon,Subscription.ChargedItem,Subscription.ContractTerm,Subscription.Coupon,Subscription.Discount,Subscription.EventBasedAddon,Subscription.ItemTier,Subscription.ReferralInfo,Subscription.ShippingAddress,Subscription.SubscriptionItem,SubscriptionEntitlement,SubscriptionEntitlement.Component,SubscriptionEntitlementsCreatedDetail,SubscriptionEntitlementsUpdatedDetail,SubscriptionEstimate,SubscriptionEstimate.ContractTerm,SubscriptionEstimate.ShippingAddress,TaxWithheld,ThirdPartyPaymentMethod,TimeMachine,Token,Transaction,Transaction.GatewayErrorDetail,Transaction.LinkedCreditNote,Transaction.LinkedInvoice,Transaction.LinkedPayment,Transaction.LinkedRefund,UnbilledCharge,UnbilledCharge.Tier,Usage,UsageEvent,UsageFile,UsageFile.UploadDetail,VirtualBankAccount,WebhookEndpoint
Base class for the ChargeBee model objects
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidapiVersionCheck(org.json.JSONObject jsonObj) protected static Stringprotected static StringoptBigDecimal(String key) optBoolean(String key) <E extends Enum>
EoptInteger(String key) org.json.JSONArrayoptJSONArray(String key) org.json.JSONObjectoptJSONObject(String key) <S> List<S><S extends Resource>
SoptSubResource(String key, Class<S> claz) optTimestamp(String key) reqBigDecimal(String key) reqBoolean(String key) <E extends Enum>
EreqInteger(String key) org.json.JSONArrayreqJSONArray(String key) org.json.JSONObjectreqJSONObject(String key) <S extends Resource>
SreqSubResource(String key, Class<S> claz) reqTimestamp(String key) toJson()toString()protected static String
-
Field Details
-
jsonObj
public org.json.JSONObject jsonObj
-
-
Constructor Details
-
Resource
public Resource(org.json.JSONObject jsonObj) -
Resource
-
Resource
- Throws:
IOException
-
Resource
- Throws:
IOException
-
-
Method Details
-
reqString
-
optString
-
reqBoolean
-
optBoolean
-
reqInteger
-
optInteger
-
reqBigDecimal
-
optBigDecimal
-
reqDouble
-
optDouble
-
reqLong
-
optLong
-
reqJSONObject
-
optJSONObject
-
reqJSONArray
-
optJSONArray
-
reqMap
-
optMap
-
reqTimestamp
-
optTimestamp
-
reqEnum
-
optEnum
-
reqList
- Type Parameters:
S- The sub-resource type
-
optList
- Type Parameters:
S- The sub-resource type
-
reqSubResource
-
optSubResource
-
toJson
-
toString
-
nullCheck
-
nullCheckWithoutEncoding
-
uri
-
apiVersionCheck
protected static void apiVersionCheck(org.json.JSONObject jsonObj)
-