gisevevokoru/ezze-siftuz-receipts-v1

dev-master 2020-01-24 01:16 UTC

This package is auto-updated.

Last update: 2024-09-24 11:57:41 UTC


README

合作伙伴获取收据信息的接口

此PHP软件包是由Swagger Codegen项目自动生成的

  • API版本:1.0.0
  • 软件包版本:v1.0
  • 构建软件包:io.swagger.codegen.v3.generators.php.PhpClientCodegen

需求

PHP 5.5及以后版本

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/gisevevokoru/ezze-siftuz-receipts-v1.git"
    }
  ],
  "require": {
    "gisevevokoru/ezze-siftuz-receipts-v1": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请遵循安装流程,然后运行以下命令

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

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

$apiInstance = new EzzeSiftuz\ReceiptsV1\Api\ReceiptsApi(
    // 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
);
$receipt_number = "receipt_number_example"; // string | ReceiptNumber

try {
    $apiInstance->getReceiptPdfUsingGET($receipt_number);
} catch (Exception $e) {
    echo 'Exception when calling ReceiptsApi->getReceiptPdfUsingGET: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new EzzeSiftuz\ReceiptsV1\Api\ReceiptsApi(
    // 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
);
$receipt_number = "receipt_number_example"; // string | ReceiptNumber

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

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

$apiInstance = new EzzeSiftuz\ReceiptsV1\Api\ReceiptsApi(
    // 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
);
$customer_id = "customer_id_example"; // string | Search for receipts filtered by customer Id
$limit = 56; // int | Page size to limit the number of receipts returned in the response
$page = 56; // int | Page number to fetch. This parameter is required to fetch data for specific page number
$sales_order_id = "sales_order_id_example"; // string | Search for receipts filtered by sales order Id
$type = "type_example"; // string | Search for receipts filtered by receipt type

try {
    $result = $apiInstance->getReceiptsUsingGET($customer_id, $limit, $page, $sales_order_id, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReceiptsApi->getReceiptsUsingGET: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI相对于https://live.api.otto.market/

模型文档

授权文档

JWT

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

作者