2017 © Pedro Peláez
 

package active-ants

Client for ActiveAnts API

image

afosto/active-ants

Client for ActiveAnts API

  • Wednesday, October 12, 2016
  • by afosto
  • Repository
  • 0 Watchers
  • 0 Stars
  • 386 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 17 % Grown

The README.md

Active Ants API client

This package provides a wrapper for the ActiveAnts ShopApi. This package was developed by Afosto to make a reliable connection between Afosto (Retail Software) and Active Ants and provides all the basic functionality., (*1)

Installation

To install, use composer:, (*2)

composer require afosto/active-ants

Usage

First get an account at ActiveAnts and obtain a username and password for the ShopApi., (*3)

Start the app with the following code. The application will obtain an authorization-token, retreive settings and cache these in the cache folder., (*4)

App::start($endpoint, $username, $password, $cacheDirectory);

Below you'll find a subset of the available methods., (*5)

Create a product

$product = Product::model()
        ->setName('testProduct')
        ->setSku('testSku');

if ($product->save()) {
    echo "Product was saved";
}

Create an order

$item = OrderItem::model()
        ->setSku('testSku')
        ->setGrossPrice(1.21)
        ->setName('Test Product')
        ->setTaxRate(21);

$address = Address::model()
        ->setName('Afosto SaaS BV')
        ->setAddress('Protonstraat', 9, 'a')
        ->setCity('Groningen')
        ->setCountry('NL')
        ->setPostalcode('9743AL');

$order = Order::model()
        ->setEmail('support@afosto.com')
        ->setOrderId('#1')
        ->setPhoneNumber('0507119519')
        ->addOrderItem($item)
        ->setBillingAddress($address)
        ->setShippingAddress($address);

if ($order->save()) {
    echo "Order was saved";
}

Get stock for all products

foreach (Stock::model()->findAll() as $stock) {
    echo $stock->sku . ': ' . $stock->stock . "\n";
}

The Versions

12/10 2016

dev-master

9999999-dev

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

12/10 2016

1.0.9

1.0.9.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

12/10 2016

dev-hotfix/cache-expiry

dev-hotfix/cache-expiry

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

04/10 2016

1.0.8

1.0.8.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

04/10 2016

dev-patch-1

dev-patch-1

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

08/04 2016

1.0.7

1.0.7.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

29/03 2016

1.0.6

1.0.6.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

21/03 2016

1.0.5

1.0.5.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

08/03 2016

1.0.4

1.0.4.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

08/03 2016

1.0.3

1.0.3.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

23/02 2016

1.0.2

1.0.2.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

01/02 2016

1.0.1

1.0.1.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants

16/12 2015

1.0.0

1.0.0.0

Client for ActiveAnts API

  Sources   Download

MIT

The Requires

 

by Afosto Development Team

api client active afosto ants