Code Monkey home page Code Monkey logo

xi-netvisor's Introduction

Xi Netvisor

Netvisor API interface for PHP 5.6+.

Build Status

Before you start hacking away

You must do the following things to get everything up and running:

  • Get your partner ID and key from Netvisor
  • Get access to Netvisor web management page (testing environment has its own management page)
  • Activate use of external interfaces in your management page
  • Create new interface ID & key with your management page (same as above).

Usage

Configuration

Most of the configuration parameters should be obtained from Netvisor.

netvisor.host           = "https://www.netvisor.biz"         // Test server is "http://integrationdemo.netvisor.fi"
netvisor.sender         = "Testiclient"                      // Pick a name that describes your service
netvisor.customerId     = "XX_yyyy_1yyy"                     // Create manually in your Netvisor management page
netvisor.partnerId      = "Xxx_yyy"                          // Obtain from your Netvisor contact
netvisor.organizationId = "2521043-1"                        // Your company ID

netvisor.userKey        = "D953E3D10457F778B009F88B038CC3C7" // Create manually in your Netvisor management page
netvisor.partnerKey     = "3BCBFB382CE884YD6C8D4F4FC1C2AC95" // Obtain from your Netvisor contact

netvisor.language       = "FI"
netvisor.enabled        = true

Initialization

$config   = new Xi\Netvisor\Config(...);       // Use the parameters described above.
$netvisor = new Xi\Netvisor\Netvisor($config);

Actions

Search customers

$customers = $netvisor->getCustomers(
    '1234567-1' // Optional keyword
);

Get customers changed since datetime

$customers = $netvisor->getCustomersChangedSince(
    new DateTime(...) // Required
);

Get product

$product = $netvisor->getProduct(
    123 // Required Netvisor identifier
);

Send customer

$customer = new Xi\Netvisor\Resource\Xml\Customer(
    new Xi\Netvisor\Resource\Xml\CustomerBaseInformation(
        '1234567-1',
        'Test Oy',
        'Test street 1',
        'Helsinki',
        '00240',
        'FI'
    )
);

$response = new \SimpleXMLElement($this->netvisor->sendCustomer($customer));
$netvisorIdentifier = (string)$response->Replies->InsertedDataIdentifier;

Send invoice

$invoice = new Xi\Netvisor\Resource\Xml\SalesInvoice(...);

$invoiceProductLine = new Xi\Netvisor\Resource\Xml\SalesInvoiceProductLine(...);

$invoice->addSalesInvoiceProductLine($invoiceProductLine);

$netvisor->sendInvoice($invoice);

xi-netvisor's People

Contributors

panunu avatar pkjedi avatar henrivesala avatar puppe0 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.