shopify-admin-api
Version:
Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.
37 lines (36 loc) • 1.53 kB
TypeScript
import * as Options from '../options';
import { Transaction } from '../interfaces';
import { BaseService } from '../infrastructure';
/**
* A service for manipulating an order's transactions.
*/
export declare class Transactions extends BaseService {
constructor(shopDomain: string, accessToken: string);
private getPath;
/**
* Creates a new transaction.
* @param orderId Id of the order that the transaction will belong to.
* @param transaction The transaction being created.
*/
create(orderId: number, transaction: Partial<Transaction>): Promise<Transaction>;
/**
* Gets an transaction with the given id.
* @param orderId Id of the order that the transaction belongs to.
* @param transactionId Id of the transaction being retrieved.
* @param options Options for filtering the result.
*/
get(orderId: number, transactionId: number, options?: Options.TransactionBaseOptions): Promise<Transaction>;
/**
* Lists up to 250 transactions for the given order.
* @param orderId Id of the order that the transactions belong to.
* @param options Options for filtering the results.
*/
list(orderId: number, options?: Options.TransactionListOptions): Promise<Transaction[]>;
/**
* Counts the transactions on the given order.
* @param orderId Id of the order that the transactions belong to.
* @param options Options for filtering the results.
*/
count(orderId: number): Promise<number>;
}
export default Transactions;