A laravel service provider for the netsuite-php library service

Overview

netsuite-laravel

License

A PHP supplemental package to the ryanwinchester/netsuite-php package to add the NetSuite service client to the service container of a Laravel application. This package should be considered to be beta software for the time being.

Installation

composer require netsuitephp/netsuite-laravel

Configuration

By default, the configuration will assume you have your $_ENV populated with netsuite configuration keys laid out in the netsuite-php package. Read the included config/netsuite.php file as it is documented with inline comments.

Go to the netsuite-php quickstart section for more details. You can jump directly to the .env.example file to save time.

Publishing the config file

If for whatever reason you don't want to use the .env method of configuring the NetSuite service in your application, you can also publish the provided config file into your Laravel application and modify it as desired.

php artisan vendor:publish --provider=NetSuite\\Providers\\NetSuiteServiceProvider

Usage

Once installed, you should be able to access the netsuite service in the usual ways that you might get an object from the service container, either by the full service class name or using the alias provided, or by using the provided Facade, if preferred.

Get from the service container using the long form method

$service = app(NetSuite\NetSuiteService::class);
$response = $service->get($request);

Get from the service container using the alias

$service = app('netsuite');
$response = $service->get($request);

Get from the Facade accessor

$response = NetSuite::get($request);

Dependency Injection

You can also use Laravel's dependency injection. This imaginary Http controller provides a theoretical demonstration.

namespace App\Http\Controllers;

use NetSuite\Classes\GetRequest;
use NetSuite\Classes\RecordRef;
use NetSuite\Classes\RecordType;
use NetSuite\NetSuiteService;

class LookupController extends Controller
{
    public function lookupCustomer(NetSuiteService $service, int $internalId)
    {
        $request = new GetRequest();
        $request->baseRef = new RecordRef();
        $request->baseRef->type = RecordType::customer;
        $request->baseRef->internalId = $internalId;
        $response = $service->get($request);
    }
}

Support

If you need help with this package you can use the netsuite-php project's discussions area to look for help or if you believe you have discovered a bug, please report it in this package's issues area.

You might also like...
Project C2 (Laravel 8.x) - Pemograman Web Service (Semester 5)

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Nusa SMS Laravel Service

A Laravel Service (or library) used to integrate NusaSMS.

Dedicated laravel package for Behpadakht Mellat bank payment service.
Dedicated laravel package for Behpadakht Mellat bank payment service.

Iranian Mellat bank full online payment service Dedicated laravel package for Behpadakht Mellat bank payment service. Features Event calls Log on chan

📲 SmsOffice.ge service with notification channel for Laravel
📲 SmsOffice.ge service with notification channel for Laravel

Laravel SmsOffice This package allows you to send SMS messages with SmsOffice.ge API You can send sms with notification class or directly with SmsOffi

Service manager for Slim compatible with Laravel packages

SlimServices SlimServices is a service manager for the Slim PHP microframework based on Laravel 4 service providers and DI container, allowing you to

Email validation service in PHP

Email validation service Email validation service in PHP using Laravel 8. Validation features Domain Regular Expression Smtp Txt records Installing de

Shared code for the MaxMind Web Service PHP client APIs

Common Code for MaxMind Web Service Clients This is not intended for direct use by third parties. Rather, it is for shared code between MaxMind's vari

Generate and autoload custom Helpers, Builder Scope, Service class, Trait

laravel-make-extender Generate and autoload custom helpers, It can generate multilevel helpers in the context of the directory. Generate Service class

Adds a service worker to Magento2 to enable PWA features
Adds a service worker to Magento2 to enable PWA features

Monsoon PWA Adds icons, a web manifest file and a service-worker file to make magento 2 a PWA. Main Features Supports Magento Blank and Luma as well a

Comments
  • You can do create a Rest Suite Talk.

    You can do create a Rest Suite Talk.

    Maybe you can include in code call to Suite Talk in rest.

    Maybe we can work together. https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_1540391670.html

    opened by kelvinkrisna 5
  • Add method hints to facade

    Add method hints to facade

    Added method hints to the NetSuite facade to provide a better IntelliSense experience.

    Only added the methods from \NetSuite\Classes\NetSuiteService.

    This PR is just a quality-of-life change for developers and does not impact or break existing codebases.

    opened by SirCoolness 0
Releases(v1.0)
Owner
NetsuitePHP
Community supported PHP libraries for Netsuite
NetsuitePHP
Laravel Lumen service provider for Understand.io

The service provider is deprecated - it does not support error grouping. Laravel Lumen service provider for Understand.io You may also be interested i

null 6 May 30, 2019
Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite

Mollie for Laravel Laravel-Mollie incorporates the Mollie API and Mollie Connect into your Laravel or Lumen project. Accepting iDEAL, Apple Pay, Banco

Mollie 289 Nov 24, 2022
Driver for managing cash payments in the Cashier Provider ecosystem

Cash Driver Provider Installation To get the latest version of Cash Driver Provider, simply require the project using Composer: $ composer require cas

Cashier Provider 4 Aug 30, 2022
UnifiedPush provider for Nextcloud - server application

NextPush - Server App UnifiedPush provider for Nextcloud - server application This is still a WIP version Requirement It require the nextcloud server

NextPush 38 Jan 5, 2023
PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.

reCAPTCHA PHP client library reCAPTCHA is a free CAPTCHA service that protects websites from spam and abuse. This is a PHP library that wraps up the s

Google 3.3k Dec 23, 2022
Laravel 4.* and 5.* service providers to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

Laravel 4.* service provider for PHP Console See https://github.com/barbushin/php-console-laravel/releases/tag/1.2.1 Use "php-console/laravel-service-

Sergey 73 Jun 1, 2022
MediaDB is a web-based media streaming service written in Laravel and Vue.

MediaDB (API) MediaDB is a web-based media streaming service written in Laravel and Vue. The nginx-vod-module is used for on-the-fly repackaging of MP

François M. 53 Sep 3, 2022
A simple package to manage the creation of a structure composed of the service and repository layers in a Laravel application

Chapolim Este projeto tem como objetivo fornecer alguns comandos adicionais à interface de linha de comando do Laravel, o Artisan, para manipular a es

Eliezer Alves 51 Dec 11, 2022
Load Laravel service providers based on your application's environment.

Laravel EnvProviders A more finetuned way of managing your service providers in Laravel. This package allows you to configure the environment certain

Sven Luijten 79 Dec 29, 2022
Contextual Service Providers for Laravel

Laravel Context This simple yet powerful package will help you load different Service Providers depending in which context you are. Contexts can be se

Rodrigo Troncoso 51 Dec 25, 2020