Package com.chargebee.v4.services
Class BaseService<T extends BaseService<T>>
java.lang.Object
com.chargebee.v4.services.BaseService<T>
- Direct Known Subclasses:
AdditionalBillingLogiqService,AddonService,AddressService,AttachedItemService,BrandConfigurationService,BusinessEntityService,BusinessProfileService,CardService,CommentService,ConfigurationService,CouponCodeService,CouponService,CouponSetService,CreditNoteService,CsvTaxRuleService,CurrencyService,CustomerEntitlementService,CustomerService,DifferentialPriceService,EntitlementOverrideService,EntitlementService,EstimateService,EventService,ExportService,FeatureService,FullExportService,GiftService,HostedPageService,InAppSubscriptionService,InvoiceService,ItemEntitlementService,ItemFamilyService,ItemPriceService,ItemService,MediaService,NonSubscriptionService,OfferEventService,OfferFulfillmentService,OmnichannelOneTimeOrderService,OmnichannelSubscriptionItemService,OmnichannelSubscriptionService,OrderService,PaymentIntentService,PaymentScheduleSchemeService,PaymentSourceService,PaymentVoucherService,Pc2MigrationItemFamilyService,Pc2MigrationItemPriceService,Pc2MigrationItemService,Pc2MigrationService,PersonalizedOfferService,PlanService,PortalSessionService,PriceVariantService,PricingPageSessionService,ProductService,PromotionalCreditService,PurchaseService,QuoteService,RampService,RecordedPurchaseService,ResourceMigrationService,RuleService,SiteMigrationDetailService,SubscriptionEntitlementService,SubscriptionService,SubscriptionSettingService,ThirdPartyConfigurationService,ThirdPartyEntityMappingService,ThirdPartySyncDetailService,TimeMachineService,TpSiteUserService,TransactionService,UnbilledChargeService,UnbilledChargesSettingService,UsageEventService,UsageFileService,UsageService,VariantService,VirtualBankAccountService,WebhookEndpointService
Base class for all Chargebee resource services.
Provides common functionality and per-request options support.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseService(ChargebeeClient client) protectedBaseService(ChargebeeClient client, RequestOptions options) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildPathWithParams(String pathTemplate, String paramName, String paramValue) Build path with path parameters replaced.protected ObjectHelper: Client instance appropriate for builders.protected ChargebeeClientGet a client instance with merged headers (client + request options).protected ResponseGET with Object query parameters.protected CompletableFuture<Response>GET async with Object query parameters.Get the merged headers for this request.options(RequestOptions explicitOptions) Alias for withOptions for natural readability.protected <R> RparseResponse(Response response, Class<R> responseClass) Parse response into response object using fromJson method.protected ResponseHelper: POST with optional headers.protected CompletableFuture<Response>Helper: POST async with optional headers.protected ResponseHelper: POST JSON with optional headers.protected CompletableFuture<Response>postJsonAsync(String path, String jsonData) Helper: POST JSON async with optional headers.withOptions(RequestOptions explicitOptions) Apply explicit RequestOptions for subsequent calls on this service instance.
-
Field Details
-
client
-
options
-
-
Constructor Details
-
BaseService
-
BaseService
-
-
Method Details
-
withOptions
Apply explicit RequestOptions for subsequent calls on this service instance. -
options
Alias for withOptions for natural readability. -
header
-
headers
-
clientWithOptions
Get a client instance with merged headers (client + request options). -
getMergedHeaders
Get the merged headers for this request. -
clientForBuilders
Helper: Client instance appropriate for builders. Returns the original client if no headers, otherwise a headered client. -
post
Helper: POST with optional headers.- Throws:
ChargebeeException
-
postJson
Helper: POST JSON with optional headers.- Throws:
ChargebeeException
-
postAsync
Helper: POST async with optional headers. -
postJsonAsync
Helper: POST JSON async with optional headers. -
buildPathWithParams
Build path with path parameters replaced. -
parseResponse
Parse response into response object using fromJson method. This follows the same pattern as model classes. -
get
GET with Object query parameters.- Throws:
ChargebeeException
-
getAsync
GET async with Object query parameters.
-