Returns a single Store Credit by its ID. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.storeCredits.show({
bearer_token: '7381273269536713689562374856'
id: '1'
})
Creates a new Store Credit and returns its attributes. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.storeCredits.create({
bearer_token: '7381273269536713689562374856',
store_credit: {
user_id: '2',
category_id: '4',
created_by_id: '5',
amount: 25,
amount_used: 10,
memo: 'This credit was given as a refund',
currency: 'USD',
amount_authorized: 15.5,
originator_id: '3',
originator_type: 'Refund',
type_id: '1',
store_id: '2',
public_metadata: {},
private_metadata: {}
}
})
Update selected Store Credit. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.storeCredits.update({
bearer_token: '7381273269536713689562374856',
id: '1',
store_credit: {
user_id: '2',
category_id: '4',
created_by_id: '5',
amount: 25,
amount_used: 10,
memo: 'This credit was given as a refund',
currency: 'USD',
amount_authorized: 15.5,
originator_id: '3',
originator_type: 'Refund',
type_id: '1',
store_id: '2',
public_metadata: {},
private_metadata: {}
}
})
This endpoint removes the specified Store Credit. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example:
const response = await client.storeCredits.remove({
bearer_token: '7381273269536713689562374856',
id: '1'
})
Protected
spreeOptional
tokens: ITokenOptional
params: anyOptional
responseParsing: ResponseParsingProtected
classifyProtected
processProtected
processProtected
spreeGenerated using TypeDoc
Returns a list of Store Credits. See api docs.
Required token: Bearer token
Success response schema: Success schema
Failure response schema: Error schema
Example: