@rechargeapps/storefront-client 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/address.js +3 -5
- package/dist/cjs/api/address.js.map +1 -1
- package/dist/cjs/api/charge.js +2 -10
- package/dist/cjs/api/charge.js.map +1 -1
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/address.js +3 -5
- package/dist/esm/api/address.js.map +1 -1
- package/dist/esm/api/charge.js +3 -9
- package/dist/esm/api/charge.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +12 -21
- package/dist/umd/recharge-client.min.js +9 -9
- package/package.json +1 -1
package/dist/cjs/api/address.js
CHANGED
|
@@ -19,13 +19,11 @@ async function updateAddress(session, id, updateRequest) {
|
|
|
19
19
|
const { address } = await request.rechargeApiRequest("put", `/addresses`, { id, data: updateRequest }, session);
|
|
20
20
|
return address;
|
|
21
21
|
}
|
|
22
|
-
async function applyDiscountToAddress(session, id,
|
|
23
|
-
|
|
24
|
-
return address;
|
|
22
|
+
async function applyDiscountToAddress(session, id, discountCode) {
|
|
23
|
+
return updateAddress(session, id, { discounts: [{ code: discountCode }] });
|
|
25
24
|
}
|
|
26
25
|
async function removeDiscountsFromAddress(session, id) {
|
|
27
|
-
|
|
28
|
-
return address;
|
|
26
|
+
return updateAddress(session, id, { discounts: [] });
|
|
29
27
|
}
|
|
30
28
|
function deleteAddress(session, id) {
|
|
31
29
|
return request.rechargeApiRequest("delete", `/addresses`, { id }, session);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.js","sources":["../../../src/api/address.ts"],"sourcesContent":["import { rechargeApiRequest } from '../utils/request';\nimport {\n AddressResponse,\n AddressListParams,\n CreateAddressRequest,\n UpdateAddressRequest,\n AddressListResponse,\n MergeAddressesRequest,\n SkipFutureChargeAddressRequest,\n SkipFutureChargeAddressResponse,\n} from '../types/address';\nimport { Session } from '../types/session';\n\n/** Returns all addresses from the store, or addresses for the customer given in the parameter. */\nexport function listAddresses(session: Session, query?: AddressListParams) {\n return rechargeApiRequest<AddressListResponse>('get', `/addresses`, { query }, session);\n}\n\n/** Retrieves address for customer based on specified address id. */\nexport async function getAddress(session: Session, id: string | number) {\n const { address } = await rechargeApiRequest<AddressResponse>('get', `/addresses`, { id }, session);\n return address;\n}\n\n/** Create a new address for a customer. */\nexport async function createAddress(session: Session, createRequest: CreateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>('post', `/addresses`, { data: createRequest }, session);\n return address;\n}\n\n/** Updates an existing address to match the specified parameters. */\nexport async function updateAddress(session: Session, id: string | number, updateRequest: UpdateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>(\n 'put',\n `/addresses`,\n { id, data: updateRequest },\n session\n );\n return address;\n}\n\n/** Apply discount to an address. Addresses are currently limited to a single discount. */\nexport async function applyDiscountToAddress(session: Session, id: string | number,
|
|
1
|
+
{"version":3,"file":"address.js","sources":["../../../src/api/address.ts"],"sourcesContent":["import { rechargeApiRequest } from '../utils/request';\nimport {\n AddressResponse,\n AddressListParams,\n CreateAddressRequest,\n UpdateAddressRequest,\n AddressListResponse,\n MergeAddressesRequest,\n SkipFutureChargeAddressRequest,\n SkipFutureChargeAddressResponse,\n} from '../types/address';\nimport { Session } from '../types/session';\n\n/** Returns all addresses from the store, or addresses for the customer given in the parameter. */\nexport function listAddresses(session: Session, query?: AddressListParams) {\n return rechargeApiRequest<AddressListResponse>('get', `/addresses`, { query }, session);\n}\n\n/** Retrieves address for customer based on specified address id. */\nexport async function getAddress(session: Session, id: string | number) {\n const { address } = await rechargeApiRequest<AddressResponse>('get', `/addresses`, { id }, session);\n return address;\n}\n\n/** Create a new address for a customer. */\nexport async function createAddress(session: Session, createRequest: CreateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>('post', `/addresses`, { data: createRequest }, session);\n return address;\n}\n\n/** Updates an existing address to match the specified parameters. */\nexport async function updateAddress(session: Session, id: string | number, updateRequest: UpdateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>(\n 'put',\n `/addresses`,\n { id, data: updateRequest },\n session\n );\n return address;\n}\n\n/** Apply discount code to an address. Addresses are currently limited to a single discount. */\nexport async function applyDiscountToAddress(session: Session, id: string | number, discountCode: string) {\n return updateAddress(session, id, { discounts: [{ code: discountCode }] });\n}\n\n/** Removes all discounts from an address. */\nexport async function removeDiscountsFromAddress(session: Session, id: string | number) {\n return updateAddress(session, id, { discounts: [] });\n}\n\n/** Deletes an address. Only Addresses with no active Subscriptions can be deleted. */\nexport function deleteAddress(session: Session, id: string | number) {\n return rechargeApiRequest<void>('delete', `/addresses`, { id }, session);\n}\n\n/**\n * Merges up to 10 source addresses into 1 target address.\n */\nexport async function mergeAddresses(session: Session, mergeRequest: MergeAddressesRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>(\n 'post',\n `/addresses/merge`,\n {\n data: mergeRequest,\n },\n session\n );\n return address;\n}\n\n/**\n * Skip a Charge in the future for one or multiple Subscriptions associated with the Address.\n */\nexport async function skipFutureCharge(\n session: Session,\n id: string | number,\n skipRequest: SkipFutureChargeAddressRequest\n) {\n const { charge } = await rechargeApiRequest<SkipFutureChargeAddressResponse>(\n 'post',\n `/addresses/${id}/charges/skip`,\n {\n data: skipRequest,\n },\n session\n );\n return charge;\n}\n"],"names":["rechargeApiRequest"],"mappings":";;;;;;AACO,SAAS,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE;AAC9C,EAAE,OAAOA,0BAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;AACrE,CAAC;AACM,eAAe,UAAU,CAAC,OAAO,EAAE,EAAE,EAAE;AAC9C,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAMA,0BAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACrF,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE;AAC5D,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;AACvG,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE;AAChE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAMA,0BAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1G,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,sBAAsB,CAAC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE;AACxE,EAAE,OAAO,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7E,CAAC;AACM,eAAe,0BAA0B,CAAC,OAAO,EAAE,EAAE,EAAE;AAC9D,EAAE,OAAO,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC;AACM,SAAS,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE;AAC3C,EAAE,OAAOA,0BAAkB,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACrE,CAAC;AACM,eAAe,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE;AAC5D,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,gBAAgB,CAAC,EAAE;AAC3E,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE;AACjE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE;AACvF,IAAI,IAAI,EAAE,WAAW;AACrB,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,EAAE,OAAO,MAAM,CAAC;AAChB;;;;;;;;;;;;"}
|
package/dist/cjs/api/charge.js
CHANGED
|
@@ -11,18 +11,12 @@ async function getCharge(session, id) {
|
|
|
11
11
|
function listCharges(session, query) {
|
|
12
12
|
return request.rechargeApiRequest("get", `/charges`, { query }, session);
|
|
13
13
|
}
|
|
14
|
-
async function
|
|
15
|
-
return applyDiscountToCharge(session, id, applyRequest);
|
|
16
|
-
}
|
|
17
|
-
async function applyDiscountToCharge(session, id, applyRequest) {
|
|
14
|
+
async function applyDiscountToCharge(session, id, discountCode) {
|
|
18
15
|
const { charge } = await request.rechargeApiRequest("post", `/charges/${id}/apply_discount`, {
|
|
19
|
-
data:
|
|
16
|
+
data: { discount_code: discountCode }
|
|
20
17
|
}, session);
|
|
21
18
|
return charge;
|
|
22
19
|
}
|
|
23
|
-
async function removeDiscount(session, id) {
|
|
24
|
-
return removeDiscountsFromCharge(session, id);
|
|
25
|
-
}
|
|
26
20
|
async function removeDiscountsFromCharge(session, id) {
|
|
27
21
|
const { charge } = await request.rechargeApiRequest("post", `/charges/${id}/remove_discount`, {}, session);
|
|
28
22
|
return charge;
|
|
@@ -40,12 +34,10 @@ async function processCharge(session, id) {
|
|
|
40
34
|
return charge;
|
|
41
35
|
}
|
|
42
36
|
|
|
43
|
-
exports.applyDiscount = applyDiscount;
|
|
44
37
|
exports.applyDiscountToCharge = applyDiscountToCharge;
|
|
45
38
|
exports.getCharge = getCharge;
|
|
46
39
|
exports.listCharges = listCharges;
|
|
47
40
|
exports.processCharge = processCharge;
|
|
48
|
-
exports.removeDiscount = removeDiscount;
|
|
49
41
|
exports.removeDiscountsFromCharge = removeDiscountsFromCharge;
|
|
50
42
|
exports.skipCharge = skipCharge;
|
|
51
43
|
exports.unskipCharge = unskipCharge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import { ChargeListParams, ChargeListResponse, ChargeResponse } from '../types/charge';\nimport { Session } from '../types/session';\nimport { rechargeApiRequest } from '../utils/request';\n\n/* Retrieve a Charge using the charge_id. */\nexport async function getCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('get', `/charges`, { id }, session);\n return charge;\n}\n\n/** Lists charges */\nexport function listCharges(session: Session, query?: ChargeListParams) {\n return rechargeApiRequest<ChargeListResponse>('get', `/charges`, { query }, session);\n}\n\n/**\n * You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.\n * If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.\n */\nexport async function applyDiscountToCharge(session: Session, id: number | string, discountCode: string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/apply_discount`,\n {\n data: { discount_code: discountCode },\n },\n session\n );\n return charge;\n}\n\n/**\n * Remove all Discounts from a Charge without destroying the Discount.\n * In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.\n * If the Discount is on the parent Address, you cannot remove it using charge_id.\n * When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.\n * If you pass both parameters, it will remove the Discount from the Address.\n */\nexport async function removeDiscountsFromCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/remove_discount`, {}, session);\n return charge;\n}\n\n/* Skip a Charge. */\nexport async function skipCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/skip`, {}, session);\n return charge;\n}\n\n/* Unskip a Charge. */\nexport async function unskipCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/unskip`, {}, session);\n return charge;\n}\n\n/* Process a Charge. */\nexport async function processCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/process`, {}, session);\n return charge;\n}\n"],"names":["rechargeApiRequest"],"mappings":";;;;;;AACO,eAAe,SAAS,CAAC,OAAO,EAAE,EAAE,EAAE;AAC7C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,SAAS,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE;AAC5C,EAAE,OAAOA,0BAAkB,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC;AACM,eAAe,qBAAqB,CAAC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE;AACvE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE;AACvF,IAAI,IAAI,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE;AACzC,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,yBAAyB,CAAC,OAAO,EAAE,EAAE,EAAE;AAC7D,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACrG,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,UAAU,CAAC,OAAO,EAAE,EAAE,EAAE;AAC9C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1F,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE;AAChD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC5F,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE;AACjD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAMA,0BAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7F,EAAE,OAAO,MAAM,CAAC;AAChB;;;;;;;;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,12 +29,10 @@ exports.skipFutureCharge = address.skipFutureCharge;
|
|
|
29
29
|
exports.updateAddress = address.updateAddress;
|
|
30
30
|
exports.loginShopifyApi = auth.loginShopifyApi;
|
|
31
31
|
exports.loginShopifyAppProxy = auth.loginShopifyAppProxy;
|
|
32
|
-
exports.applyDiscount = charge.applyDiscount;
|
|
33
32
|
exports.applyDiscountToCharge = charge.applyDiscountToCharge;
|
|
34
33
|
exports.getCharge = charge.getCharge;
|
|
35
34
|
exports.listCharges = charge.listCharges;
|
|
36
35
|
exports.processCharge = charge.processCharge;
|
|
37
|
-
exports.removeDiscount = charge.removeDiscount;
|
|
38
36
|
exports.removeDiscountsFromCharge = charge.removeDiscountsFromCharge;
|
|
39
37
|
exports.skipCharge = charge.skipCharge;
|
|
40
38
|
exports.unskipCharge = charge.unskipCharge;
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/api/address.js
CHANGED
|
@@ -15,13 +15,11 @@ async function updateAddress(session, id, updateRequest) {
|
|
|
15
15
|
const { address } = await rechargeApiRequest("put", `/addresses`, { id, data: updateRequest }, session);
|
|
16
16
|
return address;
|
|
17
17
|
}
|
|
18
|
-
async function applyDiscountToAddress(session, id,
|
|
19
|
-
|
|
20
|
-
return address;
|
|
18
|
+
async function applyDiscountToAddress(session, id, discountCode) {
|
|
19
|
+
return updateAddress(session, id, { discounts: [{ code: discountCode }] });
|
|
21
20
|
}
|
|
22
21
|
async function removeDiscountsFromAddress(session, id) {
|
|
23
|
-
|
|
24
|
-
return address;
|
|
22
|
+
return updateAddress(session, id, { discounts: [] });
|
|
25
23
|
}
|
|
26
24
|
function deleteAddress(session, id) {
|
|
27
25
|
return rechargeApiRequest("delete", `/addresses`, { id }, session);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.js","sources":["../../../src/api/address.ts"],"sourcesContent":["import { rechargeApiRequest } from '../utils/request';\nimport {\n AddressResponse,\n AddressListParams,\n CreateAddressRequest,\n UpdateAddressRequest,\n AddressListResponse,\n MergeAddressesRequest,\n SkipFutureChargeAddressRequest,\n SkipFutureChargeAddressResponse,\n} from '../types/address';\nimport { Session } from '../types/session';\n\n/** Returns all addresses from the store, or addresses for the customer given in the parameter. */\nexport function listAddresses(session: Session, query?: AddressListParams) {\n return rechargeApiRequest<AddressListResponse>('get', `/addresses`, { query }, session);\n}\n\n/** Retrieves address for customer based on specified address id. */\nexport async function getAddress(session: Session, id: string | number) {\n const { address } = await rechargeApiRequest<AddressResponse>('get', `/addresses`, { id }, session);\n return address;\n}\n\n/** Create a new address for a customer. */\nexport async function createAddress(session: Session, createRequest: CreateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>('post', `/addresses`, { data: createRequest }, session);\n return address;\n}\n\n/** Updates an existing address to match the specified parameters. */\nexport async function updateAddress(session: Session, id: string | number, updateRequest: UpdateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>(\n 'put',\n `/addresses`,\n { id, data: updateRequest },\n session\n );\n return address;\n}\n\n/** Apply discount to an address. Addresses are currently limited to a single discount. */\nexport async function applyDiscountToAddress(session: Session, id: string | number,
|
|
1
|
+
{"version":3,"file":"address.js","sources":["../../../src/api/address.ts"],"sourcesContent":["import { rechargeApiRequest } from '../utils/request';\nimport {\n AddressResponse,\n AddressListParams,\n CreateAddressRequest,\n UpdateAddressRequest,\n AddressListResponse,\n MergeAddressesRequest,\n SkipFutureChargeAddressRequest,\n SkipFutureChargeAddressResponse,\n} from '../types/address';\nimport { Session } from '../types/session';\n\n/** Returns all addresses from the store, or addresses for the customer given in the parameter. */\nexport function listAddresses(session: Session, query?: AddressListParams) {\n return rechargeApiRequest<AddressListResponse>('get', `/addresses`, { query }, session);\n}\n\n/** Retrieves address for customer based on specified address id. */\nexport async function getAddress(session: Session, id: string | number) {\n const { address } = await rechargeApiRequest<AddressResponse>('get', `/addresses`, { id }, session);\n return address;\n}\n\n/** Create a new address for a customer. */\nexport async function createAddress(session: Session, createRequest: CreateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>('post', `/addresses`, { data: createRequest }, session);\n return address;\n}\n\n/** Updates an existing address to match the specified parameters. */\nexport async function updateAddress(session: Session, id: string | number, updateRequest: UpdateAddressRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>(\n 'put',\n `/addresses`,\n { id, data: updateRequest },\n session\n );\n return address;\n}\n\n/** Apply discount code to an address. Addresses are currently limited to a single discount. */\nexport async function applyDiscountToAddress(session: Session, id: string | number, discountCode: string) {\n return updateAddress(session, id, { discounts: [{ code: discountCode }] });\n}\n\n/** Removes all discounts from an address. */\nexport async function removeDiscountsFromAddress(session: Session, id: string | number) {\n return updateAddress(session, id, { discounts: [] });\n}\n\n/** Deletes an address. Only Addresses with no active Subscriptions can be deleted. */\nexport function deleteAddress(session: Session, id: string | number) {\n return rechargeApiRequest<void>('delete', `/addresses`, { id }, session);\n}\n\n/**\n * Merges up to 10 source addresses into 1 target address.\n */\nexport async function mergeAddresses(session: Session, mergeRequest: MergeAddressesRequest) {\n const { address } = await rechargeApiRequest<AddressResponse>(\n 'post',\n `/addresses/merge`,\n {\n data: mergeRequest,\n },\n session\n );\n return address;\n}\n\n/**\n * Skip a Charge in the future for one or multiple Subscriptions associated with the Address.\n */\nexport async function skipFutureCharge(\n session: Session,\n id: string | number,\n skipRequest: SkipFutureChargeAddressRequest\n) {\n const { charge } = await rechargeApiRequest<SkipFutureChargeAddressResponse>(\n 'post',\n `/addresses/${id}/charges/skip`,\n {\n data: skipRequest,\n },\n session\n );\n return charge;\n}\n"],"names":[],"mappings":";;AACO,SAAS,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE;AAC9C,EAAE,OAAO,kBAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;AACrE,CAAC;AACM,eAAe,UAAU,CAAC,OAAO,EAAE,EAAE,EAAE;AAC9C,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACrF,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE;AAC5D,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;AACvG,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE;AAChE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1G,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,sBAAsB,CAAC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE;AACxE,EAAE,OAAO,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7E,CAAC;AACM,eAAe,0BAA0B,CAAC,OAAO,EAAE,EAAE,EAAE;AAC9D,EAAE,OAAO,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;AACvD,CAAC;AACM,SAAS,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE;AAC3C,EAAE,OAAO,kBAAkB,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACrE,CAAC;AACM,eAAe,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE;AAC5D,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,gBAAgB,CAAC,EAAE;AAC3E,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,EAAE,OAAO,OAAO,CAAC;AACjB,CAAC;AACM,eAAe,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE;AACjE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE;AACvF,IAAI,IAAI,EAAE,WAAW;AACrB,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,EAAE,OAAO,MAAM,CAAC;AAChB;;;;"}
|
package/dist/esm/api/charge.js
CHANGED
|
@@ -7,18 +7,12 @@ async function getCharge(session, id) {
|
|
|
7
7
|
function listCharges(session, query) {
|
|
8
8
|
return rechargeApiRequest("get", `/charges`, { query }, session);
|
|
9
9
|
}
|
|
10
|
-
async function
|
|
11
|
-
return applyDiscountToCharge(session, id, applyRequest);
|
|
12
|
-
}
|
|
13
|
-
async function applyDiscountToCharge(session, id, applyRequest) {
|
|
10
|
+
async function applyDiscountToCharge(session, id, discountCode) {
|
|
14
11
|
const { charge } = await rechargeApiRequest("post", `/charges/${id}/apply_discount`, {
|
|
15
|
-
data:
|
|
12
|
+
data: { discount_code: discountCode }
|
|
16
13
|
}, session);
|
|
17
14
|
return charge;
|
|
18
15
|
}
|
|
19
|
-
async function removeDiscount(session, id) {
|
|
20
|
-
return removeDiscountsFromCharge(session, id);
|
|
21
|
-
}
|
|
22
16
|
async function removeDiscountsFromCharge(session, id) {
|
|
23
17
|
const { charge } = await rechargeApiRequest("post", `/charges/${id}/remove_discount`, {}, session);
|
|
24
18
|
return charge;
|
|
@@ -36,5 +30,5 @@ async function processCharge(session, id) {
|
|
|
36
30
|
return charge;
|
|
37
31
|
}
|
|
38
32
|
|
|
39
|
-
export {
|
|
33
|
+
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, skipCharge, unskipCharge };
|
|
40
34
|
//# sourceMappingURL=charge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"charge.js","sources":["../../../src/api/charge.ts"],"sourcesContent":["import { ChargeListParams, ChargeListResponse, ChargeResponse } from '../types/charge';\nimport { Session } from '../types/session';\nimport { rechargeApiRequest } from '../utils/request';\n\n/* Retrieve a Charge using the charge_id. */\nexport async function getCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('get', `/charges`, { id }, session);\n return charge;\n}\n\n/** Lists charges */\nexport function listCharges(session: Session, query?: ChargeListParams) {\n return rechargeApiRequest<ChargeListResponse>('get', `/charges`, { query }, session);\n}\n\n/**\n * You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.\n * If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.\n */\nexport async function applyDiscountToCharge(session: Session, id: number | string, discountCode: string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>(\n 'post',\n `/charges/${id}/apply_discount`,\n {\n data: { discount_code: discountCode },\n },\n session\n );\n return charge;\n}\n\n/**\n * Remove all Discounts from a Charge without destroying the Discount.\n * In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.\n * If the Discount is on the parent Address, you cannot remove it using charge_id.\n * When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.\n * If you pass both parameters, it will remove the Discount from the Address.\n */\nexport async function removeDiscountsFromCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/remove_discount`, {}, session);\n return charge;\n}\n\n/* Skip a Charge. */\nexport async function skipCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/skip`, {}, session);\n return charge;\n}\n\n/* Unskip a Charge. */\nexport async function unskipCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/unskip`, {}, session);\n return charge;\n}\n\n/* Process a Charge. */\nexport async function processCharge(session: Session, id: number | string) {\n const { charge } = await rechargeApiRequest<ChargeResponse>('post', `/charges/${id}/process`, {}, session);\n return charge;\n}\n"],"names":[],"mappings":";;AACO,eAAe,SAAS,CAAC,OAAO,EAAE,EAAE,EAAE;AAC7C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,SAAS,WAAW,CAAC,OAAO,EAAE,KAAK,EAAE;AAC5C,EAAE,OAAO,kBAAkB,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;AACnE,CAAC;AACM,eAAe,qBAAqB,CAAC,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE;AACvE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE;AACvF,IAAI,IAAI,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE;AACzC,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,yBAAyB,CAAC,OAAO,EAAE,EAAE,EAAE;AAC7D,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AACrG,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,UAAU,CAAC,OAAO,EAAE,EAAE,EAAE;AAC9C,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1F,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE;AAChD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC5F,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC;AACM,eAAe,aAAa,CAAC,OAAO,EAAE,EAAE,EAAE;AACjD,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7F,EAAE,OAAO,MAAM,CAAC;AAChB;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { applyDiscountToAddress, createAddress, deleteAddress, getAddress, listAddresses, mergeAddresses, removeDiscountsFromAddress, skipFutureCharge, updateAddress } from './api/address.js';
|
|
2
2
|
export { loginShopifyApi, loginShopifyAppProxy } from './api/auth.js';
|
|
3
|
-
export {
|
|
3
|
+
export { applyDiscountToCharge, getCharge, listCharges, processCharge, removeDiscountsFromCharge, skipCharge, unskipCharge } from './api/charge.js';
|
|
4
4
|
export { getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, resetCDNCache } from './api/cdn.js';
|
|
5
5
|
export { getBundleId, getDynamicBundleItems, validateBundle, validateDynamicBundle } from './api/bundle.js';
|
|
6
6
|
export { activateMembership, cancelMembership, getMembership, listMemberships } from './api/membership.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -358,12 +358,6 @@ interface ChargeListResponse {
|
|
|
358
358
|
previous_cursor: null | string;
|
|
359
359
|
charges: Charge[];
|
|
360
360
|
}
|
|
361
|
-
interface ApplyDiscountRequest {
|
|
362
|
-
/** Code of the Discount you want to apply to a Charge. */
|
|
363
|
-
discount_code?: string;
|
|
364
|
-
/** ID of the Discount you want to apply to a Charge. */
|
|
365
|
-
discount_id?: number;
|
|
366
|
-
}
|
|
367
361
|
declare type ChargeSortBy = 'id-asc' | 'id-desc' | 'updated_at-asc' | 'updated_at-desc' | 'scheduled_at-asc' | 'scheduled_at-desc';
|
|
368
362
|
interface ChargeListParams extends ListParams<ChargeSortBy> {
|
|
369
363
|
/** Filter Charges by Address. */
|
|
@@ -445,7 +439,11 @@ interface CreateAddressRequest {
|
|
|
445
439
|
/** The zip or postal code associated with the address. */
|
|
446
440
|
zip: string;
|
|
447
441
|
}
|
|
448
|
-
declare type UpdateAddressRequest = Omit<Partial<CreateAddressRequest>, 'presentment_currency' | 'customer_id'
|
|
442
|
+
declare type UpdateAddressRequest = Omit<Partial<CreateAddressRequest>, 'presentment_currency' | 'customer_id' | 'discounts'> & {
|
|
443
|
+
discounts?: {
|
|
444
|
+
code: string;
|
|
445
|
+
}[];
|
|
446
|
+
};
|
|
449
447
|
interface MergeAddressesRequest {
|
|
450
448
|
/** Indicates whether source addresses should be deleted. */
|
|
451
449
|
delete_source_addresses?: boolean;
|
|
@@ -553,8 +551,8 @@ declare function getAddress(session: Session, id: string | number): Promise<Addr
|
|
|
553
551
|
declare function createAddress(session: Session, createRequest: CreateAddressRequest): Promise<Address>;
|
|
554
552
|
/** Updates an existing address to match the specified parameters. */
|
|
555
553
|
declare function updateAddress(session: Session, id: string | number, updateRequest: UpdateAddressRequest): Promise<Address>;
|
|
556
|
-
/** Apply discount to an address. Addresses are currently limited to a single discount. */
|
|
557
|
-
declare function applyDiscountToAddress(session: Session, id: string | number,
|
|
554
|
+
/** Apply discount code to an address. Addresses are currently limited to a single discount. */
|
|
555
|
+
declare function applyDiscountToAddress(session: Session, id: string | number, discountCode: string): Promise<Address>;
|
|
558
556
|
/** Removes all discounts from an address. */
|
|
559
557
|
declare function removeDiscountsFromAddress(session: Session, id: string | number): Promise<Address>;
|
|
560
558
|
/** Deletes an address. Only Addresses with no active Subscriptions can be deleted. */
|
|
@@ -574,20 +572,11 @@ declare function loginShopifyApi(shopifyStorefrontToken: string, shopifyCustomer
|
|
|
574
572
|
declare function getCharge(session: Session, id: number | string): Promise<Charge>;
|
|
575
573
|
/** Lists charges */
|
|
576
574
|
declare function listCharges(session: Session, query?: ChargeListParams): Promise<ChargeListResponse>;
|
|
577
|
-
/**
|
|
578
|
-
* @deprecated will be removed at version 1.0 - replaced with applyDiscountToCharge
|
|
579
|
-
*/
|
|
580
|
-
declare function applyDiscount(session: Session, id: number | string, applyRequest: ApplyDiscountRequest): Promise<Charge>;
|
|
581
575
|
/**
|
|
582
576
|
* You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.
|
|
583
|
-
* You can provide either discount_id or discount_code. If both parameters are passed, the value for discount_id will take precedence.
|
|
584
577
|
* If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.
|
|
585
578
|
*/
|
|
586
|
-
declare function applyDiscountToCharge(session: Session, id: number | string,
|
|
587
|
-
/**
|
|
588
|
-
* @deprecated will be removed at version 1.0 - replaced with removeDiscountsFromCharge
|
|
589
|
-
*/
|
|
590
|
-
declare function removeDiscount(session: Session, id: number | string): Promise<Charge>;
|
|
579
|
+
declare function applyDiscountToCharge(session: Session, id: number | string, discountCode: string): Promise<Charge>;
|
|
591
580
|
/**
|
|
592
581
|
* Remove all Discounts from a Charge without destroying the Discount.
|
|
593
582
|
* In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.
|
|
@@ -877,6 +866,8 @@ interface CDNBaseWidgetSettings {
|
|
|
877
866
|
subscribe_without_discount_message: string;
|
|
878
867
|
subscription_details_verbiage: string;
|
|
879
868
|
translations: Translations;
|
|
869
|
+
/** Whether or not plans data will be used on the widget */
|
|
870
|
+
use_plans_data?: boolean;
|
|
880
871
|
widget_charge_every: string;
|
|
881
872
|
widget_deliver_every: string;
|
|
882
873
|
widget_icon: WidgetIconColor;
|
|
@@ -1368,7 +1359,7 @@ interface Onetime {
|
|
|
1368
1359
|
/** Presentment currency */
|
|
1369
1360
|
presentment_currency: string | null;
|
|
1370
1361
|
}
|
|
1371
|
-
declare type OnetimeRequiredCreateProps = 'address_id' | 'external_variant_id' | 'next_charge_scheduled_at' | 'product_title' | 'quantity';
|
|
1362
|
+
declare type OnetimeRequiredCreateProps = 'address_id' | 'external_variant_id' | 'next_charge_scheduled_at' | 'price' | 'product_title' | 'quantity';
|
|
1372
1363
|
declare type OnetimeOptionalCreateProps = 'external_product_id' | 'properties' | 'sku';
|
|
1373
1364
|
interface OnetimeCreateProps {
|
|
1374
1365
|
/** Instructs to add the Onetime to the next charge scheduled under this Address. */
|
|
@@ -1596,4 +1587,4 @@ declare const api: {
|
|
|
1596
1587
|
};
|
|
1597
1588
|
declare function initRecharge(opt?: InitOptions): void;
|
|
1598
1589
|
|
|
1599
|
-
export { ActivateMembershipRequest, Address, AddressListParams, AddressListResponse, AddressResponse, AddressSortBy, AnalyticsData,
|
|
1590
|
+
export { ActivateMembershipRequest, Address, AddressListParams, AddressListResponse, AddressResponse, AddressSortBy, AnalyticsData, AssociatedAddress, Bundle, BundleItem, BundleProperties, BundleSelection, BundleTranslations, CDNBaseWidgetSettings, CDNBundleLayoutSettings, CDNBundleSettings, CDNBundleStep, CDNBundleStepOption, CDNBundleVariant, CDNBundleVariantOptionSource, CDNBundleVariantSelectionDefault, CDNPrices, CDNProduct, CDNProductAndSettings, CDNProductKeyObject, CDNProductOption, CDNProductOptionValue, CDNProductRaw, CDNProductResource, CDNProductsAndSettings, CDNProductsAndSettingsResource, CDNSellingPlan, CDNSellingPlanAllocations, CDNSellingPlanGroup, CDNStoreSettings, CDNSubscriptionOption, CDNVariant, CDNVariantOptionValue, CDNWidgetSettings, CDNWidgetSettingsRaw, CDNWidgetSettingsResource, CRUDRequestOptions, CancelMembershipRequest, CancelSubscriptionRequest, ChannelSettings, Charge, ChargeListParams, ChargeListResponse, ChargeResponse, ChargeSortBy, ChargeStatus, ColorString, CreateAddressRequest, CreateOnetimeRequest, CreateSubscriptionRequest, Customer, CustomerDeliveryScheduleParams, CustomerDeliveryScheduleResponse, CustomerIncludes, CustomerOptionalUpdateProps, Delivery, Discount, ExternalId, ExternalTransactionId, FirstOption, GetCustomerOptions, GetRequestOptions, HTMLString, InitOptions, IntervalUnit, IsoDateString, LineItem, ListParams, LoginResponse, Membership, MembershipIncludes, MembershipListParams, MembershipListResponse, MembershipResponse, MembershipStatus, MembershipsSortBy, MergeAddressesRequest, Method, Onetime, OnetimeCreateProps, OnetimeListParams, OnetimeOptionalCreateProps, OnetimeOptionalUpdateProps, OnetimeRequiredCreateProps, OnetimesResponse, OnetimesSortBy, Order, OrderListParams, OrderSortBy, OrderStatus, OrderType, OrdersResponse, PaymentDetails, PaymentMethod, PaymentMethodListParams, PaymentMethodOptionalUpdateProps, PaymentMethodSortBy, PaymentMethodStatus, PaymentMethodsResponse, PaymentType, Plan, PlanListParams, PlanSortBy, PlanType, PlansResponse, PriceAdjustmentsType, ProcessorName, ProductImage, Property, Request, RequestHeaders, RequestOptions, RequestOptionsHeaders, Session, ShippingLine, SkipFutureChargeAddressRequest, SkipFutureChargeAddressResponse, StorefrontEnvironment, StorefrontOptions, StorefrontPurchaseOption, SubType, Subscription, SubscriptionListParams, SubscriptionOptionalCreateProps, SubscriptionOptionalUpdateProps, SubscriptionPreferences, SubscriptionRequiredCreateProps, SubscriptionSortBy, SubscriptionStatus, SubscriptionsResponse, TaxLine, Translations, UpdateAddressRequest, UpdateCustomerRequest, UpdateOnetimeRequest, UpdatePaymentMethodRequest, UpdateSubscriptionParams, UpdateSubscriptionRequest, WidgetIconColor, WidgetTemplateType, activateMembership, activateSubscription, api, applyDiscountToAddress, applyDiscountToCharge, cancelMembership, cancelSubscription, createAddress, createOnetime, createSubscription, deleteAddress, deleteOnetime, getAddress, getBundleId, getCDNBundleSettings, getCDNProduct, getCDNProductAndSettings, getCDNProducts, getCDNProductsAndSettings, getCDNStoreSettings, getCDNWidgetSettings, getCharge, getCustomer, getDeliverySchedule, getDynamicBundleItems, getMembership, getOnetime, getOrder, getPaymentMethod, getPlan, getSubscription, initRecharge, listAddresses, listCharges, listMemberships, listOnetimes, listOrders, listPaymentMethods, listPlans, listSubscriptions, loginShopifyApi, loginShopifyAppProxy, membershipIncludes, mergeAddresses, processCharge, removeDiscountsFromAddress, removeDiscountsFromCharge, resetCDNCache, skipCharge, skipFutureCharge, skipSubscriptionCharge, unskipCharge, updateAddress, updateCustomer, updateOnetime, updatePaymentMethod, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, validateBundle, validateDynamicBundle };
|