Coder Social home page Coder Social logo

quickbooks's People

Contributors

gnilya avatar jnstr avatar jthomaschewski avatar khairulashraff avatar sznowak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

quickbooks's Issues

Excellent job!

Hi,

After playing with the official PHP SDK a bit and getting frustrated with it, I checked for an alternative and this is just brilliant. Well done and thanks for creating this.

Best regards,
René

create Bill

How to create new Bill with multiple line items?
Thanks for answer.

Fix Boolean Condition in Where Clause

As of php Boolean value is being converted to either 1 or 0 while Quickbooks does not accept such parameters for Boolean values and will throw error as of value 1/0 is not recognized for such parameter.
I've faced the issue while fetching jobs for the customer.

$this->jobService->query()
        ->where('Job', '=', true)
        ->paginate($this->start, $this->offset)
        ->get();//throws error value 1 is not valid for property 'Job'

I've come up with solution by adding a method for Bool values which fix that.
Would you please add this code in Query.php or let me know if there is any alternate solution.

    public function whereBool($property, $operator, $constraint) {
        if($constraint === true) {
            $this->where[] = $property. $operator . "true";
        } else {
            $this->where[] = $property. $operator . "false";
        }
        return $this;
    } 

Or another solution would be

    public function whereTrue($property, $operator) {
        $this->where[] = $property. $operator . "true";
        return $this;
    } 
   
    public function whereFalse($property, $operator) {
        $this->where[] = $property. $operator . "false";
        return $this;
    } 

Thanks

Pagination does not seem to work

When I try to paginate the customers or vendors something like

try {
          $results = $this->customerService->query()->paginate(0, 1000)->get();
    } catch (\Exception $e) {
         return response()->json([ 'success' => false, 'message' => $e->getMessage() ]);
}

maxresults\" \"MAXRESULTS \"\" at line 1, column 38.\nWas expecting:\n <INTEGER>
As we already know that it accepts start and offset as an integer.
Please fix it ASAP.
Thanks

signature_invalid

Hey

I'm trying to generate a token, but when the user gives access to the app and returns on the callback and I execute:

$connector = new Connect;
$result = $connector->connect($_GET);

I get:

Fatal error:  Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://oauth.intuit.com/oauth/v1/get_access_token?oauth_consumer_key=<removed>&oauth_nonce=94XOiIMxq8&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1477409108&oauth_token=qyprdDloPAuo924wDURniAFMgUFgRGigr8OpnRbJta3qRRgj&oauth_verifier=734z6xe&oauth_version=1.0&oauth_signature=PKBdCWeRGTfPF1G20%2F0unTlIEZg%3D` resulted in a `401 Unauthorized` response:
oauth_problem=signature_invalid
 in /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
Stack trace:
#0 /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzl in /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 111

Can you advice to solve this issue?

Thank you,
Gecko

Vendor ID

When vendor is created in return request I don'g get Vendor's ID. Is it normal? If it is, how can I get this Id number?

Using QBClass create problem

PHP Fatal error: Class '\Rangka\Quickbooks\Builders\class' not found in /var/www/html/kpi/vendor/rangka/quickbooks/src/Services/Service.php on line 87
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class '\Rangk
a\Quickbooks\Builders\class' not found","file":"/var/www/html/kpi/vendor/rangka/quickbooks/
src/Services/Service.php","line":87}}

Class resource is not working

class QBClass extends Service {
/**
* Name of this service. Must correspond to actual objecet type in Quickbooks.
* @var string
*/
protected static $name = 'class';

/**
 * Resource name of this service. Must correspond to actual objecet type in Quickbooks and in all lowercase.
 * @var string
 */
protected static $resource_name = 'Class';

}

But when I changed the $name to 'Class', it works. Please verify if it should be capitalize?

Add Delete method on Service

First of all thanks for the great and enhanced Quickbooks package. Could you please also add delete operation on services. currently I've just modified the Service class with adding just a new method for delete operation which just works fine for Quickbooks Bill though I've not tested with other Services. Would you please add the below code to the Service or may I sent a pull request over this issue.
Thanks

  /**
    * Delete an entity.
    *
    * @param array $data Item information.
    * @return void
    */
    public function delete($data) {
        return parent::post($this->getResourceName() . '?operation=delete', $data)->{$this->getEntityName()};
    }

