Bundle Selections
Methods to work with Recharge bundle selections.
listBundleSelections v1.0.0 read subscriptions Types
Get a paginated list of bundle selections for the user.
- ESM
- UMD
import { listBundleSelections } from '@rechargeapps/storefront-client';
await listBundleSelections(session, {
limit: 25,
sort_by: 'id-asc',
});
await recharge.bundle.listBundleSelections(session, {
limit: 25,
sort_by: 'id-asc',
});
getBundleSelection v1.0.0 read subscriptions Types
Get a bundle selection by id.
- ESM
- UMD
import { getBundleSelection } from '@rechargeapps/storefront-client';
await getBundleSelection(session, 123);
const session = await recharge.bundle.getBundleSelection(session, 123);
createBundleSelection v1.0.0 write subscriptions Types
Create a new bundle selection.
- ESM
- UMD
import { createBundleSelection } from '@rechargeapps/storefront-client';
await createBundleSelection(session, {
purchase_item_id: 106841871,
items: [
{
collection_id: '6948805869631',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 1,
},
{
collection_id: '6948806688831',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 2,
},
],
});
await recharge.bundle.createBundleSelection(session, {
purchase_item_id: 106841871,
items: [
{
collection_id: '6948805869631',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 1,
},
{
collection_id: '6948806688831',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 2,
},
],
});
updateBundleSelection v1.0.0 write subscriptions Types
Update an existing bundle selection.
- ESM
- UMD
import { updateBundleSelection } from '@rechargeapps/storefront-client';
await updateBundleSelection(session, 123, {
purchase_item_id: 106841871,
items: [
{
collection_id: '6948805869631',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 2,
},
{
collection_id: '6948806688831',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 1,
},
],
});
await recharge.bundle.updateBundleSelection(session, 123, {
purchase_item_id: 106841871,
items: [
{
collection_id: '6948805869631',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 2,
},
{
collection_id: '6948806688831',
collection_source: 'shopify',
external_product_id: '6949187452991',
external_variant_id: '39689109405759',
quantity: 1,
},
],
});
deleteBundleSelection v1.0.0 write subscriptions Types
Delete a bundle selection.
- ESM
- UMD
import { deleteBundleSelection } from '@rechargeapps/storefront-client';
await deleteBundleSelection(session, 123);
await recharge.bundle.deleteBundleSelection(session, 123);