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.
41 lines (40 loc) • 1.43 kB
TypeScript
import BaseService from "../infrastructure/base_service";
import { Country } from "../interfaces/country";
import { FieldOptions } from "../options/base";
import { CountryListOptions } from "../options/country";
export default class Countries extends BaseService {
constructor(shopDomain: string, accessToken: string);
/**
* Gets a count of all of the shop's countries.
* @param options Options for filtering the results.
*/
count(): Promise<number>;
/**
* Gets a list of up to 250 of the shop's countries.
* @param options Options for filtering the results.
*/
list(options?: CountryListOptions): Promise<Country[]>;
/**
* Gets the country with the given id.
* @param countryId The country's id.
* @param options Options for filtering the results.
*/
get(countryId: number, options?: FieldOptions): Promise<Country>;
/**
* Creates an country.
* @param country The country being created.
* @param options Options for creating the country.
*/
create(country: Country): Promise<Country>;
/**
* Updates an country with the given id.
* @param id The country's id.
* @param country The updated country.
*/
update(id: number, country: Country): Promise<Country>;
/**
* Deletes an country with the given id.
* @param id The country's id.
*/
delete(id: number): Promise<undefined>;
}