Operation create

Create New Address


@throws \\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \\Resources\\Address
347264
public function create()
    {
        $instance = self::createAddress($this);
        $this->setId($instance->getId());
        return $instance;
    }
19550
public function create()
    {
        /**
         * @var BannerZoneInterface $bannerZone
         */
        $classNamespace = $this->getEntityNamespace();
        $bannerZone = new $classNamespace();
        $bannerZone->setBanners(new ArrayCollection());

        return $bannerZone;
    }
582796
public function create()
    {
        $instance = self::createCountriesGeoZone($this);
        $this->setId($instance->getId());
        return $instance;
    }
408685
public function createAddress(Address $address, array $params = [])
    {
        $this->getClient()->createAccountAddress($this, $address, $params);
    }
528748
public function create() 
    {
        try {            
            $fileData['alias'] = Input::get('filename') ? Input::get('filename') : date('m.d.Y - G:i:s');
            $fileData['type'] = 'folder';
            if(Input::get('pid') > 0) {
                $fileData['parent_id'] = Input::get('pid');
            }
            
            $this->file->create($fileData);

            return response()->json([
                'status' => 'success'
            ]);
        }
        
        catch (Exception $e) {
            return $this->handleError($e);
        }
    }
450545
public function createAddress(int $customerId, Address $address): ?int
    {
        return $this->restClient->createResource(
            $address,
            sprintf(self::CUSTOMER_ADDRESS, $customerId)
        );
    }
311644
public function create()
    {
        $instance = self::createFreeItemCoupon($this);
        $this->setId($instance->getId());
        return $instance;
    }
350552
public function create()
    {
        $instance = self::createCancelOperation($this);
        $this->setId($instance->getId());
        return $instance;
    }
217352
public function create()
    {
        if (empty($this->id)) {
            throw new InvalidException('You should set a valid pipeline id');
        }

        if (empty($this->_params['description'])) {
            throw new InvalidException('You should set a valid processor description.');
        }

        if (empty($this->_processors['processors'])) {
            throw new InvalidException('You should set a valid processor of type Elastica\Processor\AbstractProcessor.');
        }

        $endpoint = new Put();
        $endpoint->setID($this->id);
        $endpoint->setBody($this->toArray());

        return $this->requestEndpoint($endpoint);
    }
702167
public static function create()
	{
		switch (func_num_args()) {
			case 0:
				return new Location();
			case 1:
				return new Location(func_get_arg(0));
			case 2:
				return new Location(func_get_arg(0), func_get_arg(1));
			case 3:
				return new Location(func_get_arg(0), func_get_arg(1), func_get_arg(2));
			case 4:
				return new Location(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3));
			case 5:
				return new Location(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4));
			case 6:
				return new Location(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5));
			case 7:
				return new Location(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6));
			case 8:
				return new Location(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6), func_get_arg(7));
			default:
				throw new \InvalidArgumentException('More than 8 arguments supplied, please be reasonable.');
		}
	}
482188
public function create($address)
    {
        if (is_array($address)) {
            $address = new OrderAddress($address);
        }

        if ($address instanceof OrderAddress) {
            if ($this->fireEvent('creating', array($address)) === false) {
                return false;
            }

            $address->setCaller($this);
            $address->save();

            $this->fireEvent('created', array($address));

            $address = $this->find($address->id);

            return $address;
        }

        throw new Exception(sprintf(Exception::CANT_CREATE_MODEL,
            'Subbly\\Model\\Order',
            $this->name()
        ));
    }
1182985
public function create()
    {
      $data = Ensure::Input(func_get_args());
      $url = URIResource::Make($this->path);
      $id = Locator::Find($this->client->post($url, $data->get()));
      $data->add("id", $id);

      return Constructor::Make($this, $data->get(), TRUE);
    }
787450
protected function create()
    {
        // if user_id and license_key are set then use the web service
        if (array_get($this->config, 'user_id', false)) {
            return $this->createWebClient();
        }

        // if database file is set then use database service
        if (array_get($this->config, 'database', false)) {
            return $this->createDatabase();
        }

        throw new InvalidCredentialsException();
    }
616004
protected function createMessage()
	{
		$message = new Message( new Swift_Message );

		// If a global from address has been specified we will set it on every message
		// instances so the developer does not have to repeat themselves every time
		// they create a new message. We will just go ahead and push the address.
		if ( !empty( $this->from['address'] ) )
		{
			$message->from( $this->from['address'], $this->from['name'] );
		}

		return $message;
	}
789434
public function create()
	{
		try
		{
			$this->client->send(new Request($this->uri->withPath($this->uri->getPath().'resources')
				->withQuery(http_build_query([
					'path' => $this->getPath()
				], null, '&')), 'PUT'));
			$this->setContents([]);
		}
		catch (\Exception $exc)
		{
			throw $exc;
		}

		return $this;
	}
1006616
protected function create()
    {
        $this->user = app(\SuperV\Platform\Domains\Auth\Contracts\User::class)->create([
            'name'    => $this->request['name'],
            'email'    => $this->request['email'],
            'password' => bcrypt($this->request['password']),
        ]);

        return $this;
    }
428715
public function create()
    {
        $instance = self::createReturnOperation($this);
        $this->setId($instance->getId());
        return $instance;
    }