2017 © Pedro Peláez
 

library yuki-php-wrapper

PHP Wrapper for the Yuki SOAP Webservice

image

bertmaurau/yuki-php-wrapper

PHP Wrapper for the Yuki SOAP Webservice

  • Monday, February 5, 2018
  • by BertMaurau
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

yuki-wrapper

PHP Wrapper for the Yuki SOAP Webservice, (*1)

Currently available - Common Functions - Sales (Invoicing) - PettyCash (Import CSV files), (*2)

Installation with Composer

curl -s http://getcomposer.org/installer | php
php composer.phar require "bertmaurau/yuki-php-wrapper"

Usage

try {
    $yuki = (new \Yuki())
            -> setAccessKey(getenv('API_TOKEN'))
            -> setAdministrationID(getenv('ADMINISTRATION_ID'))
            -> authenticate();
} catch (\Exception $ex) {
    echo $ex -> getMessage();
    exit;
}

// Do stuffs here

Methods

Common

  • Administrations, (*3)

    Required: Session ID
    Throws: InvalidSessionIDException
    Returns: List of active administration models, (*4)

    $yuki -> administrations();, (*5)

  • GetAdministrationIDByName, (*6)

    Required: Session ID 1 Administration Name
    Throws: InvalidAdministrationNameException
    Returns: The ID of the administration, (*7)

    $yuki -> getAdministrationIDByName($administrationName);, (*8)

  • Authenticate, (*9)

    Required: Access Key
    Throws: InvalidAccessKeyException, (*10)

    $yuki -> authenticate();, (*11)

  • AuthenticateByUserName (deprecated), (*12)

    Required: UserName & Password
    Throws: InvalidCredentialsException, (*13)

    $yuki -> authenticateByUserName($userName, $password);, (*14)

  • Domains, (*15)

    Required: Session ID
    Throws: InvalidSessionIDException
    Returns: List of active domain models, (*16)

    $yuki -> domains();, (*17)

  • GetCurrentDomain, (*18)

    Required: Session ID
    Throws: InvalidSessionIDException
    Returns: Returns current domain model, (*19)

    $yuki -> getCurrentDomain();, (*20)

  • SetCurrentDomain, (*21)

    Required: Domain ID
    Throws: InvalidSessionIDException, (*22)

    $yuki -> setCurrentDomain($domainId);, (*23)

Sales

  • ProcessSalesInvoices, (*24)

    Required: array of Invoices
    Throws: Exception & InvalidSessionIDException & InvalidAdministrationIDException & InvalidSalesInvoiceException, (*25)

    $yuki -> processSalesInvoices($salesInvoices);, (*26)

PettyCash

  • ImportStatementCSV, (*27)

    Required: Statement Text
    Throws: Exception & InvalidSessionIDException & InvalidAdministrationIDException & InvalidStatementTextException, (*28)

    $yuki -> importStatementCSV($statementText);, (*29)

  • ImportStatementLine, (*30)

    Required: StatementLine
    Throws: Exception & InvalidStatementLineException, (*31)

    $yuki -> importStatementLine(Model\StatementLine $statementLine);, (*32)

  • ImportStatementLineProject, (*33)

    Required: StatementLineProject
    Throws: Exception & InvalidStatementLineException, (*34)

    $yuki -> importStatementLineProject(Model\StatementLineProject $statementLineProject);, (*35)

Getters & Setters

  • getSessionID()
  • setSessionID()
  • getAdministrationID()
  • setAdministrationID()
  • getAccessKey()
  • setAccessKey()

Exceptions

The next Exceptions can be thrown:, (*36)

  • InvalidAccessKeyException: When there is no Access Key set.
  • InvalidAdministrationIDException: When there is no Administration ID set.
  • InvalidAdministrationNameException: When there is no Administration Name provided to get the ID.
  • InvalidCredentialsException: When there is no UserName or Password given (Deprecated).
  • InvalidDomainIDException: When there is no Domain ID set.
  • InvalidSessionIDException: When there is no Session ID set (Gets set after Authentication).
  • InvalidStatementTextException: When there is no Statement Text provided for import.
  • InvalidStatementLineException: When there is no Statement Line provided for import.
  • InvalidValueTypeException: When given value doesn't match the required type.
  • ModelNotFoundException: When the requested model was not found.
  • NoAuthenticationResultException: When the Authenticate didn't return the expected results
  • NonAllowedEnumValueException: When given value isn't within the allowed enum list values

The Versions

05/02 2018

dev-master

9999999-dev

PHP Wrapper for the Yuki SOAP Webservice

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

php library wrapper yuki

05/02 2018

2.2.1

2.2.1.0

PHP Wrapper for the Yuki SOAP Webservice

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

php library wrapper yuki

05/01 2018

2.1.1

2.1.1.0

PHP Wrapper for the Yuki SOAP Webservice

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

php library wrapper yuki

27/10 2017

2.0.2

2.0.2.0

PHP Wrapper for the Yuki SOAP Webservice

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

php library wrapper yuki

17/10 2017

2.0.1

2.0.1.0

PHP Wrapper for the Yuki SOAP Webservice

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

php library wrapper yuki

17/10 2017

1.3.1

1.3.1.0

Yuki PettyCash Webservice Integration

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

import yuki pettycash

17/10 2017

1.2.1

1.2.1.0

Yuki PettyCash Webservice Integration

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

import yuki pettycash

16/10 2017

1.1.0

1.1.0.0

Yuki PettyCash Webservice Integration

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau

import yuki pettycash

16/10 2017

1.0.0

1.0.0.0

Yuki PettyCash Webservice Integration

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by Bert Maurau