Vendor Update issue

When i try to create new Vendor every things work fine, but when i try update i get exception like
Calling undefined method in Rangka\Quickbooks\Builders\Vendor
this is my code:

$ex        = getVendorByID( $vendor->Id );
$syncToken = $ex->SyncToken;
$service   = new Vendor();
$builder   = $service->getBuilder();
$builder->setDisplayName( $ex->DisplayName );
$builder->setPrimaryEmailAddr( [
	'Address' => $ex->PrimaryEmailAddr->Address
] );
$builder->setBillAddr( [
	"Line1"                  => $address['address1'],
	"Line2"                  => $address['address2'],
	"City"                   => $address['city'],
	"Country"                => $address['country'],
	"CountrySubDivisionCode" => $address['state'],
	"PostalCode"             => $address['postal_code'],
] );

$builder->setPrimaryPhone( [
	'FreeFormNumber' => $ex->PrimaryPhone->FreeFormNumber
] );

$builder->setSyncToken( $syncToken );
$ret = $builder->update();

Sync token are set and all variables like address, phone and email address.
createVendor function is on the same file and Rangka\Quickbooks\Services\Vendor is declared properly on top
How to fix this? Where is the issue?

Thanks

Notice: Undefined index: query

Hi, thought id let you know i'm seeing the error "Notice: Undefined index: query" when using the library in symfony. (a simple isset($parsedURL['query'] should fix it)

Client.php line 116

Cheers
Paul

Service Implementation.

Here is a list of services that are still being implemented.

  • Account
    • - Create
    • - Read
    • - Update
  • Attachable
    • - Create
    • - Read
    • - Update
    • - Delete
  • Batch
    • - BatchRequest
  • Bill
    • - Create
    • - Read
    • - Update
    • - Delete
  • BillPayment
    • - Create
    • - Read
    • - Update
    • - Delete
  • Budget
    • - Create
    • - Read
    • - Update
  • ChangeDataCapture
    • - ChangeDataCapture
  • Class
    • - Create
    • - Read
    • - Update
  • CompanyInfo
    • - Read
  • CreditMemo
    • - Create
    • - Read
    • - Update
    • - Delete
  • Customer
    • - Create
    • - Read
    • - Update
  • Department
    • - Create
    • - Read
    • - Update
  • Deposit
    • - Create
    • - Read
    • - Update
    • - Delete
  • Employee
    • - Create
    • - Read
    • - Update
  • Estimate
    • - Create
    • - Read
    • - Update
    • - Delete
  • Invoice
    • - Create
    • - Read
    • - Update
    • - Delete
  • Item
    • - Create
    • - Read
    • - Update
  • JournalEntry
    • - Create
    • - Read
    • - Update
    • - Delete
  • Payment
    • - Create
    • - Read
    • - Update
    • - Delete
  • PaymentMethod
    • - Create
    • - Read
    • - Update
  • Preferences
    • - Read
    • - Update
  • Purchase
    • - Create
    • - Read
    • - Update
    • - Delete
  • PurchaseOrder
    • - Create
    • - Read
    • - Update
    • - Delete
  • RefundReceipt
    • - Create
    • - Read
    • - Update
    • - Delete
  • Reports
    • - Read
  • SalesReceipt
    • - Create
    • - Read
    • - Update
    • - Delete
  • TaxAgency
    • - Create
    • - Read
  • TaxCode
    • - Read
  • TaxRate
    • - Read
  • TaxService
    • - Create
  • Term
    • - Create
    • - Read
    • - Update
  • TimeActivity
    • - Create
    • - Read
    • - Update
    • - Delete
  • Transfer
    • - Create
    • - Read
    • - Update
    • - Delete
  • Vendor
    • - Create
    • - Read
    • - Update
  • VendorCredit
    • - Create
    • - Read
    • - Update
    • - Delete

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.