crayon/arta-php-sdk
Composer 安装命令:
composer require crayon/arta-php-sdk
包简介
The Arta Public API provides quote generation, transport booking, and tracking capabilities. Additionally the API enables Arta partner organizations to configure email and webhook notifications for their accounts.
README 文档
README
The Arta Public API provides quote generation, transport booking, and tracking capabilities. Additionally the API enables Arta partner organizations to configure email and webhook notifications for their accounts.
For more information, please visit https://manual.arta.io/.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKeyAuth $config = Arta\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Arta\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Arta\Client\Api\ApiKeysApi( // 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 ); $authorization = ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y; // string | Authorize your API calls with an Arta API token $api_keys_create_request = new \Arta\Client\Model\ApiKeysCreateRequest(); // \Arta\Client\Model\ApiKeysCreateRequest try { $result = $apiInstance->apiKeysCreate($authorization, $api_keys_create_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApiKeysApi->apiKeysCreate: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.arta.io
| Class | Method | HTTP request | Description |
|---|---|---|---|
| ApiKeysApi | apiKeysCreate | POST /api_keys | Create an API Key |
| ApiKeysApi | apiKeysDelete | DELETE /api_keys/{api_key_id} | Delete an API Key |
| ApiKeysApi | apiKeysGet | GET /api_keys/{api_key_id} | Get an API Key |
| ApiKeysApi | apiKeysList | GET /api_keys | List API Keys |
| AttachmentsApi | attachmentsCreate | POST /attachments | Create an Attachment |
| AttachmentsApi | attachmentsDelete | DELETE /attachments/{attachment_id} | Delete an Attachment |
| AttachmentsApi | attachmentsGet | GET /attachments/{attachment_id} | Get an Attachment |
| AttachmentsApi | attachmentsList | GET /attachments | List Attachments |
| EmailRulesApi | emailRulesCreate | POST /email_rules | Create an Email Rule |
| EmailRulesApi | emailRulesDelete | DELETE /email_rules/{email_rule_id} | Delete an Email Rule |
| EmailRulesApi | emailRulesGet | GET /email_rules/{email_rule_id} | Get an Email Rule |
| EmailRulesApi | emailRulesList | GET /email_rules | List Email Rules |
| EmailRulesApi | emailRulesUpdate | PATCH /email_rules/{email_rule_id} | Update an Email Rule |
| EmailSubscriptionsApi | emailSubscriptionsCreate | POST /email_subscriptions | Create an Email Subscription |
| EmailSubscriptionsApi | emailSubscriptionsDelete | DELETE /email_subscriptions/{email_subscription_id} | Delete an Email Subscription |
| EmailSubscriptionsApi | emailSubscriptionsGet | GET /email_subscriptions/{email_subscription_id} | Get an Email Subscription |
| EmailSubscriptionsApi | emailSubscriptionsList | GET /email_subscriptions | List Email Subscriptions |
| EmailSubscriptionsApi | emailSubscriptionsUpdate | PATCH /email_subscriptions/{email_subscription_id} | Update an Email Subscription |
| HostedSessionsApi | hostedSessionsCancel | PATCH /hosted_sessions/{hosted_session_id}/cancel | Cancel a Hosted Session |
| HostedSessionsApi | hostedSessionsCreate | POST /hosted_sessions | Create a Hosted Session |
| HostedSessionsApi | hostedSessionsGet | GET /hosted_sessions/{hosted_session_id} | Get a Hosted Session |
| HostedSessionsApi | hostedSessionsList | GET /hosted_sessions | List Hosted Sessions |
| InvoicePaymentsApi | invoicePaymentsGet | GET /invoice_payments/{invoice_payment_id} | Get an Invoice Payment record |
| InvoicePaymentsApi | invoicePaymentsList | GET /invoice_payments | List invoice payment records |
| InvoicesApi | invoicesGet | GET /invoices/{invoice_id} | Get an Invoice record |
| InvoicesApi | invoicesList | GET /invoices | List invoice records |
| LogsApi | logsGet | GET /logs/{log_id} | Get a Log record |
| LogsApi | logsList | GET /logs | List Log records |
| MetadataApi | metadalocationAccessRestrictions | GET /metadata/location_access_restrictions | Location Access Restrictions |
| MetadataApi | metadataApiVersions | GET /metadata/api_versions | API Versions |
| MetadataApi | metadataCurrencies | GET /metadata/currencies | Currencies |
| MetadataApi | metadataEmailNotifications | GET /metadata/email_notifications | Email Notifications |
| MetadataApi | metadataInsurances | GET /metadata/insurances | Insurance |
| MetadataApi | metadataObjectMaterials | GET /metadata/object_materials | Object Materials |
| MetadataApi | metadataObjects | GET /metadata/objects | Object Types |
| MetadataApi | metadataPackageStatuses | GET /metadata/package_statuses | Package Statuses |
| MetadataApi | metadataPackings | GET /metadata/packings | Packing Types |
| MetadataApi | metadataParcelTransportServices | GET /metadata/parcel_transport_services | Parcel Transport Services |
| MetadataApi | metadataPaymentProcessTypes | GET /metadata/payment_process_types | Payment Process types |
| MetadataApi | metadataQuotes | GET /metadata/quotes | Quote Types |
| MetadataApi | metadataRequestStatuses | GET /metadata/request_statuses | Quote Request Statuses |
| MetadataApi | metadataServices | GET /metadata/services | Services |
| MetadataApi | metadataShipmentExceptionTypes | GET /metadata/shipment_exception_types | Shipment Exception Types |
| MetadataApi | metadataShipmentStatuses | GET /metadata/shipment_statuses | Shipment Statuses |
| OrganizationApi | organizationGet | GET /organization | Get an Organization |
| OrganizationApi | organizationPatch | PATCH /organization | Update an Organization |
| PaymentsApi | paymentsGet | GET /payments/{payment_id} | Get an Payment record |
| PaymentsApi | paymentsList | GET /payments | List payment records |
| RequestsApi | requestsCancel | PATCH /requests/{request_id}/cancel | Cancel a Quote Request |
| RequestsApi | requestsCreate | POST /requests | Create a Quote Request |
| RequestsApi | requestsCustom | PATCH /requests/{request_id}/custom | Request custom quotes |
| RequestsApi | requestsGet | GET /requests/{request_id} | Get a Quote Request |
| RequestsApi | requestsList | GET /requests | List Request records |
| RequestsApi | requestsUpdateContacts | PATCH /requests/{request_id}/contacts | Update the contacts for a Quote Request |
| ShipmentExceptionsApi | shipmentExceptionsCreate | POST /shipment_exceptions | Create Shipment Exception |
| ShipmentExceptionsApi | shipmentExceptionsGet | GET /shipment_exceptions/{shipment_exception_id} | Get a Shipment Exception |
| ShipmentExceptionsApi | shipmentExceptionsList | GET /shipment_exceptions | List Shipment Exceptions |
| ShipmentExceptionsApi | shipmentExceptionsUpdate | PATCH /shipment_exceptions/{shipment_exception_id} | Update a Shipment Exception |
| ShipmentsApi | shipmentsCreate | POST /shipments | Create a Shipment |
| ShipmentsApi | shipmentsGet | GET /shipments/{shipment_id} | Get a Shipment record |
| ShipmentsApi | shipmentsList | GET /shipments | List Shipment records |
| TrackingApi | trackingsGet | GET /trackings/{tracking_number} | Get Tracking Details |
| UploadsApi | uploadsCreate | POST /uploads | Create an Upload |
| UploadsApi | uploadsDelete | DELETE /uploads/{upload_id} | Delete an Upload |
| UploadsApi | uploadsGet | GET /uploads/{upload_id} | Get an Upload |
| UploadsApi | uploadsList | GET /uploads | List Uploads |
| WebhookDeliveriesApi | webhookDeliveriesGet | GET /webhook_deliveries/{webhook_delivery_id} | Get a Webhook Delivery |
| WebhookDeliveriesApi | webhookDeliveriesList | GET /webhook_deliveries | List Webhook Deliveries |
| WebhooksApi | webhooksCreate | POST /webhooks | Create a Webhook |
| WebhooksApi | webhooksDelete | DELETE /webhooks/{webhook_id} | Delete a Webhook |
| WebhooksApi | webhooksGet | GET /webhooks/{webhook_id} | Get a Webhook |
| WebhooksApi | webhooksList | GET /webhooks | List Webhooks |
| WebhooksApi | webhooksPatch | PATCH /webhooks/{webhook_id} | Update a Webhook |
| WebhooksApi | webhooksPost | POST /webhooks/{webhook_id}/ping | Ping a Webhook |
| WebhooksApi | webhooksSecretTokenGet | GET /webhooks/{webhook_id}/secret_token | Get a Webhook Secret Token |
| WebhooksApi | webhooksSecretTokenResetPatch | PATCH /webhooks/{webhook_id}/secret_token/reset | Reset a Webhook Secret Token |
Models
- ApiKey
- ApiKeyList
- ApiKeysCreateRequest
- ApiKeysCreateRequestApiKey
- Attachment
- AttachmentList
- AttachmentsCreateRequest
- AttachmentsCreateRequestAttachment
- BasicError
- BasicErrorErrors
- EmailRule
- EmailRuleList
- EmailRulesCreateRequest
- EmailRulesCreateRequestEmailRule
- EmailRulesUpdateRequest
- EmailRulesUpdateRequestEmailRule
- EmailSubscription
- EmailSubscriptionList
- EmailSubscriptionsCreateRequest
- EmailSubscriptionsCreateRequestEmailSubscription
- EmailSubscriptionsUpdateRequest
- EmailSubscriptionsUpdateRequestEmailSubscription
- HostedSession
- HostedSessionList
- Invoice
- InvoiceList
- InvoicePayment
- InvoicePaymentList
- Location
- LocationContactsInner
- Log
- LogList
- MetadalocationAccessRestrictions200ResponseInner
- MetadataApiVersions200ResponseInner
- MetadataCurrencies200ResponseInner
- MetadataEmailNotifications200ResponseInner
- MetadataInsurances200ResponseInner
- MetadataObjectMaterials200ResponseInner
- MetadataObjects200ResponseInner
- MetadataObjects200ResponseInnerSubtypesInner
- MetadataPackageStatuses200ResponseInner
- MetadataPackings200ResponseInner
- MetadataPackings200ResponseInnerSubtypesInner
- MetadataParcelTransportServices200ResponseInner
- MetadataPaymentProcessTypes200ResponseInner
- MetadataQuotes200ResponseInner
- MetadataRequestStatuses200ResponseInner
- MetadataServices200ResponseInner
- MetadataServices200ResponseInnerSubtypesInner
- MetadataServices200ResponseInnerSubtypesInnerSubSubtypesInner
- MetadataShipmentExceptionTypes200ResponseInner
- MetadataShipmentStatuses200ResponseInner
- NullableLocation
- NullableLocationContactsInner
- Organization
- OrganizationPatchRequest
- OrganizationPatchRequestOrganization
- PaginationMetadata
- Payment
- PaymentList
- Request
- RequestBookable
- RequestDisqualificationsInner
- RequestList
- RequestListItemsInner
- RequestListItemsInnerBookable
- RequestListItemsInnerDestination
- RequestListItemsInnerOrigin
- RequestObjectsInner
- RequestObjectsInnerDetails
- RequestQuotesInner
- RequestQuotesInnerIncludedInsurancePolicy
- RequestQuotesInnerIncludedServicesInner
- RequestQuotesInnerIncludedServicesInnerIncludedServicesInner
- RequestQuotesInnerOptionalServicesInner
- RequestsCreateRequest
- RequestsCreateRequestRequest
- RequestsCreateRequestRequestDestination
- RequestsCreateRequestRequestDestinationContactsInner
- RequestsCreateRequestRequestObjectsInner
- RequestsCreateRequestRequestObjectsInnerDetails
- RequestsCreateRequestRequestOrigin
- RequestsCreateRequestRequestOriginContactsInner
- RequestsCustomRequest
- RequestsUpdateContactsRequest
- RequestsUpdateContactsRequestDestination
- RequestsUpdateContactsRequestDestinationContactsInner
- RequestsUpdateContactsRequestOrigin
- RequestsUpdateContactsRequestOriginContactsInner
- Shipment
- ShipmentExceptionsCreate201Response
- ShipmentExceptionsCreateRequest
- ShipmentExceptionsCreateRequestShipmentException
- ShipmentExceptionsGet200Response
- ShipmentExceptionsInner
- ShipmentExceptionsList200Response
- ShipmentExceptionsList200ResponseItemsInner
- ShipmentExceptionsList200ResponseMetadata
- ShipmentExceptionsUpdate200Response
- ShipmentExceptionsUpdateRequest
- ShipmentExceptionsUpdateRequestShipmentException
- ShipmentInsurancePolicy
- ShipmentList
- ShipmentListItemsInner
- ShipmentListItemsInnerDestination
- ShipmentListItemsInnerOrigin
- ShipmentPackagesInner
- ShipmentPackagesInnerObjectsInner
- ShipmentPackagesInnerObjectsInnerDetails
- ShipmentSchedule
- ShipmentServicesInner
- ShipmentTrackingInner
- ShipmentsCreateRequest
- ShipmentsCreateRequestShipment
- Tracking
- TrackingCarrier
- Upload
- UploadList
- UploadWithPresignedUrl
- UploadsCreateRequest
- UploadsCreateRequestUpload
- Webhook
- WebhookDelivery
- WebhookDeliveryList
- WebhookDeliveryListItem
- WebhookList
- WebhooksCreateRequest
- WebhooksCreateRequestWebhook
- WebhooksPatchRequest
- WebhooksPatchRequestWebhook
- WebhooksSecretTokenGet200Response
- WebhooksSecretTokenResetPatch200Response
Authorization
Authentication schemes defined for the API:
apiKeyAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2021-01-01 - Build package:
org.openapitools.codegen.languages.PhpClientCodegen
crayon/arta-php-sdk 适用场景与选型建议
crayon/arta-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 01 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「openapitools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 crayon/arta-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crayon/arta-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 crayon/arta-php-sdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Alfabank REST API integration
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
BlockCypher's PHP SDK for REST API
Helper classes for creating cookie headers
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: unlicense
- 更新时间: 2024-01-03