Overview

Namespaces

  • Html2Text
  • Izberg
    • Exception
    • Resource
      • Category

Classes

  • Html2Text\Html2Text
  • Izberg\Helper
  • Izberg\Izberg
  • Izberg\Resource
  • Izberg\Resource\Address
  • Izberg\Resource\Application
  • Izberg\Resource\ApplicationCategory
  • Izberg\Resource\Attributes
  • Izberg\Resource\BillingAddress
  • Izberg\Resource\Brand
  • Izberg\Resource\Carrier
  • Izberg\Resource\Cart
  • Izberg\Resource\CartItem
  • Izberg\Resource\CartShippingChoice
  • Izberg\Resource\Category
  • Izberg\Resource\Category\CategoryAbstract
  • Izberg\Resource\Country
  • Izberg\Resource\CoverImage
  • Izberg\Resource\Currency
  • Izberg\Resource\Discount
  • Izberg\Resource\ExtraInfo
  • Izberg\Resource\Feed
  • Izberg\Resource\LocaleConfig
  • Izberg\Resource\Merchant
  • Izberg\Resource\MerchantAddress
  • Izberg\Resource\MerchantImage
  • Izberg\Resource\MerchantOrder
  • Izberg\Resource\MerchantReview
  • Izberg\Resource\Message
  • Izberg\Resource\Meta
  • Izberg\Resource\Offer
  • Izberg\Resource\OfferImage
  • Izberg\Resource\Order
  • Izberg\Resource\OrderItem
  • Izberg\Resource\Payment
  • Izberg\Resource\PaymentCardAlias
  • Izberg\Resource\Product
  • Izberg\Resource\ProductAttribute
  • Izberg\Resource\ProductBrand
  • Izberg\Resource\ProductChannel
  • Izberg\Resource\ProductChannelFileOutput
  • Izberg\Resource\Productoffer
  • Izberg\Resource\ProductOfferVariation
  • Izberg\Resource\ProductVariation
  • Izberg\Resource\ProfileImage
  • Izberg\Resource\Receiver
  • Izberg\Resource\ReturnRequest
  • Izberg\Resource\Review
  • Izberg\Resource\Sender
  • Izberg\Resource\ShippingAddress
  • Izberg\Resource\ShippingMerchantTemplate
  • Izberg\Resource\ShippingProvider
  • Izberg\Resource\ShippingProviderAssignment
  • Izberg\Resource\ShoppingPreference
  • Izberg\Resource\User
  • Izberg\Resource\Webhook

Exceptions

  • Izberg\Exception\BadRequestException
  • Izberg\Exception\ForbiddenException
  • Izberg\Exception\GenericException
  • Izberg\Exception\HttpException
  • Izberg\Exception\InternalErrorException
  • Izberg\Exception\MethodNotAllowedException
  • Izberg\Exception\NotFoundException
  • Izberg\Exception\UnauthorizedException
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Izberg\Resource;
 3: use Izberg\Resource;
 4: 
 5: class Merchant extends Resource
 6: {
 7:     public function get_list($params, $accept_type) {
 8:         return self::$Izberg->Call("application/" . self::$Izberg->getAppNamespace() . "/merchants/", 'GET', $params, $accept_type);
 9:     }
10: 
11:     public function get_catalog($merchant_id = null, $params = null, $accept_type = 'Accept: application/xml')
12:     {
13:         if (!$merchant_id)
14:             $merchant_id = $this->id;
15:         $channel = $this->get_channel($merchant_id);
16:         return self::$Izberg->Call("product_channel/" . $channel->id . "/viewer/?format=xml", 'GET', $params, $accept_type);
17:     }
18: 
19:     public function get_channel($merchant_id = null, $params = null)
20:     {
21:         if (!$merchant_id)
22:             $merchant_id = $this->id;
23:         return self::$Izberg->Call("merchant/".$merchant_id."/active_products_channel/", 'GET', $params);
24:     }
25: 
26:     public function getCurrent($api_key = '')
27:     {
28:         if ($this->id && $api_key == '')
29:             return $this;
30:         try
31:         {
32:             $seller = self::$Izberg->Call("merchant/", 'GET', array('api_key' => $api_key));
33:         }
34:         catch (Exception\GenericException $e)
35:         {
36:             $seller = false;
37:         }
38:         if (!isset($seller->meta->total_count))
39:             $seller = false;
40:         else if ($seller->meta->total_count == 0)
41:             $seller = false;
42:         else
43:             $this->hydrate($seller->objects[0]);
44:         return $this;
45:     }
46: 
47:     public function getCatalog($params = null, $accept_type = 'Accept: application/xml')
48:     {
49:         return $this->get_catalog($this->id, $params , $accept_type);
50:     }
51: }
52: 
API documentation generated by ApiGen