Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
beqakapanadze committed Nov 13, 2017
0 parents commit 5ddbf29
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
46 changes: 46 additions & 0 deletions Quickbooks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* Created by PhpStorm.
* User: beqa
* Date: 11/13/17
* Time: 12:25 PM
*/

namespace omcrn\quickbooks;


use QuickBooksOnline\API\DataService\DataService;
use yii\base\Component;

class Quickbooks extends Component
{
public $authMode = 'oauth2';
public $clientID;
public $clientSecret;
public $accessTokenKey;
public $refreshTokenKey;
public $realmID;
public $baseUrl;
/**
* @var DataService
*/
private $dataService;
public $dataServiceConfig = null;


public function init()
{
parent::init();
if ($this->dataServiceConfig === null){
$this->dataServiceConfig = [
'auth_mode' => $this->authMode,
'ClientID' => $this->clientID,
'ClientSecret' => $this->clientSecret,
'accessTokenKey' => $this->accessTokenKey,
'refreshTokenKey' => $this->refreshTokenKey,
'QBORealmID' => $this->realmID,
'baseUrl' => $this->baseUrl,
];
}
}
}
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Yii2 Extension for Quickbooks
=============================
quickbooks online oauth2 and API wrapper for Yii2

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist omcrn/yii2-quickbooks "*"
```

or add

```
"omcrn/yii2-quickbooks": "*"
```

to the require section of your `composer.json` file.


Usage
-----

Once the extension is installed, simply use it in your code by :

```php
<?= \omcrn\quickbooks\AutoloadExample::widget(); ?>```
21 changes: 21 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "omcrn/yii2-quickbooks",
"description": "quickbooks online oauth2 and API wrapper for Yii2",
"type": "yii2-extension",
"keywords": ["yii2"," extension"," quickbooks"],
"license": "MIT",
"authors": [
{
"name": "Zura Sekhniashvili",
"email": "[email protected]"
}
],
"require": {
"yiisoft/yii2": "*"
},
"autoload": {
"psr-4": {
"omcrn\\quickbooks\\": ""
}
}
}

0 comments on commit 5ddbf29

Please sign in to comment.