aurigma/php-storefront-client

PHP API Client for Storefront API service of Customer's Canvas web-to-print system.

1.0.4 2022-02-17 10:09 UTC

This package is auto-updated.

Last update: 2022-11-17 09:28:21 UTC


README

======================================================

This module is a PHP API client for Storefront API service which is a part of Customer's Canvas web-to-print system. It is supposed that you are familiar with its services and understand how to use its APIs. To learn more about Customer's Canvas and its services, refer the Getting Started section of its documentation.

Pre-requisites

To be able to use this package, you need to meet the following requirements:

  • You must have an account at Customer's Canvas.

For other platforms, see the Backend services article in Customer's Canvas documentation.

Installation

composer require aurigma/php-storefront-client

Requirements

PHP 7.2 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/aurigma/php-storefront-client.git"
    }
  ],
  "require": {
    "aurigma/php-storefront-client": "*@dev"
  }
}

Then run composer install

Getting Started

Please follow the installation procedure.

Receive an access token through your backend as explained in the documentation and deliver it to your app.

Then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new OpenAPI\Client\Api\BuildInfoApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->buildInfoGetInfo();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BuildInfoApi->buildInfoGetInfo: ', $e->getMessage(), PHP_EOL;
}
?>

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

Aurigma Inc info@aurigma.com (https://customerscanvas.com)

API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
BuildInfoApi buildInfoGetInfo GET /api/storefront/v1/info Gets assembly build info
BuildInfoApi buildInfoHeadInfo HEAD /api/storefront/v1/info Gets assembly build info
ProductReferencesApi productReferencesCreate POST /api/storefront/v1/product-references Creates new storefront product reference
ProductReferencesApi productReferencesDelete DELETE /api/storefront/v1/product-references/{reference} Deletes storefront product reference
ProductReferencesApi productReferencesGet GET /api/storefront/v1/product-references/{reference} Gets storefront product reference
ProductReferencesApi productReferencesGetAll GET /api/storefront/v1/product-references Gets all storefront product references relevant to specified query parameters
ProductReferencesApi productReferencesGetProductConfig GET /api/storefront/v1/product-references/{reference}/product-config Gets product configuration information by storefront product reference
ProductReferencesApi productReferencesGetProductSpecification GET /api/storefront/v1/product-references/{reference}/product-specification Gets product specification by storefront product reference
ProductSpecificationsApi productSpecificationsGet GET /api/storefront/v1/product-specifications/{id} Gets product specification by id
ProductSpecificationsApi productSpecificationsGetAll GET /api/storefront/v1/product-specifications Gets all product specifications relevant to specified query parameters
ProductSpecificationsApi productSpecificationsGetConfiguration GET /api/storefront/v1/product-specifications/{id}/config Gets product configuration description by product specification id
ProjectsApi projectsChangeStatus POST /api/storefront/v1/projects/{id}/transitions/{transition} Changes project status
ProjectsApi projectsCreate POST /api/storefront/v1/projects Creates new project
ProjectsApi projectsForceStatus POST /api/storefront/v1/projects/{id}/statuses/{status} Force changes project status
ProjectsApi projectsGet GET /api/storefront/v1/projects/{id} Gets project by id
ProjectsApi projectsGetAll GET /api/storefront/v1/projects Gets all projects relevant to specified query parameters
ProjectsApi projectsGetAllStatuses GET /api/storefront/v1/projects/statuses Gets all project statuses
ProjectsApi projectsGetAllTransitions GET /api/storefront/v1/projects/transitions Gets all project transitions
ProjectsApi projectsGetAvailableTransitions GET /api/storefront/v1/projects/{id}/transitions Gets available project transitions
ProjectsApi projectsGetProjectOrder GET /api/storefront/v1/projects/{id}/order Gets project order data from ecommerce system
ProjectsApi projectsGetProjectPdfUrl GET /api/storefront/v1/projects/{id}/project-pdf Gets project pdf url
ProjectsApi projectsGetProjectPdfZip GET /api/storefront/v1/projects/{id}/project-pdf-zip Gets project pdf files in zip archive
StorefrontsApi storefrontsGet GET /api/storefront/v1/storefronts/{id} Gets storefront
StorefrontsApi storefrontsGetAll GET /api/storefront/v1/storefronts Gets all storefronts relevant to specified query parameters
TenantInfoApi tenantInfoGetApplicationsInfo GET /api/storefront/v1/tenant-info/applications Gets information about tenant applications

Models