6592 lines
420 KiB
HTML
6592 lines
420 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>RetailCRM API Client</title>
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<base href="../">
|
||
<link rel="icon" href="images/favicon.ico"/>
|
||
<link rel="stylesheet" href="css/normalize.css">
|
||
<link rel="stylesheet" href="css/base.css">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
|
||
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
|
||
<link rel="stylesheet" href="css/template.css">
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
|
||
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
|
||
<script src="js/template.js"></script>
|
||
<script src="js/search.js"></script>
|
||
<script defer src="js/searchIndex.js"></script>
|
||
</head>
|
||
<body id="top">
|
||
<header class="phpdocumentor-header phpdocumentor-section">
|
||
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">RetailCRM API Client</a></h1>
|
||
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
|
||
<label class="phpdocumentor-header__menu-icon" for="menu-button">
|
||
<i class="fas fa-bars"></i>
|
||
</label>
|
||
<section data-search-form class="phpdocumentor-search">
|
||
<label>
|
||
<span class="visually-hidden">Search for</span>
|
||
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
|
||
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
|
||
</svg>
|
||
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
|
||
</label>
|
||
</section>
|
||
|
||
<nav class="phpdocumentor-topnav">
|
||
<ul class="phpdocumentor-topnav__menu">
|
||
</ul>
|
||
</nav>
|
||
</header>
|
||
|
||
<main class="phpdocumentor">
|
||
<div class="phpdocumentor-section">
|
||
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
|
||
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
|
||
Menu
|
||
</label>
|
||
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
|
||
<section class="phpdocumentor-sidebar__category">
|
||
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
|
||
<h4 class="phpdocumentor-sidebar__root-namespace">
|
||
<a href="namespaces/retailcrm.html" class="">RetailCrm</a>
|
||
</h4>
|
||
<ul class="phpdocumentor-list">
|
||
<li>
|
||
<a href="namespaces/retailcrm-api.html" class="">Api</a>
|
||
|
||
</li>
|
||
</ul>
|
||
|
||
</section>
|
||
<section class="phpdocumentor-sidebar__category">
|
||
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
|
||
<h4 class="phpdocumentor-sidebar__root-namespace">
|
||
<a href="packages/RetailCrm.html" class="">RetailCrm</a>
|
||
</h4>
|
||
<ul class="phpdocumentor-list">
|
||
<li>
|
||
<a href="packages/RetailCrm-Api.html" class="">Api</a>
|
||
|
||
</li>
|
||
</ul>
|
||
|
||
<h4 class="phpdocumentor-sidebar__root-namespace">
|
||
<a href="packages/Application.html" class="">Application</a>
|
||
</h4>
|
||
|
||
</section>
|
||
|
||
<section class="phpdocumentor-sidebar__category">
|
||
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
|
||
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
|
||
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
|
||
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
|
||
</section>
|
||
|
||
<section class="phpdocumentor-sidebar__category">
|
||
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
|
||
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
|
||
</section>
|
||
</aside>
|
||
|
||
<div class="phpdocumentor-column -nine phpdocumentor-content">
|
||
<section>
|
||
<ul class="phpdocumentor-breadcrumbs">
|
||
<li class="phpdocumentor-breadcrumb"><a href="namespaces/retailcrm.html">RetailCrm</a></li>
|
||
<li class="phpdocumentor-breadcrumb"><a href="namespaces/retailcrm-api.html">Api</a></li>
|
||
<li class="phpdocumentor-breadcrumb"><a href="namespaces/retailcrm-api-resourcegroup.html">ResourceGroup</a></li>
|
||
</ul>
|
||
|
||
<article class="phpdocumentor-element -class">
|
||
<h2 class="phpdocumentor-content__title">
|
||
References
|
||
|
||
<span class="phpdocumentor-element__extends">
|
||
extends <abbr title="\RetailCrm\Api\ResourceGroup\AbstractApiResourceGroup">AbstractApiResourceGroup</abbr>
|
||
</span>
|
||
|
||
<div class="phpdocumentor-element__package">
|
||
in package
|
||
<ul class="phpdocumentor-breadcrumbs">
|
||
<li class="phpdocumentor-breadcrumb"><a href="packages/RetailCrm.html">RetailCrm</a></li>
|
||
<li class="phpdocumentor-breadcrumb"><a href="packages/RetailCrm-Api.html">Api</a></li>
|
||
<li class="phpdocumentor-breadcrumb"><a href="packages/RetailCrm-Api-ResourceGroup.html">ResourceGroup</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
</h2>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
|
||
|
||
</div>
|
||
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">64</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Class References</p>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">category</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
|
||
<section class="phpdocumentor-description"><p>References</p>
|
||
</section>
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">SuppressWarnings</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
|
||
<section class="phpdocumentor-description"><p>(PHPMD.CouplingBetweenObjects)</p>
|
||
</section>
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">SuppressWarnings</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
|
||
<section class="phpdocumentor-description"><p>(PHPMD.ExcessiveClassLength)</p>
|
||
</section>
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">SuppressWarnings</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
|
||
<section class="phpdocumentor-description"><p>(PHPMD.TooManyMethods)</p>
|
||
</section>
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">SuppressWarnings</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
|
||
<section class="phpdocumentor-description"><p>(PHPMD.TooManyPublicMethods)</p>
|
||
</section>
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
|
||
<h3 id="toc">
|
||
Table of Contents
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h4 id="toc-methods">
|
||
Methods
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<dl class="phpdocumentor-table-of-contents">
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroups">costGroups()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-CostGroupsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CostGroupsResponse">CostGroupsResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/cost-groups" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroupsEdit">costGroupsEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/cost-groups/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItems">costItems()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-CostItemsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CostItemsResponse">CostItemsResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/cost-items" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItemsEdit">costItemsEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/cost-items/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_countries">countries()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-CountriesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CountriesResponse">CountriesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/countries" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriers">couriers()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-CouriersResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CouriersResponse">CouriersResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/couriers" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersCreate">couriersCreate()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-IdResponse.html"><abbr title="\RetailCrm\Api\Model\Response\IdResponse">IdResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/couriers/create" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersEdit">couriersEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/couriers/{id}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currencies">currencies()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-CurrenciesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CurrenciesResponse">CurrenciesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/currencies" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesCreate">currenciesCreate()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-IdResponse.html"><abbr title="\RetailCrm\Api\Model\Response\IdResponse">IdResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/currencies/create" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesEdit">currenciesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/currencies/{id}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServices">deliveryServices()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-DeliveryServicesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\DeliveryServicesResponse">DeliveryServicesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/delivery-services" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServicesEdit">deliveryServicesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/delivery-services/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypes">deliveryTypes()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-DeliveryTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\DeliveryTypesResponse">DeliveryTypesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/delivery-types" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypesEdit">deliveryTypesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/delivery-types/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntities">legalEntities()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-LegalEntitiesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\LegalEntitiesResponse">LegalEntitiesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/legal-entities" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntitiesEdit">legalEntitiesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/legal-entities/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_mgChannels">mgChannels()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-MgChannelsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\MgChannelsResponse">MgChannelsResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/mg-channels" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethods">orderMethods()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-OrderMethodsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\OrderMethodsResponse">OrderMethodsResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/order-methods" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethodsEdit">orderMethodsEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/order-methods/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypes">orderTypes()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-OrderTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\OrderTypesResponse">OrderTypesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/order-types" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypesEdit">orderTypesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/order-types/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatuses">paymentStatuses()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-PaymentStatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PaymentStatusesResponse">PaymentStatusesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/payment-statuses" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatusesEdit">paymentStatusesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/payment-statuses/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypes">paymentTypes()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-PaymentTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PaymentTypesResponse">PaymentTypesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/payment-types" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypesEdit">paymentTypesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/payment-types/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypes">priceTypes()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-PriceTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PriceTypesResponse">PriceTypesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/price-types" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypesEdit">priceTypesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/price-types/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatuses">productStatuses()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-ProductStatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\ProductStatusesResponse">ProductStatusesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/product-statuses" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatusesEdit">productStatusesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/product-statuses/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sites">sites()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-SitesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\SitesResponse">SitesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/sites" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sitesEdit">sitesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/sites/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statuses">statuses()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-StatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StatusesResponse">StatusesResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/statuses" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusesEdit">statusesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/statuses/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusGroups">statusGroups()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-StatusGroupsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StatusGroupsResponse">StatusGroupsResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/status-groups" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_stores">stores()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-StoresResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StoresResponse">StoresResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/stores" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_storesEdit">storesEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/stores/{code}/edit" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_units">units()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-References-UnitsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\UnitsResponse">UnitsResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes GET "/api/v5/reference/units" request.</dd>
|
||
|
||
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_unitsEdit">unitsEdit()</a>
|
||
<span>
|
||
: <a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a> </span>
|
||
</dt>
|
||
<dd>Makes POST "/api/v5/reference/units/{code}/edit" request.</dd>
|
||
|
||
</dl>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="phpdocumentor-methods">
|
||
<h3 class="phpdocumentor-elements__header" id="methods">
|
||
Methods
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h3>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_costGroups">
|
||
costGroups()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroups" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">106</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/cost-groups" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">costGroups</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CostGroupsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CostGroupsResponse">CostGroupsResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->costGroups();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Cost groups: ' . print_r($response->costGroups, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroups#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CostGroupsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CostGroupsResponse">CostGroupsResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_costGroupsEdit">
|
||
costGroupsEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroupsEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">164</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/cost-groups/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">costGroupsEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CostGroupsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CostGroupsEditRequest">CostGroupsEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\CostGroup;
|
||
use RetailCrm\Api\Model\Request\References\CostGroupsEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new CostGroup();
|
||
$entity->name = 'Комиссии';
|
||
$entity->ordering = 60;
|
||
$entity->active = true;
|
||
|
||
try {
|
||
$response = $client->references->costGroupsEdit('commission', new CostGroupsEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CostGroupsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CostGroupsEditRequest">CostGroupsEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroupsEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_costItems">
|
||
costItems()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItems" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">216</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/cost-items" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">costItems</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CostItemsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CostItemsResponse">CostItemsResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->costItems();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Cost items: ' . print_r($response->costItems, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItems#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CostItemsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CostItemsResponse">CostItemsResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_costItemsEdit">
|
||
costItemsEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItemsEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">278</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/cost-items/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">costItemsEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CostItemsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CostItemsEditRequest">CostItemsEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\CostItem;
|
||
use RetailCrm\Api\Model\Request\References\CostItemsEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new CostItem();
|
||
$entity->name = "Test item";
|
||
$entity->group = "product-cost";
|
||
$entity->ordering = 990;
|
||
$entity->active = true;
|
||
$entity->appliesToOrders = true;
|
||
$entity->type = "var";
|
||
$entity->appliesToUsers = false;
|
||
|
||
try {
|
||
$response = $client->references->costItemsEdit('test-item', new CostItemsEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CostItemsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CostItemsEditRequest">CostItemsEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItemsEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_countries">
|
||
countries()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_countries" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">330</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/countries" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">countries</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CountriesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CountriesResponse">CountriesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->countries();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Countries ISO codes: ' . print_r($response->countriesIso, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_countries#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CountriesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CountriesResponse">CountriesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_couriers">
|
||
couriers()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriers" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">382</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/couriers" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">couriers</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CouriersResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CouriersResponse">CouriersResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->couriers();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Couriers: ' . print_r($response->couriers, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriers#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CouriersResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CouriersResponse">CouriersResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_couriersCreate">
|
||
couriersCreate()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersCreate" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">444</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/couriers/create" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">couriersCreate</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CouriersCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CouriersCreateRequest">CouriersCreateRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-IdResponse.html"><abbr title="\RetailCrm\Api\Model\Response\IdResponse">IdResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\Orders\Delivery\CourierPhone;
|
||
use RetailCrm\Api\Model\Entity\References\Courier;
|
||
use RetailCrm\Api\Model\Request\References\CouriersCreateRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Courier();
|
||
$entity->firstName = 'Tester';
|
||
$entity->lastName = 'Tester';
|
||
$entity->phone = new CourierPhone('88005553125');
|
||
|
||
try {
|
||
$response = $client->references->couriersCreate(new CouriersCreateRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Created courier with ID: ' . $response->id;
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CouriersCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CouriersCreateRequest">CouriersCreateRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersCreate#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-IdResponse.html"><abbr title="\RetailCrm\Api\Model\Response\IdResponse">IdResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_couriersEdit">
|
||
couriersEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">503</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/couriers/{id}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">couriersEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int </span><span class="phpdocumentor-signature__argument__name">$id</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CouriersCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CouriersCreateRequest">CouriersCreateRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\Orders\Delivery\CourierPhone;
|
||
use RetailCrm\Api\Model\Entity\References\Courier;
|
||
use RetailCrm\Api\Model\Request\References\CouriersCreateRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Courier();
|
||
$entity->firstName = 'Tester';
|
||
$entity->lastName = 'Courier';
|
||
$entity->phone = new CourierPhone('88005553126');
|
||
|
||
try {
|
||
$response = $client->references->couriersEdit(1, new CouriersCreateRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$id</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">int</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CouriersCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CouriersCreateRequest">CouriersCreateRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_currencies">
|
||
currencies()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currencies" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">555</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/currencies" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">currencies</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CurrenciesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CurrenciesResponse">CurrenciesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->currencies();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Currencies: ' . print_r($response->currencies, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currencies#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-CurrenciesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\CurrenciesResponse">CurrenciesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_currenciesCreate">
|
||
currenciesCreate()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesCreate" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">616</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/currencies/create" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">currenciesCreate</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CurrenciesCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CurrenciesCreateRequest">CurrenciesCreateRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-IdResponse.html"><abbr title="\RetailCrm\Api\Model\Response\IdResponse">IdResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\Currency;
|
||
use RetailCrm\Api\Model\Request\References\CurrenciesCreateRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Currency();
|
||
$entity->code = 'USD';
|
||
$entity->isAutoConvert = true;
|
||
$entity->autoConvertExtraPercent = 5;
|
||
|
||
try {
|
||
$response = $client->references->currenciesCreate(new CurrenciesCreateRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Created currency with ID: ' . $response->id;
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CurrenciesCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CurrenciesCreateRequest">CurrenciesCreateRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesCreate#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-IdResponse.html"><abbr title="\RetailCrm\Api\Model\Response\IdResponse">IdResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_currenciesEdit">
|
||
currenciesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">674</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/currencies/{id}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">currenciesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int </span><span class="phpdocumentor-signature__argument__name">$id</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CurrenciesCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CurrenciesCreateRequest">CurrenciesCreateRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\Currency;
|
||
use RetailCrm\Api\Model\Request\References\CurrenciesCreateRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Currency();
|
||
$entity->code = 'USD';
|
||
$entity->isAutoConvert = true;
|
||
$entity->autoConvertExtraPercent = 10;
|
||
|
||
try {
|
||
$response = $client->references->currenciesEdit(1, new CurrenciesCreateRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$id</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">int</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-CurrenciesCreateRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\CurrenciesCreateRequest">CurrenciesCreateRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_deliveryServices">
|
||
deliveryServices()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServices" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">726</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/delivery-services" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">deliveryServices</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-DeliveryServicesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\DeliveryServicesResponse">DeliveryServicesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->deliveryServices();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Delivery services: ' . print_r($response->deliveryServices, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServices#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-DeliveryServicesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\DeliveryServicesResponse">DeliveryServicesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_deliveryServicesEdit">
|
||
deliveryServicesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServicesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">786</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/delivery-services/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">deliveryServicesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-DeliveryServicesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\DeliveryServicesEditRequest">DeliveryServicesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\DeliveryService;
|
||
use RetailCrm\Api\Model\Request\References\DeliveryServicesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new DeliveryService();
|
||
$entity->name = 'dict-deliveryservices-1571123786';
|
||
$entity->active = false;
|
||
|
||
try {
|
||
$response = $client->references->deliveryServicesEdit(
|
||
'dict-deliveryservices-1571123786',
|
||
new DeliveryServicesEditRequest($entity)
|
||
);
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-DeliveryServicesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\DeliveryServicesEditRequest">DeliveryServicesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServicesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_deliveryTypes">
|
||
deliveryTypes()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypes" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">838</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/delivery-types" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">deliveryTypes</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-DeliveryTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\DeliveryTypesResponse">DeliveryTypesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->deliveryTypes();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Delivery types: ' . print_r($response->deliveryTypes, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypes#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-DeliveryTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\DeliveryTypesResponse">DeliveryTypesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_deliveryTypesEdit">
|
||
deliveryTypesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">904</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/delivery-types/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">deliveryTypesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-DeliveryTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\DeliveryTypesEditRequest">DeliveryTypesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\DeliveryType;
|
||
use RetailCrm\Api\Model\Request\References\DeliveryTypesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new DeliveryType();
|
||
$entity->name = 'Test Type';
|
||
$entity->active = false;
|
||
$entity->defaultCost = 0;
|
||
$entity->defaultNetCost = 0;
|
||
$entity->paymentTypes = [
|
||
'bank-card',
|
||
'bank-transfer',
|
||
'credit',
|
||
'cash',
|
||
'e-money'
|
||
];
|
||
|
||
try {
|
||
$response = $client->references->deliveryTypesEdit('test-type', new DeliveryTypesEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-DeliveryTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\DeliveryTypesEditRequest">DeliveryTypesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_legalEntities">
|
||
legalEntities()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntities" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">956</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/legal-entities" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">legalEntities</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-LegalEntitiesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\LegalEntitiesResponse">LegalEntitiesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->legalEntities();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Legal entities: ' . print_r($response->legalEntities, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntities#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-LegalEntitiesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\LegalEntitiesResponse">LegalEntitiesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_legalEntitiesEdit">
|
||
legalEntitiesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntitiesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1016</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/legal-entities/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">legalEntitiesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-LegalEntityEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\LegalEntityEditRequest">LegalEntityEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Enum\CountryCodeIso3166;
|
||
use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\LegalEntity;
|
||
use RetailCrm\Api\Model\Request\References\LegalEntityEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new LegalEntity();
|
||
$entity->contragentType = "legal-entity";
|
||
$entity->legalName = "Test Entity";
|
||
$entity->countryIso = CountryCodeIso3166::RUSSIAN_FEDERATION;
|
||
$entity->vatRate = "20.00";
|
||
|
||
try {
|
||
$response = $client->references->legalEntitiesEdit('test-entity', new LegalEntityEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-LegalEntityEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\LegalEntityEditRequest">LegalEntityEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntitiesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_mgChannels">
|
||
mgChannels()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_mgChannels" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1068</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/mg-channels" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">mgChannels</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-MgChannelsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\MgChannelsResponse">MgChannelsResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->mgChannels();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'MG Channels: ' . print_r($response->mgChannels, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_mgChannels#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-MgChannelsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\MgChannelsResponse">MgChannelsResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_orderMethods">
|
||
orderMethods()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethods" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1120</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/order-methods" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">orderMethods</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-OrderMethodsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\OrderMethodsResponse">OrderMethodsResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->orderMethods();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Order methods: ' . print_r($response->orderMethods, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethods#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-OrderMethodsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\OrderMethodsResponse">OrderMethodsResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_orderMethodsEdit">
|
||
orderMethodsEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethodsEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1177</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/order-methods/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">orderMethodsEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-OrderMethodsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\OrderMethodsEditRequest">OrderMethodsEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\OrderMethod;
|
||
use RetailCrm\Api\Model\Request\References\OrderMethodsEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new OrderMethod();
|
||
$entity->name = 'Test Method';
|
||
$entity->active = true;
|
||
|
||
try {
|
||
$response = $client->references->orderMethodsEdit('test-method', new OrderMethodsEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-OrderMethodsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\OrderMethodsEditRequest">OrderMethodsEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethodsEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_orderTypes">
|
||
orderTypes()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypes" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1229</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/order-types" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">orderTypes</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-OrderTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\OrderTypesResponse">OrderTypesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->orderTypes();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Order types: ' . print_r($response->orderTypes, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypes#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-OrderTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\OrderTypesResponse">OrderTypesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_orderTypesEdit">
|
||
orderTypesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1286</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/order-types/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">orderTypesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-OrderTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\OrderTypesEditRequest">OrderTypesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\OrderType;
|
||
use RetailCrm\Api\Model\Request\References\OrderTypesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new OrderType();
|
||
$entity->name = 'Test Type';
|
||
$entity->active = true;
|
||
|
||
try {
|
||
$response = $client->references->orderTypesEdit('test-method', new OrderTypesEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-OrderTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\OrderTypesEditRequest">OrderTypesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_paymentStatuses">
|
||
paymentStatuses()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatuses" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1338</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/payment-statuses" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">paymentStatuses</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-PaymentStatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PaymentStatusesResponse">PaymentStatusesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->paymentStatuses();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Payment statuses: ' . print_r($response->paymentStatuses, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatuses#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-PaymentStatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PaymentStatusesResponse">PaymentStatusesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_paymentStatusesEdit">
|
||
paymentStatusesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatusesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1397</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/payment-statuses/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">paymentStatusesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-PaymentStatusesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\PaymentStatusesEditRequest">PaymentStatusesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\PaymentStatus;
|
||
use RetailCrm\Api\Model\Request\References\PaymentStatusesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new PaymentStatus();
|
||
$entity->name = 'Test Status';
|
||
$entity->active = true;
|
||
$entity->ordering = 990;
|
||
$entity->paymentTypes = ['cash'];
|
||
|
||
try {
|
||
$response = $client->references->paymentStatusesEdit('test-status', new PaymentStatusesEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-PaymentStatusesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\PaymentStatusesEditRequest">PaymentStatusesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatusesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_paymentTypes">
|
||
paymentTypes()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypes" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1449</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/payment-types" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">paymentTypes</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-PaymentTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PaymentTypesResponse">PaymentTypesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->paymentTypes();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Payment types: ' . print_r($response->paymentTypes, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypes#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-PaymentTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PaymentTypesResponse">PaymentTypesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_paymentTypesEdit">
|
||
paymentTypesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1519</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/payment-types/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">paymentTypesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-PaymentTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\PaymentTypesEditRequest">PaymentTypesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\PaymentType;
|
||
use RetailCrm\Api\Model\Request\References\PaymentTypesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new PaymentType();
|
||
$entity->name = "Test Integration Payment";
|
||
$entity->code = "test-payment-integration";
|
||
$entity->active = true;
|
||
$entity->defaultForCrm = false;
|
||
$entity->defaultForApi = false;
|
||
$entity->paymentStatuses = [
|
||
"invoice",
|
||
"payment-start",
|
||
"paid",
|
||
"check-refund",
|
||
"check-refund-after"
|
||
];
|
||
|
||
try {
|
||
$response = $client->references->paymentTypesEdit(
|
||
'test-payment-integration',
|
||
new PaymentTypesEditRequest($entity)
|
||
);
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-PaymentTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\PaymentTypesEditRequest">PaymentTypesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_priceTypes">
|
||
priceTypes()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypes" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1571</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/price-types" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">priceTypes</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-PriceTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PriceTypesResponse">PriceTypesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->priceTypes();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Price types: ' . print_r($response->priceTypes, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypes#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-PriceTypesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\PriceTypesResponse">PriceTypesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_priceTypesEdit">
|
||
priceTypesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1629</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/price-types/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">priceTypesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-PriceTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\PriceTypesEditRequest">PriceTypesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\PriceType;
|
||
use RetailCrm\Api\Model\Request\References\PriceTypesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new PriceType();
|
||
$entity->name = "Test Price Type";
|
||
$entity->active = true;
|
||
$entity->ordering = 980;
|
||
|
||
try {
|
||
$response = $client->references->priceTypesEdit('test-price-type', new PriceTypesEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-PriceTypesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\PriceTypesEditRequest">PriceTypesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_productStatuses">
|
||
productStatuses()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatuses" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1681</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/product-statuses" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">productStatuses</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-ProductStatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\ProductStatusesResponse">ProductStatusesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->productStatuses();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Product statuses: ' . print_r($response->productStatuses, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatuses#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-ProductStatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\ProductStatusesResponse">ProductStatusesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_productStatusesEdit">
|
||
productStatusesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatusesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1742</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/product-statuses/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">productStatusesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-ProductStatusesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\ProductStatusesEditRequest">ProductStatusesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\OrderProductStatus;
|
||
use RetailCrm\Api\Model\Request\References\ProductStatusesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new OrderProductStatus();
|
||
$entity->name = "Test Product Status";
|
||
$entity->active = true;
|
||
$entity->ordering = 980;
|
||
|
||
try {
|
||
$response = $client->references->productStatusesEdit(
|
||
'test-product-status',
|
||
new ProductStatusesEditRequest($entity)
|
||
);
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-ProductStatusesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\ProductStatusesEditRequest">ProductStatusesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatusesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_sites">
|
||
sites()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sites" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1794</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/sites" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">sites</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-SitesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\SitesResponse">SitesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->sites();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Sites: ' . print_r($response->sites, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sites#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-SitesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\SitesResponse">SitesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_sitesEdit">
|
||
sitesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sitesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1857</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/sites/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">sitesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-SitesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\SitesEditRequest">SitesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Enum\CountryCodeIso3166;
|
||
use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\Site;
|
||
use RetailCrm\Api\Model\Request\References\SitesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Site();
|
||
$entity->name = "Test Shop";
|
||
$entity->url = "https://example.com";
|
||
$entity->defaultForCrm = false;
|
||
$entity->ymlUrl = "https://example.com/test_catalog.xml";
|
||
$entity->loadFromYml = true;
|
||
$entity->countryIso = CountryCodeIso3166::RUSSIAN_FEDERATION;
|
||
$entity->contragentCode = 'test-contragent';
|
||
|
||
try {
|
||
$response = $client->references->sitesEdit('test-site', new SitesEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-SitesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\SitesEditRequest">SitesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sitesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_statuses">
|
||
statuses()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statuses" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1961</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/statuses" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">statuses</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-StatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StatusesResponse">StatusesResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->statuses();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Statuses: ' . print_r($response->statuses, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statuses#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-StatusesResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StatusesResponse">StatusesResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_statusesEdit">
|
||
statusesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">2020</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/statuses/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">statusesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-StatusesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\StatusesEditRequest">StatusesEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\Status;
|
||
use RetailCrm\Api\Model\Request\References\StatusesEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Status();
|
||
$entity->name = "Test Status";
|
||
$entity->active = true;
|
||
$entity->ordering = 990;
|
||
$entity->group = "assembling";
|
||
|
||
try {
|
||
$response = $client->references->statusesEdit('test', new StatusesEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-StatusesEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\StatusesEditRequest">StatusesEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_statusGroups">
|
||
statusGroups()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusGroups" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">1909</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/status-groups" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">statusGroups</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-StatusGroupsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StatusGroupsResponse">StatusGroupsResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->statusGroups();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Status groups: ' . print_r($response->statusGroups, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusGroups#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-StatusGroupsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StatusGroupsResponse">StatusGroupsResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_stores">
|
||
stores()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_stores" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">2072</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/stores" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">stores</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-StoresResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StoresResponse">StoresResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->stores();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Stores: ' . print_r($response->stores, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_stores#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-StoresResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\StoresResponse">StoresResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_storesEdit">
|
||
storesEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_storesEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">2157</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/stores/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">storesEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-StoresEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\StoresEditRequest">StoresEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Enum\Reference\StoreInventoryType;
|
||
use RetailCrm\Api\Enum\Reference\StoreType;
|
||
use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Callback\Entity\Delivery\SerializedStoreWeekOpeningHours;
|
||
use RetailCrm\Api\Model\Callback\Entity\Delivery\StoreWorkTime;
|
||
use RetailCrm\Api\Model\Entity\References\Store;
|
||
use RetailCrm\Api\Model\Entity\References\StoreAddress;
|
||
use RetailCrm\Api\Model\Entity\References\StorePhone;
|
||
use RetailCrm\Api\Model\Request\References\StoresEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new Store();
|
||
$entity->address = new StoreAddress();
|
||
$entity->address->countryIso = "UA";
|
||
$entity->address->region = "Винницкая область";
|
||
$entity->address->regionId = 104;
|
||
$entity->address->city = "Винница";
|
||
$entity->address->cityId = 16054;
|
||
$entity->address->cityType = "г.";
|
||
$entity->address->street = "Аграрна";
|
||
$entity->address->streetId = 1814071;
|
||
$entity->address->streetType = "ул.";
|
||
$entity->address->building = "12";
|
||
$entity->address->text = "ул. Аграрна, д. 12";
|
||
$entity->workTime = new SerializedStoreWeekOpeningHours(
|
||
[new StoreWorkTime('9:00', '18:00', '12:00', '13:00')],
|
||
[new StoreWorkTime('9:00', '18:00', '12:00', '13:00')],
|
||
[new StoreWorkTime('9:00', '18:00', '12:00', '13:00')],
|
||
[new StoreWorkTime('9:00', '18:00', '12:00', '13:00')],
|
||
[new StoreWorkTime('9:00', '18:00', '12:00', '13:00')]
|
||
);
|
||
$entity->type = StoreType::STORE_TYPE_WAREHOUSE;
|
||
$entity->inventoryType = StoreInventoryType::INTEGER;
|
||
$entity->active = true;
|
||
$entity->phone = new StorePhone('88005553123');
|
||
$entity->name = 'Test Store';
|
||
|
||
try {
|
||
$response = $client->references->storesEdit('test', new StoresEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-StoresEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\StoresEditRequest">StoresEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_storesEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_units">
|
||
units()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_units" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">2209</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes GET "/api/v5/reference/units" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">units</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-UnitsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\UnitsResponse">UnitsResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
try {
|
||
$response = $client->references->units();
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
|
||
return;
|
||
}
|
||
|
||
echo 'Units: ' . print_r($response->units, true);
|
||
</code></pre>
|
||
</section>
|
||
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_units#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-References-UnitsResponse.html"><abbr title="\RetailCrm\Api\Model\Response\References\UnitsResponse">UnitsResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
<article
|
||
class="phpdocumentor-element
|
||
-method
|
||
-public
|
||
"
|
||
>
|
||
<h4 class="phpdocumentor-element__name" id="method_unitsEdit">
|
||
unitsEdit()
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_unitsEdit" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h4>
|
||
<aside class="phpdocumentor-element-found-in">
|
||
<abbr class="phpdocumentor-element-found-in__file" title="src/ResourceGroup/References.php"><a href="files/src-resourcegroup-references.html"><abbr title="src/ResourceGroup/References.php">References.php</abbr></a></abbr>
|
||
:
|
||
<span class="phpdocumentor-element-found-in__line">2267</span>
|
||
|
||
</aside>
|
||
|
||
<p class="phpdocumentor-summary">Makes POST "/api/v5/reference/units/{code}/edit" request.</p>
|
||
|
||
<code class="phpdocumentor-code phpdocumentor-signature ">
|
||
<span class="phpdocumentor-signature__visibility">public</span>
|
||
<span class="phpdocumentor-signature__name">unitsEdit</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$code</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-UnitsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\UnitsEditRequest">UnitsEditRequest</abbr></a> </span><span class="phpdocumentor-signature__argument__name">$request</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span></code>
|
||
|
||
<div class="phpdocumentor-label-line">
|
||
</div>
|
||
<section class="phpdocumentor-description"><p>Example:</p>
|
||
<pre class="prettyprint"><code class="language-php">use RetailCrm\Api\Factory\SimpleClientFactory;
|
||
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
|
||
use RetailCrm\Api\Model\Entity\References\SerializedUnit;
|
||
use RetailCrm\Api\Model\Request\References\UnitsEditRequest;
|
||
|
||
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
|
||
|
||
$entity = new SerializedUnit();
|
||
$entity->name = "Бобина";
|
||
$entity->sym = "боб";
|
||
$entity->active = true;
|
||
|
||
try {
|
||
$response = $client->references->unitsEdit('nbb', new UnitsEditRequest($entity));
|
||
} catch (ApiExceptionInterface $exception) {
|
||
echo sprintf(
|
||
'Error from RetailCRM API (status code: %d): %s',
|
||
$exception->getStatusCode(),
|
||
$exception->getMessage()
|
||
);
|
||
|
||
if (count($exception->getErrorResponse()->errors) > 0) {
|
||
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
|
||
}
|
||
}
|
||
</code></pre>
|
||
</section>
|
||
|
||
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
|
||
<dl class="phpdocumentor-argument-list">
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$code</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-argument-list__entry">
|
||
<span class="phpdocumentor-signature__argument__name">$request</span>
|
||
: <span class="phpdocumentor-signature__argument__return-type"><a href="classes/RetailCrm-Api-Model-Request-References-UnitsEditRequest.html"><abbr title="\RetailCrm\Api\Model\Request\References\UnitsEditRequest">UnitsEditRequest</abbr></a></span>
|
||
</dt>
|
||
<dd class="phpdocumentor-argument-list__definition">
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
|
||
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
||
Tags
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_unitsEdit#tags" class="headerlink"><i class="fas fa-link"></i></a>
|
||
|
||
</h5>
|
||
<dl class="phpdocumentor-tag-list">
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ApiExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ApiExceptionInterface">ApiExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Interfaces-ClientExceptionInterface.html"><abbr title="\RetailCrm\Api\Interfaces\ClientExceptionInterface">ClientExceptionInterface</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-AccountDoesNotExistException.html"><abbr title="\RetailCrm\Api\Exception\Api\AccountDoesNotExistException">AccountDoesNotExistException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ApiErrorException.html"><abbr title="\RetailCrm\Api\Exception\Api\ApiErrorException">ApiErrorException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingCredentialsException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingCredentialsException">MissingCredentialsException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-MissingParameterException.html"><abbr title="\RetailCrm\Api\Exception\Api\MissingParameterException">MissingParameterException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Api-ValidationException.html"><abbr title="\RetailCrm\Api\Exception\Api\ValidationException">ValidationException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HandlerException.html"><abbr title="\RetailCrm\Api\Exception\Client\HandlerException">HandlerException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
<dt class="phpdocumentor-tag-list__entry">
|
||
<span class="phpdocumentor-tag__name">throws</span>
|
||
</dt>
|
||
<dd class="phpdocumentor-tag-list__definition">
|
||
<span class="phpdocumentor-tag-link"><a href="classes/RetailCrm-Api-Exception-Client-HttpClientException.html"><abbr title="\RetailCrm\Api\Exception\Client\HttpClientException">HttpClientException</abbr></a></span>
|
||
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<section>
|
||
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
||
<span class="phpdocumentor-signature__response_type"><a href="classes/RetailCrm-Api-Model-Response-SuccessResponse.html"><abbr title="\RetailCrm\Api\Model\Response\SuccessResponse">SuccessResponse</abbr></a></span>
|
||
</section>
|
||
|
||
</article>
|
||
</section>
|
||
|
||
<div class="phpdocumentor-modal" id="source-view">
|
||
<div class="phpdocumentor-modal-bg" data-exit-button></div>
|
||
<div class="phpdocumentor-modal-container">
|
||
<div class="phpdocumentor-modal-content">
|
||
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/ResourceGroup/References.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
|
||
</div>
|
||
<button data-exit-button class="phpdocumentor-modal__close">×</button>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
(function () {
|
||
function loadExternalCodeSnippet(el, url, line) {
|
||
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
|
||
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
|
||
const language = 'php';
|
||
|
||
const code = document.createElement('code');
|
||
code.className = 'language-' + language;
|
||
pre.textContent = '';
|
||
pre.setAttribute('data-line', line)
|
||
code.textContent = 'Loading…';
|
||
pre.appendChild(code);
|
||
|
||
var xhr = new XMLHttpRequest();
|
||
|
||
xhr.open('GET', src, true);
|
||
|
||
xhr.onreadystatechange = function () {
|
||
if (xhr.readyState !== 4) {
|
||
return;
|
||
}
|
||
|
||
if (xhr.status < 400 && xhr.responseText) {
|
||
code.textContent = xhr.responseText;
|
||
Prism.highlightElement(code);
|
||
return;
|
||
}
|
||
|
||
if (xhr.status === 404) {
|
||
code.textContent = '✖ Error: File could not be found';
|
||
return;
|
||
}
|
||
|
||
if (xhr.status >= 400) {
|
||
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
|
||
return;
|
||
}
|
||
|
||
code.textContent = '✖ Error: An unknown error occurred';
|
||
};
|
||
|
||
xhr.send(null);
|
||
});
|
||
}
|
||
|
||
const modalButtons = document.querySelectorAll("[data-modal]");
|
||
const openedAsLocalFile = window.location.protocol === 'file:';
|
||
if (modalButtons.length > 0 && openedAsLocalFile) {
|
||
console.warn(
|
||
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
|
||
'browsers block XHR requests when a page is opened this way'
|
||
);
|
||
}
|
||
|
||
modalButtons.forEach(function (trigger) {
|
||
if (openedAsLocalFile) {
|
||
trigger.setAttribute("hidden", "hidden");
|
||
}
|
||
|
||
trigger.addEventListener("click", function (event) {
|
||
event.preventDefault();
|
||
const modal = document.getElementById(trigger.dataset.modal);
|
||
if (!modal) {
|
||
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
|
||
return;
|
||
}
|
||
modal.classList.add("phpdocumentor-modal__open");
|
||
|
||
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
|
||
const exits = modal.querySelectorAll("[data-exit-button]");
|
||
exits.forEach(function (exit) {
|
||
exit.addEventListener("click", function (event) {
|
||
event.preventDefault();
|
||
modal.classList.remove("phpdocumentor-modal__open");
|
||
});
|
||
});
|
||
});
|
||
});
|
||
})();
|
||
</script>
|
||
|
||
</article>
|
||
</section>
|
||
<section class="phpdocumentor-on-this-page__sidebar">
|
||
|
||
<section class="phpdocumentor-on-this-page__content">
|
||
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
|
||
|
||
<ul class="phpdocumentor-list -clean">
|
||
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
|
||
<li>
|
||
<ul class="phpdocumentor-list -clean">
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#toc-methods">Methods</a></li>
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
|
||
<li>
|
||
<ul class="phpdocumentor-list -clean">
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroups">costGroups()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costGroupsEdit">costGroupsEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItems">costItems()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_costItemsEdit">costItemsEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_countries">countries()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriers">couriers()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersCreate">couriersCreate()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_couriersEdit">couriersEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currencies">currencies()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesCreate">currenciesCreate()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_currenciesEdit">currenciesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServices">deliveryServices()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryServicesEdit">deliveryServicesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypes">deliveryTypes()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_deliveryTypesEdit">deliveryTypesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntities">legalEntities()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_legalEntitiesEdit">legalEntitiesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_mgChannels">mgChannels()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethods">orderMethods()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderMethodsEdit">orderMethodsEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypes">orderTypes()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_orderTypesEdit">orderTypesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatuses">paymentStatuses()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentStatusesEdit">paymentStatusesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypes">paymentTypes()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_paymentTypesEdit">paymentTypesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypes">priceTypes()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_priceTypesEdit">priceTypesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatuses">productStatuses()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_productStatusesEdit">productStatusesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sites">sites()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_sitesEdit">sitesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statuses">statuses()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusesEdit">statusesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_statusGroups">statusGroups()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_stores">stores()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_storesEdit">storesEdit()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_units">units()</a></li>
|
||
<li><a href="classes/RetailCrm-Api-ResourceGroup-References.html#method_unitsEdit">unitsEdit()</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
|
||
</section>
|
||
</div>
|
||
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
|
||
<section class="phpdocumentor-search-results__dialog">
|
||
<header class="phpdocumentor-search-results__header">
|
||
<h2 class="phpdocumentor-search-results__title">Search results</h2>
|
||
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
|
||
</header>
|
||
<section class="phpdocumentor-search-results__body">
|
||
<ul class="phpdocumentor-search-results__entries"></ul>
|
||
</section>
|
||
</section>
|
||
</section>
|
||
</div>
|
||
<a href="classes/RetailCrm-Api-ResourceGroup-References.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
|
||
|
||
</main>
|
||
|
||
<script>
|
||
cssVars({});
|
||
</script>
|
||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
|
||
</body>
|
||
</html>
|