gemini-commerce/php-client-product-configurator

## 简介 本全面指南将为您提供将我们的产品配置器服务集成和利用到您的应用程序中的知识。 ## 快速入门 立即开始!按照以下步骤启动您的集成: 1. **认证**:获取您的集成JWT以认证您的请求。

1.1.0 2024-02-29 14:09 UTC

This package is auto-updated.

Last update: 2024-09-29 15:47:49 UTC


README

简介

本全面指南将为您提供将我们的产品配置器服务集成和利用到您的应用程序中的知识。

快速入门

立即开始!按照以下步骤启动您的集成

  1. 认证: 获取您的集成JWT以认证您的请求。
  2. 客户端库: 查看我们的GitHub仓库以获取您首选编程语言的客户端库。
  3. API概览: 使用OpenAPI规范熟悉我们的RESTful API。

集成

API概览

我们的RESTful API是解锁产品配置器全部潜力的门户。查看详细的API参考,以深入了解每个端点和请求/响应格式。

客户端库

为了加速您的集成过程,我们为各种编程语言提供了客户端库。在我们的GitHub仓库中找到适合您堆栈的库。

认证

安全性至关重要。了解如何使用JWT认证您的请求,确保您的应用程序与产品配置器之间安全可靠的联系。

配置管理

配置器生命周期

了解配置器的生命周期,从草稿到活动状态再到删除。这种灵活性允许您按自己的节奏管理配置。

步骤和选项

轻松配置产品步骤,轻松定义选项。探索依赖关系的力量,创建动态直观的配置。

矩阵

深入了解矩阵——您的秘密武器。探索价格和重量矩阵,并了解配置步骤如何影响属性和定价。

价格管理

使用我们灵活的价格矩阵释放动态定价。从固定价格到增量结构,轻松适应各种定价模型。

安全

您的数据在安全手中。了解产品配置器如何通过JWT认证确保安全性,保护您的敏感信息。

向后兼容性

走在曲线之前。了解我们的版本策略,在允许我们的服务无缝演进的同时提供向后兼容性。

开发者支持

有问题?需要帮助?请发送电子邮件至info@gemini-commerce.com,我们将回复您。

安装与使用

要求

PHP 7.4及更高版本。也应与PHP 8.0兼容。

Composer

要通过Composer安装绑定,请将以下内容添加到composer.json

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

然后运行composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/product-configurator/vendor/autoload.php');

入门

请按照安装过程进行操作,然后运行以下命令

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



// Configure OAuth2 access token for authorization: standardAuthorization
$config = GeminiCommerce\ProductConfigurator\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIAuthorization
$config = GeminiCommerce\ProductConfigurator\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = GeminiCommerce\ProductConfigurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new GeminiCommerce\ProductConfigurator\Api\ConfigurationApi(
    // 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(),
    $config
);
$tenant_id = 'tenant_id_example'; // string
$product_id = 'product_id_example'; // string
$configurator_id = 'configurator_id_example'; // string | If not set, the service returns the active configurator

try {
    $result = $apiInstance->productConfiguratorGetAvailableConfiguration($tenant_id, $product_id, $configurator_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfigurationApi->productConfiguratorGetAvailableConfiguration: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI都是相对于https://product-configurator.api.gogemini.io

模型

授权

API定义的认证方案

API授权

  • 类型: API密钥
  • API密钥参数名: 授权
  • 位置: HTTP头

标准授权

  • 类型: OAuth
  • 流程: 隐式
  • 授权URL: https://iambackoffice.gogemini.io/iambackoffice.IamBackoffice/Login
  • 作用域: N/A

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

info@gemini-commerce.com

关于此包

此PHP包是由OpenAPI Generator项目自动生成的

  • API版本: v1
    • 包版本: 1.1.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen