etsy-1.0.0-alpha3/src/EtsyServiceInterface.php
src/EtsyServiceInterface.php
<?php
namespace Drupal\etsy;
interface EtsyServiceInterface {
/**
* Ping the Etsy API to test that everything is set up correctly.
*
* @return false|mixed
*/
public function ping(): mixed;
/**
* Returns basic info for the user making the request.
*
* @return false|mixed
*/
public function getMe(): mixed;
/**
* Retrieves the shop object identified by a specific shop ID.
*
* @param null|string $key The property of the Shop object.
*
* @return false|mixed
*/
public function shopInfo($key=NULL): mixed;
/**
* List Listings that belong to a Shop.
*
* @param int $limit The maximum number of results to return.
* @param int $offset The number of records to skip before selecting the first result.
* @param null|string $state Shop Listings that belong to a Shop. Listings can be filtered using the 'state' param.
*
* @return mixed array or boolean FALSE
*/
public function getListingsByShop($limit=25, $offset=0, $includes=[], $state=null ): mixed;
/**
* Retrieves a listing record by listing ID.
*
* @param int $listingId
* @param array $includes
*
* @return false|mixed
*/
public function getListingById(int $listingId, $includes=[]): mixed;
/**
* Get a listing's properties.
*
* @param int $listingId
*
* @return mixed
*/
public function getListingProperties(int $listingId ): mixed;
/**
* Retrieves the list of transactions associated with a listing.
*
* @param int $listingId
*
* @return object|bool
* @throws \Exception
*/
public function getListingTransactions(int $listingId): object|bool;
/**
* Retrieves the list of shop sections in a configured shop.
*
* @return false|object
*/
public function getShopSections(): object|bool;
/**
* Retrieves the full hierarchy tree of buyer/seller taxonomy nodes. If
* the $taxonomy_id is > 0, retrieves a list of product properties, with
* applicable scales and values, supported for a specific seller taxonomy ID.
*
* @param string $type valid values are 'buyer' and 'seller'.
* @param int $taxonomy_id
*
* @return object|bool
* @throws \Exception
*/
public function getTaxonomy(string $type, int $taxonomy_id = 0 ): object|bool;
/**
* Requests the Shop Receipts from a specific Shop, unfiltered or filtered by
* receipt id range or offset, date, paid, and/or shipped purchases. If $receiptId
* is passed, the request will be for the specific receipt.
*
* @param int|NULL $receiptId
* @param array $params Additional query string parameters to pass to the api call.
*
* @return object|bool
* @throws \Exception
*/
public function getShopReceipts(int $receiptId=NULL, array $params=[]): object|bool;
}
