Пример #1
0
 protected static function getReferencedEnums()
 {
     $ref_enums = array();
     $ref_enums['Delimiter'] = ProductFeedDelimiterValues::getInstance()->getValues();
     $ref_enums['Encoding'] = ProductFeedEncodingValues::getInstance()->getValues();
     $ref_enums['QuotedFieldsMode'] = ProductFeedQuotedFieldsModeValues::getInstance()->getValues();
     return $ref_enums;
 }
 public function createProductFeed(array $fields = array(), array $params = array(), $pending = false)
 {
     $this->assureId();
     $param_types = array('country' => 'string', 'default_currency' => 'string', 'deletion_enabled' => 'bool', 'delimiter' => 'delimiter_enum', 'encoding' => 'encoding_enum', 'file_name' => 'string', 'name' => 'string', 'quoted_fields_mode' => 'quoted_fields_mode_enum', 'schedule' => 'string');
     $enums = array('delimiter_enum' => ProductFeedDelimiterValues::getInstance()->getValues(), 'encoding_enum' => ProductFeedEncodingValues::getInstance()->getValues(), 'quoted_fields_mode_enum' => ProductFeedQuotedFieldsModeValues::getInstance()->getValues());
     $request = new ApiRequest($this->api, $this->data['id'], RequestInterface::METHOD_POST, '/product_feeds', new ProductFeed(), 'EDGE', ProductFeed::getFieldsEnum()->getValues(), new TypeChecker($param_types, $enums));
     $request->addParams($params);
     $request->addFields($fields);
     return $pending ? $request : $request->execute();
 }