diff --git a/.konfig/generate-id.txt b/.konfig/generate-id.txt index 5d23be2..bc725cd 100644 --- a/.konfig/generate-id.txt +++ b/.konfig/generate-id.txt @@ -1 +1 @@ -9be05c51-16c8-489a-aa9b-10ffc9752007 \ No newline at end of file +6d5dfc92-f988-4c4c-b849-3fd5e6ebadf4 \ No newline at end of file diff --git a/README.md b/README.md index 5816286..c956f8f 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Connect brokerage accounts to your app for live positions and trading * [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2) * [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2) * [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2) - * [`snaptrade.options.getOptionQuote`](#snaptradeoptionsgetoptionquote) + * [`snaptrade.options.getUserAccountOptionQuotes`](#snaptradeoptionsgetuseraccountoptionquotes) * [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings) * [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair) * [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo) @@ -1432,16 +1432,17 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to --- -### `snaptrade.options.getOptionQuote` +### `snaptrade.options.getUserAccountOptionQuotes` -Returns a real-time quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) +Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) +**Note:** These are derived values and are not suitable for trading purposes. #### 🛠️ Usage ```php -$result = $snaptrade->options->getOptionQuote( +$result = $snaptrade->options->getUserAccountOptionQuotes( user_id: "snaptrade-user-123", user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61", account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631", @@ -2011,7 +2012,7 @@ $result = $snaptrade->trading->getCryptocurrencyPairQuote( ### `snaptrade.trading.getOptionImpact` Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. -Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.notion.site/brokerages) for more information on which brokerages support this endpoint. +Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint. diff --git a/lib/Api/OptionsApi.php b/lib/Api/OptionsApi.php index fb81719..c44e6b3 100644 --- a/lib/Api/OptionsApi.php +++ b/lib/Api/OptionsApi.php @@ -62,7 +62,7 @@ class OptionsApi extends \SnapTrade\CustomApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'getOptionQuote' => [ + 'getUserAccountOptionQuotes' => [ 'application/json', ], 'listOptionHoldings' => [ @@ -139,56 +139,56 @@ private function setRequestBodyProperty(&$body, $property, $value) { } /** - * Operation getOptionQuote + * Operation getUserAccountOptionQuotes * * Get option quote * - * Returns a real-time quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) + * Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. * * @param string $user_id user_id (required) * @param string $user_secret user_secret (required) * @param string $account_id account_id (required) * @param string $symbol The OCC-formatted option symbol. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOptionQuote'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserAccountOptionQuotes'] to see the possible values for this operation * * @throws \SnapTrade\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \SnapTrade\Model\OptionQuote|\SnapTrade\Model\Model404FailedRequestResponse|\SnapTrade\Model\Model500UnexpectedExceptionResponse */ - public function getOptionQuote( + public function getUserAccountOptionQuotes( $user_id, $user_secret, $account_id, $symbol, - string $contentType = self::contentTypes['getOptionQuote'][0] + string $contentType = self::contentTypes['getUserAccountOptionQuotes'][0] ) { - list($response) = $this->getOptionQuoteWithHttpInfo($user_id, $user_secret, $account_id, $symbol, $contentType); + list($response) = $this->getUserAccountOptionQuotesWithHttpInfo($user_id, $user_secret, $account_id, $symbol, $contentType); return $response; } /** - * Operation getOptionQuoteWithHttpInfo + * Operation getUserAccountOptionQuotesWithHttpInfo * * Get option quote * - * Returns a real-time quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) + * Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. * * @param string $user_id (required) * @param string $user_secret (required) * @param string $account_id (required) * @param string $symbol The OCC-formatted option symbol. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOptionQuote'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserAccountOptionQuotes'] to see the possible values for this operation * * @throws \SnapTrade\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \SnapTrade\Model\OptionQuote|\SnapTrade\Model\Model404FailedRequestResponse|\SnapTrade\Model\Model500UnexpectedExceptionResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getOptionQuoteWithHttpInfo($user_id, $user_secret, $account_id, $symbol, string $contentType = self::contentTypes['getOptionQuote'][0], \SnapTrade\RequestOptions $requestOptions = new \SnapTrade\RequestOptions()) + public function getUserAccountOptionQuotesWithHttpInfo($user_id, $user_secret, $account_id, $symbol, string $contentType = self::contentTypes['getUserAccountOptionQuotes'][0], \SnapTrade\RequestOptions $requestOptions = new \SnapTrade\RequestOptions()) { - ["request" => $request, "serializedBody" => $serializedBody] = $this->getOptionQuoteRequest($user_id, $user_secret, $account_id, $symbol, $contentType); + ["request" => $request, "serializedBody" => $serializedBody] = $this->getUserAccountOptionQuotesRequest($user_id, $user_secret, $account_id, $symbol, $contentType); // Customization hook $this->beforeSendHook($request, $requestOptions, $this->config); @@ -203,7 +203,7 @@ public function getOptionQuoteWithHttpInfo($user_id, $user_secret, $account_id, !empty($this->getConfig()->getAccessToken()) && $requestOptions->shouldRetryOAuth() ) { - return $this->getOptionQuoteWithHttpInfo( + return $this->getUserAccountOptionQuotesWithHttpInfo( $user_id, $user_secret, $account_id, @@ -339,32 +339,32 @@ public function getOptionQuoteWithHttpInfo($user_id, $user_secret, $account_id, } /** - * Operation getOptionQuoteAsync + * Operation getUserAccountOptionQuotesAsync * * Get option quote * - * Returns a real-time quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) + * Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. * * @param string $user_id (required) * @param string $user_secret (required) * @param string $account_id (required) * @param string $symbol The OCC-formatted option symbol. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOptionQuote'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserAccountOptionQuotes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOptionQuoteAsync( + public function getUserAccountOptionQuotesAsync( $user_id, $user_secret, $account_id, $symbol, - string $contentType = self::contentTypes['getOptionQuote'][0] + string $contentType = self::contentTypes['getUserAccountOptionQuotes'][0] ) { - return $this->getOptionQuoteAsyncWithHttpInfo($user_id, $user_secret, $account_id, $symbol, $contentType) + return $this->getUserAccountOptionQuotesAsyncWithHttpInfo($user_id, $user_secret, $account_id, $symbol, $contentType) ->then( function ($response) { return $response[0]; @@ -373,25 +373,25 @@ function ($response) { } /** - * Operation getOptionQuoteAsyncWithHttpInfo + * Operation getUserAccountOptionQuotesAsyncWithHttpInfo * * Get option quote * - * Returns a real-time quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) + * Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes. * * @param string $user_id (required) * @param string $user_secret (required) * @param string $account_id (required) * @param string $symbol The OCC-formatted option symbol. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOptionQuote'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserAccountOptionQuotes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOptionQuoteAsyncWithHttpInfo($user_id, $user_secret, $account_id, $symbol, string $contentType = self::contentTypes['getOptionQuote'][0], \SnapTrade\RequestOptions $requestOptions = new \SnapTrade\RequestOptions()) + public function getUserAccountOptionQuotesAsyncWithHttpInfo($user_id, $user_secret, $account_id, $symbol, string $contentType = self::contentTypes['getUserAccountOptionQuotes'][0], \SnapTrade\RequestOptions $requestOptions = new \SnapTrade\RequestOptions()) { $returnType = '\SnapTrade\Model\OptionQuote'; - ["request" => $request, "serializedBody" => $serializedBody] = $this->getOptionQuoteRequest($user_id, $user_secret, $account_id, $symbol, $contentType); + ["request" => $request, "serializedBody" => $serializedBody] = $this->getUserAccountOptionQuotesRequest($user_id, $user_secret, $account_id, $symbol, $contentType); // Customization hook $this->beforeSendHook($request, $requestOptions, $this->config); @@ -433,18 +433,18 @@ function ($exception) { } /** - * Create request for operation 'getOptionQuote' + * Create request for operation 'getUserAccountOptionQuotes' * * @param string $user_id (required) * @param string $user_secret (required) * @param string $account_id (required) * @param string $symbol The OCC-formatted option symbol. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getOptionQuote'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getUserAccountOptionQuotes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOptionQuoteRequest($user_id, $user_secret, $account_id, $symbol, string $contentType = self::contentTypes['getOptionQuote'][0]) + public function getUserAccountOptionQuotesRequest($user_id, $user_secret, $account_id, $symbol, string $contentType = self::contentTypes['getUserAccountOptionQuotes'][0]) { // Check if $user_id is a string @@ -454,7 +454,7 @@ public function getOptionQuoteRequest($user_id, $user_secret, $account_id, $symb // verify the required parameter 'user_id' is set if ($user_id === SENTINEL_VALUE || (is_array($user_id) && count($user_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter user_id when calling getOptionQuote' + 'Missing the required parameter user_id when calling getUserAccountOptionQuotes' ); } // Check if $user_secret is a string @@ -464,7 +464,7 @@ public function getOptionQuoteRequest($user_id, $user_secret, $account_id, $symb // verify the required parameter 'user_secret' is set if ($user_secret === SENTINEL_VALUE || (is_array($user_secret) && count($user_secret) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter user_secret when calling getOptionQuote' + 'Missing the required parameter user_secret when calling getUserAccountOptionQuotes' ); } // Check if $account_id is a string @@ -474,7 +474,7 @@ public function getOptionQuoteRequest($user_id, $user_secret, $account_id, $symb // verify the required parameter 'account_id' is set if ($account_id === SENTINEL_VALUE || (is_array($account_id) && count($account_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter account_id when calling getOptionQuote' + 'Missing the required parameter account_id when calling getUserAccountOptionQuotes' ); } // Check if $symbol is a string @@ -484,7 +484,7 @@ public function getOptionQuoteRequest($user_id, $user_secret, $account_id, $symb // verify the required parameter 'symbol' is set if ($symbol === SENTINEL_VALUE || (is_array($symbol) && count($symbol) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter symbol when calling getOptionQuote' + 'Missing the required parameter symbol when calling getUserAccountOptionQuotes' ); } diff --git a/lib/Api/TradingApi.php b/lib/Api/TradingApi.php index 84708ac..835ee30 100644 --- a/lib/Api/TradingApi.php +++ b/lib/Api/TradingApi.php @@ -1578,7 +1578,7 @@ public function getCryptocurrencyPairQuoteRequest($user_id, $user_secret, $accou * * Get option order impact * - * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.notion.site/brokerages) for more information on which brokerages support this endpoint. + * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint. * * @param string $user_id user_id (required) * @param string $user_secret user_secret (required) @@ -1622,7 +1622,7 @@ public function getOptionImpact( * * Get option order impact * - * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.notion.site/brokerages) for more information on which brokerages support this endpoint. + * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint. * * @param string $user_id (required) * @param string $user_secret (required) @@ -1791,7 +1791,7 @@ public function getOptionImpactWithHttpInfo($user_id, $user_secret, $account_id, * * Get option order impact * - * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.notion.site/brokerages) for more information on which brokerages support this endpoint. + * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint. * * @param string $user_id (required) * @param string $user_secret (required) @@ -1838,7 +1838,7 @@ function ($response) { * * Get option order impact * - * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.notion.site/brokerages) for more information on which brokerages support this endpoint. + * Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint. * * @param string $user_id (required) * @param string $user_secret (required) diff --git a/lib/Model/OptionQuote.php b/lib/Model/OptionQuote.php index a77bf2f..7e737b1 100644 --- a/lib/Model/OptionQuote.php +++ b/lib/Model/OptionQuote.php @@ -52,17 +52,10 @@ class OptionQuote implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'symbol' => 'string', - 'bid_price' => 'float', - 'bid_size' => 'int', - 'ask_price' => 'float', - 'ask_size' => 'int', - 'last_price' => 'float', - 'last_size' => 'int', - 'open_interest' => 'int', - 'volume' => 'int', + 'synthetic_price' => 'float', 'implied_volatility' => 'float', - 'underlying_price' => 'float', - 'timestamp' => '\DateTime' + 'timestamp' => '\DateTime', + 'greeks' => '\SnapTrade\Model\OptionQuoteGreeks' ]; /** @@ -74,17 +67,10 @@ class OptionQuote implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'symbol' => null, - 'bid_price' => null, - 'bid_size' => null, - 'ask_price' => null, - 'ask_size' => null, - 'last_price' => null, - 'last_size' => null, - 'open_interest' => null, - 'volume' => null, + 'synthetic_price' => null, 'implied_volatility' => null, - 'underlying_price' => null, - 'timestamp' => 'date-time' + 'timestamp' => 'date-time', + 'greeks' => null ]; /** @@ -94,17 +80,10 @@ class OptionQuote implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'symbol' => false, - 'bid_price' => false, - 'bid_size' => false, - 'ask_price' => false, - 'ask_size' => false, - 'last_price' => false, - 'last_size' => false, - 'open_interest' => false, - 'volume' => false, + 'synthetic_price' => false, 'implied_volatility' => false, - 'underlying_price' => false, - 'timestamp' => true + 'timestamp' => true, + 'greeks' => false ]; /** @@ -194,17 +173,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'symbol' => 'symbol', - 'bid_price' => 'bid_price', - 'bid_size' => 'bid_size', - 'ask_price' => 'ask_price', - 'ask_size' => 'ask_size', - 'last_price' => 'last_price', - 'last_size' => 'last_size', - 'open_interest' => 'open_interest', - 'volume' => 'volume', + 'synthetic_price' => 'synthetic_price', 'implied_volatility' => 'implied_volatility', - 'underlying_price' => 'underlying_price', - 'timestamp' => 'timestamp' + 'timestamp' => 'timestamp', + 'greeks' => 'greeks' ]; /** @@ -214,17 +186,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'symbol' => 'setSymbol', - 'bid_price' => 'setBidPrice', - 'bid_size' => 'setBidSize', - 'ask_price' => 'setAskPrice', - 'ask_size' => 'setAskSize', - 'last_price' => 'setLastPrice', - 'last_size' => 'setLastSize', - 'open_interest' => 'setOpenInterest', - 'volume' => 'setVolume', + 'synthetic_price' => 'setSyntheticPrice', 'implied_volatility' => 'setImpliedVolatility', - 'underlying_price' => 'setUnderlyingPrice', - 'timestamp' => 'setTimestamp' + 'timestamp' => 'setTimestamp', + 'greeks' => 'setGreeks' ]; /** @@ -234,17 +199,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'symbol' => 'getSymbol', - 'bid_price' => 'getBidPrice', - 'bid_size' => 'getBidSize', - 'ask_price' => 'getAskPrice', - 'ask_size' => 'getAskSize', - 'last_price' => 'getLastPrice', - 'last_size' => 'getLastSize', - 'open_interest' => 'getOpenInterest', - 'volume' => 'getVolume', + 'synthetic_price' => 'getSyntheticPrice', 'implied_volatility' => 'getImpliedVolatility', - 'underlying_price' => 'getUnderlyingPrice', - 'timestamp' => 'getTimestamp' + 'timestamp' => 'getTimestamp', + 'greeks' => 'getGreeks' ]; /** @@ -305,17 +263,10 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('symbol', $data ?? [], null); - $this->setIfExists('bid_price', $data ?? [], null); - $this->setIfExists('bid_size', $data ?? [], null); - $this->setIfExists('ask_price', $data ?? [], null); - $this->setIfExists('ask_size', $data ?? [], null); - $this->setIfExists('last_price', $data ?? [], null); - $this->setIfExists('last_size', $data ?? [], null); - $this->setIfExists('open_interest', $data ?? [], null); - $this->setIfExists('volume', $data ?? [], null); + $this->setIfExists('synthetic_price', $data ?? [], null); $this->setIfExists('implied_volatility', $data ?? [], null); - $this->setIfExists('underlying_price', $data ?? [], null); $this->setIfExists('timestamp', $data ?? [], null); + $this->setIfExists('greeks', $data ?? [], null); } /** @@ -390,233 +341,30 @@ public function setSymbol($symbol) } /** - * Gets bid_price + * Gets synthetic_price * * @return float|null */ - public function getBidPrice() + public function getSyntheticPrice() { - return $this->container['bid_price']; + return $this->container['synthetic_price']; } /** - * Sets bid_price + * Sets synthetic_price * - * @param float|null $bid_price The best bid price for the option contract. + * @param float|null $synthetic_price The derived synthetic price of the contract. * * @return self */ - public function setBidPrice($bid_price) + public function setSyntheticPrice($synthetic_price) { - if (is_null($bid_price)) { - throw new \InvalidArgumentException('non-nullable bid_price cannot be null'); + if (is_null($synthetic_price)) { + throw new \InvalidArgumentException('non-nullable synthetic_price cannot be null'); } - $this->container['bid_price'] = $bid_price; - - return $this; - } - - /** - * Gets bid_size - * - * @return int|null - */ - public function getBidSize() - { - return $this->container['bid_size']; - } - - /** - * Sets bid_size - * - * @param int|null $bid_size The number of contracts available at the bid price. - * - * @return self - */ - public function setBidSize($bid_size) - { - - if (is_null($bid_size)) { - throw new \InvalidArgumentException('non-nullable bid_size cannot be null'); - } - - $this->container['bid_size'] = $bid_size; - - return $this; - } - - /** - * Gets ask_price - * - * @return float|null - */ - public function getAskPrice() - { - return $this->container['ask_price']; - } - - /** - * Sets ask_price - * - * @param float|null $ask_price The best ask price for the option contract. - * - * @return self - */ - public function setAskPrice($ask_price) - { - - if (is_null($ask_price)) { - throw new \InvalidArgumentException('non-nullable ask_price cannot be null'); - } - - $this->container['ask_price'] = $ask_price; - - return $this; - } - - /** - * Gets ask_size - * - * @return int|null - */ - public function getAskSize() - { - return $this->container['ask_size']; - } - - /** - * Sets ask_size - * - * @param int|null $ask_size The number of contracts available at the ask price. - * - * @return self - */ - public function setAskSize($ask_size) - { - - if (is_null($ask_size)) { - throw new \InvalidArgumentException('non-nullable ask_size cannot be null'); - } - - $this->container['ask_size'] = $ask_size; - - return $this; - } - - /** - * Gets last_price - * - * @return float|null - */ - public function getLastPrice() - { - return $this->container['last_price']; - } - - /** - * Sets last_price - * - * @param float|null $last_price The price of the last trade for the option contract. - * - * @return self - */ - public function setLastPrice($last_price) - { - - if (is_null($last_price)) { - throw new \InvalidArgumentException('non-nullable last_price cannot be null'); - } - - $this->container['last_price'] = $last_price; - - return $this; - } - - /** - * Gets last_size - * - * @return int|null - */ - public function getLastSize() - { - return $this->container['last_size']; - } - - /** - * Sets last_size - * - * @param int|null $last_size The number of contracts in the last trade. - * - * @return self - */ - public function setLastSize($last_size) - { - - if (is_null($last_size)) { - throw new \InvalidArgumentException('non-nullable last_size cannot be null'); - } - - $this->container['last_size'] = $last_size; - - return $this; - } - - /** - * Gets open_interest - * - * @return int|null - */ - public function getOpenInterest() - { - return $this->container['open_interest']; - } - - /** - * Sets open_interest - * - * @param int|null $open_interest The total number of outstanding contracts. - * - * @return self - */ - public function setOpenInterest($open_interest) - { - - if (is_null($open_interest)) { - throw new \InvalidArgumentException('non-nullable open_interest cannot be null'); - } - - $this->container['open_interest'] = $open_interest; - - return $this; - } - - /** - * Gets volume - * - * @return int|null - */ - public function getVolume() - { - return $this->container['volume']; - } - - /** - * Sets volume - * - * @param int|null $volume The total number of contracts traded during the current session. - * - * @return self - */ - public function setVolume($volume) - { - - if (is_null($volume)) { - throw new \InvalidArgumentException('non-nullable volume cannot be null'); - } - - $this->container['volume'] = $volume; + $this->container['synthetic_price'] = $synthetic_price; return $this; } @@ -651,66 +399,66 @@ public function setImpliedVolatility($implied_volatility) } /** - * Gets underlying_price + * Gets timestamp * - * @return float|null + * @return \DateTime|null */ - public function getUnderlyingPrice() + public function getTimestamp() { - return $this->container['underlying_price']; + return $this->container['timestamp']; } /** - * Sets underlying_price + * Sets timestamp * - * @param float|null $underlying_price The current price of the underlying security. + * @param \DateTime|null $timestamp The timestamp of the last update for the option quote. * * @return self */ - public function setUnderlyingPrice($underlying_price) + public function setTimestamp($timestamp) { - if (is_null($underlying_price)) { - throw new \InvalidArgumentException('non-nullable underlying_price cannot be null'); + if (is_null($timestamp)) { + array_push($this->openAPINullablesSetToNull, 'timestamp'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('timestamp', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } - $this->container['underlying_price'] = $underlying_price; + $this->container['timestamp'] = $timestamp; return $this; } /** - * Gets timestamp + * Gets greeks * - * @return \DateTime|null + * @return \SnapTrade\Model\OptionQuoteGreeks|null */ - public function getTimestamp() + public function getGreeks() { - return $this->container['timestamp']; + return $this->container['greeks']; } /** - * Sets timestamp + * Sets greeks * - * @param \DateTime|null $timestamp The timestamp of the quote. + * @param \SnapTrade\Model\OptionQuoteGreeks|null $greeks greeks * * @return self */ - public function setTimestamp($timestamp) + public function setGreeks($greeks) { - if (is_null($timestamp)) { - array_push($this->openAPINullablesSetToNull, 'timestamp'); - } else { - $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); - $index = array_search('timestamp', $nullablesSetToNull); - if ($index !== FALSE) { - unset($nullablesSetToNull[$index]); - $this->setOpenAPINullablesSetToNull($nullablesSetToNull); - } + if (is_null($greeks)) { + throw new \InvalidArgumentException('non-nullable greeks cannot be null'); } - $this->container['timestamp'] = $timestamp; + $this->container['greeks'] = $greeks; return $this; } diff --git a/lib/Model/OptionQuoteGreeks.php b/lib/Model/OptionQuoteGreeks.php new file mode 100644 index 0000000..d41c975 --- /dev/null +++ b/lib/Model/OptionQuoteGreeks.php @@ -0,0 +1,513 @@ + + */ +class OptionQuoteGreeks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OptionQuote_greeks'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'delta' => 'float', + 'gamma' => 'float', + 'theta' => 'float', + 'vega' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'delta' => null, + 'gamma' => null, + 'theta' => null, + 'vega' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'delta' => false, + 'gamma' => false, + 'theta' => false, + 'vega' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'delta' => 'delta', + 'gamma' => 'gamma', + 'theta' => 'theta', + 'vega' => 'vega' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'delta' => 'setDelta', + 'gamma' => 'setGamma', + 'theta' => 'setTheta', + 'vega' => 'setVega' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'delta' => 'getDelta', + 'gamma' => 'getGamma', + 'theta' => 'getTheta', + 'vega' => 'getVega' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('delta', $data ?? [], null); + $this->setIfExists('gamma', $data ?? [], null); + $this->setIfExists('theta', $data ?? [], null); + $this->setIfExists('vega', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets delta + * + * @return float|null + */ + public function getDelta() + { + return $this->container['delta']; + } + + /** + * Sets delta + * + * @param float|null $delta Delta represents the rate of change between the option's price and a $1 change in the underlying asset's price. + * + * @return self + */ + public function setDelta($delta) + { + + if (is_null($delta)) { + throw new \InvalidArgumentException('non-nullable delta cannot be null'); + } + + $this->container['delta'] = $delta; + + return $this; + } + + /** + * Gets gamma + * + * @return float|null + */ + public function getGamma() + { + return $this->container['gamma']; + } + + /** + * Sets gamma + * + * @param float|null $gamma Gamma represents the rate of change between an option's delta and the underlying asset's price. + * + * @return self + */ + public function setGamma($gamma) + { + + if (is_null($gamma)) { + throw new \InvalidArgumentException('non-nullable gamma cannot be null'); + } + + $this->container['gamma'] = $gamma; + + return $this; + } + + /** + * Gets theta + * + * @return float|null + */ + public function getTheta() + { + return $this->container['theta']; + } + + /** + * Sets theta + * + * @param float|null $theta Theta represents the rate of change between the option price and time, or time sensitivity - sometimes known as an option's time decay. + * + * @return self + */ + public function setTheta($theta) + { + + if (is_null($theta)) { + throw new \InvalidArgumentException('non-nullable theta cannot be null'); + } + + $this->container['theta'] = $theta; + + return $this; + } + + /** + * Gets vega + * + * @return float|null + */ + public function getVega() + { + return $this->container['vega']; + } + + /** + * Sets vega + * + * @param float|null $vega Vega represents the rate of change between an option's value and the underlying asset's implied volatility. + * + * @return self + */ + public function setVega($vega) + { + + if (is_null($vega)) { + throw new \InvalidArgumentException('non-nullable vega cannot be null'); + } + + $this->container['vega'] = $vega; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OrderUpdatedResponse.php b/lib/Model/OrderUpdatedResponse.php index 3fac5da..7033722 100644 --- a/lib/Model/OrderUpdatedResponse.php +++ b/lib/Model/OrderUpdatedResponse.php @@ -51,7 +51,7 @@ class OrderUpdatedResponse implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static $openAPITypes = [ 'brokerage_order_id' => 'string', - 'order' => '\SnapTrade\Model\AccountOrderRecord' + 'order' => '\SnapTrade\Model\OrderUpdatedResponseOrder' ]; /** @@ -73,7 +73,7 @@ class OrderUpdatedResponse implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static array $openAPINullables = [ 'brokerage_order_id' => false, - 'order' => false + 'order' => true ]; /** @@ -324,7 +324,7 @@ public function setBrokerageOrderId($brokerage_order_id) /** * Gets order * - * @return \SnapTrade\Model\AccountOrderRecord|null + * @return \SnapTrade\Model\OrderUpdatedResponseOrder|null */ public function getOrder() { @@ -334,7 +334,7 @@ public function getOrder() /** * Sets order * - * @param \SnapTrade\Model\AccountOrderRecord|null $order order + * @param \SnapTrade\Model\OrderUpdatedResponseOrder|null $order order * * @return self */ @@ -342,7 +342,14 @@ public function setOrder($order) { if (is_null($order)) { - throw new \InvalidArgumentException('non-nullable order cannot be null'); + array_push($this->openAPINullablesSetToNull, 'order'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('order', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['order'] = $order; diff --git a/lib/Model/OrderUpdatedResponseOrder.php b/lib/Model/OrderUpdatedResponseOrder.php new file mode 100644 index 0000000..3648187 --- /dev/null +++ b/lib/Model/OrderUpdatedResponseOrder.php @@ -0,0 +1,1246 @@ + + */ +class OrderUpdatedResponseOrder implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OrderUpdatedResponse_order'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'brokerage_order_id' => 'string', + 'status' => '\SnapTrade\Model\AccountOrderRecordStatus', + 'universal_symbol' => '\SnapTrade\Model\AccountOrderRecordUniversalSymbol', + 'option_symbol' => '\SnapTrade\Model\AccountOrderRecordOptionSymbol', + 'quote_universal_symbol' => '\SnapTrade\Model\AccountOrderRecordQuoteUniversalSymbol', + 'quote_currency' => '\SnapTrade\Model\AccountOrderRecordQuoteCurrency', + 'action' => 'string', + 'total_quantity' => 'string', + 'open_quantity' => 'string', + 'canceled_quantity' => 'string', + 'filled_quantity' => 'string', + 'execution_price' => 'float', + 'limit_price' => 'float', + 'stop_price' => 'float', + 'order_type' => 'string', + 'time_in_force' => 'string', + 'time_placed' => '\DateTime', + 'time_updated' => '\DateTime', + 'time_executed' => '\DateTime', + 'expiry_date' => '\DateTime', + 'symbol' => 'string', + 'child_brokerage_order_ids' => '\SnapTrade\Model\AccountOrderRecordChildBrokerageOrderIds' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'brokerage_order_id' => null, + 'status' => null, + 'universal_symbol' => null, + 'option_symbol' => null, + 'quote_universal_symbol' => null, + 'quote_currency' => null, + 'action' => null, + 'total_quantity' => null, + 'open_quantity' => null, + 'canceled_quantity' => null, + 'filled_quantity' => null, + 'execution_price' => null, + 'limit_price' => null, + 'stop_price' => null, + 'order_type' => null, + 'time_in_force' => null, + 'time_placed' => 'date-time', + 'time_updated' => 'date-time', + 'time_executed' => 'date-time', + 'expiry_date' => 'date-time', + 'symbol' => 'uuid', + 'child_brokerage_order_ids' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'brokerage_order_id' => false, + 'status' => false, + 'universal_symbol' => false, + 'option_symbol' => false, + 'quote_universal_symbol' => false, + 'quote_currency' => false, + 'action' => false, + 'total_quantity' => true, + 'open_quantity' => true, + 'canceled_quantity' => true, + 'filled_quantity' => true, + 'execution_price' => true, + 'limit_price' => true, + 'stop_price' => true, + 'order_type' => true, + 'time_in_force' => false, + 'time_placed' => false, + 'time_updated' => true, + 'time_executed' => true, + 'expiry_date' => true, + 'symbol' => false, + 'child_brokerage_order_ids' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'brokerage_order_id' => 'brokerage_order_id', + 'status' => 'status', + 'universal_symbol' => 'universal_symbol', + 'option_symbol' => 'option_symbol', + 'quote_universal_symbol' => 'quote_universal_symbol', + 'quote_currency' => 'quote_currency', + 'action' => 'action', + 'total_quantity' => 'total_quantity', + 'open_quantity' => 'open_quantity', + 'canceled_quantity' => 'canceled_quantity', + 'filled_quantity' => 'filled_quantity', + 'execution_price' => 'execution_price', + 'limit_price' => 'limit_price', + 'stop_price' => 'stop_price', + 'order_type' => 'order_type', + 'time_in_force' => 'time_in_force', + 'time_placed' => 'time_placed', + 'time_updated' => 'time_updated', + 'time_executed' => 'time_executed', + 'expiry_date' => 'expiry_date', + 'symbol' => 'symbol', + 'child_brokerage_order_ids' => 'child_brokerage_order_ids' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'brokerage_order_id' => 'setBrokerageOrderId', + 'status' => 'setStatus', + 'universal_symbol' => 'setUniversalSymbol', + 'option_symbol' => 'setOptionSymbol', + 'quote_universal_symbol' => 'setQuoteUniversalSymbol', + 'quote_currency' => 'setQuoteCurrency', + 'action' => 'setAction', + 'total_quantity' => 'setTotalQuantity', + 'open_quantity' => 'setOpenQuantity', + 'canceled_quantity' => 'setCanceledQuantity', + 'filled_quantity' => 'setFilledQuantity', + 'execution_price' => 'setExecutionPrice', + 'limit_price' => 'setLimitPrice', + 'stop_price' => 'setStopPrice', + 'order_type' => 'setOrderType', + 'time_in_force' => 'setTimeInForce', + 'time_placed' => 'setTimePlaced', + 'time_updated' => 'setTimeUpdated', + 'time_executed' => 'setTimeExecuted', + 'expiry_date' => 'setExpiryDate', + 'symbol' => 'setSymbol', + 'child_brokerage_order_ids' => 'setChildBrokerageOrderIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'brokerage_order_id' => 'getBrokerageOrderId', + 'status' => 'getStatus', + 'universal_symbol' => 'getUniversalSymbol', + 'option_symbol' => 'getOptionSymbol', + 'quote_universal_symbol' => 'getQuoteUniversalSymbol', + 'quote_currency' => 'getQuoteCurrency', + 'action' => 'getAction', + 'total_quantity' => 'getTotalQuantity', + 'open_quantity' => 'getOpenQuantity', + 'canceled_quantity' => 'getCanceledQuantity', + 'filled_quantity' => 'getFilledQuantity', + 'execution_price' => 'getExecutionPrice', + 'limit_price' => 'getLimitPrice', + 'stop_price' => 'getStopPrice', + 'order_type' => 'getOrderType', + 'time_in_force' => 'getTimeInForce', + 'time_placed' => 'getTimePlaced', + 'time_updated' => 'getTimeUpdated', + 'time_executed' => 'getTimeExecuted', + 'expiry_date' => 'getExpiryDate', + 'symbol' => 'getSymbol', + 'child_brokerage_order_ids' => 'getChildBrokerageOrderIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('brokerage_order_id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('universal_symbol', $data ?? [], null); + $this->setIfExists('option_symbol', $data ?? [], null); + $this->setIfExists('quote_universal_symbol', $data ?? [], null); + $this->setIfExists('quote_currency', $data ?? [], null); + $this->setIfExists('action', $data ?? [], null); + $this->setIfExists('total_quantity', $data ?? [], null); + $this->setIfExists('open_quantity', $data ?? [], null); + $this->setIfExists('canceled_quantity', $data ?? [], null); + $this->setIfExists('filled_quantity', $data ?? [], null); + $this->setIfExists('execution_price', $data ?? [], null); + $this->setIfExists('limit_price', $data ?? [], null); + $this->setIfExists('stop_price', $data ?? [], null); + $this->setIfExists('order_type', $data ?? [], null); + $this->setIfExists('time_in_force', $data ?? [], null); + $this->setIfExists('time_placed', $data ?? [], null); + $this->setIfExists('time_updated', $data ?? [], null); + $this->setIfExists('time_executed', $data ?? [], null); + $this->setIfExists('expiry_date', $data ?? [], null); + $this->setIfExists('symbol', $data ?? [], null); + $this->setIfExists('child_brokerage_order_ids', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets brokerage_order_id + * + * @return string|null + */ + public function getBrokerageOrderId() + { + return $this->container['brokerage_order_id']; + } + + /** + * Sets brokerage_order_id + * + * @param string|null $brokerage_order_id Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system. + * + * @return self + */ + public function setBrokerageOrderId($brokerage_order_id) + { + + if (is_null($brokerage_order_id)) { + throw new \InvalidArgumentException('non-nullable brokerage_order_id cannot be null'); + } + + $this->container['brokerage_order_id'] = $brokerage_order_id; + + return $this; + } + + /** + * Gets status + * + * @return \SnapTrade\Model\AccountOrderRecordStatus|null + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \SnapTrade\Model\AccountOrderRecordStatus|null $status status + * + * @return self + */ + public function setStatus($status) + { + + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets universal_symbol + * + * @return \SnapTrade\Model\AccountOrderRecordUniversalSymbol|null + */ + public function getUniversalSymbol() + { + return $this->container['universal_symbol']; + } + + /** + * Sets universal_symbol + * + * @param \SnapTrade\Model\AccountOrderRecordUniversalSymbol|null $universal_symbol universal_symbol + * + * @return self + */ + public function setUniversalSymbol($universal_symbol) + { + + if (is_null($universal_symbol)) { + throw new \InvalidArgumentException('non-nullable universal_symbol cannot be null'); + } + + $this->container['universal_symbol'] = $universal_symbol; + + return $this; + } + + /** + * Gets option_symbol + * + * @return \SnapTrade\Model\AccountOrderRecordOptionSymbol|null + */ + public function getOptionSymbol() + { + return $this->container['option_symbol']; + } + + /** + * Sets option_symbol + * + * @param \SnapTrade\Model\AccountOrderRecordOptionSymbol|null $option_symbol option_symbol + * + * @return self + */ + public function setOptionSymbol($option_symbol) + { + + if (is_null($option_symbol)) { + throw new \InvalidArgumentException('non-nullable option_symbol cannot be null'); + } + + $this->container['option_symbol'] = $option_symbol; + + return $this; + } + + /** + * Gets quote_universal_symbol + * + * @return \SnapTrade\Model\AccountOrderRecordQuoteUniversalSymbol|null + */ + public function getQuoteUniversalSymbol() + { + return $this->container['quote_universal_symbol']; + } + + /** + * Sets quote_universal_symbol + * + * @param \SnapTrade\Model\AccountOrderRecordQuoteUniversalSymbol|null $quote_universal_symbol quote_universal_symbol + * + * @return self + */ + public function setQuoteUniversalSymbol($quote_universal_symbol) + { + + if (is_null($quote_universal_symbol)) { + throw new \InvalidArgumentException('non-nullable quote_universal_symbol cannot be null'); + } + + $this->container['quote_universal_symbol'] = $quote_universal_symbol; + + return $this; + } + + /** + * Gets quote_currency + * + * @return \SnapTrade\Model\AccountOrderRecordQuoteCurrency|null + */ + public function getQuoteCurrency() + { + return $this->container['quote_currency']; + } + + /** + * Sets quote_currency + * + * @param \SnapTrade\Model\AccountOrderRecordQuoteCurrency|null $quote_currency quote_currency + * + * @return self + */ + public function setQuoteCurrency($quote_currency) + { + + if (is_null($quote_currency)) { + throw new \InvalidArgumentException('non-nullable quote_currency cannot be null'); + } + + $this->container['quote_currency'] = $quote_currency; + + return $this; + } + + /** + * Gets action + * + * @return string|null + */ + public function getAction() + { + return $this->container['action']; + } + + /** + * Sets action + * + * @param string|null $action The action describes the intent or side of a trade. This is usually `BUY` or `SELL` but can include other potential values like the following depending on the specific brokerage. - BUY - SELL - BUY_COVER - SELL_SHORT - BUY_OPEN - BUY_CLOSE - SELL_OPEN - SELL_CLOSE + * + * @return self + */ + public function setAction($action) + { + + if (is_null($action)) { + throw new \InvalidArgumentException('non-nullable action cannot be null'); + } + + $this->container['action'] = $action; + + return $this; + } + + /** + * Gets total_quantity + * + * @return string|null + */ + public function getTotalQuantity() + { + return $this->container['total_quantity']; + } + + /** + * Sets total_quantity + * + * @param string|null $total_quantity The total number of shares or contracts of the order. This should be the sum of the filled, canceled, and open quantities. Can be a decimal number for fractional shares. + * + * @return self + */ + public function setTotalQuantity($total_quantity) + { + + if (is_null($total_quantity)) { + array_push($this->openAPINullablesSetToNull, 'total_quantity'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('total_quantity', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['total_quantity'] = $total_quantity; + + return $this; + } + + /** + * Gets open_quantity + * + * @return string|null + */ + public function getOpenQuantity() + { + return $this->container['open_quantity']; + } + + /** + * Sets open_quantity + * + * @param string|null $open_quantity The number of shares or contracts that are still open (waiting for execution). Can be a decimal number for fractional shares. + * + * @return self + */ + public function setOpenQuantity($open_quantity) + { + + if (is_null($open_quantity)) { + array_push($this->openAPINullablesSetToNull, 'open_quantity'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('open_quantity', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['open_quantity'] = $open_quantity; + + return $this; + } + + /** + * Gets canceled_quantity + * + * @return string|null + */ + public function getCanceledQuantity() + { + return $this->container['canceled_quantity']; + } + + /** + * Sets canceled_quantity + * + * @param string|null $canceled_quantity The number of shares or contracts that have been canceled. Can be a decimal number for fractional shares. + * + * @return self + */ + public function setCanceledQuantity($canceled_quantity) + { + + if (is_null($canceled_quantity)) { + array_push($this->openAPINullablesSetToNull, 'canceled_quantity'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('canceled_quantity', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['canceled_quantity'] = $canceled_quantity; + + return $this; + } + + /** + * Gets filled_quantity + * + * @return string|null + */ + public function getFilledQuantity() + { + return $this->container['filled_quantity']; + } + + /** + * Sets filled_quantity + * + * @param string|null $filled_quantity The number of shares or contracts that have been filled. Can be a decimal number for fractional shares. + * + * @return self + */ + public function setFilledQuantity($filled_quantity) + { + + if (is_null($filled_quantity)) { + array_push($this->openAPINullablesSetToNull, 'filled_quantity'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('filled_quantity', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['filled_quantity'] = $filled_quantity; + + return $this; + } + + /** + * Gets execution_price + * + * @return float|null + */ + public function getExecutionPrice() + { + return $this->container['execution_price']; + } + + /** + * Sets execution_price + * + * @param float|null $execution_price The price at which the order was executed. + * + * @return self + */ + public function setExecutionPrice($execution_price) + { + + if (is_null($execution_price)) { + array_push($this->openAPINullablesSetToNull, 'execution_price'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('execution_price', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['execution_price'] = $execution_price; + + return $this; + } + + /** + * Gets limit_price + * + * @return float|null + */ + public function getLimitPrice() + { + return $this->container['limit_price']; + } + + /** + * Sets limit_price + * + * @param float|null $limit_price The limit price is maximum price one is willing to pay for a buy order or the minimum price one is willing to accept for a sell order. Should only apply to `Limit` and `StopLimit` orders. + * + * @return self + */ + public function setLimitPrice($limit_price) + { + + if (is_null($limit_price)) { + array_push($this->openAPINullablesSetToNull, 'limit_price'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('limit_price', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['limit_price'] = $limit_price; + + return $this; + } + + /** + * Gets stop_price + * + * @return float|null + */ + public function getStopPrice() + { + return $this->container['stop_price']; + } + + /** + * Sets stop_price + * + * @param float|null $stop_price The stop price is the price at which a stop order is triggered. Should only apply to `Stop` and `StopLimit` orders. + * + * @return self + */ + public function setStopPrice($stop_price) + { + + if (is_null($stop_price)) { + array_push($this->openAPINullablesSetToNull, 'stop_price'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stop_price', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['stop_price'] = $stop_price; + + return $this; + } + + /** + * Gets order_type + * + * @return string|null + */ + public function getOrderType() + { + return $this->container['order_type']; + } + + /** + * Sets order_type + * + * @param string|null $order_type The type of order placed. The most common values are `Market`, `Limit`, `Stop`, and `StopLimit`. We try our best to map brokerage order types to these values. When mapping fails, we will return the brokerage's order type value. + * + * @return self + */ + public function setOrderType($order_type) + { + + if (is_null($order_type)) { + array_push($this->openAPINullablesSetToNull, 'order_type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('order_type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['order_type'] = $order_type; + + return $this; + } + + /** + * Gets time_in_force + * + * @return string|null + */ + public function getTimeInForce() + { + return $this->container['time_in_force']; + } + + /** + * Sets time_in_force + * + * @param string|null $time_in_force The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. We try our best to map brokerage time in force values to the following. When mapping fails, we will return the brokerage's time in force value. - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date. - `MOO` - Market On Open. The order is to be executed at the day's opening price. - `EHP` - Extended Hours P.M. The order is to be placed during extended hour trading, after markets close. + * + * @return self + */ + public function setTimeInForce($time_in_force) + { + + if (is_null($time_in_force)) { + throw new \InvalidArgumentException('non-nullable time_in_force cannot be null'); + } + + $this->container['time_in_force'] = $time_in_force; + + return $this; + } + + /** + * Gets time_placed + * + * @return \DateTime|null + */ + public function getTimePlaced() + { + return $this->container['time_placed']; + } + + /** + * Sets time_placed + * + * @param \DateTime|null $time_placed The time the order was placed. This is the time the order was submitted to the brokerage. + * + * @return self + */ + public function setTimePlaced($time_placed) + { + + if (is_null($time_placed)) { + throw new \InvalidArgumentException('non-nullable time_placed cannot be null'); + } + + $this->container['time_placed'] = $time_placed; + + return $this; + } + + /** + * Gets time_updated + * + * @return \DateTime|null + */ + public function getTimeUpdated() + { + return $this->container['time_updated']; + } + + /** + * Sets time_updated + * + * @param \DateTime|null $time_updated The time the order was last updated in the brokerage system. This value is not always available from the brokerage. + * + * @return self + */ + public function setTimeUpdated($time_updated) + { + + if (is_null($time_updated)) { + array_push($this->openAPINullablesSetToNull, 'time_updated'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('time_updated', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['time_updated'] = $time_updated; + + return $this; + } + + /** + * Gets time_executed + * + * @return \DateTime|null + */ + public function getTimeExecuted() + { + return $this->container['time_executed']; + } + + /** + * Sets time_executed + * + * @param \DateTime|null $time_executed The time the order was executed in the brokerage system. This value is not always available from the brokerage. + * + * @return self + */ + public function setTimeExecuted($time_executed) + { + + if (is_null($time_executed)) { + array_push($this->openAPINullablesSetToNull, 'time_executed'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('time_executed', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['time_executed'] = $time_executed; + + return $this; + } + + /** + * Gets expiry_date + * + * @return \DateTime|null + */ + public function getExpiryDate() + { + return $this->container['expiry_date']; + } + + /** + * Sets expiry_date + * + * @param \DateTime|null $expiry_date The time the order expires. This value is not always available from the brokerage. + * + * @return self + */ + public function setExpiryDate($expiry_date) + { + + if (is_null($expiry_date)) { + array_push($this->openAPINullablesSetToNull, 'expiry_date'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expiry_date', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['expiry_date'] = $expiry_date; + + return $this; + } + + /** + * Gets symbol + * + * @return string|null + * @deprecated + */ + public function getSymbol() + { + return $this->container['symbol']; + } + + /** + * Sets symbol + * + * @param string|null $symbol A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change. + * + * @return self + * @deprecated + */ + public function setSymbol($symbol) + { + + if (is_null($symbol)) { + throw new \InvalidArgumentException('non-nullable symbol cannot be null'); + } + + $this->container['symbol'] = $symbol; + + return $this; + } + + /** + * Gets child_brokerage_order_ids + * + * @return \SnapTrade\Model\AccountOrderRecordChildBrokerageOrderIds|null + */ + public function getChildBrokerageOrderIds() + { + return $this->container['child_brokerage_order_ids']; + } + + /** + * Sets child_brokerage_order_ids + * + * @param \SnapTrade\Model\AccountOrderRecordChildBrokerageOrderIds|null $child_brokerage_order_ids child_brokerage_order_ids + * + * @return self + */ + public function setChildBrokerageOrderIds($child_brokerage_order_ids) + { + + if (is_null($child_brokerage_order_ids)) { + array_push($this->openAPINullablesSetToNull, 'child_brokerage_order_ids'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('child_brokerage_order_ids', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + $this->container['child_brokerage_order_ids'] = $child_brokerage_order_ids; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Position.php b/lib/Model/Position.php index a5911d1..937827c 100644 --- a/lib/Model/Position.php +++ b/lib/Model/Position.php @@ -381,7 +381,7 @@ public function getUnits() /** * Sets units * - * @param float|null $units The number of shares of the position. This can be fractional or integer units. + * @param float|null $units The number of shares of the position. This can be fractional or integer units. A positive number indicates a long position, while a negative number indicates a short position. * * @return self */ diff --git a/test/Api/OptionsApiTest.php b/test/Api/OptionsApiTest.php index f83ea79..048f2c4 100644 --- a/test/Api/OptionsApiTest.php +++ b/test/Api/OptionsApiTest.php @@ -59,12 +59,12 @@ public static function tearDownAfterClass(): void } /** - * Test case for getOptionQuote + * Test case for getUserAccountOptionQuotes * * Get option quote. * */ - public function testGetOptionQuote() + public function testGetUserAccountOptionQuotes() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/test/Model/OptionQuoteGreeksTest.php b/test/Model/OptionQuoteGreeksTest.php new file mode 100644 index 0000000..ba03efd --- /dev/null +++ b/test/Model/OptionQuoteGreeksTest.php @@ -0,0 +1,110 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "delta" + */ + public function testPropertyDelta() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "gamma" + */ + public function testPropertyGamma() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "theta" + */ + public function testPropertyTheta() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "vega" + */ + public function testPropertyVega() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/OptionQuoteTest.php b/test/Model/OptionQuoteTest.php index c539cdc..442b001 100644 --- a/test/Model/OptionQuoteTest.php +++ b/test/Model/OptionQuoteTest.php @@ -82,72 +82,9 @@ public function testPropertySymbol() } /** - * Test attribute "bid_price" + * Test attribute "synthetic_price" */ - public function testPropertyBidPrice() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "bid_size" - */ - public function testPropertyBidSize() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "ask_price" - */ - public function testPropertyAskPrice() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "ask_size" - */ - public function testPropertyAskSize() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "last_price" - */ - public function testPropertyLastPrice() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "last_size" - */ - public function testPropertyLastSize() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "open_interest" - */ - public function testPropertyOpenInterest() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "volume" - */ - public function testPropertyVolume() + public function testPropertySyntheticPrice() { // TODO: implement $this->markTestIncomplete('Not implemented'); @@ -163,18 +100,18 @@ public function testPropertyImpliedVolatility() } /** - * Test attribute "underlying_price" + * Test attribute "timestamp" */ - public function testPropertyUnderlyingPrice() + public function testPropertyTimestamp() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "timestamp" + * Test attribute "greeks" */ - public function testPropertyTimestamp() + public function testPropertyGreeks() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/test/Model/OrderUpdatedResponseOrderTest.php b/test/Model/OrderUpdatedResponseOrderTest.php new file mode 100644 index 0000000..8f7c450 --- /dev/null +++ b/test/Model/OrderUpdatedResponseOrderTest.php @@ -0,0 +1,272 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "brokerage_order_id" + */ + public function testPropertyBrokerageOrderId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "status" + */ + public function testPropertyStatus() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "universal_symbol" + */ + public function testPropertyUniversalSymbol() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "option_symbol" + */ + public function testPropertyOptionSymbol() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "quote_universal_symbol" + */ + public function testPropertyQuoteUniversalSymbol() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "quote_currency" + */ + public function testPropertyQuoteCurrency() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "action" + */ + public function testPropertyAction() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "total_quantity" + */ + public function testPropertyTotalQuantity() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "open_quantity" + */ + public function testPropertyOpenQuantity() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "canceled_quantity" + */ + public function testPropertyCanceledQuantity() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "filled_quantity" + */ + public function testPropertyFilledQuantity() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "execution_price" + */ + public function testPropertyExecutionPrice() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "limit_price" + */ + public function testPropertyLimitPrice() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "stop_price" + */ + public function testPropertyStopPrice() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "order_type" + */ + public function testPropertyOrderType() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "time_in_force" + */ + public function testPropertyTimeInForce() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "time_placed" + */ + public function testPropertyTimePlaced() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "time_updated" + */ + public function testPropertyTimeUpdated() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "time_executed" + */ + public function testPropertyTimeExecuted() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "expiry_date" + */ + public function testPropertyExpiryDate() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "symbol" + */ + public function testPropertySymbol() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "child_brokerage_order_ids" + */ + public function testPropertyChildBrokerageOrderIds() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +}