Download the PHP package zfr/zfr-tradegecko without Composer
On this page you can find all versions of the php package zfr/zfr-tradegecko. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zfr/zfr-tradegecko
More information about zfr/zfr-tradegecko
Files in zfr/zfr-tradegecko
Package zfr-tradegecko
Short Description PHP library for interacting with the TradeGecko REST API
License MIT
Homepage https://github.com/zf-fr/zfr-shopify
Informations about the package zfr-tradegecko
ZfrTradeGecko
ZfrTradeGecko is a modern PHP library based on Guzzle for TradeGecko.
Dependencies
- PHP 7
- Guzzle: ^6.1
Installation
Installation of ZfrTradeGecko is only officially supported using Composer:
Usage
ZfrTradeGecko provides a one-to-one mapping with API methods defined in TradeGecko doc.
You can easily create a client using the following code:
Then, you can simply do requests for supported endpoints:
Using a container
ZfrTradeGecko also provides built-in container-interop factories
that you can use. You must make sure that your container contains a service called "config" that is an array with a key
zfr_tradegecko
containing the required config:
If you're using Zend\ServiceManager 3, you can use Zend\ComponentInstaller to register our factories into Zend\ServiceManager automatically.
However if you're using other framework or other container, you can still manually register our factories, they are under src/Container folder.
Exploiting responses
ZfrTradeGecko returns TradeGecko response directly. However, by default, TradeGecko wrap the responses by a top-key. For instance, if you want to retrieve account information, TradeGecko will return this payload:
This is a bit inconvenient to use as we would need to do that:
Instead, ZfrTradeGecko automatically "unwraps" response, so you can use the more concise code:
When reading TradeGecko API doc, make sure you remove the top key when exploiting responses.
Implemented endpoints
Here is a list of supported endpoints (more to come in the future). Please note that some resources are not officially supported yet. They have been tested and are working as of 17th January 2017, but it's basically "use at your own risk".
ACCOUNT RELATED METHODS:
- getAccounts(array $args = [])
- getAccount(array $args = [])
- getCurrentAccount(array $args = [])
- createAccount(array $args = [])
- updateAccount(array $args = [])
ADDRESS RELATED METHODS:
- getAddresses(array $args = [])
- getAddress(array $args = [])
- createAddress(array $args = [])
- updateAddress(array $args = [])
- deleteAddress(array $args = [])
COMPANIES RELATED METHODS:
- getCompanies(array $args = [])
- getCompany(array $args = [])
- createCompany(array $args = [])
- updateCompany(array $args = [])
- deleteCompany(array $args = [])
CONTACT RELATED METHODS:
- getContacts(array $args = [])
- getContact(array $args = [])
- createContact(array $args = [])
- updateContact(array $args = [])
- deleteContact(array $args = [])
CURRENCY RELATED METHODS:
- getCurrencies(array $args = [])
- getCurrency(array $args = [])
- createCurrency(array $args = [])
- updateCurrency(array $args = [])
- deleteCurrency(array $args = [])
FULFILLMENT RELATED METHODS:
- getFulfillments(array $args = [])
- getFulfillment(array $args = [])
- createFulfillment(array $args = [])
- updateFulfillment(array $args = [])
- deleteFulfillment(array $args = [])
FULFILLMENT LINE ITEM RELATED METHODS:
- getFulfillmentLineItems(array $args = [])
- getFulfillmentLineItem(array $args = [])
- createFulfillmentLineItem(array $args = [])
- updateFulfillmentLineItem(array $args = [])
- deleteFulfillmentLineItem(array $args = [])
IMAGE RELATED METHODS:
- getImages(array $args = [])
- getImage(array $args = [])
- createImage(array $args = [])
- updateImage(array $args = [])
- deleteImage(array $args = [])
INVOICE RELATED METHODS:
- getInvoices(array $args = [])
- getInvoice(array $args = [])
- createInvoice(array $args = [])
- updateInvoice(array $args = [])
- deleteInvoice(array $args = [])
INVOICE LINE ITEM RELATED METHODS:
- getInvoiceLineItems(array $args = [])
- getInvoiceLineItem(array $args = [])
- createInvoiceLineItem(array $args = [])
- updateInvoiceLineItem(array $args = [])
- deleteInvoiceLineItem(array $args = [])
LOCATION RELATED METHODS:
- getLocations(array $args = [])
- getLocation(array $args = [])
- createLocation(array $args = [])
- updateLocation(array $args = [])
- deleteLocation(array $args = [])
NOTES RELATED METHODS:
- getNotes(array $args = [])
- getNote(array $args = [])
- createNote(array $args = [])
- updateNote(array $args = [])
- deleteNote(array $args = [])
ORDER RELATED METHODS:
- getOrders(array $args = [])
- getOrder(array $args = [])
- createOrder(array $args = [])
- updateOrder(array $args = [])
- deleteOrder(array $args = [])
ORDER LINE ITEMS RELATED METHODS:
- getOrderLineItems(array $args = [])
- getOrderLineItem(array $args = [])
- createOrderLineItem(array $args = [])
- updateOrderLineItem(array $args = [])
- deleteOrderLineItem(array $args = [])
PAYMENT TERM RELATED METHODS:
- getPaymentTerms(array $args = [])
- getPaymentTerm(array $args = [])
- createPaymentTerm(array $args = [])
- updatePaymentTerm(array $args = [])
- deletePaymentTerm(array $args = [])
PRICE LIST RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getPriceLists(array $args = [])
- getPriceList(array $args = [])
- createPriceList(array $args = [])
- updatePriceList(array $args = [])
- deletePriceList(array $args = [])
PRODUCT RELATED METHODS:
- getProducts(array $args = [])
- getProduct(array $args = [])
- createProduct(array $args = [])
- updateProduct(array $args = [])
- deleteProduct(array $args = [])
PROCUREMENT RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- array getProcurements(array $args = [])
- array getProcurement(array $args = [])
- array createProcurement(array $args = [])
- array deleteProcurement(array $args = [])
PURCHASE ORDER RELATED METHODS:
- getPurchaseOrders(array $args = [])
- getPurchaseOrder(array $args = [])
- createPurchaseOrder(array $args = [])
- updatePurchaseOrder(array $args = [])
- deletePurchaseOrder(array $args = [])
PURCHASE ORDER LINE ITEM RELATED METHODS:
- getPurchaseOrderLineItems(array $args = [])
- getPurchaseOrderLineItem(array $args = [])
- createPurchaseOrderLineItem(array $args = [])
- updatePurchaseOrderLineItem(array $args = [])
- deletePurchaseOrderLineItem(array $args = [])
STOCK ADJUSTMENT RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getStockAdjustments(array $args = [])
- getStockAdjustment(array $args = [])
- createStockAdjustment(array $args = [])
- updateStockAdjustment(array $args = [])
- deleteStockAdjustment(array $args = [])
STOCK ADJUSTMENT LINE ITEM RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getStockAdjustmentLineItems(array $args = [])
- getStockAdjustmentLineItem(array $args = [])
- createStockAdjustmentLineItem(array $args = [])
- updateStockAdjustmentLineItem(array $args = [])
- deleteStockAdjustmentLineItem(array $args = [])
STOCK TRANSFER RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getStockTransfers(array $args = [])
- getStockTransfer(array $args = [])
- createStockTransfer(array $args = [])
- updateStockTransfer(array $args = [])
- deleteStockTransfer(array $args = [])
STOCK TRANSFER LINE ITEM RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getStockTransferLineItems(array $args = [])
- getStockTransferLineItem(array $args = [])
- createStockTransferLineItem(array $args = [])
- updateStockTransferLineItem(array $args = [])
- deleteStockTransferLineItem(array $args = [])
TAX COMPONENT RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getTaxComponents(array $args = [])
- getTaxComponent(array $args = [])
- createTaxComponent(array $args = [])
- updateTaxComponent(array $args = [])
- deleteTaxComponent(array $args = [])
TAX TYPE RELATED METHODS:
- getTaxTypes(array $args = [])
- getTaxType(array $args = [])
- createTaxType(array $args = [])
- updateTaxType(array $args = [])
- deleteTaxType(array $args = [])
USER RELATED METHODS:
- getUsers(array $args = [])
- getUser(array $args = [])
- updateUser(array $args = [])
- deleteUser(array $args = [])
VARIANT RELATED METHODS:
- getVariants(array $args = [])
- getVariant(array $args = [])
- createVariant(array $args = [])
- updateVariant(array $args = [])
- deleteVariant(array $args = [])
WEBHOOK RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getWebhooks(array $args = [])
- getWebhook(array $args = [])
- createWebhook(array $args = [])
- updateWebhook(array $args = [])
- deleteWebhook(array $args = [])
PAYMENT RELATED METHODS (NOT OFFICIALLY SUPPORTED YET):
- getPayment(array $args = [])
- getPayments(array $args = [])
- createPayment(array $args = [])
- updatePayment(array $args = [])
- deletePayment(array $args = [])
All versions of zfr-tradegecko with dependencies
container-interop/container-interop Version ^1.1
guzzlehttp/guzzle-services Version ^1.1
psr/http-message Version ^1.0