Search by

There is no license information available for the latest version (2.0.0) of this package.

Gubee SDK for PHP

Maintainers

Package info

github.com/gubee-marketplace/gubee-magento-m2-sdk

pkg:composer/gubee-marketplace/php-sdk

Transparency log

Statistics

Installs: 1 855

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.0 2026-08-28 13:48 UTC

README

CI Security OpenSSF Scorecard Contributors Issues Coverage Changelog

Gubee PHP SDK

English | Português (Brasil)

PHP SDK for integrating with the Gubee API, aimed at teams that need to consume catalog, orders, promotions, media, platform, and related Gubee resources from PHP applications.

Summary

Installation

Install gubee-marketplace/php-sdk with Composer.

composer require gubee-marketplace/php-sdk

Documentation And Help

What This Repository Covers

  • HTTP client with Bearer authentication, retries, and response history
  • models and enums for API payloads
  • resources for catalog, orders, ads, invoice, notifications, promotions, tags, media, shipping, and platform APIs
  • unit tests and integration contract tests against the OpenAPI specification

Usage/Examples

<?php

use Gubee\SDK\Client;

$client = (new Client())
    ->authenticate('your-token');

Revalidate a token

<?php

use Gubee\SDK\Client;

$client = (new Client())
    ->authenticate('your-token');

$token = $client->token()->revalidate('your-token');

echo $token->getSellerId();

Query platform configuration

<?php

use Gubee\SDK\Client;
use Gubee\SDK\Resource\PlatformResource;

$client = (new Client())
    ->authenticate('your-token');

$platforms = (new PlatformResource($client))->configuration();

Load a product by id

<?php

use Gubee\SDK\Client;
use Gubee\SDK\Resource\Catalog\ProductResource;

$client = (new Client())
    ->authenticate('your-token');

$product = (new ProductResource($client))->loadById('product-id');

echo $product->getId();

Read the last response

<?php

use Gubee\SDK\Client;

$client = (new Client())
    ->authenticate('your-token');

$client->token()->revalidate('your-token');

$response = $client->getLastResponse();

Running Tests

To run tests, run the following command:

composer test

Development

composer cs
composer cs:fix
composer rector:dry-run
composer test

Repository Maintenance

Contributing

Read CONTRIBUTING.md before opening issues or pull requests.

Contributors

Contributors

Official Links

FAQ

Which PHP version is supported?

This SDK targets PHP ^8.0, matching the requirement declared in composer.json.

Does the SDK include a built-in DI container?

No dedicated application container is required for normal use. The SDK bootstraps its internal service provider, and the common entrypoint is instantiating Gubee\SDK\Client directly.

How do I authenticate requests?

Instantiate Client and call authenticate('your-token') before using a resource.

How do I access resources not exposed as shortcut methods on `Client`?

Instantiate the resource directly with the client instance, for example new ProductResource($client) or new PlatformResource($client).

Are there tests for the SDK contracts?

Yes. The repository includes unit tests and integration contract tests validated against the OpenAPI fixture in test/Integration/Contract/openapi-integration.json.

License

This project is currently distributed as proprietary software unless the maintainers publish a different license later.