diff --git a/.konfig/generate-id.txt b/.konfig/generate-id.txt
index c0f472c..874d703 100644
--- a/.konfig/generate-id.txt
+++ b/.konfig/generate-id.txt
@@ -1 +1 @@
-91597193-8d71-4b24-b49e-33d571495054
\ No newline at end of file
+b9830204-50ac-4fda-9249-94da42326a7c
\ No newline at end of file
diff --git a/README.md b/README.md
index f94c26d..485a152 100644
--- a/README.md
+++ b/README.md
@@ -340,6 +340,8 @@ The ID of the account to get positions.
Lists balances, positions, option positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__
+The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
+
#### 🛠️ Usage
diff --git a/lib/Model/AccountHoldingsAccount.php b/lib/Model/AccountHoldingsAccount.php
index 27e2eb5..73e1b5f 100644
--- a/lib/Model/AccountHoldingsAccount.php
+++ b/lib/Model/AccountHoldingsAccount.php
@@ -30,7 +30,7 @@
* AccountHoldingsAccount Class Doc Comment
*
* @category Class
- * @description A wrapper object containing holdings information for a single account
+ * @description A wrapper object containing holdings information for a single account.
* @package SnapTrade
* @implements \ArrayAccess
*/
diff --git a/lib/Model/AccountOrderRecord.php b/lib/Model/AccountOrderRecord.php
index 3941beb..0f52f6c 100644
--- a/lib/Model/AccountOrderRecord.php
+++ b/lib/Model/AccountOrderRecord.php
@@ -30,7 +30,7 @@
* AccountOrderRecord Class Doc Comment
*
* @category Class
- * @description Record of order in brokerageaccount
+ * @description Describes a single recent order in an account.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -422,7 +422,7 @@ public function getBrokerageOrderId()
/**
* Sets brokerage_order_id
*
- * @param string|null $brokerage_order_id Order id returned by brokerage
+ * @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
*/
@@ -471,6 +471,7 @@ public function setStatus($status)
* Gets symbol
*
* @return string|null
+ * @deprecated
*/
public function getSymbol()
{
@@ -480,9 +481,10 @@ public function getSymbol()
/**
* Sets symbol
*
- * @param string|null $symbol 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)
{
diff --git a/lib/Model/AccountOrderRecordStatus.php b/lib/Model/AccountOrderRecordStatus.php
index 60cc012..d54bc28 100644
--- a/lib/Model/AccountOrderRecordStatus.php
+++ b/lib/Model/AccountOrderRecordStatus.php
@@ -28,6 +28,7 @@
* AccountOrderRecordStatus Class Doc Comment
*
* @category Class
+ * @description Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum.
* @package SnapTrade
*/
class AccountOrderRecordStatus
diff --git a/lib/Model/BrokerageAuthorizationType.php b/lib/Model/BrokerageAuthorizationType.php
deleted file mode 100644
index bc6805a..0000000
--- a/lib/Model/BrokerageAuthorizationType.php
+++ /dev/null
@@ -1,438 +0,0 @@
-
- */
-class BrokerageAuthorizationType implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'BrokerageAuthorizationType';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'type' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'type' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'type' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'type' => 'type'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'type' => 'setType'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'type' => 'getType'
- ];
-
- /**
- * 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;
- }
-
- public const TYPE_READ = 'read';
- public const TYPE_TRADE = 'trade';
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getTypeAllowableValues()
- {
- return [
- self::TYPE_READ,
- self::TYPE_TRADE,
- ];
- }
-
- /**
- * 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('type', $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 = [];
-
- $allowedValues = $this->getTypeAllowableValues();
- if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'type', must be one of '%s'",
- $this->container['type'],
- implode("', '", $allowedValues)
- );
- }
-
- 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 type
- *
- * @return string|null
- */
- public function getType()
- {
- return $this->container['type'];
- }
-
- /**
- * Sets type
- *
- * @param string|null $type type
- *
- * @return self
- */
- public function setType($type)
- {
- $allowedValues = $this->getTypeAllowableValues();
- if (!is_null($type) && !in_array($type, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'type', must be one of '%s'",
- $type,
- implode("', '", $allowedValues)
- )
- );
- }
-
- if (is_null($type)) {
- throw new \InvalidArgumentException('non-nullable type cannot be null');
- }
-
- $this->container['type'] = $type;
-
- 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/BrokerageSymbolOptionSymbol.php b/lib/Model/BrokerageSymbolOptionSymbol.php
deleted file mode 100644
index 9ec8586..0000000
--- a/lib/Model/BrokerageSymbolOptionSymbol.php
+++ /dev/null
@@ -1,744 +0,0 @@
-
- */
-class BrokerageSymbolOptionSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'BrokerageSymbol_option_symbol';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'id' => 'string',
- 'ticker' => 'string',
- 'option_type' => 'string',
- 'strike_price' => 'float',
- 'expiration_date' => 'string',
- 'is_mini_option' => 'bool',
- 'underlying_symbol' => '\SnapTrade\Model\UnderlyingSymbol',
- 'local_id' => 'string',
- 'exchange_id' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'id' => 'uuid',
- 'ticker' => null,
- 'option_type' => null,
- 'strike_price' => null,
- 'expiration_date' => 'datetime',
- 'is_mini_option' => null,
- 'underlying_symbol' => null,
- 'local_id' => null,
- 'exchange_id' => 'uuid'
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'id' => false,
- 'ticker' => false,
- 'option_type' => false,
- 'strike_price' => false,
- 'expiration_date' => false,
- 'is_mini_option' => false,
- 'underlying_symbol' => false,
- 'local_id' => false,
- 'exchange_id' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'id' => 'id',
- 'ticker' => 'ticker',
- 'option_type' => 'option_type',
- 'strike_price' => 'strike_price',
- 'expiration_date' => 'expiration_date',
- 'is_mini_option' => 'is_mini_option',
- 'underlying_symbol' => 'underlying_symbol',
- 'local_id' => 'local_id',
- 'exchange_id' => 'exchange_id'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'id' => 'setId',
- 'ticker' => 'setTicker',
- 'option_type' => 'setOptionType',
- 'strike_price' => 'setStrikePrice',
- 'expiration_date' => 'setExpirationDate',
- 'is_mini_option' => 'setIsMiniOption',
- 'underlying_symbol' => 'setUnderlyingSymbol',
- 'local_id' => 'setLocalId',
- 'exchange_id' => 'setExchangeId'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'id' => 'getId',
- 'ticker' => 'getTicker',
- 'option_type' => 'getOptionType',
- 'strike_price' => 'getStrikePrice',
- 'expiration_date' => 'getExpirationDate',
- 'is_mini_option' => 'getIsMiniOption',
- 'underlying_symbol' => 'getUnderlyingSymbol',
- 'local_id' => 'getLocalId',
- 'exchange_id' => 'getExchangeId'
- ];
-
- /**
- * 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;
- }
-
- public const OPTION_TYPE_CALL = 'CALL';
- public const OPTION_TYPE_PUT = 'PUT';
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getOptionTypeAllowableValues()
- {
- return [
- self::OPTION_TYPE_CALL,
- self::OPTION_TYPE_PUT,
- ];
- }
-
- /**
- * 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('id', $data ?? [], null);
- $this->setIfExists('ticker', $data ?? [], null);
- $this->setIfExists('option_type', $data ?? [], null);
- $this->setIfExists('strike_price', $data ?? [], null);
- $this->setIfExists('expiration_date', $data ?? [], null);
- $this->setIfExists('is_mini_option', $data ?? [], null);
- $this->setIfExists('underlying_symbol', $data ?? [], null);
- $this->setIfExists('local_id', $data ?? [], null);
- $this->setIfExists('exchange_id', $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 = [];
-
- if ($this->container['id'] === null) {
- $invalidProperties[] = "'id' can't be null";
- }
- if ($this->container['ticker'] === null) {
- $invalidProperties[] = "'ticker' can't be null";
- }
- if ($this->container['option_type'] === null) {
- $invalidProperties[] = "'option_type' can't be null";
- }
- $allowedValues = $this->getOptionTypeAllowableValues();
- if (!is_null($this->container['option_type']) && !in_array($this->container['option_type'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'option_type', must be one of '%s'",
- $this->container['option_type'],
- implode("', '", $allowedValues)
- );
- }
-
- if ($this->container['strike_price'] === null) {
- $invalidProperties[] = "'strike_price' can't be null";
- }
- if ($this->container['expiration_date'] === null) {
- $invalidProperties[] = "'expiration_date' can't be null";
- }
- if ($this->container['underlying_symbol'] === null) {
- $invalidProperties[] = "'underlying_symbol' can't be null";
- }
- 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 id
- *
- * @return string
- */
- public function getId()
- {
- return $this->container['id'];
- }
-
- /**
- * Sets id
- *
- * @param string $id id
- *
- * @return self
- */
- public function setId($id)
- {
-
- if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
- }
-
- $this->container['id'] = $id;
-
- return $this;
- }
-
- /**
- * Gets ticker
- *
- * @return string
- */
- public function getTicker()
- {
- return $this->container['ticker'];
- }
-
- /**
- * Sets ticker
- *
- * @param string $ticker ticker
- *
- * @return self
- */
- public function setTicker($ticker)
- {
-
- if (is_null($ticker)) {
- throw new \InvalidArgumentException('non-nullable ticker cannot be null');
- }
-
- $this->container['ticker'] = $ticker;
-
- return $this;
- }
-
- /**
- * Gets option_type
- *
- * @return string
- */
- public function getOptionType()
- {
- return $this->container['option_type'];
- }
-
- /**
- * Sets option_type
- *
- * @param string $option_type option_type
- *
- * @return self
- */
- public function setOptionType($option_type)
- {
- $allowedValues = $this->getOptionTypeAllowableValues();
- if (!in_array($option_type, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'option_type', must be one of '%s'",
- $option_type,
- implode("', '", $allowedValues)
- )
- );
- }
-
- if (is_null($option_type)) {
- throw new \InvalidArgumentException('non-nullable option_type cannot be null');
- }
-
- $this->container['option_type'] = $option_type;
-
- return $this;
- }
-
- /**
- * Gets strike_price
- *
- * @return float
- */
- public function getStrikePrice()
- {
- return $this->container['strike_price'];
- }
-
- /**
- * Sets strike_price
- *
- * @param float $strike_price strike_price
- *
- * @return self
- */
- public function setStrikePrice($strike_price)
- {
-
- if (is_null($strike_price)) {
- throw new \InvalidArgumentException('non-nullable strike_price cannot be null');
- }
-
- $this->container['strike_price'] = $strike_price;
-
- return $this;
- }
-
- /**
- * Gets expiration_date
- *
- * @return string
- */
- public function getExpirationDate()
- {
- return $this->container['expiration_date'];
- }
-
- /**
- * Sets expiration_date
- *
- * @param string $expiration_date expiration_date
- *
- * @return self
- */
- public function setExpirationDate($expiration_date)
- {
-
- if (is_null($expiration_date)) {
- throw new \InvalidArgumentException('non-nullable expiration_date cannot be null');
- }
-
- $this->container['expiration_date'] = $expiration_date;
-
- return $this;
- }
-
- /**
- * Gets is_mini_option
- *
- * @return bool|null
- */
- public function getIsMiniOption()
- {
- return $this->container['is_mini_option'];
- }
-
- /**
- * Sets is_mini_option
- *
- * @param bool|null $is_mini_option is_mini_option
- *
- * @return self
- */
- public function setIsMiniOption($is_mini_option)
- {
-
- if (is_null($is_mini_option)) {
- throw new \InvalidArgumentException('non-nullable is_mini_option cannot be null');
- }
-
- $this->container['is_mini_option'] = $is_mini_option;
-
- return $this;
- }
-
- /**
- * Gets underlying_symbol
- *
- * @return \SnapTrade\Model\UnderlyingSymbol
- */
- public function getUnderlyingSymbol()
- {
- return $this->container['underlying_symbol'];
- }
-
- /**
- * Sets underlying_symbol
- *
- * @param \SnapTrade\Model\UnderlyingSymbol $underlying_symbol underlying_symbol
- *
- * @return self
- */
- public function setUnderlyingSymbol($underlying_symbol)
- {
-
- if (is_null($underlying_symbol)) {
- throw new \InvalidArgumentException('non-nullable underlying_symbol cannot be null');
- }
-
- $this->container['underlying_symbol'] = $underlying_symbol;
-
- return $this;
- }
-
- /**
- * Gets local_id
- *
- * @return string|null
- */
- public function getLocalId()
- {
- return $this->container['local_id'];
- }
-
- /**
- * Sets local_id
- *
- * @param string|null $local_id local_id
- *
- * @return self
- */
- public function setLocalId($local_id)
- {
-
- if (is_null($local_id)) {
- throw new \InvalidArgumentException('non-nullable local_id cannot be null');
- }
-
- $this->container['local_id'] = $local_id;
-
- return $this;
- }
-
- /**
- * Gets exchange_id
- *
- * @return string|null
- */
- public function getExchangeId()
- {
- return $this->container['exchange_id'];
- }
-
- /**
- * Sets exchange_id
- *
- * @param string|null $exchange_id exchange_id
- *
- * @return self
- */
- public function setExchangeId($exchange_id)
- {
-
- if (is_null($exchange_id)) {
- throw new \InvalidArgumentException('non-nullable exchange_id cannot be null');
- }
-
- $this->container['exchange_id'] = $exchange_id;
-
- 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/BrokerageSymbolSymbol.php b/lib/Model/BrokerageSymbolSymbol.php
deleted file mode 100644
index d78448a..0000000
--- a/lib/Model/BrokerageSymbolSymbol.php
+++ /dev/null
@@ -1,767 +0,0 @@
-
- */
-class BrokerageSymbolSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'BrokerageSymbol_symbol';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'id' => 'string',
- 'symbol' => 'string',
- 'raw_symbol' => 'string',
- 'description' => 'string',
- 'currency' => '\SnapTrade\Model\Currency',
- 'exchange' => '\SnapTrade\Model\Exchange',
- 'type' => '\SnapTrade\Model\SecurityType',
- 'currencies' => '\SnapTrade\Model\Currency[]',
- 'figi_code' => 'string',
- 'figi_instrument' => '\SnapTrade\Model\SymbolFigiInstrument'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'id' => 'uuid',
- 'symbol' => null,
- 'raw_symbol' => null,
- 'description' => null,
- 'currency' => null,
- 'exchange' => null,
- 'type' => null,
- 'currencies' => null,
- 'figi_code' => null,
- 'figi_instrument' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'id' => false,
- 'symbol' => false,
- 'raw_symbol' => false,
- 'description' => true,
- 'currency' => false,
- 'exchange' => false,
- 'type' => false,
- 'currencies' => false,
- 'figi_code' => true,
- 'figi_instrument' => true
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'id' => 'id',
- 'symbol' => 'symbol',
- 'raw_symbol' => 'raw_symbol',
- 'description' => 'description',
- 'currency' => 'currency',
- 'exchange' => 'exchange',
- 'type' => 'type',
- 'currencies' => 'currencies',
- 'figi_code' => 'figi_code',
- 'figi_instrument' => 'figi_instrument'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'id' => 'setId',
- 'symbol' => 'setSymbol',
- 'raw_symbol' => 'setRawSymbol',
- 'description' => 'setDescription',
- 'currency' => 'setCurrency',
- 'exchange' => 'setExchange',
- 'type' => 'setType',
- 'currencies' => 'setCurrencies',
- 'figi_code' => 'setFigiCode',
- 'figi_instrument' => 'setFigiInstrument'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'id' => 'getId',
- 'symbol' => 'getSymbol',
- 'raw_symbol' => 'getRawSymbol',
- 'description' => 'getDescription',
- 'currency' => 'getCurrency',
- 'exchange' => 'getExchange',
- 'type' => 'getType',
- 'currencies' => 'getCurrencies',
- 'figi_code' => 'getFigiCode',
- 'figi_instrument' => 'getFigiInstrument'
- ];
-
- /**
- * 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('id', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('raw_symbol', $data ?? [], null);
- $this->setIfExists('description', $data ?? [], null);
- $this->setIfExists('currency', $data ?? [], null);
- $this->setIfExists('exchange', $data ?? [], null);
- $this->setIfExists('type', $data ?? [], null);
- $this->setIfExists('currencies', $data ?? [], null);
- $this->setIfExists('figi_code', $data ?? [], null);
- $this->setIfExists('figi_instrument', $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 = [];
-
- if ($this->container['id'] === null) {
- $invalidProperties[] = "'id' can't be null";
- }
- if ($this->container['symbol'] === null) {
- $invalidProperties[] = "'symbol' can't be null";
- }
- if ($this->container['raw_symbol'] === null) {
- $invalidProperties[] = "'raw_symbol' can't be null";
- }
- if ($this->container['currency'] === null) {
- $invalidProperties[] = "'currency' can't be null";
- }
- if ($this->container['type'] === null) {
- $invalidProperties[] = "'type' can't be null";
- }
- if ($this->container['currencies'] === null) {
- $invalidProperties[] = "'currencies' can't be null";
- }
- 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 id
- *
- * @return string
- */
- public function getId()
- {
- return $this->container['id'];
- }
-
- /**
- * Sets id
- *
- * @param string $id id
- *
- * @return self
- */
- public function setId($id)
- {
-
- if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
- }
-
- $this->container['id'] = $id;
-
- return $this;
- }
-
- /**
- * Gets symbol
- *
- * @return string
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param string $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets raw_symbol
- *
- * @return string
- */
- public function getRawSymbol()
- {
- return $this->container['raw_symbol'];
- }
-
- /**
- * Sets raw_symbol
- *
- * @param string $raw_symbol raw_symbol
- *
- * @return self
- */
- public function setRawSymbol($raw_symbol)
- {
-
- if (is_null($raw_symbol)) {
- throw new \InvalidArgumentException('non-nullable raw_symbol cannot be null');
- }
-
- $this->container['raw_symbol'] = $raw_symbol;
-
- return $this;
- }
-
- /**
- * Gets description
- *
- * @return string|null
- */
- public function getDescription()
- {
- return $this->container['description'];
- }
-
- /**
- * Sets description
- *
- * @param string|null $description description
- *
- * @return self
- */
- public function setDescription($description)
- {
-
- if (is_null($description)) {
- array_push($this->openAPINullablesSetToNull, 'description');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('description', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
-
- $this->container['description'] = $description;
-
- return $this;
- }
-
- /**
- * Gets currency
- *
- * @return \SnapTrade\Model\Currency
- */
- public function getCurrency()
- {
- return $this->container['currency'];
- }
-
- /**
- * Sets currency
- *
- * @param \SnapTrade\Model\Currency $currency currency
- *
- * @return self
- */
- public function setCurrency($currency)
- {
-
- if (is_null($currency)) {
- throw new \InvalidArgumentException('non-nullable currency cannot be null');
- }
-
- $this->container['currency'] = $currency;
-
- return $this;
- }
-
- /**
- * Gets exchange
- *
- * @return \SnapTrade\Model\Exchange|null
- */
- public function getExchange()
- {
- return $this->container['exchange'];
- }
-
- /**
- * Sets exchange
- *
- * @param \SnapTrade\Model\Exchange|null $exchange exchange
- *
- * @return self
- */
- public function setExchange($exchange)
- {
-
- if (is_null($exchange)) {
- throw new \InvalidArgumentException('non-nullable exchange cannot be null');
- }
-
- $this->container['exchange'] = $exchange;
-
- return $this;
- }
-
- /**
- * Gets type
- *
- * @return \SnapTrade\Model\SecurityType
- */
- public function getType()
- {
- return $this->container['type'];
- }
-
- /**
- * Sets type
- *
- * @param \SnapTrade\Model\SecurityType $type type
- *
- * @return self
- */
- public function setType($type)
- {
-
- if (is_null($type)) {
- throw new \InvalidArgumentException('non-nullable type cannot be null');
- }
-
- $this->container['type'] = $type;
-
- return $this;
- }
-
- /**
- * Gets currencies
- *
- * @return \SnapTrade\Model\Currency[]
- */
- public function getCurrencies()
- {
- return $this->container['currencies'];
- }
-
- /**
- * Sets currencies
- *
- * @param \SnapTrade\Model\Currency[] $currencies currencies
- *
- * @return self
- */
- public function setCurrencies($currencies)
- {
-
- if (is_null($currencies)) {
- throw new \InvalidArgumentException('non-nullable currencies cannot be null');
- }
-
- $this->container['currencies'] = $currencies;
-
- return $this;
- }
-
- /**
- * Gets figi_code
- *
- * @return string|null
- */
- public function getFigiCode()
- {
- return $this->container['figi_code'];
- }
-
- /**
- * Sets figi_code
- *
- * @param string|null $figi_code figi_code
- *
- * @return self
- */
- public function setFigiCode($figi_code)
- {
-
- if (is_null($figi_code)) {
- array_push($this->openAPINullablesSetToNull, 'figi_code');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('figi_code', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
-
- $this->container['figi_code'] = $figi_code;
-
- return $this;
- }
-
- /**
- * Gets figi_instrument
- *
- * @return \SnapTrade\Model\SymbolFigiInstrument|null
- */
- public function getFigiInstrument()
- {
- return $this->container['figi_instrument'];
- }
-
- /**
- * Sets figi_instrument
- *
- * @param \SnapTrade\Model\SymbolFigiInstrument|null $figi_instrument figi_instrument
- *
- * @return self
- */
- public function setFigiInstrument($figi_instrument)
- {
-
- if (is_null($figi_instrument)) {
- array_push($this->openAPINullablesSetToNull, 'figi_instrument');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('figi_instrument', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
-
- $this->container['figi_instrument'] = $figi_instrument;
-
- 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/CalculatedTrade.php b/lib/Model/CalculatedTrade.php
deleted file mode 100644
index f1e44f8..0000000
--- a/lib/Model/CalculatedTrade.php
+++ /dev/null
@@ -1,441 +0,0 @@
-
- */
-class CalculatedTrade implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'CalculatedTrade';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'id' => 'string',
- 'trades' => '\SnapTrade\Model\Trade[]'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'id' => 'uuid',
- 'trades' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'id' => false,
- 'trades' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'id' => 'id',
- 'trades' => 'trades'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'id' => 'setId',
- 'trades' => 'setTrades'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'id' => 'getId',
- 'trades' => 'getTrades'
- ];
-
- /**
- * 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('id', $data ?? [], null);
- $this->setIfExists('trades', $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 id
- *
- * @return string|null
- */
- public function getId()
- {
- return $this->container['id'];
- }
-
- /**
- * Sets id
- *
- * @param string|null $id id
- *
- * @return self
- */
- public function setId($id)
- {
-
- if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
- }
-
- $this->container['id'] = $id;
-
- return $this;
- }
-
- /**
- * Gets trades
- *
- * @return \SnapTrade\Model\Trade[]|null
- */
- public function getTrades()
- {
- return $this->container['trades'];
- }
-
- /**
- * Sets trades
- *
- * @param \SnapTrade\Model\Trade[]|null $trades trades
- *
- * @return self
- */
- public function setTrades($trades)
- {
-
- if (is_null($trades)) {
- throw new \InvalidArgumentException('non-nullable trades cannot be null');
- }
-
- $this->container['trades'] = $trades;
-
- 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/Exchange.php b/lib/Model/Exchange.php
index 6d443b5..e1d4aad 100644
--- a/lib/Model/Exchange.php
+++ b/lib/Model/Exchange.php
@@ -30,7 +30,7 @@
* Exchange Class Doc Comment
*
* @category Class
- * @description Stock Exchange
+ * @description Describes a single stock or crypto exchange.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -345,7 +345,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id Unique ID for the exchange in SnapTrade.
*
* @return self
*/
@@ -374,7 +374,7 @@ public function getCode()
/**
* Sets code
*
- * @param string|null $code code
+ * @param string|null $code A short name for the exchange. For standardized exchange code, please us the `mic_code` field.
*
* @return self
*/
@@ -403,7 +403,7 @@ public function getMicCode()
/**
* Sets mic_code
*
- * @param string|null $mic_code mic_code
+ * @param string|null $mic_code The [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) (MIC) for the exchange.
*
* @return self
*/
@@ -432,7 +432,7 @@ public function getName()
/**
* Sets name
*
- * @param string|null $name name
+ * @param string|null $name The full name of the exchange.
*
* @return self
*/
@@ -461,7 +461,7 @@ public function getTimezone()
/**
* Sets timezone
*
- * @param string|null $timezone timezone
+ * @param string|null $timezone The timezone for the trading hours (`start_time` and `close_time`) of the exchange.
*
* @return self
*/
@@ -490,7 +490,7 @@ public function getStartTime()
/**
* Sets start_time
*
- * @param string|null $start_time start_time
+ * @param string|null $start_time The time when the exchange opens for trading.
*
* @return self
*/
@@ -519,7 +519,7 @@ public function getCloseTime()
/**
* Sets close_time
*
- * @param string|null $close_time close_time
+ * @param string|null $close_time The time when the exchange closes for trading.
*
* @return self
*/
@@ -548,7 +548,7 @@ public function getSuffix()
/**
* Sets suffix
*
- * @param string|null $suffix suffix
+ * @param string|null $suffix The suffix to be appended to the symbol when trading on this exchange. For example, the suffix for the Toronto Stock Exchange is `.TO`. See `UniversalSymbol->symbol` and `UniversalSymbol->raw_symbol` for more detail.
*
* @return self
*/
diff --git a/lib/Model/ExcludedAsset.php b/lib/Model/ExcludedAsset.php
deleted file mode 100644
index 5cf9386..0000000
--- a/lib/Model/ExcludedAsset.php
+++ /dev/null
@@ -1,405 +0,0 @@
-
- */
-class ExcludedAsset implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ExcludedAsset';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'symbol' => '\SnapTrade\Model\UniversalSymbol'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'symbol' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'symbol' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'symbol' => 'symbol'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'symbol' => 'setSymbol'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'symbol' => 'getSymbol'
- ];
-
- /**
- * 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('symbol', $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 symbol
- *
- * @return \SnapTrade\Model\UniversalSymbol|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param \SnapTrade\Model\UniversalSymbol|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- 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/FigiInstrument.php b/lib/Model/FigiInstrument.php
index b94d76b..cc1b968 100644
--- a/lib/Model/FigiInstrument.php
+++ b/lib/Model/FigiInstrument.php
@@ -30,7 +30,7 @@
* FigiInstrument Class Doc Comment
*
* @category Class
- * @description Open FIGI Identifiers
+ * @description Financial Instrument Global Identifier (FIGI) information for the security. See [OpenFIGI](https://www.openfigi.com/) for more information.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -303,7 +303,7 @@ public function getFigiCode()
/**
* Sets figi_code
*
- * @param string|null $figi_code figi_code
+ * @param string|null $figi_code This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information.
*
* @return self
*/
@@ -339,7 +339,7 @@ public function getFigiShareClass()
/**
* Sets figi_share_class
*
- * @param string|null $figi_share_class figi_share_class
+ * @param string|null $figi_share_class This enables users to link multiple FIGIs for the same security in order to obtain an aggregated view across all countries and all exchanges. For example, `AAPL` has a different FIGI for each exchange/trading venue it is traded on. The `figi_share_class` is the same for all of these FIGIs. See section 1.4.3 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information.
*
* @return self
*/
diff --git a/lib/Model/JWT.php b/lib/Model/JWT.php
deleted file mode 100644
index d363721..0000000
--- a/lib/Model/JWT.php
+++ /dev/null
@@ -1,405 +0,0 @@
-
- */
-class JWT implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'JWT';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'token' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'token' => 'jwt'
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'token' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'token' => 'token'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'token' => 'setToken'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'token' => 'getToken'
- ];
-
- /**
- * 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('token', $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 token
- *
- * @return string|null
- */
- public function getToken()
- {
- return $this->container['token'];
- }
-
- /**
- * Sets token
- *
- * @param string|null $token token
- *
- * @return self
- */
- public function setToken($token)
- {
-
- if (is_null($token)) {
- throw new \InvalidArgumentException('non-nullable token cannot be null');
- }
-
- $this->container['token'] = $token;
-
- 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/ModelAssetClass.php b/lib/Model/ModelAssetClass.php
deleted file mode 100644
index 08b4089..0000000
--- a/lib/Model/ModelAssetClass.php
+++ /dev/null
@@ -1,440 +0,0 @@
-
- */
-class ModelAssetClass implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ModelAssetClass';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'id' => 'string',
- 'name' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'id' => 'uuid',
- 'name' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'id' => false,
- 'name' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'id' => 'id',
- 'name' => 'name'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'id' => 'setId',
- 'name' => 'setName'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'id' => 'getId',
- 'name' => 'getName'
- ];
-
- /**
- * 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('id', $data ?? [], null);
- $this->setIfExists('name', $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 id
- *
- * @return string|null
- */
- public function getId()
- {
- return $this->container['id'];
- }
-
- /**
- * Sets id
- *
- * @param string|null $id id
- *
- * @return self
- */
- public function setId($id)
- {
-
- if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
- }
-
- $this->container['id'] = $id;
-
- return $this;
- }
-
- /**
- * Gets name
- *
- * @return string|null
- */
- public function getName()
- {
- return $this->container['name'];
- }
-
- /**
- * Sets name
- *
- * @param string|null $name name
- *
- * @return self
- */
- public function setName($name)
- {
-
- if (is_null($name)) {
- throw new \InvalidArgumentException('non-nullable name cannot be null');
- }
-
- $this->container['name'] = $name;
-
- 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/ModelAssetClassDetails.php b/lib/Model/ModelAssetClassDetails.php
deleted file mode 100644
index 4364eff..0000000
--- a/lib/Model/ModelAssetClassDetails.php
+++ /dev/null
@@ -1,440 +0,0 @@
-
- */
-class ModelAssetClassDetails implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ModelAssetClassDetails';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'model_asset_class' => '\SnapTrade\Model\ModelAssetClass',
- 'model_asset_class_target' => '\SnapTrade\Model\ModelAssetClassTarget[]'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'model_asset_class' => null,
- 'model_asset_class_target' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'model_asset_class' => false,
- 'model_asset_class_target' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'model_asset_class' => 'model_asset_class',
- 'model_asset_class_target' => 'model_asset_class_target'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'model_asset_class' => 'setModelAssetClass',
- 'model_asset_class_target' => 'setModelAssetClassTarget'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'model_asset_class' => 'getModelAssetClass',
- 'model_asset_class_target' => 'getModelAssetClassTarget'
- ];
-
- /**
- * 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('model_asset_class', $data ?? [], null);
- $this->setIfExists('model_asset_class_target', $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 model_asset_class
- *
- * @return \SnapTrade\Model\ModelAssetClass|null
- */
- public function getModelAssetClass()
- {
- return $this->container['model_asset_class'];
- }
-
- /**
- * Sets model_asset_class
- *
- * @param \SnapTrade\Model\ModelAssetClass|null $model_asset_class model_asset_class
- *
- * @return self
- */
- public function setModelAssetClass($model_asset_class)
- {
-
- if (is_null($model_asset_class)) {
- throw new \InvalidArgumentException('non-nullable model_asset_class cannot be null');
- }
-
- $this->container['model_asset_class'] = $model_asset_class;
-
- return $this;
- }
-
- /**
- * Gets model_asset_class_target
- *
- * @return \SnapTrade\Model\ModelAssetClassTarget[]|null
- */
- public function getModelAssetClassTarget()
- {
- return $this->container['model_asset_class_target'];
- }
-
- /**
- * Sets model_asset_class_target
- *
- * @param \SnapTrade\Model\ModelAssetClassTarget[]|null $model_asset_class_target model_asset_class_target
- *
- * @return self
- */
- public function setModelAssetClassTarget($model_asset_class_target)
- {
-
- if (is_null($model_asset_class_target)) {
- throw new \InvalidArgumentException('non-nullable model_asset_class_target cannot be null');
- }
-
- $this->container['model_asset_class_target'] = $model_asset_class_target;
-
- 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/ModelAssetClassTarget.php b/lib/Model/ModelAssetClassTarget.php
deleted file mode 100644
index 78ab69a..0000000
--- a/lib/Model/ModelAssetClassTarget.php
+++ /dev/null
@@ -1,404 +0,0 @@
-
- */
-class ModelAssetClassTarget implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ModelAssetClassTarget';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'symbol' => '\SnapTrade\Model\UniversalSymbol'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'symbol' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'symbol' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'symbol' => 'symbol'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'symbol' => 'setSymbol'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'symbol' => 'getSymbol'
- ];
-
- /**
- * 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('symbol', $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 symbol
- *
- * @return \SnapTrade\Model\UniversalSymbol|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param \SnapTrade\Model\UniversalSymbol|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- 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/ModelPortfolioAssetClass.php b/lib/Model/ModelPortfolioAssetClass.php
deleted file mode 100644
index 4528756..0000000
--- a/lib/Model/ModelPortfolioAssetClass.php
+++ /dev/null
@@ -1,456 +0,0 @@
-
- */
-class ModelPortfolioAssetClass implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ModelPortfolioAssetClass';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'model_asset_class' => '\SnapTrade\Model\ModelAssetClass',
- 'percent' => 'int'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'model_asset_class' => null,
- 'percent' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'model_asset_class' => false,
- 'percent' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'model_asset_class' => 'model_asset_class',
- 'percent' => 'percent'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'model_asset_class' => 'setModelAssetClass',
- 'percent' => 'setPercent'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'model_asset_class' => 'getModelAssetClass',
- 'percent' => 'getPercent'
- ];
-
- /**
- * 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('model_asset_class', $data ?? [], null);
- $this->setIfExists('percent', $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 = [];
-
- if (!is_null($this->container['percent']) && ($this->container['percent'] > 100)) {
- $invalidProperties[] = "invalid value for 'percent', must be smaller than or equal to 100.";
- }
-
- if (!is_null($this->container['percent']) && ($this->container['percent'] < 0)) {
- $invalidProperties[] = "invalid value for 'percent', must be bigger than or equal to 0.";
- }
-
- 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 model_asset_class
- *
- * @return \SnapTrade\Model\ModelAssetClass|null
- */
- public function getModelAssetClass()
- {
- return $this->container['model_asset_class'];
- }
-
- /**
- * Sets model_asset_class
- *
- * @param \SnapTrade\Model\ModelAssetClass|null $model_asset_class model_asset_class
- *
- * @return self
- */
- public function setModelAssetClass($model_asset_class)
- {
-
- if (is_null($model_asset_class)) {
- throw new \InvalidArgumentException('non-nullable model_asset_class cannot be null');
- }
-
- $this->container['model_asset_class'] = $model_asset_class;
-
- return $this;
- }
-
- /**
- * Gets percent
- *
- * @return int|null
- */
- public function getPercent()
- {
- return $this->container['percent'];
- }
-
- /**
- * Sets percent
- *
- * @param int|null $percent percent
- *
- * @return self
- */
- public function setPercent($percent)
- {
-
- if (!is_null($percent) && ($percent > 100)) {
- throw new \InvalidArgumentException('invalid value for $percent when calling ModelPortfolioAssetClass., must be smaller than or equal to 100.');
- }
- if (!is_null($percent) && ($percent < 0)) {
- throw new \InvalidArgumentException('invalid value for $percent when calling ModelPortfolioAssetClass., must be bigger than or equal to 0.');
- }
-
-
- if (is_null($percent)) {
- throw new \InvalidArgumentException('non-nullable percent cannot be null');
- }
-
- $this->container['percent'] = $percent;
-
- 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/ModelPortfolioDetails.php b/lib/Model/ModelPortfolioDetails.php
deleted file mode 100644
index 9aaad95..0000000
--- a/lib/Model/ModelPortfolioDetails.php
+++ /dev/null
@@ -1,476 +0,0 @@
-
- */
-class ModelPortfolioDetails implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ModelPortfolioDetails';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'model_portfolio' => '\SnapTrade\Model\ModelPortfolio',
- 'model_portfolio_security' => '\SnapTrade\Model\ModelPortfolioSecurity[]',
- 'model_portfolio_asset_class' => '\SnapTrade\Model\ModelPortfolioAssetClass[]'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'model_portfolio' => null,
- 'model_portfolio_security' => null,
- 'model_portfolio_asset_class' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'model_portfolio' => false,
- 'model_portfolio_security' => false,
- 'model_portfolio_asset_class' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'model_portfolio' => 'model_portfolio',
- 'model_portfolio_security' => 'model_portfolio_security',
- 'model_portfolio_asset_class' => 'model_portfolio_asset_class'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'model_portfolio' => 'setModelPortfolio',
- 'model_portfolio_security' => 'setModelPortfolioSecurity',
- 'model_portfolio_asset_class' => 'setModelPortfolioAssetClass'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'model_portfolio' => 'getModelPortfolio',
- 'model_portfolio_security' => 'getModelPortfolioSecurity',
- 'model_portfolio_asset_class' => 'getModelPortfolioAssetClass'
- ];
-
- /**
- * 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('model_portfolio', $data ?? [], null);
- $this->setIfExists('model_portfolio_security', $data ?? [], null);
- $this->setIfExists('model_portfolio_asset_class', $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 model_portfolio
- *
- * @return \SnapTrade\Model\ModelPortfolio|null
- */
- public function getModelPortfolio()
- {
- return $this->container['model_portfolio'];
- }
-
- /**
- * Sets model_portfolio
- *
- * @param \SnapTrade\Model\ModelPortfolio|null $model_portfolio model_portfolio
- *
- * @return self
- */
- public function setModelPortfolio($model_portfolio)
- {
-
- if (is_null($model_portfolio)) {
- throw new \InvalidArgumentException('non-nullable model_portfolio cannot be null');
- }
-
- $this->container['model_portfolio'] = $model_portfolio;
-
- return $this;
- }
-
- /**
- * Gets model_portfolio_security
- *
- * @return \SnapTrade\Model\ModelPortfolioSecurity[]|null
- */
- public function getModelPortfolioSecurity()
- {
- return $this->container['model_portfolio_security'];
- }
-
- /**
- * Sets model_portfolio_security
- *
- * @param \SnapTrade\Model\ModelPortfolioSecurity[]|null $model_portfolio_security model_portfolio_security
- *
- * @return self
- */
- public function setModelPortfolioSecurity($model_portfolio_security)
- {
-
- if (is_null($model_portfolio_security)) {
- throw new \InvalidArgumentException('non-nullable model_portfolio_security cannot be null');
- }
-
- $this->container['model_portfolio_security'] = $model_portfolio_security;
-
- return $this;
- }
-
- /**
- * Gets model_portfolio_asset_class
- *
- * @return \SnapTrade\Model\ModelPortfolioAssetClass[]|null
- */
- public function getModelPortfolioAssetClass()
- {
- return $this->container['model_portfolio_asset_class'];
- }
-
- /**
- * Sets model_portfolio_asset_class
- *
- * @param \SnapTrade\Model\ModelPortfolioAssetClass[]|null $model_portfolio_asset_class model_portfolio_asset_class
- *
- * @return self
- */
- public function setModelPortfolioAssetClass($model_portfolio_asset_class)
- {
-
- if (is_null($model_portfolio_asset_class)) {
- throw new \InvalidArgumentException('non-nullable model_portfolio_asset_class cannot be null');
- }
-
- $this->container['model_portfolio_asset_class'] = $model_portfolio_asset_class;
-
- 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/ModelPortfolioSecurity.php b/lib/Model/ModelPortfolioSecurity.php
deleted file mode 100644
index 2b1e512..0000000
--- a/lib/Model/ModelPortfolioSecurity.php
+++ /dev/null
@@ -1,456 +0,0 @@
-
- */
-class ModelPortfolioSecurity implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'ModelPortfolioSecurity';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'symbol' => '\SnapTrade\Model\UniversalSymbol',
- 'percent' => 'int'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'symbol' => null,
- 'percent' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'symbol' => false,
- 'percent' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'symbol' => 'symbol',
- 'percent' => 'percent'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'symbol' => 'setSymbol',
- 'percent' => 'setPercent'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'symbol' => 'getSymbol',
- 'percent' => 'getPercent'
- ];
-
- /**
- * 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('symbol', $data ?? [], null);
- $this->setIfExists('percent', $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 = [];
-
- if (!is_null($this->container['percent']) && ($this->container['percent'] > 100)) {
- $invalidProperties[] = "invalid value for 'percent', must be smaller than or equal to 100.";
- }
-
- if (!is_null($this->container['percent']) && ($this->container['percent'] < 0)) {
- $invalidProperties[] = "invalid value for 'percent', must be bigger than or equal to 0.";
- }
-
- 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 symbol
- *
- * @return \SnapTrade\Model\UniversalSymbol|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param \SnapTrade\Model\UniversalSymbol|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets percent
- *
- * @return int|null
- */
- public function getPercent()
- {
- return $this->container['percent'];
- }
-
- /**
- * Sets percent
- *
- * @param int|null $percent percent
- *
- * @return self
- */
- public function setPercent($percent)
- {
-
- if (!is_null($percent) && ($percent > 100)) {
- throw new \InvalidArgumentException('invalid value for $percent when calling ModelPortfolioSecurity., must be smaller than or equal to 100.');
- }
- if (!is_null($percent) && ($percent < 0)) {
- throw new \InvalidArgumentException('invalid value for $percent when calling ModelPortfolioSecurity., must be bigger than or equal to 0.');
- }
-
-
- if (is_null($percent)) {
- throw new \InvalidArgumentException('non-nullable percent cannot be null');
- }
-
- $this->container['percent'] = $percent;
-
- 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/OptionBrokerageSymbol.php b/lib/Model/OptionBrokerageSymbol.php
index acee1a8..29aedca 100644
--- a/lib/Model/OptionBrokerageSymbol.php
+++ b/lib/Model/OptionBrokerageSymbol.php
@@ -30,7 +30,7 @@
* OptionBrokerageSymbol Class Doc Comment
*
* @category Class
- * @description Option Brokerage symbol
+ * @description Uniquely describes a security for the option position within an account. The distinction between this and the `option_symbol` child property is that this object is specific to a position within an account, while the `option_symbol` child property is universal across all brokerage accounts. The caller should rely on the `option_symbol` child property for most use cases.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -301,6 +301,7 @@ public function valid()
* Gets id
*
* @return string|null
+ * @deprecated
*/
public function getId()
{
@@ -310,9 +311,10 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id 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 setId($id)
{
@@ -330,6 +332,7 @@ public function setId($id)
* Gets description
*
* @return string|null
+ * @deprecated
*/
public function getDescription()
{
@@ -339,9 +342,10 @@ public function getDescription()
/**
* Sets description
*
- * @param string|null $description description
+ * @param string|null $description This field is deprecated and the caller should use the `option_symbol` child property's `description` instead.
*
* @return self
+ * @deprecated
*/
public function setDescription($description)
{
diff --git a/lib/Model/OptionsPosition.php b/lib/Model/OptionsPosition.php
index 4e8ab87..9e10166 100644
--- a/lib/Model/OptionsPosition.php
+++ b/lib/Model/OptionsPosition.php
@@ -389,7 +389,7 @@ public function getUnits()
/**
* Sets units
*
- * @param float|null $units The number of contracts for this option position.
+ * @param float|null $units The number of contracts for this option position. A positive number indicates a long position, while a negative number indicates a short position.
*
* @return self
*/
@@ -409,6 +409,7 @@ public function setUnits($units)
* Gets currency
*
* @return \SnapTrade\Model\OptionsPositionCurrency|null
+ * @deprecated
*/
public function getCurrency()
{
@@ -421,6 +422,7 @@ public function getCurrency()
* @param \SnapTrade\Model\OptionsPositionCurrency|null $currency currency
*
* @return self
+ * @deprecated
*/
public function setCurrency($currency)
{
diff --git a/lib/Model/OptionsPositionCurrency.php b/lib/Model/OptionsPositionCurrency.php
index 8ea6954..bac0841 100644
--- a/lib/Model/OptionsPositionCurrency.php
+++ b/lib/Model/OptionsPositionCurrency.php
@@ -30,6 +30,7 @@
* OptionsPositionCurrency Class Doc Comment
*
* @category Class
+ * @description The currency of the price. This field is deprecated and will be removed in a future version. The currency of the price is determined by the currency of the underlying security.
* @package SnapTrade
* @implements \ArrayAccess
*/
diff --git a/lib/Model/OptionsSymbol.php b/lib/Model/OptionsSymbol.php
index 2a1865e..77492b6 100644
--- a/lib/Model/OptionsSymbol.php
+++ b/lib/Model/OptionsSymbol.php
@@ -30,7 +30,7 @@
* OptionsSymbol Class Doc Comment
*
* @category Class
- * @description Options Symbol
+ * @description Uniquely describes an option security + exchange combination across all brokerages.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -55,11 +55,9 @@ class OptionsSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
'ticker' => 'string',
'option_type' => 'string',
'strike_price' => 'float',
- 'expiration_date' => 'string',
+ 'expiration_date' => '\DateTime',
'is_mini_option' => 'bool',
- 'underlying_symbol' => '\SnapTrade\Model\UnderlyingSymbol',
- 'local_id' => 'string',
- 'exchange_id' => 'string'
+ 'underlying_symbol' => '\SnapTrade\Model\UnderlyingSymbol'
];
/**
@@ -74,11 +72,9 @@ class OptionsSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
'ticker' => null,
'option_type' => null,
'strike_price' => null,
- 'expiration_date' => 'datetime',
+ 'expiration_date' => 'date',
'is_mini_option' => null,
- 'underlying_symbol' => null,
- 'local_id' => null,
- 'exchange_id' => 'uuid'
+ 'underlying_symbol' => null
];
/**
@@ -93,9 +89,7 @@ class OptionsSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
'strike_price' => false,
'expiration_date' => false,
'is_mini_option' => false,
- 'underlying_symbol' => false,
- 'local_id' => false,
- 'exchange_id' => false
+ 'underlying_symbol' => false
];
/**
@@ -190,9 +184,7 @@ public function isNullableSetToNull(string $property): bool
'strike_price' => 'strike_price',
'expiration_date' => 'expiration_date',
'is_mini_option' => 'is_mini_option',
- 'underlying_symbol' => 'underlying_symbol',
- 'local_id' => 'local_id',
- 'exchange_id' => 'exchange_id'
+ 'underlying_symbol' => 'underlying_symbol'
];
/**
@@ -207,9 +199,7 @@ public function isNullableSetToNull(string $property): bool
'strike_price' => 'setStrikePrice',
'expiration_date' => 'setExpirationDate',
'is_mini_option' => 'setIsMiniOption',
- 'underlying_symbol' => 'setUnderlyingSymbol',
- 'local_id' => 'setLocalId',
- 'exchange_id' => 'setExchangeId'
+ 'underlying_symbol' => 'setUnderlyingSymbol'
];
/**
@@ -224,9 +214,7 @@ public function isNullableSetToNull(string $property): bool
'strike_price' => 'getStrikePrice',
'expiration_date' => 'getExpirationDate',
'is_mini_option' => 'getIsMiniOption',
- 'underlying_symbol' => 'getUnderlyingSymbol',
- 'local_id' => 'getLocalId',
- 'exchange_id' => 'getExchangeId'
+ 'underlying_symbol' => 'getUnderlyingSymbol'
];
/**
@@ -308,8 +296,6 @@ public function __construct(array $data = null)
$this->setIfExists('expiration_date', $data ?? [], null);
$this->setIfExists('is_mini_option', $data ?? [], null);
$this->setIfExists('underlying_symbol', $data ?? [], null);
- $this->setIfExists('local_id', $data ?? [], null);
- $this->setIfExists('exchange_id', $data ?? [], null);
}
/**
@@ -394,7 +380,7 @@ public function getId()
/**
* Sets id
*
- * @param string $id id
+ * @param string $id Unique identifier for the option symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
*
* @return self
*/
@@ -423,7 +409,7 @@ public function getTicker()
/**
* Sets ticker
*
- * @param string $ticker ticker
+ * @param string $ticker The [OCC symbol](https://en.wikipedia.org/wiki/Option_symbol) for the option.
*
* @return self
*/
@@ -452,7 +438,7 @@ public function getOptionType()
/**
* Sets option_type
*
- * @param string $option_type option_type
+ * @param string $option_type The type of option. Either \"CALL\" or \"PUT\".
*
* @return self
*/
@@ -491,7 +477,7 @@ public function getStrikePrice()
/**
* Sets strike_price
*
- * @param float $strike_price strike_price
+ * @param float $strike_price The option strike price.
*
* @return self
*/
@@ -510,7 +496,7 @@ public function setStrikePrice($strike_price)
/**
* Gets expiration_date
*
- * @return string
+ * @return \DateTime
*/
public function getExpirationDate()
{
@@ -520,7 +506,7 @@ public function getExpirationDate()
/**
* Sets expiration_date
*
- * @param string $expiration_date expiration_date
+ * @param \DateTime $expiration_date The option expiration date.
*
* @return self
*/
@@ -549,7 +535,7 @@ public function getIsMiniOption()
/**
* Sets is_mini_option
*
- * @param bool|null $is_mini_option is_mini_option
+ * @param bool|null $is_mini_option Whether the option is a mini option. Mini options have 10 underlying shares per contract instead of the standard 100.
*
* @return self
*/
@@ -593,64 +579,6 @@ public function setUnderlyingSymbol($underlying_symbol)
return $this;
}
-
- /**
- * Gets local_id
- *
- * @return string|null
- */
- public function getLocalId()
- {
- return $this->container['local_id'];
- }
-
- /**
- * Sets local_id
- *
- * @param string|null $local_id local_id
- *
- * @return self
- */
- public function setLocalId($local_id)
- {
-
- if (is_null($local_id)) {
- throw new \InvalidArgumentException('non-nullable local_id cannot be null');
- }
-
- $this->container['local_id'] = $local_id;
-
- return $this;
- }
-
- /**
- * Gets exchange_id
- *
- * @return string|null
- */
- public function getExchangeId()
- {
- return $this->container['exchange_id'];
- }
-
- /**
- * Sets exchange_id
- *
- * @param string|null $exchange_id exchange_id
- *
- * @return self
- */
- public function setExchangeId($exchange_id)
- {
-
- if (is_null($exchange_id)) {
- throw new \InvalidArgumentException('non-nullable exchange_id cannot be null');
- }
-
- $this->container['exchange_id'] = $exchange_id;
-
- return $this;
- }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/lib/Model/PortfolioGroupInfo.php b/lib/Model/PortfolioGroupInfo.php
deleted file mode 100644
index 2996f07..0000000
--- a/lib/Model/PortfolioGroupInfo.php
+++ /dev/null
@@ -1,765 +0,0 @@
-
- */
-class PortfolioGroupInfo implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'PortfolioGroupInfo';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'symbols' => '\SnapTrade\Model\UniversalSymbol[]',
- 'quotable_symbols' => '\SnapTrade\Model\UniversalSymbol[]',
- 'balances' => '\SnapTrade\Model\Balance[]',
- 'positions' => '\SnapTrade\Model\Position[]',
- 'target_positions' => '\SnapTrade\Model\TargetAsset[]',
- 'ideal_positions' => '\SnapTrade\Model\Position[]',
- 'excluded_positions' => '\SnapTrade\Model\ExcludedAsset[]',
- 'calculated_trades' => '\SnapTrade\Model\CalculatedTrade[]',
- 'brokerage_authorizations' => '\SnapTrade\Model\BrokerageAuthorization[]',
- 'accuracy' => 'float',
- 'settings' => '\SnapTrade\Model\PortfolioGroupSettings'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'symbols' => null,
- 'quotable_symbols' => null,
- 'balances' => null,
- 'positions' => null,
- 'target_positions' => null,
- 'ideal_positions' => null,
- 'excluded_positions' => null,
- 'calculated_trades' => null,
- 'brokerage_authorizations' => null,
- 'accuracy' => null,
- 'settings' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'symbols' => false,
- 'quotable_symbols' => false,
- 'balances' => false,
- 'positions' => false,
- 'target_positions' => false,
- 'ideal_positions' => false,
- 'excluded_positions' => false,
- 'calculated_trades' => false,
- 'brokerage_authorizations' => false,
- 'accuracy' => false,
- 'settings' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'symbols' => 'symbols',
- 'quotable_symbols' => 'quotable_symbols',
- 'balances' => 'balances',
- 'positions' => 'positions',
- 'target_positions' => 'target_positions',
- 'ideal_positions' => 'ideal_positions',
- 'excluded_positions' => 'excluded_positions',
- 'calculated_trades' => 'calculated_trades',
- 'brokerage_authorizations' => 'brokerage_authorizations',
- 'accuracy' => 'accuracy',
- 'settings' => 'settings'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'symbols' => 'setSymbols',
- 'quotable_symbols' => 'setQuotableSymbols',
- 'balances' => 'setBalances',
- 'positions' => 'setPositions',
- 'target_positions' => 'setTargetPositions',
- 'ideal_positions' => 'setIdealPositions',
- 'excluded_positions' => 'setExcludedPositions',
- 'calculated_trades' => 'setCalculatedTrades',
- 'brokerage_authorizations' => 'setBrokerageAuthorizations',
- 'accuracy' => 'setAccuracy',
- 'settings' => 'setSettings'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'symbols' => 'getSymbols',
- 'quotable_symbols' => 'getQuotableSymbols',
- 'balances' => 'getBalances',
- 'positions' => 'getPositions',
- 'target_positions' => 'getTargetPositions',
- 'ideal_positions' => 'getIdealPositions',
- 'excluded_positions' => 'getExcludedPositions',
- 'calculated_trades' => 'getCalculatedTrades',
- 'brokerage_authorizations' => 'getBrokerageAuthorizations',
- 'accuracy' => 'getAccuracy',
- 'settings' => 'getSettings'
- ];
-
- /**
- * 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('symbols', $data ?? [], null);
- $this->setIfExists('quotable_symbols', $data ?? [], null);
- $this->setIfExists('balances', $data ?? [], null);
- $this->setIfExists('positions', $data ?? [], null);
- $this->setIfExists('target_positions', $data ?? [], null);
- $this->setIfExists('ideal_positions', $data ?? [], null);
- $this->setIfExists('excluded_positions', $data ?? [], null);
- $this->setIfExists('calculated_trades', $data ?? [], null);
- $this->setIfExists('brokerage_authorizations', $data ?? [], null);
- $this->setIfExists('accuracy', $data ?? [], null);
- $this->setIfExists('settings', $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 symbols
- *
- * @return \SnapTrade\Model\UniversalSymbol[]|null
- */
- public function getSymbols()
- {
- return $this->container['symbols'];
- }
-
- /**
- * Sets symbols
- *
- * @param \SnapTrade\Model\UniversalSymbol[]|null $symbols symbols
- *
- * @return self
- */
- public function setSymbols($symbols)
- {
-
- if (is_null($symbols)) {
- throw new \InvalidArgumentException('non-nullable symbols cannot be null');
- }
-
- $this->container['symbols'] = $symbols;
-
- return $this;
- }
-
- /**
- * Gets quotable_symbols
- *
- * @return \SnapTrade\Model\UniversalSymbol[]|null
- */
- public function getQuotableSymbols()
- {
- return $this->container['quotable_symbols'];
- }
-
- /**
- * Sets quotable_symbols
- *
- * @param \SnapTrade\Model\UniversalSymbol[]|null $quotable_symbols quotable_symbols
- *
- * @return self
- */
- public function setQuotableSymbols($quotable_symbols)
- {
-
- if (is_null($quotable_symbols)) {
- throw new \InvalidArgumentException('non-nullable quotable_symbols cannot be null');
- }
-
- $this->container['quotable_symbols'] = $quotable_symbols;
-
- return $this;
- }
-
- /**
- * Gets balances
- *
- * @return \SnapTrade\Model\Balance[]|null
- */
- public function getBalances()
- {
- return $this->container['balances'];
- }
-
- /**
- * Sets balances
- *
- * @param \SnapTrade\Model\Balance[]|null $balances balances
- *
- * @return self
- */
- public function setBalances($balances)
- {
-
- if (is_null($balances)) {
- throw new \InvalidArgumentException('non-nullable balances cannot be null');
- }
-
- $this->container['balances'] = $balances;
-
- return $this;
- }
-
- /**
- * Gets positions
- *
- * @return \SnapTrade\Model\Position[]|null
- */
- public function getPositions()
- {
- return $this->container['positions'];
- }
-
- /**
- * Sets positions
- *
- * @param \SnapTrade\Model\Position[]|null $positions positions
- *
- * @return self
- */
- public function setPositions($positions)
- {
-
- if (is_null($positions)) {
- throw new \InvalidArgumentException('non-nullable positions cannot be null');
- }
-
- $this->container['positions'] = $positions;
-
- return $this;
- }
-
- /**
- * Gets target_positions
- *
- * @return \SnapTrade\Model\TargetAsset[]|null
- */
- public function getTargetPositions()
- {
- return $this->container['target_positions'];
- }
-
- /**
- * Sets target_positions
- *
- * @param \SnapTrade\Model\TargetAsset[]|null $target_positions target_positions
- *
- * @return self
- */
- public function setTargetPositions($target_positions)
- {
-
- if (is_null($target_positions)) {
- throw new \InvalidArgumentException('non-nullable target_positions cannot be null');
- }
-
- $this->container['target_positions'] = $target_positions;
-
- return $this;
- }
-
- /**
- * Gets ideal_positions
- *
- * @return \SnapTrade\Model\Position[]|null
- */
- public function getIdealPositions()
- {
- return $this->container['ideal_positions'];
- }
-
- /**
- * Sets ideal_positions
- *
- * @param \SnapTrade\Model\Position[]|null $ideal_positions ideal_positions
- *
- * @return self
- */
- public function setIdealPositions($ideal_positions)
- {
-
- if (is_null($ideal_positions)) {
- throw new \InvalidArgumentException('non-nullable ideal_positions cannot be null');
- }
-
- $this->container['ideal_positions'] = $ideal_positions;
-
- return $this;
- }
-
- /**
- * Gets excluded_positions
- *
- * @return \SnapTrade\Model\ExcludedAsset[]|null
- */
- public function getExcludedPositions()
- {
- return $this->container['excluded_positions'];
- }
-
- /**
- * Sets excluded_positions
- *
- * @param \SnapTrade\Model\ExcludedAsset[]|null $excluded_positions excluded_positions
- *
- * @return self
- */
- public function setExcludedPositions($excluded_positions)
- {
-
- if (is_null($excluded_positions)) {
- throw new \InvalidArgumentException('non-nullable excluded_positions cannot be null');
- }
-
- $this->container['excluded_positions'] = $excluded_positions;
-
- return $this;
- }
-
- /**
- * Gets calculated_trades
- *
- * @return \SnapTrade\Model\CalculatedTrade[]|null
- */
- public function getCalculatedTrades()
- {
- return $this->container['calculated_trades'];
- }
-
- /**
- * Sets calculated_trades
- *
- * @param \SnapTrade\Model\CalculatedTrade[]|null $calculated_trades calculated_trades
- *
- * @return self
- */
- public function setCalculatedTrades($calculated_trades)
- {
-
- if (is_null($calculated_trades)) {
- throw new \InvalidArgumentException('non-nullable calculated_trades cannot be null');
- }
-
- $this->container['calculated_trades'] = $calculated_trades;
-
- return $this;
- }
-
- /**
- * Gets brokerage_authorizations
- *
- * @return \SnapTrade\Model\BrokerageAuthorization[]|null
- */
- public function getBrokerageAuthorizations()
- {
- return $this->container['brokerage_authorizations'];
- }
-
- /**
- * Sets brokerage_authorizations
- *
- * @param \SnapTrade\Model\BrokerageAuthorization[]|null $brokerage_authorizations brokerage_authorizations
- *
- * @return self
- */
- public function setBrokerageAuthorizations($brokerage_authorizations)
- {
-
- if (is_null($brokerage_authorizations)) {
- throw new \InvalidArgumentException('non-nullable brokerage_authorizations cannot be null');
- }
-
- $this->container['brokerage_authorizations'] = $brokerage_authorizations;
-
- return $this;
- }
-
- /**
- * Gets accuracy
- *
- * @return float|null
- */
- public function getAccuracy()
- {
- return $this->container['accuracy'];
- }
-
- /**
- * Sets accuracy
- *
- * @param float|null $accuracy accuracy
- *
- * @return self
- */
- public function setAccuracy($accuracy)
- {
-
- if (is_null($accuracy)) {
- throw new \InvalidArgumentException('non-nullable accuracy cannot be null');
- }
-
- $this->container['accuracy'] = $accuracy;
-
- return $this;
- }
-
- /**
- * Gets settings
- *
- * @return \SnapTrade\Model\PortfolioGroupSettings|null
- */
- public function getSettings()
- {
- return $this->container['settings'];
- }
-
- /**
- * Sets settings
- *
- * @param \SnapTrade\Model\PortfolioGroupSettings|null $settings settings
- *
- * @return self
- */
- public function setSettings($settings)
- {
-
- if (is_null($settings)) {
- throw new \InvalidArgumentException('non-nullable settings cannot be null');
- }
-
- $this->container['settings'] = $settings;
-
- 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/PortfolioGroupPosition.php b/lib/Model/PortfolioGroupPosition.php
deleted file mode 100644
index 587448b..0000000
--- a/lib/Model/PortfolioGroupPosition.php
+++ /dev/null
@@ -1,484 +0,0 @@
-
- */
-class PortfolioGroupPosition implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'PortfolioGroupPosition';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'symbol' => '\SnapTrade\Model\UniversalSymbol',
- 'price' => 'float',
- 'units' => 'int'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'symbol' => null,
- 'price' => null,
- 'units' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'symbol' => false,
- 'price' => true,
- 'units' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'symbol' => 'symbol',
- 'price' => 'price',
- 'units' => 'units'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'symbol' => 'setSymbol',
- 'price' => 'setPrice',
- 'units' => 'setUnits'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'symbol' => 'getSymbol',
- 'price' => 'getPrice',
- 'units' => 'getUnits'
- ];
-
- /**
- * 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('symbol', $data ?? [], null);
- $this->setIfExists('price', $data ?? [], null);
- $this->setIfExists('units', $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 symbol
- *
- * @return \SnapTrade\Model\UniversalSymbol|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param \SnapTrade\Model\UniversalSymbol|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets price
- *
- * @return float|null
- */
- public function getPrice()
- {
- return $this->container['price'];
- }
-
- /**
- * Sets price
- *
- * @param float|null $price Last known market price for the symbol
- *
- * @return self
- */
- public function setPrice($price)
- {
-
- if (is_null($price)) {
- array_push($this->openAPINullablesSetToNull, 'price');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('price', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
-
- $this->container['price'] = $price;
-
- return $this;
- }
-
- /**
- * Gets units
- *
- * @return int|null
- */
- public function getUnits()
- {
- return $this->container['units'];
- }
-
- /**
- * Sets units
- *
- * @param int|null $units units
- *
- * @return self
- */
- public function setUnits($units)
- {
-
- if (is_null($units)) {
- throw new \InvalidArgumentException('non-nullable units cannot be null');
- }
-
- $this->container['units'] = $units;
-
- 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/PortfolioGroupSettings.php b/lib/Model/PortfolioGroupSettings.php
deleted file mode 100644
index da48070..0000000
--- a/lib/Model/PortfolioGroupSettings.php
+++ /dev/null
@@ -1,564 +0,0 @@
-
- */
-class PortfolioGroupSettings implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'PortfolioGroupSettings';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'buy_only' => 'bool',
- 'cash_optimizer' => 'bool',
- 'notify_frequency' => 'string',
- 'drift_threshold' => 'float',
- 'preferred_currency' => '\SnapTrade\Model\Currency'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'buy_only' => null,
- 'cash_optimizer' => null,
- 'notify_frequency' => null,
- 'drift_threshold' => null,
- 'preferred_currency' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'buy_only' => false,
- 'cash_optimizer' => false,
- 'notify_frequency' => false,
- 'drift_threshold' => false,
- 'preferred_currency' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'buy_only' => 'buyOnly',
- 'cash_optimizer' => 'cash_optimizer',
- 'notify_frequency' => 'notifyFrequency',
- 'drift_threshold' => 'driftThreshold',
- 'preferred_currency' => 'preferred_currency'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'buy_only' => 'setBuyOnly',
- 'cash_optimizer' => 'setCashOptimizer',
- 'notify_frequency' => 'setNotifyFrequency',
- 'drift_threshold' => 'setDriftThreshold',
- 'preferred_currency' => 'setPreferredCurrency'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'buy_only' => 'getBuyOnly',
- 'cash_optimizer' => 'getCashOptimizer',
- 'notify_frequency' => 'getNotifyFrequency',
- 'drift_threshold' => 'getDriftThreshold',
- 'preferred_currency' => 'getPreferredCurrency'
- ];
-
- /**
- * 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('buy_only', $data ?? [], null);
- $this->setIfExists('cash_optimizer', $data ?? [], null);
- $this->setIfExists('notify_frequency', $data ?? [], null);
- $this->setIfExists('drift_threshold', $data ?? [], null);
- $this->setIfExists('preferred_currency', $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 = [];
-
- if (!is_null($this->container['drift_threshold']) && ($this->container['drift_threshold'] > 100)) {
- $invalidProperties[] = "invalid value for 'drift_threshold', must be smaller than or equal to 100.";
- }
-
- if (!is_null($this->container['drift_threshold']) && ($this->container['drift_threshold'] < 0)) {
- $invalidProperties[] = "invalid value for 'drift_threshold', must be bigger than or equal to 0.";
- }
-
- 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 buy_only
- *
- * @return bool|null
- */
- public function getBuyOnly()
- {
- return $this->container['buy_only'];
- }
-
- /**
- * Sets buy_only
- *
- * @param bool|null $buy_only buy_only
- *
- * @return self
- */
- public function setBuyOnly($buy_only)
- {
-
- if (is_null($buy_only)) {
- throw new \InvalidArgumentException('non-nullable buy_only cannot be null');
- }
-
- $this->container['buy_only'] = $buy_only;
-
- return $this;
- }
-
- /**
- * Gets cash_optimizer
- *
- * @return bool|null
- */
- public function getCashOptimizer()
- {
- return $this->container['cash_optimizer'];
- }
-
- /**
- * Sets cash_optimizer
- *
- * @param bool|null $cash_optimizer cash_optimizer
- *
- * @return self
- */
- public function setCashOptimizer($cash_optimizer)
- {
-
- if (is_null($cash_optimizer)) {
- throw new \InvalidArgumentException('non-nullable cash_optimizer cannot be null');
- }
-
- $this->container['cash_optimizer'] = $cash_optimizer;
-
- return $this;
- }
-
- /**
- * Gets notify_frequency
- *
- * @return string|null
- */
- public function getNotifyFrequency()
- {
- return $this->container['notify_frequency'];
- }
-
- /**
- * Sets notify_frequency
- *
- * @param string|null $notify_frequency notify_frequency
- *
- * @return self
- */
- public function setNotifyFrequency($notify_frequency)
- {
-
- if (is_null($notify_frequency)) {
- throw new \InvalidArgumentException('non-nullable notify_frequency cannot be null');
- }
-
- $this->container['notify_frequency'] = $notify_frequency;
-
- return $this;
- }
-
- /**
- * Gets drift_threshold
- *
- * @return float|null
- */
- public function getDriftThreshold()
- {
- return $this->container['drift_threshold'];
- }
-
- /**
- * Sets drift_threshold
- *
- * @param float|null $drift_threshold drift_threshold
- *
- * @return self
- */
- public function setDriftThreshold($drift_threshold)
- {
-
- if (!is_null($drift_threshold) && ($drift_threshold > 100)) {
- throw new \InvalidArgumentException('invalid value for $drift_threshold when calling PortfolioGroupSettings., must be smaller than or equal to 100.');
- }
- if (!is_null($drift_threshold) && ($drift_threshold < 0)) {
- throw new \InvalidArgumentException('invalid value for $drift_threshold when calling PortfolioGroupSettings., must be bigger than or equal to 0.');
- }
-
-
- if (is_null($drift_threshold)) {
- throw new \InvalidArgumentException('non-nullable drift_threshold cannot be null');
- }
-
- $this->container['drift_threshold'] = $drift_threshold;
-
- return $this;
- }
-
- /**
- * Gets preferred_currency
- *
- * @return \SnapTrade\Model\Currency|null
- */
- public function getPreferredCurrency()
- {
- return $this->container['preferred_currency'];
- }
-
- /**
- * Sets preferred_currency
- *
- * @param \SnapTrade\Model\Currency|null $preferred_currency preferred_currency
- *
- * @return self
- */
- public function setPreferredCurrency($preferred_currency)
- {
-
- if (is_null($preferred_currency)) {
- throw new \InvalidArgumentException('non-nullable preferred_currency cannot be null');
- }
-
- $this->container['preferred_currency'] = $preferred_currency;
-
- 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/PositionSymbol.php b/lib/Model/PositionSymbol.php
index c30b156..e5e6e2f 100644
--- a/lib/Model/PositionSymbol.php
+++ b/lib/Model/PositionSymbol.php
@@ -30,7 +30,7 @@
* PositionSymbol Class Doc Comment
*
* @category Class
- * @description Symbol returned in position object
+ * @description Uniquely describes a security for the position within an account. The distinction between this and the `symbol` child property is that this object is specific to a position within an account, while the `symbol` child property is universal across all brokerage accounts. The caller should rely on the `symbol` child property for most use cases.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -322,6 +322,7 @@ public function valid()
* Gets id
*
* @return string|null
+ * @deprecated
*/
public function getId()
{
@@ -331,9 +332,10 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id 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 setId($id)
{
@@ -351,6 +353,7 @@ public function setId($id)
* Gets description
*
* @return string|null
+ * @deprecated
*/
public function getDescription()
{
@@ -360,9 +363,10 @@ public function getDescription()
/**
* Sets description
*
- * @param string|null $description description
+ * @param string|null $description This field is deprecated and the caller should use the `symbol` child property's `description` instead.
*
* @return self
+ * @deprecated
*/
public function setDescription($description)
{
@@ -409,6 +413,7 @@ public function setSymbol($symbol)
* Gets local_id
*
* @return string|null
+ * @deprecated
*/
public function getLocalId()
{
@@ -418,9 +423,10 @@ public function getLocalId()
/**
* Sets local_id
*
- * @param string|null $local_id local_id
+ * @param string|null $local_id This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
*
* @return self
+ * @deprecated
*/
public function setLocalId($local_id)
{
@@ -445,6 +451,7 @@ public function setLocalId($local_id)
* Gets is_quotable
*
* @return bool|null
+ * @deprecated
*/
public function getIsQuotable()
{
@@ -454,9 +461,10 @@ public function getIsQuotable()
/**
* Sets is_quotable
*
- * @param bool|null $is_quotable is_quotable
+ * @param bool|null $is_quotable This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
*
* @return self
+ * @deprecated
*/
public function setIsQuotable($is_quotable)
{
@@ -474,6 +482,7 @@ public function setIsQuotable($is_quotable)
* Gets is_tradable
*
* @return bool|null
+ * @deprecated
*/
public function getIsTradable()
{
@@ -483,9 +492,10 @@ public function getIsTradable()
/**
* Sets is_tradable
*
- * @param bool|null $is_tradable is_tradable
+ * @param bool|null $is_tradable This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
*
* @return self
+ * @deprecated
*/
public function setIsTradable($is_tradable)
{
diff --git a/lib/Model/RedirectTokenandPin.php b/lib/Model/RedirectTokenandPin.php
deleted file mode 100644
index 4219cac..0000000
--- a/lib/Model/RedirectTokenandPin.php
+++ /dev/null
@@ -1,441 +0,0 @@
-
- */
-class RedirectTokenandPin implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'RedirectTokenandPin';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'token' => 'string',
- 'pin' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'token' => null,
- 'pin' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'token' => false,
- 'pin' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'token' => 'token',
- 'pin' => 'pin'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'token' => 'setToken',
- 'pin' => 'setPin'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'token' => 'getToken',
- 'pin' => 'getPin'
- ];
-
- /**
- * 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('token', $data ?? [], null);
- $this->setIfExists('pin', $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 token
- *
- * @return string|null
- */
- public function getToken()
- {
- return $this->container['token'];
- }
-
- /**
- * Sets token
- *
- * @param string|null $token token
- *
- * @return self
- */
- public function setToken($token)
- {
-
- if (is_null($token)) {
- throw new \InvalidArgumentException('non-nullable token cannot be null');
- }
-
- $this->container['token'] = $token;
-
- return $this;
- }
-
- /**
- * Gets pin
- *
- * @return string|null
- */
- public function getPin()
- {
- return $this->container['pin'];
- }
-
- /**
- * Sets pin
- *
- * @param string|null $pin pin
- *
- * @return self
- */
- public function setPin($pin)
- {
-
- if (is_null($pin)) {
- throw new \InvalidArgumentException('non-nullable pin cannot be null');
- }
-
- $this->container['pin'] = $pin;
-
- 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/SecurityType.php b/lib/Model/SecurityType.php
index 39e167f..5904dfd 100644
--- a/lib/Model/SecurityType.php
+++ b/lib/Model/SecurityType.php
@@ -30,7 +30,7 @@
* SecurityType Class Doc Comment
*
* @category Class
- * @description Security Type
+ * @description The type of security. For example, \"Common Stock\" or \"ETF\".
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -317,7 +317,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id Unique identifier for the security type within SnapTrade. This is the ID used to reference the security type in SnapTrade API calls.
*
* @return self
*/
@@ -346,7 +346,7 @@ public function getCode()
/**
* Sets code
*
- * @param string|null $code code
+ * @param string|null $code A short code representing the security type. For example, \"cs\" for Common Stock. Here are some common values: ad - ADR bnd - Bond cs - Common Stock cef - Closed End Fund et - ETF oef - Open Ended Fund ps - Preferred Stock rt - Right struct - Structured Product ut - Unit wi - When Issued wt - Warrant
*
* @return self
*/
@@ -375,7 +375,7 @@ public function getDescription()
/**
* Sets description
*
- * @param string|null $description description
+ * @param string|null $description A human-readable description of the security type. For example, \"Common Stock\" or \"ETF\".
*
* @return self
*/
@@ -395,6 +395,7 @@ public function setDescription($description)
* Gets is_supported
*
* @return bool|null
+ * @deprecated
*/
public function getIsSupported()
{
@@ -404,9 +405,10 @@ public function getIsSupported()
/**
* Sets is_supported
*
- * @param bool|null $is_supported is_supported
+ * @param bool|null $is_supported This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
*
* @return self
+ * @deprecated
*/
public function setIsSupported($is_supported)
{
diff --git a/lib/Model/SnapTradeAPIDisclaimerAcceptStatus.php b/lib/Model/SnapTradeAPIDisclaimerAcceptStatus.php
deleted file mode 100644
index 59c8fe7..0000000
--- a/lib/Model/SnapTradeAPIDisclaimerAcceptStatus.php
+++ /dev/null
@@ -1,441 +0,0 @@
-
- */
-class SnapTradeAPIDisclaimerAcceptStatus implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'SnapTradeAPIDisclaimerAcceptStatus';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'accepted' => 'bool',
- 'timestamp' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'accepted' => null,
- 'timestamp' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'accepted' => false,
- 'timestamp' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'accepted' => 'accepted',
- 'timestamp' => 'timestamp'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'accepted' => 'setAccepted',
- 'timestamp' => 'setTimestamp'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'accepted' => 'getAccepted',
- 'timestamp' => 'getTimestamp'
- ];
-
- /**
- * 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('accepted', $data ?? [], null);
- $this->setIfExists('timestamp', $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 accepted
- *
- * @return bool|null
- */
- public function getAccepted()
- {
- return $this->container['accepted'];
- }
-
- /**
- * Sets accepted
- *
- * @param bool|null $accepted accepted
- *
- * @return self
- */
- public function setAccepted($accepted)
- {
-
- if (is_null($accepted)) {
- throw new \InvalidArgumentException('non-nullable accepted cannot be null');
- }
-
- $this->container['accepted'] = $accepted;
-
- return $this;
- }
-
- /**
- * Gets timestamp
- *
- * @return string|null
- */
- public function getTimestamp()
- {
- return $this->container['timestamp'];
- }
-
- /**
- * Sets timestamp
- *
- * @param string|null $timestamp timestamp
- *
- * @return self
- */
- public function setTimestamp($timestamp)
- {
-
- if (is_null($timestamp)) {
- throw new \InvalidArgumentException('non-nullable timestamp cannot be null');
- }
-
- $this->container['timestamp'] = $timestamp;
-
- 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/StrategyImpact.php b/lib/Model/StrategyImpact.php
deleted file mode 100644
index e997432..0000000
--- a/lib/Model/StrategyImpact.php
+++ /dev/null
@@ -1,765 +0,0 @@
-
- */
-class StrategyImpact implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'StrategyImpact';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'estimated_commissions' => 'float',
- 'buying_power_effect' => 'float',
- 'buying_power_result' => 'float',
- 'maint_excess_effect' => 'float',
- 'maint_excess_result' => 'float',
- 'trade_value_calculation' => 'string',
- 'legs' => '\SnapTrade\Model\StrategyImpactLegsInner[]',
- 'side' => 'string',
- 'effect' => 'string',
- 'price' => 'float',
- 'strategy' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'estimated_commissions' => null,
- 'buying_power_effect' => null,
- 'buying_power_result' => null,
- 'maint_excess_effect' => null,
- 'maint_excess_result' => null,
- 'trade_value_calculation' => null,
- 'legs' => null,
- 'side' => null,
- 'effect' => null,
- 'price' => null,
- 'strategy' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'estimated_commissions' => false,
- 'buying_power_effect' => false,
- 'buying_power_result' => false,
- 'maint_excess_effect' => false,
- 'maint_excess_result' => false,
- 'trade_value_calculation' => false,
- 'legs' => false,
- 'side' => false,
- 'effect' => false,
- 'price' => false,
- 'strategy' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'estimated_commissions' => 'estimatedCommissions',
- 'buying_power_effect' => 'buyingPowerEffect',
- 'buying_power_result' => 'buyingPowerResult',
- 'maint_excess_effect' => 'maintExcessEffect',
- 'maint_excess_result' => 'maintExcessResult',
- 'trade_value_calculation' => 'tradeValueCalculation',
- 'legs' => 'legs',
- 'side' => 'side',
- 'effect' => 'effect',
- 'price' => 'price',
- 'strategy' => 'strategy'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'estimated_commissions' => 'setEstimatedCommissions',
- 'buying_power_effect' => 'setBuyingPowerEffect',
- 'buying_power_result' => 'setBuyingPowerResult',
- 'maint_excess_effect' => 'setMaintExcessEffect',
- 'maint_excess_result' => 'setMaintExcessResult',
- 'trade_value_calculation' => 'setTradeValueCalculation',
- 'legs' => 'setLegs',
- 'side' => 'setSide',
- 'effect' => 'setEffect',
- 'price' => 'setPrice',
- 'strategy' => 'setStrategy'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'estimated_commissions' => 'getEstimatedCommissions',
- 'buying_power_effect' => 'getBuyingPowerEffect',
- 'buying_power_result' => 'getBuyingPowerResult',
- 'maint_excess_effect' => 'getMaintExcessEffect',
- 'maint_excess_result' => 'getMaintExcessResult',
- 'trade_value_calculation' => 'getTradeValueCalculation',
- 'legs' => 'getLegs',
- 'side' => 'getSide',
- 'effect' => 'getEffect',
- 'price' => 'getPrice',
- 'strategy' => 'getStrategy'
- ];
-
- /**
- * 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('estimated_commissions', $data ?? [], null);
- $this->setIfExists('buying_power_effect', $data ?? [], null);
- $this->setIfExists('buying_power_result', $data ?? [], null);
- $this->setIfExists('maint_excess_effect', $data ?? [], null);
- $this->setIfExists('maint_excess_result', $data ?? [], null);
- $this->setIfExists('trade_value_calculation', $data ?? [], null);
- $this->setIfExists('legs', $data ?? [], null);
- $this->setIfExists('side', $data ?? [], null);
- $this->setIfExists('effect', $data ?? [], null);
- $this->setIfExists('price', $data ?? [], null);
- $this->setIfExists('strategy', $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 estimated_commissions
- *
- * @return float|null
- */
- public function getEstimatedCommissions()
- {
- return $this->container['estimated_commissions'];
- }
-
- /**
- * Sets estimated_commissions
- *
- * @param float|null $estimated_commissions estimated_commissions
- *
- * @return self
- */
- public function setEstimatedCommissions($estimated_commissions)
- {
-
- if (is_null($estimated_commissions)) {
- throw new \InvalidArgumentException('non-nullable estimated_commissions cannot be null');
- }
-
- $this->container['estimated_commissions'] = $estimated_commissions;
-
- return $this;
- }
-
- /**
- * Gets buying_power_effect
- *
- * @return float|null
- */
- public function getBuyingPowerEffect()
- {
- return $this->container['buying_power_effect'];
- }
-
- /**
- * Sets buying_power_effect
- *
- * @param float|null $buying_power_effect buying_power_effect
- *
- * @return self
- */
- public function setBuyingPowerEffect($buying_power_effect)
- {
-
- if (is_null($buying_power_effect)) {
- throw new \InvalidArgumentException('non-nullable buying_power_effect cannot be null');
- }
-
- $this->container['buying_power_effect'] = $buying_power_effect;
-
- return $this;
- }
-
- /**
- * Gets buying_power_result
- *
- * @return float|null
- */
- public function getBuyingPowerResult()
- {
- return $this->container['buying_power_result'];
- }
-
- /**
- * Sets buying_power_result
- *
- * @param float|null $buying_power_result buying_power_result
- *
- * @return self
- */
- public function setBuyingPowerResult($buying_power_result)
- {
-
- if (is_null($buying_power_result)) {
- throw new \InvalidArgumentException('non-nullable buying_power_result cannot be null');
- }
-
- $this->container['buying_power_result'] = $buying_power_result;
-
- return $this;
- }
-
- /**
- * Gets maint_excess_effect
- *
- * @return float|null
- */
- public function getMaintExcessEffect()
- {
- return $this->container['maint_excess_effect'];
- }
-
- /**
- * Sets maint_excess_effect
- *
- * @param float|null $maint_excess_effect maint_excess_effect
- *
- * @return self
- */
- public function setMaintExcessEffect($maint_excess_effect)
- {
-
- if (is_null($maint_excess_effect)) {
- throw new \InvalidArgumentException('non-nullable maint_excess_effect cannot be null');
- }
-
- $this->container['maint_excess_effect'] = $maint_excess_effect;
-
- return $this;
- }
-
- /**
- * Gets maint_excess_result
- *
- * @return float|null
- */
- public function getMaintExcessResult()
- {
- return $this->container['maint_excess_result'];
- }
-
- /**
- * Sets maint_excess_result
- *
- * @param float|null $maint_excess_result maint_excess_result
- *
- * @return self
- */
- public function setMaintExcessResult($maint_excess_result)
- {
-
- if (is_null($maint_excess_result)) {
- throw new \InvalidArgumentException('non-nullable maint_excess_result cannot be null');
- }
-
- $this->container['maint_excess_result'] = $maint_excess_result;
-
- return $this;
- }
-
- /**
- * Gets trade_value_calculation
- *
- * @return string|null
- */
- public function getTradeValueCalculation()
- {
- return $this->container['trade_value_calculation'];
- }
-
- /**
- * Sets trade_value_calculation
- *
- * @param string|null $trade_value_calculation trade_value_calculation
- *
- * @return self
- */
- public function setTradeValueCalculation($trade_value_calculation)
- {
-
- if (is_null($trade_value_calculation)) {
- throw new \InvalidArgumentException('non-nullable trade_value_calculation cannot be null');
- }
-
- $this->container['trade_value_calculation'] = $trade_value_calculation;
-
- return $this;
- }
-
- /**
- * Gets legs
- *
- * @return \SnapTrade\Model\StrategyImpactLegsInner[]|null
- */
- public function getLegs()
- {
- return $this->container['legs'];
- }
-
- /**
- * Sets legs
- *
- * @param \SnapTrade\Model\StrategyImpactLegsInner[]|null $legs legs
- *
- * @return self
- */
- public function setLegs($legs)
- {
-
- if (is_null($legs)) {
- throw new \InvalidArgumentException('non-nullable legs cannot be null');
- }
-
- $this->container['legs'] = $legs;
-
- return $this;
- }
-
- /**
- * Gets side
- *
- * @return string|null
- */
- public function getSide()
- {
- return $this->container['side'];
- }
-
- /**
- * Sets side
- *
- * @param string|null $side side
- *
- * @return self
- */
- public function setSide($side)
- {
-
- if (is_null($side)) {
- throw new \InvalidArgumentException('non-nullable side cannot be null');
- }
-
- $this->container['side'] = $side;
-
- return $this;
- }
-
- /**
- * Gets effect
- *
- * @return string|null
- */
- public function getEffect()
- {
- return $this->container['effect'];
- }
-
- /**
- * Sets effect
- *
- * @param string|null $effect effect
- *
- * @return self
- */
- public function setEffect($effect)
- {
-
- if (is_null($effect)) {
- throw new \InvalidArgumentException('non-nullable effect cannot be null');
- }
-
- $this->container['effect'] = $effect;
-
- return $this;
- }
-
- /**
- * Gets price
- *
- * @return float|null
- */
- public function getPrice()
- {
- return $this->container['price'];
- }
-
- /**
- * Sets price
- *
- * @param float|null $price price
- *
- * @return self
- */
- public function setPrice($price)
- {
-
- if (is_null($price)) {
- throw new \InvalidArgumentException('non-nullable price cannot be null');
- }
-
- $this->container['price'] = $price;
-
- return $this;
- }
-
- /**
- * Gets strategy
- *
- * @return string|null
- */
- public function getStrategy()
- {
- return $this->container['strategy'];
- }
-
- /**
- * Sets strategy
- *
- * @param string|null $strategy strategy
- *
- * @return self
- */
- public function setStrategy($strategy)
- {
-
- if (is_null($strategy)) {
- throw new \InvalidArgumentException('non-nullable strategy cannot be null');
- }
-
- $this->container['strategy'] = $strategy;
-
- 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/StrategyImpactLegsInner.php b/lib/Model/StrategyImpactLegsInner.php
deleted file mode 100644
index 77af700..0000000
--- a/lib/Model/StrategyImpactLegsInner.php
+++ /dev/null
@@ -1,620 +0,0 @@
-
- */
-class StrategyImpactLegsInner implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'StrategyImpact_legs_inner';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'leg_id' => 'int',
- 'symbol' => 'string',
- 'symbol_id' => 'int',
- 'leg_ratio_quantity' => 'int',
- 'side' => 'string',
- 'avg_exec_price' => 'string',
- 'last_exec_price' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'leg_id' => 'int32',
- 'symbol' => null,
- 'symbol_id' => 'int32',
- 'leg_ratio_quantity' => 'int32',
- 'side' => null,
- 'avg_exec_price' => 'nullable',
- 'last_exec_price' => 'nullable'
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'leg_id' => false,
- 'symbol' => false,
- 'symbol_id' => false,
- 'leg_ratio_quantity' => false,
- 'side' => false,
- 'avg_exec_price' => false,
- 'last_exec_price' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'leg_id' => 'legId',
- 'symbol' => 'symbol',
- 'symbol_id' => 'symbolId',
- 'leg_ratio_quantity' => 'legRatioQuantity',
- 'side' => 'side',
- 'avg_exec_price' => 'avgExecPrice',
- 'last_exec_price' => 'lastExecPrice'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'leg_id' => 'setLegId',
- 'symbol' => 'setSymbol',
- 'symbol_id' => 'setSymbolId',
- 'leg_ratio_quantity' => 'setLegRatioQuantity',
- 'side' => 'setSide',
- 'avg_exec_price' => 'setAvgExecPrice',
- 'last_exec_price' => 'setLastExecPrice'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'leg_id' => 'getLegId',
- 'symbol' => 'getSymbol',
- 'symbol_id' => 'getSymbolId',
- 'leg_ratio_quantity' => 'getLegRatioQuantity',
- 'side' => 'getSide',
- 'avg_exec_price' => 'getAvgExecPrice',
- 'last_exec_price' => 'getLastExecPrice'
- ];
-
- /**
- * 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('leg_id', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('symbol_id', $data ?? [], null);
- $this->setIfExists('leg_ratio_quantity', $data ?? [], null);
- $this->setIfExists('side', $data ?? [], null);
- $this->setIfExists('avg_exec_price', $data ?? [], null);
- $this->setIfExists('last_exec_price', $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 leg_id
- *
- * @return int|null
- */
- public function getLegId()
- {
- return $this->container['leg_id'];
- }
-
- /**
- * Sets leg_id
- *
- * @param int|null $leg_id leg_id
- *
- * @return self
- */
- public function setLegId($leg_id)
- {
-
- if (is_null($leg_id)) {
- throw new \InvalidArgumentException('non-nullable leg_id cannot be null');
- }
-
- $this->container['leg_id'] = $leg_id;
-
- return $this;
- }
-
- /**
- * Gets symbol
- *
- * @return string|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param string|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets symbol_id
- *
- * @return int|null
- */
- public function getSymbolId()
- {
- return $this->container['symbol_id'];
- }
-
- /**
- * Sets symbol_id
- *
- * @param int|null $symbol_id symbol_id
- *
- * @return self
- */
- public function setSymbolId($symbol_id)
- {
-
- if (is_null($symbol_id)) {
- throw new \InvalidArgumentException('non-nullable symbol_id cannot be null');
- }
-
- $this->container['symbol_id'] = $symbol_id;
-
- return $this;
- }
-
- /**
- * Gets leg_ratio_quantity
- *
- * @return int|null
- */
- public function getLegRatioQuantity()
- {
- return $this->container['leg_ratio_quantity'];
- }
-
- /**
- * Sets leg_ratio_quantity
- *
- * @param int|null $leg_ratio_quantity leg_ratio_quantity
- *
- * @return self
- */
- public function setLegRatioQuantity($leg_ratio_quantity)
- {
-
- if (is_null($leg_ratio_quantity)) {
- throw new \InvalidArgumentException('non-nullable leg_ratio_quantity cannot be null');
- }
-
- $this->container['leg_ratio_quantity'] = $leg_ratio_quantity;
-
- return $this;
- }
-
- /**
- * Gets side
- *
- * @return string|null
- */
- public function getSide()
- {
- return $this->container['side'];
- }
-
- /**
- * Sets side
- *
- * @param string|null $side side
- *
- * @return self
- */
- public function setSide($side)
- {
-
- if (is_null($side)) {
- throw new \InvalidArgumentException('non-nullable side cannot be null');
- }
-
- $this->container['side'] = $side;
-
- return $this;
- }
-
- /**
- * Gets avg_exec_price
- *
- * @return string|null
- */
- public function getAvgExecPrice()
- {
- return $this->container['avg_exec_price'];
- }
-
- /**
- * Sets avg_exec_price
- *
- * @param string|null $avg_exec_price avg_exec_price
- *
- * @return self
- */
- public function setAvgExecPrice($avg_exec_price)
- {
-
- if (is_null($avg_exec_price)) {
- throw new \InvalidArgumentException('non-nullable avg_exec_price cannot be null');
- }
-
- $this->container['avg_exec_price'] = $avg_exec_price;
-
- return $this;
- }
-
- /**
- * Gets last_exec_price
- *
- * @return string|null
- */
- public function getLastExecPrice()
- {
- return $this->container['last_exec_price'];
- }
-
- /**
- * Sets last_exec_price
- *
- * @param string|null $last_exec_price last_exec_price
- *
- * @return self
- */
- public function setLastExecPrice($last_exec_price)
- {
-
- if (is_null($last_exec_price)) {
- throw new \InvalidArgumentException('non-nullable last_exec_price cannot be null');
- }
-
- $this->container['last_exec_price'] = $last_exec_price;
-
- 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/StrategyOrderPlace.php b/lib/Model/StrategyOrderPlace.php
deleted file mode 100644
index 958fba6..0000000
--- a/lib/Model/StrategyOrderPlace.php
+++ /dev/null
@@ -1,441 +0,0 @@
-
- */
-class StrategyOrderPlace implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'StrategyOrderPlace';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'order_id' => 'int',
- 'orders' => '\SnapTrade\Model\StrategyOrderPlaceOrdersInner[]'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'order_id' => 'int32',
- 'orders' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'order_id' => false,
- 'orders' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'order_id' => 'orderId',
- 'orders' => 'orders'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'order_id' => 'setOrderId',
- 'orders' => 'setOrders'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'order_id' => 'getOrderId',
- 'orders' => 'getOrders'
- ];
-
- /**
- * 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('order_id', $data ?? [], null);
- $this->setIfExists('orders', $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 order_id
- *
- * @return int|null
- */
- public function getOrderId()
- {
- return $this->container['order_id'];
- }
-
- /**
- * Sets order_id
- *
- * @param int|null $order_id order_id
- *
- * @return self
- */
- public function setOrderId($order_id)
- {
-
- if (is_null($order_id)) {
- throw new \InvalidArgumentException('non-nullable order_id cannot be null');
- }
-
- $this->container['order_id'] = $order_id;
-
- return $this;
- }
-
- /**
- * Gets orders
- *
- * @return \SnapTrade\Model\StrategyOrderPlaceOrdersInner[]|null
- */
- public function getOrders()
- {
- return $this->container['orders'];
- }
-
- /**
- * Sets orders
- *
- * @param \SnapTrade\Model\StrategyOrderPlaceOrdersInner[]|null $orders orders
- *
- * @return self
- */
- public function setOrders($orders)
- {
-
- if (is_null($orders)) {
- throw new \InvalidArgumentException('non-nullable orders cannot be null');
- }
-
- $this->container['orders'] = $orders;
-
- 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/StrategyOrderPlaceOrdersInner.php b/lib/Model/StrategyOrderPlaceOrdersInner.php
deleted file mode 100644
index 8411cb2..0000000
--- a/lib/Model/StrategyOrderPlaceOrdersInner.php
+++ /dev/null
@@ -1,1916 +0,0 @@
-
- */
-class StrategyOrderPlaceOrdersInner implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'StrategyOrderPlace_orders_inner';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'id' => 'int',
- 'symbol' => 'string',
- 'symbol_id' => 'int',
- 'total_quantity' => 'int',
- 'open_quantity' => 'int',
- 'filled_quantity' => 'int',
- 'canceled_quantity' => 'int',
- 'side' => 'string',
- 'order_type' => 'string',
- 'limit_price' => 'string',
- 'stop_price' => 'string',
- 'is_all_or_none' => 'bool',
- 'is_anonymous' => 'bool',
- 'iceberg_quantity' => 'string',
- 'min_quantity' => 'string',
- 'avg_exec_price' => 'int',
- 'last_exec_price' => 'string',
- 'source' => 'string',
- 'time_in_force' => 'string',
- 'gtd_date' => 'string',
- 'state' => 'string',
- 'rejection_reason' => 'string',
- 'chain_id' => 'int',
- 'creation_time' => 'string',
- 'update_time' => 'string',
- 'notes' => 'string',
- 'primary_route' => 'string',
- 'secondary_route' => 'string',
- 'order_route' => 'string',
- 'venue_holding_order' => 'string',
- 'comission_charged' => 'int',
- 'exchange_order_id' => 'string',
- 'is_significant_share_holder' => 'bool',
- 'is_insider' => 'bool',
- 'is_limit_offset_in_dollar' => 'bool',
- 'user_id' => 'int',
- 'placement_commission' => 'string',
- 'legs' => '\SnapTrade\Model\StrategyOrderPlaceOrdersInnerLegsInner[]',
- 'strategy_type' => 'string',
- 'trigger_stop_price' => 'string',
- 'order_group_id' => 'int',
- 'order_class' => 'string',
- 'is_cross_zero' => 'bool'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'id' => 'int32',
- 'symbol' => null,
- 'symbol_id' => 'int32',
- 'total_quantity' => 'int32',
- 'open_quantity' => 'int32',
- 'filled_quantity' => 'int32',
- 'canceled_quantity' => 'int32',
- 'side' => null,
- 'order_type' => null,
- 'limit_price' => 'nullable',
- 'stop_price' => 'nullable',
- 'is_all_or_none' => null,
- 'is_anonymous' => null,
- 'iceberg_quantity' => 'nullable',
- 'min_quantity' => 'nullable',
- 'avg_exec_price' => 'int32',
- 'last_exec_price' => 'nullable',
- 'source' => null,
- 'time_in_force' => null,
- 'gtd_date' => 'nullable',
- 'state' => null,
- 'rejection_reason' => null,
- 'chain_id' => 'int32',
- 'creation_time' => null,
- 'update_time' => null,
- 'notes' => null,
- 'primary_route' => null,
- 'secondary_route' => null,
- 'order_route' => null,
- 'venue_holding_order' => null,
- 'comission_charged' => 'int32',
- 'exchange_order_id' => null,
- 'is_significant_share_holder' => null,
- 'is_insider' => null,
- 'is_limit_offset_in_dollar' => null,
- 'user_id' => 'int32',
- 'placement_commission' => 'nullable',
- 'legs' => null,
- 'strategy_type' => null,
- 'trigger_stop_price' => 'nullable',
- 'order_group_id' => 'int32',
- 'order_class' => 'nullable',
- 'is_cross_zero' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'id' => false,
- 'symbol' => false,
- 'symbol_id' => false,
- 'total_quantity' => false,
- 'open_quantity' => false,
- 'filled_quantity' => false,
- 'canceled_quantity' => false,
- 'side' => false,
- 'order_type' => false,
- 'limit_price' => false,
- 'stop_price' => false,
- 'is_all_or_none' => false,
- 'is_anonymous' => false,
- 'iceberg_quantity' => false,
- 'min_quantity' => false,
- 'avg_exec_price' => false,
- 'last_exec_price' => false,
- 'source' => false,
- 'time_in_force' => false,
- 'gtd_date' => false,
- 'state' => false,
- 'rejection_reason' => false,
- 'chain_id' => false,
- 'creation_time' => false,
- 'update_time' => false,
- 'notes' => false,
- 'primary_route' => false,
- 'secondary_route' => false,
- 'order_route' => false,
- 'venue_holding_order' => false,
- 'comission_charged' => false,
- 'exchange_order_id' => false,
- 'is_significant_share_holder' => false,
- 'is_insider' => false,
- 'is_limit_offset_in_dollar' => false,
- 'user_id' => false,
- 'placement_commission' => false,
- 'legs' => false,
- 'strategy_type' => false,
- 'trigger_stop_price' => false,
- 'order_group_id' => false,
- 'order_class' => false,
- 'is_cross_zero' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'id' => 'id',
- 'symbol' => 'symbol',
- 'symbol_id' => 'symbolId',
- 'total_quantity' => 'totalQuantity',
- 'open_quantity' => 'openQuantity',
- 'filled_quantity' => 'filledQuantity',
- 'canceled_quantity' => 'canceledQuantity',
- 'side' => 'side',
- 'order_type' => 'orderType',
- 'limit_price' => 'limitPrice',
- 'stop_price' => 'stopPrice',
- 'is_all_or_none' => 'isAllOrNone',
- 'is_anonymous' => 'isAnonymous',
- 'iceberg_quantity' => 'icebergQuantity',
- 'min_quantity' => 'minQuantity',
- 'avg_exec_price' => 'avgExecPrice',
- 'last_exec_price' => 'lastExecPrice',
- 'source' => 'source',
- 'time_in_force' => 'timeInForce',
- 'gtd_date' => 'gtdDate',
- 'state' => 'state',
- 'rejection_reason' => 'rejectionReason',
- 'chain_id' => 'chainId',
- 'creation_time' => 'creationTime',
- 'update_time' => 'updateTime',
- 'notes' => 'notes',
- 'primary_route' => 'primaryRoute',
- 'secondary_route' => 'secondaryRoute',
- 'order_route' => 'orderRoute',
- 'venue_holding_order' => 'venueHoldingOrder',
- 'comission_charged' => 'comissionCharged',
- 'exchange_order_id' => 'exchangeOrderId',
- 'is_significant_share_holder' => 'isSignificantShareHolder',
- 'is_insider' => 'isInsider',
- 'is_limit_offset_in_dollar' => 'isLimitOffsetInDollar',
- 'user_id' => 'userId',
- 'placement_commission' => 'placementCommission',
- 'legs' => 'legs',
- 'strategy_type' => 'strategyType',
- 'trigger_stop_price' => 'triggerStopPrice',
- 'order_group_id' => 'orderGroupId',
- 'order_class' => 'orderClass',
- 'is_cross_zero' => 'isCrossZero'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'id' => 'setId',
- 'symbol' => 'setSymbol',
- 'symbol_id' => 'setSymbolId',
- 'total_quantity' => 'setTotalQuantity',
- 'open_quantity' => 'setOpenQuantity',
- 'filled_quantity' => 'setFilledQuantity',
- 'canceled_quantity' => 'setCanceledQuantity',
- 'side' => 'setSide',
- 'order_type' => 'setOrderType',
- 'limit_price' => 'setLimitPrice',
- 'stop_price' => 'setStopPrice',
- 'is_all_or_none' => 'setIsAllOrNone',
- 'is_anonymous' => 'setIsAnonymous',
- 'iceberg_quantity' => 'setIcebergQuantity',
- 'min_quantity' => 'setMinQuantity',
- 'avg_exec_price' => 'setAvgExecPrice',
- 'last_exec_price' => 'setLastExecPrice',
- 'source' => 'setSource',
- 'time_in_force' => 'setTimeInForce',
- 'gtd_date' => 'setGtdDate',
- 'state' => 'setState',
- 'rejection_reason' => 'setRejectionReason',
- 'chain_id' => 'setChainId',
- 'creation_time' => 'setCreationTime',
- 'update_time' => 'setUpdateTime',
- 'notes' => 'setNotes',
- 'primary_route' => 'setPrimaryRoute',
- 'secondary_route' => 'setSecondaryRoute',
- 'order_route' => 'setOrderRoute',
- 'venue_holding_order' => 'setVenueHoldingOrder',
- 'comission_charged' => 'setComissionCharged',
- 'exchange_order_id' => 'setExchangeOrderId',
- 'is_significant_share_holder' => 'setIsSignificantShareHolder',
- 'is_insider' => 'setIsInsider',
- 'is_limit_offset_in_dollar' => 'setIsLimitOffsetInDollar',
- 'user_id' => 'setUserId',
- 'placement_commission' => 'setPlacementCommission',
- 'legs' => 'setLegs',
- 'strategy_type' => 'setStrategyType',
- 'trigger_stop_price' => 'setTriggerStopPrice',
- 'order_group_id' => 'setOrderGroupId',
- 'order_class' => 'setOrderClass',
- 'is_cross_zero' => 'setIsCrossZero'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'id' => 'getId',
- 'symbol' => 'getSymbol',
- 'symbol_id' => 'getSymbolId',
- 'total_quantity' => 'getTotalQuantity',
- 'open_quantity' => 'getOpenQuantity',
- 'filled_quantity' => 'getFilledQuantity',
- 'canceled_quantity' => 'getCanceledQuantity',
- 'side' => 'getSide',
- 'order_type' => 'getOrderType',
- 'limit_price' => 'getLimitPrice',
- 'stop_price' => 'getStopPrice',
- 'is_all_or_none' => 'getIsAllOrNone',
- 'is_anonymous' => 'getIsAnonymous',
- 'iceberg_quantity' => 'getIcebergQuantity',
- 'min_quantity' => 'getMinQuantity',
- 'avg_exec_price' => 'getAvgExecPrice',
- 'last_exec_price' => 'getLastExecPrice',
- 'source' => 'getSource',
- 'time_in_force' => 'getTimeInForce',
- 'gtd_date' => 'getGtdDate',
- 'state' => 'getState',
- 'rejection_reason' => 'getRejectionReason',
- 'chain_id' => 'getChainId',
- 'creation_time' => 'getCreationTime',
- 'update_time' => 'getUpdateTime',
- 'notes' => 'getNotes',
- 'primary_route' => 'getPrimaryRoute',
- 'secondary_route' => 'getSecondaryRoute',
- 'order_route' => 'getOrderRoute',
- 'venue_holding_order' => 'getVenueHoldingOrder',
- 'comission_charged' => 'getComissionCharged',
- 'exchange_order_id' => 'getExchangeOrderId',
- 'is_significant_share_holder' => 'getIsSignificantShareHolder',
- 'is_insider' => 'getIsInsider',
- 'is_limit_offset_in_dollar' => 'getIsLimitOffsetInDollar',
- 'user_id' => 'getUserId',
- 'placement_commission' => 'getPlacementCommission',
- 'legs' => 'getLegs',
- 'strategy_type' => 'getStrategyType',
- 'trigger_stop_price' => 'getTriggerStopPrice',
- 'order_group_id' => 'getOrderGroupId',
- 'order_class' => 'getOrderClass',
- 'is_cross_zero' => 'getIsCrossZero'
- ];
-
- /**
- * 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('id', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('symbol_id', $data ?? [], null);
- $this->setIfExists('total_quantity', $data ?? [], null);
- $this->setIfExists('open_quantity', $data ?? [], null);
- $this->setIfExists('filled_quantity', $data ?? [], null);
- $this->setIfExists('canceled_quantity', $data ?? [], null);
- $this->setIfExists('side', $data ?? [], null);
- $this->setIfExists('order_type', $data ?? [], null);
- $this->setIfExists('limit_price', $data ?? [], null);
- $this->setIfExists('stop_price', $data ?? [], null);
- $this->setIfExists('is_all_or_none', $data ?? [], null);
- $this->setIfExists('is_anonymous', $data ?? [], null);
- $this->setIfExists('iceberg_quantity', $data ?? [], null);
- $this->setIfExists('min_quantity', $data ?? [], null);
- $this->setIfExists('avg_exec_price', $data ?? [], null);
- $this->setIfExists('last_exec_price', $data ?? [], null);
- $this->setIfExists('source', $data ?? [], null);
- $this->setIfExists('time_in_force', $data ?? [], null);
- $this->setIfExists('gtd_date', $data ?? [], null);
- $this->setIfExists('state', $data ?? [], null);
- $this->setIfExists('rejection_reason', $data ?? [], null);
- $this->setIfExists('chain_id', $data ?? [], null);
- $this->setIfExists('creation_time', $data ?? [], null);
- $this->setIfExists('update_time', $data ?? [], null);
- $this->setIfExists('notes', $data ?? [], null);
- $this->setIfExists('primary_route', $data ?? [], null);
- $this->setIfExists('secondary_route', $data ?? [], null);
- $this->setIfExists('order_route', $data ?? [], null);
- $this->setIfExists('venue_holding_order', $data ?? [], null);
- $this->setIfExists('comission_charged', $data ?? [], null);
- $this->setIfExists('exchange_order_id', $data ?? [], null);
- $this->setIfExists('is_significant_share_holder', $data ?? [], null);
- $this->setIfExists('is_insider', $data ?? [], null);
- $this->setIfExists('is_limit_offset_in_dollar', $data ?? [], null);
- $this->setIfExists('user_id', $data ?? [], null);
- $this->setIfExists('placement_commission', $data ?? [], null);
- $this->setIfExists('legs', $data ?? [], null);
- $this->setIfExists('strategy_type', $data ?? [], null);
- $this->setIfExists('trigger_stop_price', $data ?? [], null);
- $this->setIfExists('order_group_id', $data ?? [], null);
- $this->setIfExists('order_class', $data ?? [], null);
- $this->setIfExists('is_cross_zero', $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 id
- *
- * @return int|null
- */
- public function getId()
- {
- return $this->container['id'];
- }
-
- /**
- * Sets id
- *
- * @param int|null $id id
- *
- * @return self
- */
- public function setId($id)
- {
-
- if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
- }
-
- $this->container['id'] = $id;
-
- return $this;
- }
-
- /**
- * Gets symbol
- *
- * @return string|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param string|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets symbol_id
- *
- * @return int|null
- */
- public function getSymbolId()
- {
- return $this->container['symbol_id'];
- }
-
- /**
- * Sets symbol_id
- *
- * @param int|null $symbol_id symbol_id
- *
- * @return self
- */
- public function setSymbolId($symbol_id)
- {
-
- if (is_null($symbol_id)) {
- throw new \InvalidArgumentException('non-nullable symbol_id cannot be null');
- }
-
- $this->container['symbol_id'] = $symbol_id;
-
- return $this;
- }
-
- /**
- * Gets total_quantity
- *
- * @return int|null
- */
- public function getTotalQuantity()
- {
- return $this->container['total_quantity'];
- }
-
- /**
- * Sets total_quantity
- *
- * @param int|null $total_quantity total_quantity
- *
- * @return self
- */
- public function setTotalQuantity($total_quantity)
- {
-
- if (is_null($total_quantity)) {
- throw new \InvalidArgumentException('non-nullable total_quantity cannot be null');
- }
-
- $this->container['total_quantity'] = $total_quantity;
-
- return $this;
- }
-
- /**
- * Gets open_quantity
- *
- * @return int|null
- */
- public function getOpenQuantity()
- {
- return $this->container['open_quantity'];
- }
-
- /**
- * Sets open_quantity
- *
- * @param int|null $open_quantity open_quantity
- *
- * @return self
- */
- public function setOpenQuantity($open_quantity)
- {
-
- if (is_null($open_quantity)) {
- throw new \InvalidArgumentException('non-nullable open_quantity cannot be null');
- }
-
- $this->container['open_quantity'] = $open_quantity;
-
- return $this;
- }
-
- /**
- * Gets filled_quantity
- *
- * @return int|null
- */
- public function getFilledQuantity()
- {
- return $this->container['filled_quantity'];
- }
-
- /**
- * Sets filled_quantity
- *
- * @param int|null $filled_quantity filled_quantity
- *
- * @return self
- */
- public function setFilledQuantity($filled_quantity)
- {
-
- if (is_null($filled_quantity)) {
- throw new \InvalidArgumentException('non-nullable filled_quantity cannot be null');
- }
-
- $this->container['filled_quantity'] = $filled_quantity;
-
- return $this;
- }
-
- /**
- * Gets canceled_quantity
- *
- * @return int|null
- */
- public function getCanceledQuantity()
- {
- return $this->container['canceled_quantity'];
- }
-
- /**
- * Sets canceled_quantity
- *
- * @param int|null $canceled_quantity canceled_quantity
- *
- * @return self
- */
- public function setCanceledQuantity($canceled_quantity)
- {
-
- if (is_null($canceled_quantity)) {
- throw new \InvalidArgumentException('non-nullable canceled_quantity cannot be null');
- }
-
- $this->container['canceled_quantity'] = $canceled_quantity;
-
- return $this;
- }
-
- /**
- * Gets side
- *
- * @return string|null
- */
- public function getSide()
- {
- return $this->container['side'];
- }
-
- /**
- * Sets side
- *
- * @param string|null $side side
- *
- * @return self
- */
- public function setSide($side)
- {
-
- if (is_null($side)) {
- throw new \InvalidArgumentException('non-nullable side cannot be null');
- }
-
- $this->container['side'] = $side;
-
- return $this;
- }
-
- /**
- * Gets order_type
- *
- * @return string|null
- */
- public function getOrderType()
- {
- return $this->container['order_type'];
- }
-
- /**
- * Sets order_type
- *
- * @param string|null $order_type order_type
- *
- * @return self
- */
- public function setOrderType($order_type)
- {
-
- if (is_null($order_type)) {
- throw new \InvalidArgumentException('non-nullable order_type cannot be null');
- }
-
- $this->container['order_type'] = $order_type;
-
- return $this;
- }
-
- /**
- * Gets limit_price
- *
- * @return string|null
- */
- public function getLimitPrice()
- {
- return $this->container['limit_price'];
- }
-
- /**
- * Sets limit_price
- *
- * @param string|null $limit_price limit_price
- *
- * @return self
- */
- public function setLimitPrice($limit_price)
- {
-
- if (is_null($limit_price)) {
- throw new \InvalidArgumentException('non-nullable limit_price cannot be null');
- }
-
- $this->container['limit_price'] = $limit_price;
-
- return $this;
- }
-
- /**
- * Gets stop_price
- *
- * @return string|null
- */
- public function getStopPrice()
- {
- return $this->container['stop_price'];
- }
-
- /**
- * Sets stop_price
- *
- * @param string|null $stop_price stop_price
- *
- * @return self
- */
- public function setStopPrice($stop_price)
- {
-
- if (is_null($stop_price)) {
- throw new \InvalidArgumentException('non-nullable stop_price cannot be null');
- }
-
- $this->container['stop_price'] = $stop_price;
-
- return $this;
- }
-
- /**
- * Gets is_all_or_none
- *
- * @return bool|null
- */
- public function getIsAllOrNone()
- {
- return $this->container['is_all_or_none'];
- }
-
- /**
- * Sets is_all_or_none
- *
- * @param bool|null $is_all_or_none is_all_or_none
- *
- * @return self
- */
- public function setIsAllOrNone($is_all_or_none)
- {
-
- if (is_null($is_all_or_none)) {
- throw new \InvalidArgumentException('non-nullable is_all_or_none cannot be null');
- }
-
- $this->container['is_all_or_none'] = $is_all_or_none;
-
- return $this;
- }
-
- /**
- * Gets is_anonymous
- *
- * @return bool|null
- */
- public function getIsAnonymous()
- {
- return $this->container['is_anonymous'];
- }
-
- /**
- * Sets is_anonymous
- *
- * @param bool|null $is_anonymous is_anonymous
- *
- * @return self
- */
- public function setIsAnonymous($is_anonymous)
- {
-
- if (is_null($is_anonymous)) {
- throw new \InvalidArgumentException('non-nullable is_anonymous cannot be null');
- }
-
- $this->container['is_anonymous'] = $is_anonymous;
-
- return $this;
- }
-
- /**
- * Gets iceberg_quantity
- *
- * @return string|null
- */
- public function getIcebergQuantity()
- {
- return $this->container['iceberg_quantity'];
- }
-
- /**
- * Sets iceberg_quantity
- *
- * @param string|null $iceberg_quantity iceberg_quantity
- *
- * @return self
- */
- public function setIcebergQuantity($iceberg_quantity)
- {
-
- if (is_null($iceberg_quantity)) {
- throw new \InvalidArgumentException('non-nullable iceberg_quantity cannot be null');
- }
-
- $this->container['iceberg_quantity'] = $iceberg_quantity;
-
- return $this;
- }
-
- /**
- * Gets min_quantity
- *
- * @return string|null
- */
- public function getMinQuantity()
- {
- return $this->container['min_quantity'];
- }
-
- /**
- * Sets min_quantity
- *
- * @param string|null $min_quantity min_quantity
- *
- * @return self
- */
- public function setMinQuantity($min_quantity)
- {
-
- if (is_null($min_quantity)) {
- throw new \InvalidArgumentException('non-nullable min_quantity cannot be null');
- }
-
- $this->container['min_quantity'] = $min_quantity;
-
- return $this;
- }
-
- /**
- * Gets avg_exec_price
- *
- * @return int|null
- */
- public function getAvgExecPrice()
- {
- return $this->container['avg_exec_price'];
- }
-
- /**
- * Sets avg_exec_price
- *
- * @param int|null $avg_exec_price avg_exec_price
- *
- * @return self
- */
- public function setAvgExecPrice($avg_exec_price)
- {
-
- if (is_null($avg_exec_price)) {
- throw new \InvalidArgumentException('non-nullable avg_exec_price cannot be null');
- }
-
- $this->container['avg_exec_price'] = $avg_exec_price;
-
- return $this;
- }
-
- /**
- * Gets last_exec_price
- *
- * @return string|null
- */
- public function getLastExecPrice()
- {
- return $this->container['last_exec_price'];
- }
-
- /**
- * Sets last_exec_price
- *
- * @param string|null $last_exec_price last_exec_price
- *
- * @return self
- */
- public function setLastExecPrice($last_exec_price)
- {
-
- if (is_null($last_exec_price)) {
- throw new \InvalidArgumentException('non-nullable last_exec_price cannot be null');
- }
-
- $this->container['last_exec_price'] = $last_exec_price;
-
- return $this;
- }
-
- /**
- * Gets source
- *
- * @return string|null
- */
- public function getSource()
- {
- return $this->container['source'];
- }
-
- /**
- * Sets source
- *
- * @param string|null $source source
- *
- * @return self
- */
- public function setSource($source)
- {
-
- if (is_null($source)) {
- throw new \InvalidArgumentException('non-nullable source cannot be null');
- }
-
- $this->container['source'] = $source;
-
- 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 time_in_force
- *
- * @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 gtd_date
- *
- * @return string|null
- */
- public function getGtdDate()
- {
- return $this->container['gtd_date'];
- }
-
- /**
- * Sets gtd_date
- *
- * @param string|null $gtd_date gtd_date
- *
- * @return self
- */
- public function setGtdDate($gtd_date)
- {
-
- if (is_null($gtd_date)) {
- throw new \InvalidArgumentException('non-nullable gtd_date cannot be null');
- }
-
- $this->container['gtd_date'] = $gtd_date;
-
- return $this;
- }
-
- /**
- * Gets state
- *
- * @return string|null
- */
- public function getState()
- {
- return $this->container['state'];
- }
-
- /**
- * Sets state
- *
- * @param string|null $state state
- *
- * @return self
- */
- public function setState($state)
- {
-
- if (is_null($state)) {
- throw new \InvalidArgumentException('non-nullable state cannot be null');
- }
-
- $this->container['state'] = $state;
-
- return $this;
- }
-
- /**
- * Gets rejection_reason
- *
- * @return string|null
- */
- public function getRejectionReason()
- {
- return $this->container['rejection_reason'];
- }
-
- /**
- * Sets rejection_reason
- *
- * @param string|null $rejection_reason rejection_reason
- *
- * @return self
- */
- public function setRejectionReason($rejection_reason)
- {
-
- if (is_null($rejection_reason)) {
- throw new \InvalidArgumentException('non-nullable rejection_reason cannot be null');
- }
-
- $this->container['rejection_reason'] = $rejection_reason;
-
- return $this;
- }
-
- /**
- * Gets chain_id
- *
- * @return int|null
- */
- public function getChainId()
- {
- return $this->container['chain_id'];
- }
-
- /**
- * Sets chain_id
- *
- * @param int|null $chain_id chain_id
- *
- * @return self
- */
- public function setChainId($chain_id)
- {
-
- if (is_null($chain_id)) {
- throw new \InvalidArgumentException('non-nullable chain_id cannot be null');
- }
-
- $this->container['chain_id'] = $chain_id;
-
- return $this;
- }
-
- /**
- * Gets creation_time
- *
- * @return string|null
- */
- public function getCreationTime()
- {
- return $this->container['creation_time'];
- }
-
- /**
- * Sets creation_time
- *
- * @param string|null $creation_time creation_time
- *
- * @return self
- */
- public function setCreationTime($creation_time)
- {
-
- if (is_null($creation_time)) {
- throw new \InvalidArgumentException('non-nullable creation_time cannot be null');
- }
-
- $this->container['creation_time'] = $creation_time;
-
- return $this;
- }
-
- /**
- * Gets update_time
- *
- * @return string|null
- */
- public function getUpdateTime()
- {
- return $this->container['update_time'];
- }
-
- /**
- * Sets update_time
- *
- * @param string|null $update_time update_time
- *
- * @return self
- */
- public function setUpdateTime($update_time)
- {
-
- if (is_null($update_time)) {
- throw new \InvalidArgumentException('non-nullable update_time cannot be null');
- }
-
- $this->container['update_time'] = $update_time;
-
- return $this;
- }
-
- /**
- * Gets notes
- *
- * @return string|null
- */
- public function getNotes()
- {
- return $this->container['notes'];
- }
-
- /**
- * Sets notes
- *
- * @param string|null $notes notes
- *
- * @return self
- */
- public function setNotes($notes)
- {
-
- if (is_null($notes)) {
- throw new \InvalidArgumentException('non-nullable notes cannot be null');
- }
-
- $this->container['notes'] = $notes;
-
- return $this;
- }
-
- /**
- * Gets primary_route
- *
- * @return string|null
- */
- public function getPrimaryRoute()
- {
- return $this->container['primary_route'];
- }
-
- /**
- * Sets primary_route
- *
- * @param string|null $primary_route primary_route
- *
- * @return self
- */
- public function setPrimaryRoute($primary_route)
- {
-
- if (is_null($primary_route)) {
- throw new \InvalidArgumentException('non-nullable primary_route cannot be null');
- }
-
- $this->container['primary_route'] = $primary_route;
-
- return $this;
- }
-
- /**
- * Gets secondary_route
- *
- * @return string|null
- */
- public function getSecondaryRoute()
- {
- return $this->container['secondary_route'];
- }
-
- /**
- * Sets secondary_route
- *
- * @param string|null $secondary_route secondary_route
- *
- * @return self
- */
- public function setSecondaryRoute($secondary_route)
- {
-
- if (is_null($secondary_route)) {
- throw new \InvalidArgumentException('non-nullable secondary_route cannot be null');
- }
-
- $this->container['secondary_route'] = $secondary_route;
-
- return $this;
- }
-
- /**
- * Gets order_route
- *
- * @return string|null
- */
- public function getOrderRoute()
- {
- return $this->container['order_route'];
- }
-
- /**
- * Sets order_route
- *
- * @param string|null $order_route order_route
- *
- * @return self
- */
- public function setOrderRoute($order_route)
- {
-
- if (is_null($order_route)) {
- throw new \InvalidArgumentException('non-nullable order_route cannot be null');
- }
-
- $this->container['order_route'] = $order_route;
-
- return $this;
- }
-
- /**
- * Gets venue_holding_order
- *
- * @return string|null
- */
- public function getVenueHoldingOrder()
- {
- return $this->container['venue_holding_order'];
- }
-
- /**
- * Sets venue_holding_order
- *
- * @param string|null $venue_holding_order venue_holding_order
- *
- * @return self
- */
- public function setVenueHoldingOrder($venue_holding_order)
- {
-
- if (is_null($venue_holding_order)) {
- throw new \InvalidArgumentException('non-nullable venue_holding_order cannot be null');
- }
-
- $this->container['venue_holding_order'] = $venue_holding_order;
-
- return $this;
- }
-
- /**
- * Gets comission_charged
- *
- * @return int|null
- */
- public function getComissionCharged()
- {
- return $this->container['comission_charged'];
- }
-
- /**
- * Sets comission_charged
- *
- * @param int|null $comission_charged comission_charged
- *
- * @return self
- */
- public function setComissionCharged($comission_charged)
- {
-
- if (is_null($comission_charged)) {
- throw new \InvalidArgumentException('non-nullable comission_charged cannot be null');
- }
-
- $this->container['comission_charged'] = $comission_charged;
-
- return $this;
- }
-
- /**
- * Gets exchange_order_id
- *
- * @return string|null
- */
- public function getExchangeOrderId()
- {
- return $this->container['exchange_order_id'];
- }
-
- /**
- * Sets exchange_order_id
- *
- * @param string|null $exchange_order_id exchange_order_id
- *
- * @return self
- */
- public function setExchangeOrderId($exchange_order_id)
- {
-
- if (is_null($exchange_order_id)) {
- throw new \InvalidArgumentException('non-nullable exchange_order_id cannot be null');
- }
-
- $this->container['exchange_order_id'] = $exchange_order_id;
-
- return $this;
- }
-
- /**
- * Gets is_significant_share_holder
- *
- * @return bool|null
- */
- public function getIsSignificantShareHolder()
- {
- return $this->container['is_significant_share_holder'];
- }
-
- /**
- * Sets is_significant_share_holder
- *
- * @param bool|null $is_significant_share_holder is_significant_share_holder
- *
- * @return self
- */
- public function setIsSignificantShareHolder($is_significant_share_holder)
- {
-
- if (is_null($is_significant_share_holder)) {
- throw new \InvalidArgumentException('non-nullable is_significant_share_holder cannot be null');
- }
-
- $this->container['is_significant_share_holder'] = $is_significant_share_holder;
-
- return $this;
- }
-
- /**
- * Gets is_insider
- *
- * @return bool|null
- */
- public function getIsInsider()
- {
- return $this->container['is_insider'];
- }
-
- /**
- * Sets is_insider
- *
- * @param bool|null $is_insider is_insider
- *
- * @return self
- */
- public function setIsInsider($is_insider)
- {
-
- if (is_null($is_insider)) {
- throw new \InvalidArgumentException('non-nullable is_insider cannot be null');
- }
-
- $this->container['is_insider'] = $is_insider;
-
- return $this;
- }
-
- /**
- * Gets is_limit_offset_in_dollar
- *
- * @return bool|null
- */
- public function getIsLimitOffsetInDollar()
- {
- return $this->container['is_limit_offset_in_dollar'];
- }
-
- /**
- * Sets is_limit_offset_in_dollar
- *
- * @param bool|null $is_limit_offset_in_dollar is_limit_offset_in_dollar
- *
- * @return self
- */
- public function setIsLimitOffsetInDollar($is_limit_offset_in_dollar)
- {
-
- if (is_null($is_limit_offset_in_dollar)) {
- throw new \InvalidArgumentException('non-nullable is_limit_offset_in_dollar cannot be null');
- }
-
- $this->container['is_limit_offset_in_dollar'] = $is_limit_offset_in_dollar;
-
- return $this;
- }
-
- /**
- * Gets user_id
- *
- * @return int|null
- */
- public function getUserId()
- {
- return $this->container['user_id'];
- }
-
- /**
- * Sets user_id
- *
- * @param int|null $user_id user_id
- *
- * @return self
- */
- public function setUserId($user_id)
- {
-
- if (is_null($user_id)) {
- throw new \InvalidArgumentException('non-nullable user_id cannot be null');
- }
-
- $this->container['user_id'] = $user_id;
-
- return $this;
- }
-
- /**
- * Gets placement_commission
- *
- * @return string|null
- */
- public function getPlacementCommission()
- {
- return $this->container['placement_commission'];
- }
-
- /**
- * Sets placement_commission
- *
- * @param string|null $placement_commission placement_commission
- *
- * @return self
- */
- public function setPlacementCommission($placement_commission)
- {
-
- if (is_null($placement_commission)) {
- throw new \InvalidArgumentException('non-nullable placement_commission cannot be null');
- }
-
- $this->container['placement_commission'] = $placement_commission;
-
- return $this;
- }
-
- /**
- * Gets legs
- *
- * @return \SnapTrade\Model\StrategyOrderPlaceOrdersInnerLegsInner[]|null
- */
- public function getLegs()
- {
- return $this->container['legs'];
- }
-
- /**
- * Sets legs
- *
- * @param \SnapTrade\Model\StrategyOrderPlaceOrdersInnerLegsInner[]|null $legs legs
- *
- * @return self
- */
- public function setLegs($legs)
- {
-
- if (is_null($legs)) {
- throw new \InvalidArgumentException('non-nullable legs cannot be null');
- }
-
- $this->container['legs'] = $legs;
-
- return $this;
- }
-
- /**
- * Gets strategy_type
- *
- * @return string|null
- */
- public function getStrategyType()
- {
- return $this->container['strategy_type'];
- }
-
- /**
- * Sets strategy_type
- *
- * @param string|null $strategy_type strategy_type
- *
- * @return self
- */
- public function setStrategyType($strategy_type)
- {
-
- if (is_null($strategy_type)) {
- throw new \InvalidArgumentException('non-nullable strategy_type cannot be null');
- }
-
- $this->container['strategy_type'] = $strategy_type;
-
- return $this;
- }
-
- /**
- * Gets trigger_stop_price
- *
- * @return string|null
- */
- public function getTriggerStopPrice()
- {
- return $this->container['trigger_stop_price'];
- }
-
- /**
- * Sets trigger_stop_price
- *
- * @param string|null $trigger_stop_price trigger_stop_price
- *
- * @return self
- */
- public function setTriggerStopPrice($trigger_stop_price)
- {
-
- if (is_null($trigger_stop_price)) {
- throw new \InvalidArgumentException('non-nullable trigger_stop_price cannot be null');
- }
-
- $this->container['trigger_stop_price'] = $trigger_stop_price;
-
- return $this;
- }
-
- /**
- * Gets order_group_id
- *
- * @return int|null
- */
- public function getOrderGroupId()
- {
- return $this->container['order_group_id'];
- }
-
- /**
- * Sets order_group_id
- *
- * @param int|null $order_group_id order_group_id
- *
- * @return self
- */
- public function setOrderGroupId($order_group_id)
- {
-
- if (is_null($order_group_id)) {
- throw new \InvalidArgumentException('non-nullable order_group_id cannot be null');
- }
-
- $this->container['order_group_id'] = $order_group_id;
-
- return $this;
- }
-
- /**
- * Gets order_class
- *
- * @return string|null
- */
- public function getOrderClass()
- {
- return $this->container['order_class'];
- }
-
- /**
- * Sets order_class
- *
- * @param string|null $order_class order_class
- *
- * @return self
- */
- public function setOrderClass($order_class)
- {
-
- if (is_null($order_class)) {
- throw new \InvalidArgumentException('non-nullable order_class cannot be null');
- }
-
- $this->container['order_class'] = $order_class;
-
- return $this;
- }
-
- /**
- * Gets is_cross_zero
- *
- * @return bool|null
- */
- public function getIsCrossZero()
- {
- return $this->container['is_cross_zero'];
- }
-
- /**
- * Sets is_cross_zero
- *
- * @param bool|null $is_cross_zero is_cross_zero
- *
- * @return self
- */
- public function setIsCrossZero($is_cross_zero)
- {
-
- if (is_null($is_cross_zero)) {
- throw new \InvalidArgumentException('non-nullable is_cross_zero cannot be null');
- }
-
- $this->container['is_cross_zero'] = $is_cross_zero;
-
- 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/StrategyOrderPlaceOrdersInnerLegsInner.php b/lib/Model/StrategyOrderPlaceOrdersInnerLegsInner.php
deleted file mode 100644
index 8a9daee..0000000
--- a/lib/Model/StrategyOrderPlaceOrdersInnerLegsInner.php
+++ /dev/null
@@ -1,620 +0,0 @@
-
- */
-class StrategyOrderPlaceOrdersInnerLegsInner implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'StrategyOrderPlace_orders_inner_legs_inner';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'leg_id' => 'int',
- 'symbol' => 'string',
- 'symbol_id' => 'int',
- 'leg_ratio_quantity' => 'int',
- 'side' => 'string',
- 'avg_exec_price' => 'int',
- 'last_exec_price' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'leg_id' => 'int32',
- 'symbol' => null,
- 'symbol_id' => 'int32',
- 'leg_ratio_quantity' => 'int32',
- 'side' => null,
- 'avg_exec_price' => 'int32',
- 'last_exec_price' => 'nullable'
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'leg_id' => false,
- 'symbol' => false,
- 'symbol_id' => false,
- 'leg_ratio_quantity' => false,
- 'side' => false,
- 'avg_exec_price' => false,
- 'last_exec_price' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'leg_id' => 'legId',
- 'symbol' => 'symbol',
- 'symbol_id' => 'symbolId',
- 'leg_ratio_quantity' => 'legRatioQuantity',
- 'side' => 'side',
- 'avg_exec_price' => 'avgExecPrice',
- 'last_exec_price' => 'lastExecPrice'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'leg_id' => 'setLegId',
- 'symbol' => 'setSymbol',
- 'symbol_id' => 'setSymbolId',
- 'leg_ratio_quantity' => 'setLegRatioQuantity',
- 'side' => 'setSide',
- 'avg_exec_price' => 'setAvgExecPrice',
- 'last_exec_price' => 'setLastExecPrice'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'leg_id' => 'getLegId',
- 'symbol' => 'getSymbol',
- 'symbol_id' => 'getSymbolId',
- 'leg_ratio_quantity' => 'getLegRatioQuantity',
- 'side' => 'getSide',
- 'avg_exec_price' => 'getAvgExecPrice',
- 'last_exec_price' => 'getLastExecPrice'
- ];
-
- /**
- * 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('leg_id', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('symbol_id', $data ?? [], null);
- $this->setIfExists('leg_ratio_quantity', $data ?? [], null);
- $this->setIfExists('side', $data ?? [], null);
- $this->setIfExists('avg_exec_price', $data ?? [], null);
- $this->setIfExists('last_exec_price', $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 leg_id
- *
- * @return int|null
- */
- public function getLegId()
- {
- return $this->container['leg_id'];
- }
-
- /**
- * Sets leg_id
- *
- * @param int|null $leg_id leg_id
- *
- * @return self
- */
- public function setLegId($leg_id)
- {
-
- if (is_null($leg_id)) {
- throw new \InvalidArgumentException('non-nullable leg_id cannot be null');
- }
-
- $this->container['leg_id'] = $leg_id;
-
- return $this;
- }
-
- /**
- * Gets symbol
- *
- * @return string|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param string|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets symbol_id
- *
- * @return int|null
- */
- public function getSymbolId()
- {
- return $this->container['symbol_id'];
- }
-
- /**
- * Sets symbol_id
- *
- * @param int|null $symbol_id symbol_id
- *
- * @return self
- */
- public function setSymbolId($symbol_id)
- {
-
- if (is_null($symbol_id)) {
- throw new \InvalidArgumentException('non-nullable symbol_id cannot be null');
- }
-
- $this->container['symbol_id'] = $symbol_id;
-
- return $this;
- }
-
- /**
- * Gets leg_ratio_quantity
- *
- * @return int|null
- */
- public function getLegRatioQuantity()
- {
- return $this->container['leg_ratio_quantity'];
- }
-
- /**
- * Sets leg_ratio_quantity
- *
- * @param int|null $leg_ratio_quantity leg_ratio_quantity
- *
- * @return self
- */
- public function setLegRatioQuantity($leg_ratio_quantity)
- {
-
- if (is_null($leg_ratio_quantity)) {
- throw new \InvalidArgumentException('non-nullable leg_ratio_quantity cannot be null');
- }
-
- $this->container['leg_ratio_quantity'] = $leg_ratio_quantity;
-
- return $this;
- }
-
- /**
- * Gets side
- *
- * @return string|null
- */
- public function getSide()
- {
- return $this->container['side'];
- }
-
- /**
- * Sets side
- *
- * @param string|null $side side
- *
- * @return self
- */
- public function setSide($side)
- {
-
- if (is_null($side)) {
- throw new \InvalidArgumentException('non-nullable side cannot be null');
- }
-
- $this->container['side'] = $side;
-
- return $this;
- }
-
- /**
- * Gets avg_exec_price
- *
- * @return int|null
- */
- public function getAvgExecPrice()
- {
- return $this->container['avg_exec_price'];
- }
-
- /**
- * Sets avg_exec_price
- *
- * @param int|null $avg_exec_price avg_exec_price
- *
- * @return self
- */
- public function setAvgExecPrice($avg_exec_price)
- {
-
- if (is_null($avg_exec_price)) {
- throw new \InvalidArgumentException('non-nullable avg_exec_price cannot be null');
- }
-
- $this->container['avg_exec_price'] = $avg_exec_price;
-
- return $this;
- }
-
- /**
- * Gets last_exec_price
- *
- * @return string|null
- */
- public function getLastExecPrice()
- {
- return $this->container['last_exec_price'];
- }
-
- /**
- * Sets last_exec_price
- *
- * @param string|null $last_exec_price last_exec_price
- *
- * @return self
- */
- public function setLastExecPrice($last_exec_price)
- {
-
- if (is_null($last_exec_price)) {
- throw new \InvalidArgumentException('non-nullable last_exec_price cannot be null');
- }
-
- $this->container['last_exec_price'] = $last_exec_price;
-
- 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/SymbolFigiInstrument.php b/lib/Model/SymbolFigiInstrument.php
index b9c2fde..2b69c59 100644
--- a/lib/Model/SymbolFigiInstrument.php
+++ b/lib/Model/SymbolFigiInstrument.php
@@ -302,7 +302,7 @@ public function getFigiCode()
/**
* Sets figi_code
*
- * @param string|null $figi_code figi_code
+ * @param string|null $figi_code This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information.
*
* @return self
*/
@@ -338,7 +338,7 @@ public function getFigiShareClass()
/**
* Sets figi_share_class
*
- * @param string|null $figi_share_class figi_share_class
+ * @param string|null $figi_share_class This enables users to link multiple FIGIs for the same security in order to obtain an aggregated view across all countries and all exchanges. For example, `AAPL` has a different FIGI for each exchange/trading venue it is traded on. The `figi_share_class` is the same for all of these FIGIs. See section 1.4.3 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information.
*
* @return self
*/
diff --git a/lib/Model/TargetAsset.php b/lib/Model/TargetAsset.php
deleted file mode 100644
index 3cfda6b..0000000
--- a/lib/Model/TargetAsset.php
+++ /dev/null
@@ -1,608 +0,0 @@
-
- */
-class TargetAsset implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'TargetAsset';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'id' => 'string',
- 'symbol' => '\SnapTrade\Model\UniversalSymbol',
- 'percent' => 'float',
- 'is_supported' => 'bool',
- 'is_excluded' => 'bool',
- 'meta' => 'array'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'id' => 'uuid',
- 'symbol' => null,
- 'percent' => null,
- 'is_supported' => null,
- 'is_excluded' => null,
- 'meta' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'id' => false,
- 'symbol' => false,
- 'percent' => false,
- 'is_supported' => false,
- 'is_excluded' => false,
- 'meta' => true
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'id' => 'id',
- 'symbol' => 'symbol',
- 'percent' => 'percent',
- 'is_supported' => 'is_supported',
- 'is_excluded' => 'is_excluded',
- 'meta' => 'meta'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'id' => 'setId',
- 'symbol' => 'setSymbol',
- 'percent' => 'setPercent',
- 'is_supported' => 'setIsSupported',
- 'is_excluded' => 'setIsExcluded',
- 'meta' => 'setMeta'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'id' => 'getId',
- 'symbol' => 'getSymbol',
- 'percent' => 'getPercent',
- 'is_supported' => 'getIsSupported',
- 'is_excluded' => 'getIsExcluded',
- 'meta' => 'getMeta'
- ];
-
- /**
- * 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('id', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('percent', $data ?? [], null);
- $this->setIfExists('is_supported', $data ?? [], null);
- $this->setIfExists('is_excluded', $data ?? [], null);
- $this->setIfExists('meta', $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 = [];
-
- if (!is_null($this->container['percent']) && ($this->container['percent'] > 100)) {
- $invalidProperties[] = "invalid value for 'percent', must be smaller than or equal to 100.";
- }
-
- if (!is_null($this->container['percent']) && ($this->container['percent'] < 0)) {
- $invalidProperties[] = "invalid value for 'percent', must be bigger than or equal to 0.";
- }
-
- 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 id
- *
- * @return string|null
- */
- public function getId()
- {
- return $this->container['id'];
- }
-
- /**
- * Sets id
- *
- * @param string|null $id id
- *
- * @return self
- */
- public function setId($id)
- {
-
- if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
- }
-
- $this->container['id'] = $id;
-
- return $this;
- }
-
- /**
- * Gets symbol
- *
- * @return \SnapTrade\Model\UniversalSymbol|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param \SnapTrade\Model\UniversalSymbol|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets percent
- *
- * @return float|null
- */
- public function getPercent()
- {
- return $this->container['percent'];
- }
-
- /**
- * Sets percent
- *
- * @param float|null $percent percent
- *
- * @return self
- */
- public function setPercent($percent)
- {
-
- if (!is_null($percent) && ($percent > 100)) {
- throw new \InvalidArgumentException('invalid value for $percent when calling TargetAsset., must be smaller than or equal to 100.');
- }
- if (!is_null($percent) && ($percent < 0)) {
- throw new \InvalidArgumentException('invalid value for $percent when calling TargetAsset., must be bigger than or equal to 0.');
- }
-
-
- if (is_null($percent)) {
- throw new \InvalidArgumentException('non-nullable percent cannot be null');
- }
-
- $this->container['percent'] = $percent;
-
- return $this;
- }
-
- /**
- * Gets is_supported
- *
- * @return bool|null
- */
- public function getIsSupported()
- {
- return $this->container['is_supported'];
- }
-
- /**
- * Sets is_supported
- *
- * @param bool|null $is_supported is_supported
- *
- * @return self
- */
- public function setIsSupported($is_supported)
- {
-
- if (is_null($is_supported)) {
- throw new \InvalidArgumentException('non-nullable is_supported cannot be null');
- }
-
- $this->container['is_supported'] = $is_supported;
-
- return $this;
- }
-
- /**
- * Gets is_excluded
- *
- * @return bool|null
- */
- public function getIsExcluded()
- {
- return $this->container['is_excluded'];
- }
-
- /**
- * Sets is_excluded
- *
- * @param bool|null $is_excluded is_excluded
- *
- * @return self
- */
- public function setIsExcluded($is_excluded)
- {
-
- if (is_null($is_excluded)) {
- throw new \InvalidArgumentException('non-nullable is_excluded cannot be null');
- }
-
- $this->container['is_excluded'] = $is_excluded;
-
- return $this;
- }
-
- /**
- * Gets meta
- *
- * @return array|null
- */
- public function getMeta()
- {
- return $this->container['meta'];
- }
-
- /**
- * Sets meta
- *
- * @param array|null $meta meta
- *
- * @return self
- */
- public function setMeta($meta)
- {
-
- if (is_null($meta)) {
- array_push($this->openAPINullablesSetToNull, 'meta');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('meta', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
- }
-
- $this->container['meta'] = $meta;
-
- 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/TradeExecutionStatus.php b/lib/Model/TradeExecutionStatus.php
deleted file mode 100644
index b6e7279..0000000
--- a/lib/Model/TradeExecutionStatus.php
+++ /dev/null
@@ -1,767 +0,0 @@
-
- */
-class TradeExecutionStatus implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'TradeExecutionStatus';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'symbol' => '\SnapTrade\Model\BrokerageSymbol',
- 'universal_symbol' => '\SnapTrade\Model\UniversalSymbol',
- 'trade' => '\SnapTrade\Model\Trade',
- 'state' => 'string',
- 'filled_units' => 'int',
- 'action' => 'string',
- 'price' => 'float',
- 'commissions' => 'float',
- 'meta' => 'array'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'symbol' => null,
- 'universal_symbol' => null,
- 'trade' => null,
- 'state' => null,
- 'filled_units' => null,
- 'action' => null,
- 'price' => null,
- 'commissions' => null,
- 'meta' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'symbol' => false,
- 'universal_symbol' => false,
- 'trade' => false,
- 'state' => false,
- 'filled_units' => false,
- 'action' => false,
- 'price' => false,
- 'commissions' => false,
- 'meta' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'symbol' => 'symbol',
- 'universal_symbol' => 'universal_symbol',
- 'trade' => 'trade',
- 'state' => 'state',
- 'filled_units' => 'filled_units',
- 'action' => 'action',
- 'price' => 'price',
- 'commissions' => 'commissions',
- 'meta' => 'meta'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'symbol' => 'setSymbol',
- 'universal_symbol' => 'setUniversalSymbol',
- 'trade' => 'setTrade',
- 'state' => 'setState',
- 'filled_units' => 'setFilledUnits',
- 'action' => 'setAction',
- 'price' => 'setPrice',
- 'commissions' => 'setCommissions',
- 'meta' => 'setMeta'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'symbol' => 'getSymbol',
- 'universal_symbol' => 'getUniversalSymbol',
- 'trade' => 'getTrade',
- 'state' => 'getState',
- 'filled_units' => 'getFilledUnits',
- 'action' => 'getAction',
- 'price' => 'getPrice',
- 'commissions' => 'getCommissions',
- 'meta' => 'getMeta'
- ];
-
- /**
- * 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;
- }
-
- public const STATE_EXECUTED = 'Executed';
- public const STATE_CANCELED = 'Canceled';
- public const STATE_REJECTED = 'Rejected';
- public const STATE_FAILED = 'Failed';
- public const STATE_NOT_EXECUTED = 'Not Executed';
- public const ACTION_BUY = 'BUY';
- public const ACTION_SELL = 'SELL';
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getStateAllowableValues()
- {
- return [
- self::STATE_EXECUTED,
- self::STATE_CANCELED,
- self::STATE_REJECTED,
- self::STATE_FAILED,
- self::STATE_NOT_EXECUTED,
- ];
- }
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getActionAllowableValues()
- {
- return [
- self::ACTION_BUY,
- self::ACTION_SELL,
- ];
- }
-
- /**
- * 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('symbol', $data ?? [], null);
- $this->setIfExists('universal_symbol', $data ?? [], null);
- $this->setIfExists('trade', $data ?? [], null);
- $this->setIfExists('state', $data ?? [], null);
- $this->setIfExists('filled_units', $data ?? [], null);
- $this->setIfExists('action', $data ?? [], null);
- $this->setIfExists('price', $data ?? [], null);
- $this->setIfExists('commissions', $data ?? [], null);
- $this->setIfExists('meta', $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 = [];
-
- $allowedValues = $this->getStateAllowableValues();
- if (!is_null($this->container['state']) && !in_array($this->container['state'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'state', must be one of '%s'",
- $this->container['state'],
- implode("', '", $allowedValues)
- );
- }
-
- $allowedValues = $this->getActionAllowableValues();
- if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'action', must be one of '%s'",
- $this->container['action'],
- implode("', '", $allowedValues)
- );
- }
-
- 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 symbol
- *
- * @return \SnapTrade\Model\BrokerageSymbol|null
- */
- public function getSymbol()
- {
- return $this->container['symbol'];
- }
-
- /**
- * Sets symbol
- *
- * @param \SnapTrade\Model\BrokerageSymbol|null $symbol symbol
- *
- * @return self
- */
- public function setSymbol($symbol)
- {
-
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
- }
-
- $this->container['symbol'] = $symbol;
-
- return $this;
- }
-
- /**
- * Gets universal_symbol
- *
- * @return \SnapTrade\Model\UniversalSymbol|null
- */
- public function getUniversalSymbol()
- {
- return $this->container['universal_symbol'];
- }
-
- /**
- * Sets universal_symbol
- *
- * @param \SnapTrade\Model\UniversalSymbol|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 trade
- *
- * @return \SnapTrade\Model\Trade|null
- */
- public function getTrade()
- {
- return $this->container['trade'];
- }
-
- /**
- * Sets trade
- *
- * @param \SnapTrade\Model\Trade|null $trade trade
- *
- * @return self
- */
- public function setTrade($trade)
- {
-
- if (is_null($trade)) {
- throw new \InvalidArgumentException('non-nullable trade cannot be null');
- }
-
- $this->container['trade'] = $trade;
-
- return $this;
- }
-
- /**
- * Gets state
- *
- * @return string|null
- */
- public function getState()
- {
- return $this->container['state'];
- }
-
- /**
- * Sets state
- *
- * @param string|null $state Execution state of a trade
- *
- * @return self
- */
- public function setState($state)
- {
- $allowedValues = $this->getStateAllowableValues();
- if (!is_null($state) && !in_array($state, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'state', must be one of '%s'",
- $state,
- implode("', '", $allowedValues)
- )
- );
- }
-
- if (is_null($state)) {
- throw new \InvalidArgumentException('non-nullable state cannot be null');
- }
-
- $this->container['state'] = $state;
-
- return $this;
- }
-
- /**
- * Gets filled_units
- *
- * @return int|null
- */
- public function getFilledUnits()
- {
- return $this->container['filled_units'];
- }
-
- /**
- * Sets filled_units
- *
- * @param int|null $filled_units Number of filled units
- *
- * @return self
- */
- public function setFilledUnits($filled_units)
- {
-
- if (is_null($filled_units)) {
- throw new \InvalidArgumentException('non-nullable filled_units cannot be null');
- }
-
- $this->container['filled_units'] = $filled_units;
-
- return $this;
- }
-
- /**
- * Gets action
- *
- * @return string|null
- */
- public function getAction()
- {
- return $this->container['action'];
- }
-
- /**
- * Sets action
- *
- * @param string|null $action Action of executed trade
- *
- * @return self
- */
- public function setAction($action)
- {
- $allowedValues = $this->getActionAllowableValues();
- if (!is_null($action) && !in_array($action, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'action', must be one of '%s'",
- $action,
- implode("', '", $allowedValues)
- )
- );
- }
-
- if (is_null($action)) {
- throw new \InvalidArgumentException('non-nullable action cannot be null');
- }
-
- $this->container['action'] = $action;
-
- return $this;
- }
-
- /**
- * Gets price
- *
- * @return float|null
- */
- public function getPrice()
- {
- return $this->container['price'];
- }
-
- /**
- * Sets price
- *
- * @param float|null $price Price of execution
- *
- * @return self
- */
- public function setPrice($price)
- {
-
- if (is_null($price)) {
- throw new \InvalidArgumentException('non-nullable price cannot be null');
- }
-
- $this->container['price'] = $price;
-
- return $this;
- }
-
- /**
- * Gets commissions
- *
- * @return float|null
- */
- public function getCommissions()
- {
- return $this->container['commissions'];
- }
-
- /**
- * Sets commissions
- *
- * @param float|null $commissions Fees paid from executing trade
- *
- * @return self
- */
- public function setCommissions($commissions)
- {
-
- if (is_null($commissions)) {
- throw new \InvalidArgumentException('non-nullable commissions cannot be null');
- }
-
- $this->container['commissions'] = $commissions;
-
- return $this;
- }
-
- /**
- * Gets meta
- *
- * @return array|null
- */
- public function getMeta()
- {
- return $this->container['meta'];
- }
-
- /**
- * Sets meta
- *
- * @param array|null $meta Other misc. data
- *
- * @return self
- */
- public function setMeta($meta)
- {
-
- if (is_null($meta)) {
- throw new \InvalidArgumentException('non-nullable meta cannot be null');
- }
-
- $this->container['meta'] = $meta;
-
- 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/TradeImpact.php b/lib/Model/TradeImpact.php
deleted file mode 100644
index 9a2c9f4..0000000
--- a/lib/Model/TradeImpact.php
+++ /dev/null
@@ -1,549 +0,0 @@
-
- */
-class TradeImpact implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'TradeImpact';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'account' => '\SnapTrade\Model\Account',
- 'currency' => '\SnapTrade\Model\Currency',
- 'remaining_cash' => 'float',
- 'estimated_commissions' => 'float',
- 'forex_fees' => 'float'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'account' => null,
- 'currency' => null,
- 'remaining_cash' => null,
- 'estimated_commissions' => null,
- 'forex_fees' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'account' => false,
- 'currency' => false,
- 'remaining_cash' => false,
- 'estimated_commissions' => false,
- 'forex_fees' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'account' => 'account',
- 'currency' => 'currency',
- 'remaining_cash' => 'remaining_cash',
- 'estimated_commissions' => 'estimated_commissions',
- 'forex_fees' => 'forex_fees'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'account' => 'setAccount',
- 'currency' => 'setCurrency',
- 'remaining_cash' => 'setRemainingCash',
- 'estimated_commissions' => 'setEstimatedCommissions',
- 'forex_fees' => 'setForexFees'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'account' => 'getAccount',
- 'currency' => 'getCurrency',
- 'remaining_cash' => 'getRemainingCash',
- 'estimated_commissions' => 'getEstimatedCommissions',
- 'forex_fees' => 'getForexFees'
- ];
-
- /**
- * 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('account', $data ?? [], null);
- $this->setIfExists('currency', $data ?? [], null);
- $this->setIfExists('remaining_cash', $data ?? [], null);
- $this->setIfExists('estimated_commissions', $data ?? [], null);
- $this->setIfExists('forex_fees', $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 account
- *
- * @return \SnapTrade\Model\Account|null
- */
- public function getAccount()
- {
- return $this->container['account'];
- }
-
- /**
- * Sets account
- *
- * @param \SnapTrade\Model\Account|null $account account
- *
- * @return self
- */
- public function setAccount($account)
- {
-
- if (is_null($account)) {
- throw new \InvalidArgumentException('non-nullable account cannot be null');
- }
-
- $this->container['account'] = $account;
-
- return $this;
- }
-
- /**
- * Gets currency
- *
- * @return \SnapTrade\Model\Currency|null
- */
- public function getCurrency()
- {
- return $this->container['currency'];
- }
-
- /**
- * Sets currency
- *
- * @param \SnapTrade\Model\Currency|null $currency currency
- *
- * @return self
- */
- public function setCurrency($currency)
- {
-
- if (is_null($currency)) {
- throw new \InvalidArgumentException('non-nullable currency cannot be null');
- }
-
- $this->container['currency'] = $currency;
-
- return $this;
- }
-
- /**
- * Gets remaining_cash
- *
- * @return float|null
- */
- public function getRemainingCash()
- {
- return $this->container['remaining_cash'];
- }
-
- /**
- * Sets remaining_cash
- *
- * @param float|null $remaining_cash Remaining balance after executing all trades
- *
- * @return self
- */
- public function setRemainingCash($remaining_cash)
- {
-
- if (is_null($remaining_cash)) {
- throw new \InvalidArgumentException('non-nullable remaining_cash cannot be null');
- }
-
- $this->container['remaining_cash'] = $remaining_cash;
-
- return $this;
- }
-
- /**
- * Gets estimated_commissions
- *
- * @return float|null
- */
- public function getEstimatedCommissions()
- {
- return $this->container['estimated_commissions'];
- }
-
- /**
- * Sets estimated_commissions
- *
- * @param float|null $estimated_commissions Total estimated commissions across all trades to make
- *
- * @return self
- */
- public function setEstimatedCommissions($estimated_commissions)
- {
-
- if (is_null($estimated_commissions)) {
- throw new \InvalidArgumentException('non-nullable estimated_commissions cannot be null');
- }
-
- $this->container['estimated_commissions'] = $estimated_commissions;
-
- return $this;
- }
-
- /**
- * Gets forex_fees
- *
- * @return float|null
- */
- public function getForexFees()
- {
- return $this->container['forex_fees'];
- }
-
- /**
- * Sets forex_fees
- *
- * @param float|null $forex_fees Estimated forex fees to pay to excute trades
- *
- * @return self
- */
- public function setForexFees($forex_fees)
- {
-
- if (is_null($forex_fees)) {
- throw new \InvalidArgumentException('non-nullable forex_fees cannot be null');
- }
-
- $this->container['forex_fees'] = $forex_fees;
-
- 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/UnderlyingSymbol.php b/lib/Model/UnderlyingSymbol.php
index 4aedc40..7952469 100644
--- a/lib/Model/UnderlyingSymbol.php
+++ b/lib/Model/UnderlyingSymbol.php
@@ -30,7 +30,7 @@
* UnderlyingSymbol Class Doc Comment
*
* @category Class
- * @description Underlying Symbol
+ * @description Symbol object for the underlying security of an option.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -53,10 +53,11 @@ class UnderlyingSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
protected static $openAPITypes = [
'id' => 'string',
'symbol' => 'string',
+ 'raw_symbol' => 'string',
'description' => 'string',
- 'currency' => '\SnapTrade\Model\Currency',
- 'exchange' => '\SnapTrade\Model\USExchange',
- 'type' => '\SnapTrade\Model\SecurityType',
+ 'currency' => '\SnapTrade\Model\UniversalSymbolCurrency',
+ 'exchange' => '\SnapTrade\Model\UnderlyingSymbolExchange',
+ 'type' => '\SnapTrade\Model\UnderlyingSymbolType',
'currencies' => '\SnapTrade\Model\Currency[]',
'figi_code' => 'string',
'figi_instrument' => '\SnapTrade\Model\SymbolFigiInstrument'
@@ -72,6 +73,7 @@ class UnderlyingSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
protected static $openAPIFormats = [
'id' => 'uuid',
'symbol' => null,
+ 'raw_symbol' => null,
'description' => null,
'currency' => null,
'exchange' => null,
@@ -89,6 +91,7 @@ class UnderlyingSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
protected static $openAPINullables = [
'id' => false,
'symbol' => false,
+ 'raw_symbol' => false,
'description' => true,
'currency' => false,
'exchange' => false,
@@ -186,6 +189,7 @@ public function isNullableSetToNull(string $property): bool
protected static $attributeMap = [
'id' => 'id',
'symbol' => 'symbol',
+ 'raw_symbol' => 'raw_symbol',
'description' => 'description',
'currency' => 'currency',
'exchange' => 'exchange',
@@ -203,6 +207,7 @@ public function isNullableSetToNull(string $property): bool
protected static $setters = [
'id' => 'setId',
'symbol' => 'setSymbol',
+ 'raw_symbol' => 'setRawSymbol',
'description' => 'setDescription',
'currency' => 'setCurrency',
'exchange' => 'setExchange',
@@ -220,6 +225,7 @@ public function isNullableSetToNull(string $property): bool
protected static $getters = [
'id' => 'getId',
'symbol' => 'getSymbol',
+ 'raw_symbol' => 'getRawSymbol',
'description' => 'getDescription',
'currency' => 'getCurrency',
'exchange' => 'getExchange',
@@ -288,6 +294,7 @@ public function __construct(array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('symbol', $data ?? [], null);
+ $this->setIfExists('raw_symbol', $data ?? [], null);
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('currency', $data ?? [], null);
$this->setIfExists('exchange', $data ?? [], null);
@@ -352,7 +359,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
*
* @return self
*/
@@ -381,7 +388,7 @@ public function getSymbol()
/**
* Sets symbol
*
- * @param string|null $symbol symbol
+ * @param string|null $symbol The security's trading ticker symbol. For example \"AAPL\" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix.
*
* @return self
*/
@@ -397,6 +404,35 @@ public function setSymbol($symbol)
return $this;
}
+ /**
+ * Gets raw_symbol
+ *
+ * @return string|null
+ */
+ public function getRawSymbol()
+ {
+ return $this->container['raw_symbol'];
+ }
+
+ /**
+ * Sets raw_symbol
+ *
+ * @param string|null $raw_symbol The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
+ *
+ * @return self
+ */
+ public function setRawSymbol($raw_symbol)
+ {
+
+ if (is_null($raw_symbol)) {
+ throw new \InvalidArgumentException('non-nullable raw_symbol cannot be null');
+ }
+
+ $this->container['raw_symbol'] = $raw_symbol;
+
+ return $this;
+ }
+
/**
* Gets description
*
@@ -410,7 +446,7 @@ public function getDescription()
/**
* Sets description
*
- * @param string|null $description description
+ * @param string|null $description A human-readable description of the security. This is usually the company name or ETF name.
*
* @return self
*/
@@ -436,7 +472,7 @@ public function setDescription($description)
/**
* Gets currency
*
- * @return \SnapTrade\Model\Currency|null
+ * @return \SnapTrade\Model\UniversalSymbolCurrency|null
*/
public function getCurrency()
{
@@ -446,7 +482,7 @@ public function getCurrency()
/**
* Sets currency
*
- * @param \SnapTrade\Model\Currency|null $currency currency
+ * @param \SnapTrade\Model\UniversalSymbolCurrency|null $currency currency
*
* @return self
*/
@@ -465,7 +501,7 @@ public function setCurrency($currency)
/**
* Gets exchange
*
- * @return \SnapTrade\Model\USExchange|null
+ * @return \SnapTrade\Model\UnderlyingSymbolExchange|null
*/
public function getExchange()
{
@@ -475,7 +511,7 @@ public function getExchange()
/**
* Sets exchange
*
- * @param \SnapTrade\Model\USExchange|null $exchange exchange
+ * @param \SnapTrade\Model\UnderlyingSymbolExchange|null $exchange exchange
*
* @return self
*/
@@ -494,7 +530,7 @@ public function setExchange($exchange)
/**
* Gets type
*
- * @return \SnapTrade\Model\SecurityType|null
+ * @return \SnapTrade\Model\UnderlyingSymbolType|null
*/
public function getType()
{
@@ -504,7 +540,7 @@ public function getType()
/**
* Sets type
*
- * @param \SnapTrade\Model\SecurityType|null $type type
+ * @param \SnapTrade\Model\UnderlyingSymbolType|null $type type
*
* @return self
*/
@@ -524,6 +560,7 @@ public function setType($type)
* Gets currencies
*
* @return \SnapTrade\Model\Currency[]|null
+ * @deprecated
*/
public function getCurrencies()
{
@@ -533,9 +570,10 @@ public function getCurrencies()
/**
* Sets currencies
*
- * @param \SnapTrade\Model\Currency[]|null $currencies currencies
+ * @param \SnapTrade\Model\Currency[]|null $currencies This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
*
* @return self
+ * @deprecated
*/
public function setCurrencies($currencies)
{
@@ -562,7 +600,7 @@ public function getFigiCode()
/**
* Sets figi_code
*
- * @param string|null $figi_code figi_code
+ * @param string|null $figi_code This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property.
*
* @return self
*/
diff --git a/lib/Model/Trade.php b/lib/Model/UnderlyingSymbolExchange.php
similarity index 61%
rename from lib/Model/Trade.php
rename to lib/Model/UnderlyingSymbolExchange.php
index 30ab8f8..82225dd 100644
--- a/lib/Model/Trade.php
+++ b/lib/Model/UnderlyingSymbolExchange.php
@@ -1,6 +1,6 @@
*/
-class Trade implements ModelInterface, ArrayAccess, \JsonSerializable
+class UnderlyingSymbolExchange implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -43,7 +43,7 @@ class Trade implements ModelInterface, ArrayAccess, \JsonSerializable
*
* @var string
*/
- protected static $openAPIModelName = 'Trade';
+ protected static $openAPIModelName = 'UnderlyingSymbol_exchange';
/**
* Array of property to type mappings. Used for (de)serialization
@@ -52,13 +52,14 @@ class Trade implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPITypes = [
'id' => 'string',
- 'account' => '\SnapTrade\Model\Account',
- 'symbol' => '\SnapTrade\Model\BrokerageSymbol',
- 'universal_symbol' => '\SnapTrade\Model\UniversalSymbol',
- 'action' => 'string',
- 'units' => 'int',
- 'price' => 'float',
- 'sequence' => 'int'
+ 'code' => 'string',
+ 'mic_code' => 'string',
+ 'name' => 'string',
+ 'timezone' => 'string',
+ 'start_time' => 'string',
+ 'close_time' => 'string',
+ 'suffix' => 'string',
+ 'allows_cryptocurrency_symbols' => 'bool'
];
/**
@@ -70,13 +71,14 @@ class Trade implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'id' => 'uuid',
- 'account' => null,
- 'symbol' => null,
- 'universal_symbol' => null,
- 'action' => null,
- 'units' => null,
- 'price' => null,
- 'sequence' => null
+ 'code' => null,
+ 'mic_code' => null,
+ 'name' => null,
+ 'timezone' => null,
+ 'start_time' => null,
+ 'close_time' => null,
+ 'suffix' => null,
+ 'allows_cryptocurrency_symbols' => null
];
/**
@@ -86,13 +88,14 @@ class Trade implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPINullables = [
'id' => false,
- 'account' => false,
- 'symbol' => false,
- 'universal_symbol' => false,
- 'action' => false,
- 'units' => false,
- 'price' => false,
- 'sequence' => false
+ 'code' => false,
+ 'mic_code' => false,
+ 'name' => false,
+ 'timezone' => false,
+ 'start_time' => false,
+ 'close_time' => false,
+ 'suffix' => true,
+ 'allows_cryptocurrency_symbols' => false
];
/**
@@ -182,13 +185,14 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'id' => 'id',
- 'account' => 'account',
- 'symbol' => 'symbol',
- 'universal_symbol' => 'universal_symbol',
- 'action' => 'action',
- 'units' => 'units',
- 'price' => 'price',
- 'sequence' => 'sequence'
+ 'code' => 'code',
+ 'mic_code' => 'mic_code',
+ 'name' => 'name',
+ 'timezone' => 'timezone',
+ 'start_time' => 'start_time',
+ 'close_time' => 'close_time',
+ 'suffix' => 'suffix',
+ 'allows_cryptocurrency_symbols' => 'allows_cryptocurrency_symbols'
];
/**
@@ -198,13 +202,14 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'id' => 'setId',
- 'account' => 'setAccount',
- 'symbol' => 'setSymbol',
- 'universal_symbol' => 'setUniversalSymbol',
- 'action' => 'setAction',
- 'units' => 'setUnits',
- 'price' => 'setPrice',
- 'sequence' => 'setSequence'
+ 'code' => 'setCode',
+ 'mic_code' => 'setMicCode',
+ 'name' => 'setName',
+ 'timezone' => 'setTimezone',
+ 'start_time' => 'setStartTime',
+ 'close_time' => 'setCloseTime',
+ 'suffix' => 'setSuffix',
+ 'allows_cryptocurrency_symbols' => 'setAllowsCryptocurrencySymbols'
];
/**
@@ -214,13 +219,14 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'id' => 'getId',
- 'account' => 'getAccount',
- 'symbol' => 'getSymbol',
- 'universal_symbol' => 'getUniversalSymbol',
- 'action' => 'getAction',
- 'units' => 'getUnits',
- 'price' => 'getPrice',
- 'sequence' => 'getSequence'
+ 'code' => 'getCode',
+ 'mic_code' => 'getMicCode',
+ 'name' => 'getName',
+ 'timezone' => 'getTimezone',
+ 'start_time' => 'getStartTime',
+ 'close_time' => 'getCloseTime',
+ 'suffix' => 'getSuffix',
+ 'allows_cryptocurrency_symbols' => 'getAllowsCryptocurrencySymbols'
];
/**
@@ -264,21 +270,6 @@ public function getModelName()
return self::$openAPIModelName;
}
- public const ACTION_BUY = 'BUY';
- public const ACTION_SELL = 'SELL';
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getActionAllowableValues()
- {
- return [
- self::ACTION_BUY,
- self::ACTION_SELL,
- ];
- }
/**
* Associative array for storing property values
@@ -296,13 +287,14 @@ public function getActionAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
- $this->setIfExists('account', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('universal_symbol', $data ?? [], null);
- $this->setIfExists('action', $data ?? [], null);
- $this->setIfExists('units', $data ?? [], null);
- $this->setIfExists('price', $data ?? [], null);
- $this->setIfExists('sequence', $data ?? [], null);
+ $this->setIfExists('code', $data ?? [], null);
+ $this->setIfExists('mic_code', $data ?? [], null);
+ $this->setIfExists('name', $data ?? [], null);
+ $this->setIfExists('timezone', $data ?? [], null);
+ $this->setIfExists('start_time', $data ?? [], null);
+ $this->setIfExists('close_time', $data ?? [], null);
+ $this->setIfExists('suffix', $data ?? [], null);
+ $this->setIfExists('allows_cryptocurrency_symbols', $data ?? [], null);
}
/**
@@ -332,15 +324,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];
- $allowedValues = $this->getActionAllowableValues();
- if (!is_null($this->container['action']) && !in_array($this->container['action'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'action', must be one of '%s'",
- $this->container['action'],
- implode("', '", $allowedValues)
- );
- }
-
return $invalidProperties;
}
@@ -386,214 +369,240 @@ public function setId($id)
}
/**
- * Gets account
+ * Gets code
*
- * @return \SnapTrade\Model\Account|null
+ * @return string|null
*/
- public function getAccount()
+ public function getCode()
{
- return $this->container['account'];
+ return $this->container['code'];
}
/**
- * Sets account
+ * Sets code
*
- * @param \SnapTrade\Model\Account|null $account account
+ * @param string|null $code code
*
* @return self
*/
- public function setAccount($account)
+ public function setCode($code)
{
- if (is_null($account)) {
- throw new \InvalidArgumentException('non-nullable account cannot be null');
+ if (is_null($code)) {
+ throw new \InvalidArgumentException('non-nullable code cannot be null');
}
- $this->container['account'] = $account;
+ $this->container['code'] = $code;
return $this;
}
/**
- * Gets symbol
+ * Gets mic_code
*
- * @return \SnapTrade\Model\BrokerageSymbol|null
+ * @return string|null
*/
- public function getSymbol()
+ public function getMicCode()
{
- return $this->container['symbol'];
+ return $this->container['mic_code'];
}
/**
- * Sets symbol
+ * Sets mic_code
*
- * @param \SnapTrade\Model\BrokerageSymbol|null $symbol symbol
+ * @param string|null $mic_code mic_code
*
* @return self
*/
- public function setSymbol($symbol)
+ public function setMicCode($mic_code)
{
- if (is_null($symbol)) {
- throw new \InvalidArgumentException('non-nullable symbol cannot be null');
+ if (is_null($mic_code)) {
+ throw new \InvalidArgumentException('non-nullable mic_code cannot be null');
}
- $this->container['symbol'] = $symbol;
+ $this->container['mic_code'] = $mic_code;
return $this;
}
/**
- * Gets universal_symbol
+ * Gets name
*
- * @return \SnapTrade\Model\UniversalSymbol|null
+ * @return string|null
*/
- public function getUniversalSymbol()
+ public function getName()
{
- return $this->container['universal_symbol'];
+ return $this->container['name'];
}
/**
- * Sets universal_symbol
+ * Sets name
*
- * @param \SnapTrade\Model\UniversalSymbol|null $universal_symbol universal_symbol
+ * @param string|null $name name
*
* @return self
*/
- public function setUniversalSymbol($universal_symbol)
+ public function setName($name)
{
- if (is_null($universal_symbol)) {
- throw new \InvalidArgumentException('non-nullable universal_symbol cannot be null');
+ if (is_null($name)) {
+ throw new \InvalidArgumentException('non-nullable name cannot be null');
}
- $this->container['universal_symbol'] = $universal_symbol;
+ $this->container['name'] = $name;
return $this;
}
/**
- * Gets action
+ * Gets timezone
*
* @return string|null
*/
- public function getAction()
+ public function getTimezone()
{
- return $this->container['action'];
+ return $this->container['timezone'];
}
/**
- * Sets action
+ * Sets timezone
*
- * @param string|null $action action
+ * @param string|null $timezone timezone
*
* @return self
*/
- public function setAction($action)
- {
- $allowedValues = $this->getActionAllowableValues();
- if (!is_null($action) && !in_array($action, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'action', must be one of '%s'",
- $action,
- implode("', '", $allowedValues)
- )
- );
+ public function setTimezone($timezone)
+ {
+
+ if (is_null($timezone)) {
+ throw new \InvalidArgumentException('non-nullable timezone cannot be null');
}
- if (is_null($action)) {
- throw new \InvalidArgumentException('non-nullable action cannot be null');
+ $this->container['timezone'] = $timezone;
+
+ return $this;
+ }
+
+ /**
+ * Gets start_time
+ *
+ * @return string|null
+ */
+ public function getStartTime()
+ {
+ return $this->container['start_time'];
+ }
+
+ /**
+ * Sets start_time
+ *
+ * @param string|null $start_time start_time
+ *
+ * @return self
+ */
+ public function setStartTime($start_time)
+ {
+
+ if (is_null($start_time)) {
+ throw new \InvalidArgumentException('non-nullable start_time cannot be null');
}
- $this->container['action'] = $action;
+ $this->container['start_time'] = $start_time;
return $this;
}
/**
- * Gets units
+ * Gets close_time
*
- * @return int|null
+ * @return string|null
*/
- public function getUnits()
+ public function getCloseTime()
{
- return $this->container['units'];
+ return $this->container['close_time'];
}
/**
- * Sets units
+ * Sets close_time
*
- * @param int|null $units units
+ * @param string|null $close_time close_time
*
* @return self
*/
- public function setUnits($units)
+ public function setCloseTime($close_time)
{
- if (is_null($units)) {
- throw new \InvalidArgumentException('non-nullable units cannot be null');
+ if (is_null($close_time)) {
+ throw new \InvalidArgumentException('non-nullable close_time cannot be null');
}
- $this->container['units'] = $units;
+ $this->container['close_time'] = $close_time;
return $this;
}
/**
- * Gets price
+ * Gets suffix
*
- * @return float|null
+ * @return string|null
*/
- public function getPrice()
+ public function getSuffix()
{
- return $this->container['price'];
+ return $this->container['suffix'];
}
/**
- * Sets price
+ * Sets suffix
*
- * @param float|null $price price
+ * @param string|null $suffix suffix
*
* @return self
*/
- public function setPrice($price)
+ public function setSuffix($suffix)
{
- if (is_null($price)) {
- throw new \InvalidArgumentException('non-nullable price cannot be null');
+ if (is_null($suffix)) {
+ array_push($this->openAPINullablesSetToNull, 'suffix');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('suffix', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
- $this->container['price'] = $price;
+ $this->container['suffix'] = $suffix;
return $this;
}
/**
- * Gets sequence
+ * Gets allows_cryptocurrency_symbols
*
- * @return int|null
+ * @return bool|null
*/
- public function getSequence()
+ public function getAllowsCryptocurrencySymbols()
{
- return $this->container['sequence'];
+ return $this->container['allows_cryptocurrency_symbols'];
}
/**
- * Sets sequence
+ * Sets allows_cryptocurrency_symbols
*
- * @param int|null $sequence sequence
+ * @param bool|null $allows_cryptocurrency_symbols allows_cryptocurrency_symbols
*
* @return self
*/
- public function setSequence($sequence)
+ public function setAllowsCryptocurrencySymbols($allows_cryptocurrency_symbols)
{
- if (is_null($sequence)) {
- throw new \InvalidArgumentException('non-nullable sequence cannot be null');
+ if (is_null($allows_cryptocurrency_symbols)) {
+ throw new \InvalidArgumentException('non-nullable allows_cryptocurrency_symbols cannot be null');
}
- $this->container['sequence'] = $sequence;
+ $this->container['allows_cryptocurrency_symbols'] = $allows_cryptocurrency_symbols;
return $this;
}
diff --git a/lib/Model/ModelPortfolio.php b/lib/Model/UnderlyingSymbolType.php
similarity index 74%
rename from lib/Model/ModelPortfolio.php
rename to lib/Model/UnderlyingSymbolType.php
index 069198c..0d7d087 100644
--- a/lib/Model/ModelPortfolio.php
+++ b/lib/Model/UnderlyingSymbolType.php
@@ -1,6 +1,6 @@
*/
-class ModelPortfolio implements ModelInterface, ArrayAccess, \JsonSerializable
+class UnderlyingSymbolType implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -42,7 +43,7 @@ class ModelPortfolio implements ModelInterface, ArrayAccess, \JsonSerializable
*
* @var string
*/
- protected static $openAPIModelName = 'ModelPortfolio';
+ protected static $openAPIModelName = 'UnderlyingSymbol_type';
/**
* Array of property to type mappings. Used for (de)serialization
@@ -51,8 +52,9 @@ class ModelPortfolio implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPITypes = [
'id' => 'string',
- 'name' => 'string',
- 'model_type' => 'int'
+ 'code' => 'string',
+ 'description' => 'string',
+ 'is_supported' => 'bool'
];
/**
@@ -64,8 +66,9 @@ class ModelPortfolio implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'id' => 'uuid',
- 'name' => null,
- 'model_type' => null
+ 'code' => null,
+ 'description' => null,
+ 'is_supported' => null
];
/**
@@ -75,8 +78,9 @@ class ModelPortfolio implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPINullables = [
'id' => false,
- 'name' => false,
- 'model_type' => false
+ 'code' => false,
+ 'description' => false,
+ 'is_supported' => false
];
/**
@@ -166,8 +170,9 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'id' => 'id',
- 'name' => 'name',
- 'model_type' => 'model_type'
+ 'code' => 'code',
+ 'description' => 'description',
+ 'is_supported' => 'is_supported'
];
/**
@@ -177,8 +182,9 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'id' => 'setId',
- 'name' => 'setName',
- 'model_type' => 'setModelType'
+ 'code' => 'setCode',
+ 'description' => 'setDescription',
+ 'is_supported' => 'setIsSupported'
];
/**
@@ -188,8 +194,9 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'id' => 'getId',
- 'name' => 'getName',
- 'model_type' => 'getModelType'
+ 'code' => 'getCode',
+ 'description' => 'getDescription',
+ 'is_supported' => 'getIsSupported'
];
/**
@@ -233,23 +240,6 @@ public function getModelName()
return self::$openAPIModelName;
}
- public const MODEL_TYPE_MINUS_1 = -1;
- public const MODEL_TYPE_0 = 0;
- public const MODEL_TYPE_1 = 1;
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getModelTypeAllowableValues()
- {
- return [
- self::MODEL_TYPE_MINUS_1,
- self::MODEL_TYPE_0,
- self::MODEL_TYPE_1,
- ];
- }
/**
* Associative array for storing property values
@@ -267,8 +257,9 @@ public function getModelTypeAllowableValues()
public function __construct(array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
- $this->setIfExists('name', $data ?? [], null);
- $this->setIfExists('model_type', $data ?? [], self::MODEL_TYPE_MINUS_1);
+ $this->setIfExists('code', $data ?? [], null);
+ $this->setIfExists('description', $data ?? [], null);
+ $this->setIfExists('is_supported', $data ?? [], null);
}
/**
@@ -298,15 +289,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];
- $allowedValues = $this->getModelTypeAllowableValues();
- if (!is_null($this->container['model_type']) && !in_array($this->container['model_type'], $allowedValues, true)) {
- $invalidProperties[] = sprintf(
- "invalid value '%s' for 'model_type', must be one of '%s'",
- $this->container['model_type'],
- implode("', '", $allowedValues)
- );
- }
-
return $invalidProperties;
}
@@ -335,7 +317,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id Unique identifier for the security type within SnapTrade. This is the ID used to reference the security type in SnapTrade API calls.
*
* @return self
*/
@@ -352,69 +334,90 @@ public function setId($id)
}
/**
- * Gets name
+ * Gets code
*
* @return string|null
*/
- public function getName()
+ public function getCode()
{
- return $this->container['name'];
+ return $this->container['code'];
}
/**
- * Sets name
+ * Sets code
*
- * @param string|null $name name
+ * @param string|null $code A short code representing the security type. For example, \"cs\" for Common Stock. Here are some common values: ad - ADR bnd - Bond cs - Common Stock cef - Closed End Fund et - ETF oef - Open Ended Fund ps - Preferred Stock rt - Right struct - Structured Product ut - Unit wi - When Issued wt - Warrant
*
* @return self
*/
- public function setName($name)
+ public function setCode($code)
{
- if (is_null($name)) {
- throw new \InvalidArgumentException('non-nullable name cannot be null');
+ if (is_null($code)) {
+ throw new \InvalidArgumentException('non-nullable code cannot be null');
}
- $this->container['name'] = $name;
+ $this->container['code'] = $code;
return $this;
}
/**
- * Gets model_type
+ * Gets description
*
- * @return int|null
+ * @return string|null
*/
- public function getModelType()
+ public function getDescription()
{
- return $this->container['model_type'];
+ return $this->container['description'];
}
/**
- * Sets model_type
+ * Sets description
*
- * @param int|null $model_type Enum definitions -> [-1: Unassigned, 0: Security Model Portfolio, 1: Asset Class Portfolio]
+ * @param string|null $description A human-readable description of the security type. For example, \"Common Stock\" or \"ETF\".
*
* @return self
*/
- public function setModelType($model_type)
+ public function setDescription($description)
{
- $allowedValues = $this->getModelTypeAllowableValues();
- if (!is_null($model_type) && !in_array($model_type, $allowedValues, true)) {
- throw new \InvalidArgumentException(
- sprintf(
- "Invalid value '%s' for 'model_type', must be one of '%s'",
- $model_type,
- implode("', '", $allowedValues)
- )
- );
+
+ if (is_null($description)) {
+ throw new \InvalidArgumentException('non-nullable description cannot be null');
}
- if (is_null($model_type)) {
- throw new \InvalidArgumentException('non-nullable model_type cannot be null');
+ $this->container['description'] = $description;
+
+ return $this;
+ }
+
+ /**
+ * Gets is_supported
+ *
+ * @return bool|null
+ * @deprecated
+ */
+ public function getIsSupported()
+ {
+ return $this->container['is_supported'];
+ }
+
+ /**
+ * Sets is_supported
+ *
+ * @param bool|null $is_supported This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
+ *
+ * @return self
+ * @deprecated
+ */
+ public function setIsSupported($is_supported)
+ {
+
+ if (is_null($is_supported)) {
+ throw new \InvalidArgumentException('non-nullable is_supported cannot be null');
}
- $this->container['model_type'] = $model_type;
+ $this->container['is_supported'] = $is_supported;
return $this;
}
diff --git a/lib/Model/UniversalSymbol.php b/lib/Model/UniversalSymbol.php
index e085aa4..df487b8 100644
--- a/lib/Model/UniversalSymbol.php
+++ b/lib/Model/UniversalSymbol.php
@@ -30,7 +30,7 @@
* UniversalSymbol Class Doc Comment
*
* @category Class
- * @description Universal symbol
+ * @description Uniquely describes a single security + exchange combination across all brokerages.
* @package SnapTrade
* @implements \ArrayAccess
*/
@@ -55,8 +55,8 @@ class UniversalSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
'symbol' => 'string',
'raw_symbol' => 'string',
'description' => 'string',
- 'currency' => '\SnapTrade\Model\Currency',
- 'exchange' => '\SnapTrade\Model\Exchange',
+ 'currency' => '\SnapTrade\Model\UniversalSymbolCurrency',
+ 'exchange' => '\SnapTrade\Model\UniversalSymbolExchange',
'type' => '\SnapTrade\Model\SecurityType',
'currencies' => '\SnapTrade\Model\Currency[]',
'figi_code' => 'string',
@@ -377,7 +377,7 @@ public function getId()
/**
* Sets id
*
- * @param string $id id
+ * @param string $id Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
*
* @return self
*/
@@ -406,7 +406,7 @@ public function getSymbol()
/**
* Sets symbol
*
- * @param string $symbol symbol
+ * @param string $symbol The security's trading ticker symbol. For example \"AAPL\" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix.
*
* @return self
*/
@@ -435,7 +435,7 @@ public function getRawSymbol()
/**
* Sets raw_symbol
*
- * @param string $raw_symbol raw_symbol
+ * @param string $raw_symbol The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
*
* @return self
*/
@@ -464,7 +464,7 @@ public function getDescription()
/**
* Sets description
*
- * @param string|null $description description
+ * @param string|null $description A human-readable description of the security. This is usually the company name or ETF name.
*
* @return self
*/
@@ -490,7 +490,7 @@ public function setDescription($description)
/**
* Gets currency
*
- * @return \SnapTrade\Model\Currency
+ * @return \SnapTrade\Model\UniversalSymbolCurrency
*/
public function getCurrency()
{
@@ -500,7 +500,7 @@ public function getCurrency()
/**
* Sets currency
*
- * @param \SnapTrade\Model\Currency $currency currency
+ * @param \SnapTrade\Model\UniversalSymbolCurrency $currency currency
*
* @return self
*/
@@ -519,7 +519,7 @@ public function setCurrency($currency)
/**
* Gets exchange
*
- * @return \SnapTrade\Model\Exchange|null
+ * @return \SnapTrade\Model\UniversalSymbolExchange|null
*/
public function getExchange()
{
@@ -529,7 +529,7 @@ public function getExchange()
/**
* Sets exchange
*
- * @param \SnapTrade\Model\Exchange|null $exchange exchange
+ * @param \SnapTrade\Model\UniversalSymbolExchange|null $exchange exchange
*
* @return self
*/
@@ -578,6 +578,7 @@ public function setType($type)
* Gets currencies
*
* @return \SnapTrade\Model\Currency[]
+ * @deprecated
*/
public function getCurrencies()
{
@@ -587,9 +588,10 @@ public function getCurrencies()
/**
* Sets currencies
*
- * @param \SnapTrade\Model\Currency[] $currencies currencies
+ * @param \SnapTrade\Model\Currency[] $currencies This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
*
* @return self
+ * @deprecated
*/
public function setCurrencies($currencies)
{
@@ -616,7 +618,7 @@ public function getFigiCode()
/**
* Sets figi_code
*
- * @param string|null $figi_code figi_code
+ * @param string|null $figi_code This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property.
*
* @return self
*/
diff --git a/lib/Model/PortfolioGroup.php b/lib/Model/UniversalSymbolCurrency.php
similarity index 88%
rename from lib/Model/PortfolioGroup.php
rename to lib/Model/UniversalSymbolCurrency.php
index 7e4a02f..f695546 100644
--- a/lib/Model/PortfolioGroup.php
+++ b/lib/Model/UniversalSymbolCurrency.php
@@ -1,6 +1,6 @@
*/
-class PortfolioGroup implements ModelInterface, ArrayAccess, \JsonSerializable
+class UniversalSymbolCurrency implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -42,7 +43,7 @@ class PortfolioGroup implements ModelInterface, ArrayAccess, \JsonSerializable
*
* @var string
*/
- protected static $openAPIModelName = 'PortfolioGroup';
+ protected static $openAPIModelName = 'UniversalSymbol_currency';
/**
* Array of property to type mappings. Used for (de)serialization
@@ -51,6 +52,7 @@ class PortfolioGroup implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPITypes = [
'id' => 'string',
+ 'code' => 'string',
'name' => 'string'
];
@@ -63,6 +65,7 @@ class PortfolioGroup implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'id' => 'uuid',
+ 'code' => null,
'name' => null
];
@@ -73,6 +76,7 @@ class PortfolioGroup implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPINullables = [
'id' => false,
+ 'code' => false,
'name' => false
];
@@ -163,6 +167,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'id' => 'id',
+ 'code' => 'code',
'name' => 'name'
];
@@ -173,6 +178,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'id' => 'setId',
+ 'code' => 'setCode',
'name' => 'setName'
];
@@ -183,6 +189,7 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'id' => 'getId',
+ 'code' => 'getCode',
'name' => 'getName'
];
@@ -244,6 +251,7 @@ public function getModelName()
public function __construct(array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
+ $this->setIfExists('code', $data ?? [], null);
$this->setIfExists('name', $data ?? [], null);
}
@@ -302,7 +310,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
*
* @return self
*/
@@ -318,6 +326,35 @@ public function setId($id)
return $this;
}
+ /**
+ * Gets code
+ *
+ * @return string|null
+ */
+ public function getCode()
+ {
+ return $this->container['code'];
+ }
+
+ /**
+ * Sets code
+ *
+ * @param string|null $code The ISO-4217 currency code for the currency.
+ *
+ * @return self
+ */
+ public function setCode($code)
+ {
+
+ if (is_null($code)) {
+ throw new \InvalidArgumentException('non-nullable code cannot be null');
+ }
+
+ $this->container['code'] = $code;
+
+ return $this;
+ }
+
/**
* Gets name
*
@@ -331,7 +368,7 @@ public function getName()
/**
* Sets name
*
- * @param string|null $name name
+ * @param string|null $name A human-friendly name of the currency.
*
* @return self
*/
diff --git a/lib/Model/BrokerageSymbol.php b/lib/Model/UniversalSymbolExchange.php
similarity index 63%
rename from lib/Model/BrokerageSymbol.php
rename to lib/Model/UniversalSymbolExchange.php
index 163c450..70c7beb 100644
--- a/lib/Model/BrokerageSymbol.php
+++ b/lib/Model/UniversalSymbolExchange.php
@@ -1,6 +1,6 @@
*/
-class BrokerageSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
+class UniversalSymbolExchange implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
@@ -43,7 +43,7 @@ class BrokerageSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
*
* @var string
*/
- protected static $openAPIModelName = 'BrokerageSymbol';
+ protected static $openAPIModelName = 'UniversalSymbol_exchange';
/**
* Array of property to type mappings. Used for (de)serialization
@@ -52,11 +52,13 @@ class BrokerageSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPITypes = [
'id' => 'string',
- 'symbol' => '\SnapTrade\Model\BrokerageSymbolSymbol',
- 'brokerage_authorization' => '\SnapTrade\Model\BrokerageAuthorization',
- 'description' => 'string',
- 'allows_fractional_units' => 'bool',
- 'option_symbol' => '\SnapTrade\Model\BrokerageSymbolOptionSymbol'
+ 'code' => 'string',
+ 'mic_code' => 'string',
+ 'name' => 'string',
+ 'timezone' => 'string',
+ 'start_time' => 'string',
+ 'close_time' => 'string',
+ 'suffix' => 'string'
];
/**
@@ -68,11 +70,13 @@ class BrokerageSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'id' => 'uuid',
- 'symbol' => null,
- 'brokerage_authorization' => null,
- 'description' => null,
- 'allows_fractional_units' => null,
- 'option_symbol' => null
+ 'code' => null,
+ 'mic_code' => null,
+ 'name' => null,
+ 'timezone' => null,
+ 'start_time' => null,
+ 'close_time' => null,
+ 'suffix' => null
];
/**
@@ -82,11 +86,13 @@ class BrokerageSymbol implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPINullables = [
'id' => false,
- 'symbol' => true,
- 'brokerage_authorization' => false,
- 'description' => false,
- 'allows_fractional_units' => true,
- 'option_symbol' => true
+ 'code' => false,
+ 'mic_code' => false,
+ 'name' => false,
+ 'timezone' => false,
+ 'start_time' => false,
+ 'close_time' => false,
+ 'suffix' => true
];
/**
@@ -176,11 +182,13 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'id' => 'id',
- 'symbol' => 'symbol',
- 'brokerage_authorization' => 'brokerage_authorization',
- 'description' => 'description',
- 'allows_fractional_units' => 'allows_fractional_units',
- 'option_symbol' => 'option_symbol'
+ 'code' => 'code',
+ 'mic_code' => 'mic_code',
+ 'name' => 'name',
+ 'timezone' => 'timezone',
+ 'start_time' => 'start_time',
+ 'close_time' => 'close_time',
+ 'suffix' => 'suffix'
];
/**
@@ -190,11 +198,13 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'id' => 'setId',
- 'symbol' => 'setSymbol',
- 'brokerage_authorization' => 'setBrokerageAuthorization',
- 'description' => 'setDescription',
- 'allows_fractional_units' => 'setAllowsFractionalUnits',
- 'option_symbol' => 'setOptionSymbol'
+ 'code' => 'setCode',
+ 'mic_code' => 'setMicCode',
+ 'name' => 'setName',
+ 'timezone' => 'setTimezone',
+ 'start_time' => 'setStartTime',
+ 'close_time' => 'setCloseTime',
+ 'suffix' => 'setSuffix'
];
/**
@@ -204,11 +214,13 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'id' => 'getId',
- 'symbol' => 'getSymbol',
- 'brokerage_authorization' => 'getBrokerageAuthorization',
- 'description' => 'getDescription',
- 'allows_fractional_units' => 'getAllowsFractionalUnits',
- 'option_symbol' => 'getOptionSymbol'
+ 'code' => 'getCode',
+ 'mic_code' => 'getMicCode',
+ 'name' => 'getName',
+ 'timezone' => 'getTimezone',
+ 'start_time' => 'getStartTime',
+ 'close_time' => 'getCloseTime',
+ 'suffix' => 'getSuffix'
];
/**
@@ -269,11 +281,13 @@ public function getModelName()
public function __construct(array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
- $this->setIfExists('symbol', $data ?? [], null);
- $this->setIfExists('brokerage_authorization', $data ?? [], null);
- $this->setIfExists('description', $data ?? [], null);
- $this->setIfExists('allows_fractional_units', $data ?? [], null);
- $this->setIfExists('option_symbol', $data ?? [], null);
+ $this->setIfExists('code', $data ?? [], null);
+ $this->setIfExists('mic_code', $data ?? [], null);
+ $this->setIfExists('name', $data ?? [], null);
+ $this->setIfExists('timezone', $data ?? [], null);
+ $this->setIfExists('start_time', $data ?? [], null);
+ $this->setIfExists('close_time', $data ?? [], null);
+ $this->setIfExists('suffix', $data ?? [], null);
}
/**
@@ -331,7 +345,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id id
+ * @param string|null $id Unique ID for the exchange in SnapTrade.
*
* @return self
*/
@@ -348,167 +362,211 @@ public function setId($id)
}
/**
- * Gets symbol
+ * Gets code
*
- * @return \SnapTrade\Model\BrokerageSymbolSymbol|null
+ * @return string|null
*/
- public function getSymbol()
+ public function getCode()
{
- return $this->container['symbol'];
+ return $this->container['code'];
}
/**
- * Sets symbol
+ * Sets code
*
- * @param \SnapTrade\Model\BrokerageSymbolSymbol|null $symbol symbol
+ * @param string|null $code A short name for the exchange. For standardized exchange code, please us the `mic_code` field.
*
* @return self
*/
- public function setSymbol($symbol)
+ public function setCode($code)
{
- if (is_null($symbol)) {
- array_push($this->openAPINullablesSetToNull, 'symbol');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('symbol', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
+ if (is_null($code)) {
+ throw new \InvalidArgumentException('non-nullable code cannot be null');
}
- $this->container['symbol'] = $symbol;
+ $this->container['code'] = $code;
return $this;
}
/**
- * Gets brokerage_authorization
+ * Gets mic_code
*
- * @return \SnapTrade\Model\BrokerageAuthorization|null
+ * @return string|null
*/
- public function getBrokerageAuthorization()
+ public function getMicCode()
{
- return $this->container['brokerage_authorization'];
+ return $this->container['mic_code'];
}
/**
- * Sets brokerage_authorization
+ * Sets mic_code
*
- * @param \SnapTrade\Model\BrokerageAuthorization|null $brokerage_authorization brokerage_authorization
+ * @param string|null $mic_code The [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) (MIC) for the exchange.
*
* @return self
*/
- public function setBrokerageAuthorization($brokerage_authorization)
+ public function setMicCode($mic_code)
{
- if (is_null($brokerage_authorization)) {
- throw new \InvalidArgumentException('non-nullable brokerage_authorization cannot be null');
+ if (is_null($mic_code)) {
+ throw new \InvalidArgumentException('non-nullable mic_code cannot be null');
}
- $this->container['brokerage_authorization'] = $brokerage_authorization;
+ $this->container['mic_code'] = $mic_code;
return $this;
}
/**
- * Gets description
+ * Gets name
*
* @return string|null
*/
- public function getDescription()
+ public function getName()
{
- return $this->container['description'];
+ return $this->container['name'];
}
/**
- * Sets description
+ * Sets name
*
- * @param string|null $description description
+ * @param string|null $name The full name of the exchange.
*
* @return self
*/
- public function setDescription($description)
+ public function setName($name)
{
- if (is_null($description)) {
- throw new \InvalidArgumentException('non-nullable description cannot be null');
+ if (is_null($name)) {
+ throw new \InvalidArgumentException('non-nullable name cannot be null');
}
- $this->container['description'] = $description;
+ $this->container['name'] = $name;
return $this;
}
/**
- * Gets allows_fractional_units
+ * Gets timezone
*
- * @return bool|null
+ * @return string|null
*/
- public function getAllowsFractionalUnits()
+ public function getTimezone()
{
- return $this->container['allows_fractional_units'];
+ return $this->container['timezone'];
}
/**
- * Sets allows_fractional_units
+ * Sets timezone
*
- * @param bool|null $allows_fractional_units allows_fractional_units
+ * @param string|null $timezone The timezone for the trading hours (`start_time` and `close_time`) of the exchange.
*
* @return self
*/
- public function setAllowsFractionalUnits($allows_fractional_units)
+ public function setTimezone($timezone)
{
- if (is_null($allows_fractional_units)) {
- array_push($this->openAPINullablesSetToNull, 'allows_fractional_units');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('allows_fractional_units', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
+ if (is_null($timezone)) {
+ throw new \InvalidArgumentException('non-nullable timezone cannot be null');
+ }
+
+ $this->container['timezone'] = $timezone;
+
+ return $this;
+ }
+
+ /**
+ * Gets start_time
+ *
+ * @return string|null
+ */
+ public function getStartTime()
+ {
+ return $this->container['start_time'];
+ }
+
+ /**
+ * Sets start_time
+ *
+ * @param string|null $start_time The time when the exchange opens for trading.
+ *
+ * @return self
+ */
+ public function setStartTime($start_time)
+ {
+
+ if (is_null($start_time)) {
+ throw new \InvalidArgumentException('non-nullable start_time cannot be null');
+ }
+
+ $this->container['start_time'] = $start_time;
+
+ return $this;
+ }
+
+ /**
+ * Gets close_time
+ *
+ * @return string|null
+ */
+ public function getCloseTime()
+ {
+ return $this->container['close_time'];
+ }
+
+ /**
+ * Sets close_time
+ *
+ * @param string|null $close_time The time when the exchange closes for trading.
+ *
+ * @return self
+ */
+ public function setCloseTime($close_time)
+ {
+
+ if (is_null($close_time)) {
+ throw new \InvalidArgumentException('non-nullable close_time cannot be null');
}
- $this->container['allows_fractional_units'] = $allows_fractional_units;
+ $this->container['close_time'] = $close_time;
return $this;
}
/**
- * Gets option_symbol
+ * Gets suffix
*
- * @return \SnapTrade\Model\BrokerageSymbolOptionSymbol|null
+ * @return string|null
*/
- public function getOptionSymbol()
+ public function getSuffix()
{
- return $this->container['option_symbol'];
+ return $this->container['suffix'];
}
/**
- * Sets option_symbol
+ * Sets suffix
*
- * @param \SnapTrade\Model\BrokerageSymbolOptionSymbol|null $option_symbol option_symbol
+ * @param string|null $suffix The suffix to be appended to the symbol when trading on this exchange. For example, the suffix for the Toronto Stock Exchange is `.TO`. See `UniversalSymbol->symbol` and `UniversalSymbol->raw_symbol` for more detail.
*
* @return self
*/
- public function setOptionSymbol($option_symbol)
+ public function setSuffix($suffix)
{
- if (is_null($option_symbol)) {
- array_push($this->openAPINullablesSetToNull, 'option_symbol');
+ if (is_null($suffix)) {
+ array_push($this->openAPINullablesSetToNull, 'suffix');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('option_symbol', $nullablesSetToNull);
+ $index = array_search('suffix', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['option_symbol'] = $option_symbol;
+ $this->container['suffix'] = $suffix;
return $this;
}
diff --git a/lib/Model/UserErrorLog.php b/lib/Model/UserErrorLog.php
deleted file mode 100644
index 1e22c71..0000000
--- a/lib/Model/UserErrorLog.php
+++ /dev/null
@@ -1,585 +0,0 @@
-
- */
-class UserErrorLog implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'UserErrorLog';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'requested_at' => 'string',
- 'response' => 'string',
- 'status_code' => 'float',
- 'query_params' => 'string',
- 'http_method' => 'string',
- 'endpoint' => 'string'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'requested_at' => null,
- 'response' => null,
- 'status_code' => null,
- 'query_params' => null,
- 'http_method' => null,
- 'endpoint' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'requested_at' => false,
- 'response' => false,
- 'status_code' => false,
- 'query_params' => false,
- 'http_method' => false,
- 'endpoint' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'requested_at' => 'requestedAt',
- 'response' => 'response',
- 'status_code' => 'statusCode',
- 'query_params' => 'queryParams',
- 'http_method' => 'httpMethod',
- 'endpoint' => 'endpoint'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'requested_at' => 'setRequestedAt',
- 'response' => 'setResponse',
- 'status_code' => 'setStatusCode',
- 'query_params' => 'setQueryParams',
- 'http_method' => 'setHttpMethod',
- 'endpoint' => 'setEndpoint'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'requested_at' => 'getRequestedAt',
- 'response' => 'getResponse',
- 'status_code' => 'getStatusCode',
- 'query_params' => 'getQueryParams',
- 'http_method' => 'getHttpMethod',
- 'endpoint' => 'getEndpoint'
- ];
-
- /**
- * 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('requested_at', $data ?? [], null);
- $this->setIfExists('response', $data ?? [], null);
- $this->setIfExists('status_code', $data ?? [], null);
- $this->setIfExists('query_params', $data ?? [], null);
- $this->setIfExists('http_method', $data ?? [], null);
- $this->setIfExists('endpoint', $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 requested_at
- *
- * @return string|null
- */
- public function getRequestedAt()
- {
- return $this->container['requested_at'];
- }
-
- /**
- * Sets requested_at
- *
- * @param string|null $requested_at requested_at
- *
- * @return self
- */
- public function setRequestedAt($requested_at)
- {
-
- if (is_null($requested_at)) {
- throw new \InvalidArgumentException('non-nullable requested_at cannot be null');
- }
-
- $this->container['requested_at'] = $requested_at;
-
- return $this;
- }
-
- /**
- * Gets response
- *
- * @return string|null
- */
- public function getResponse()
- {
- return $this->container['response'];
- }
-
- /**
- * Sets response
- *
- * @param string|null $response response
- *
- * @return self
- */
- public function setResponse($response)
- {
-
- if (is_null($response)) {
- throw new \InvalidArgumentException('non-nullable response cannot be null');
- }
-
- $this->container['response'] = $response;
-
- return $this;
- }
-
- /**
- * Gets status_code
- *
- * @return float|null
- */
- public function getStatusCode()
- {
- return $this->container['status_code'];
- }
-
- /**
- * Sets status_code
- *
- * @param float|null $status_code status_code
- *
- * @return self
- */
- public function setStatusCode($status_code)
- {
-
- if (is_null($status_code)) {
- throw new \InvalidArgumentException('non-nullable status_code cannot be null');
- }
-
- $this->container['status_code'] = $status_code;
-
- return $this;
- }
-
- /**
- * Gets query_params
- *
- * @return string|null
- */
- public function getQueryParams()
- {
- return $this->container['query_params'];
- }
-
- /**
- * Sets query_params
- *
- * @param string|null $query_params query_params
- *
- * @return self
- */
- public function setQueryParams($query_params)
- {
-
- if (is_null($query_params)) {
- throw new \InvalidArgumentException('non-nullable query_params cannot be null');
- }
-
- $this->container['query_params'] = $query_params;
-
- return $this;
- }
-
- /**
- * Gets http_method
- *
- * @return string|null
- */
- public function getHttpMethod()
- {
- return $this->container['http_method'];
- }
-
- /**
- * Sets http_method
- *
- * @param string|null $http_method http_method
- *
- * @return self
- */
- public function setHttpMethod($http_method)
- {
-
- if (is_null($http_method)) {
- throw new \InvalidArgumentException('non-nullable http_method cannot be null');
- }
-
- $this->container['http_method'] = $http_method;
-
- return $this;
- }
-
- /**
- * Gets endpoint
- *
- * @return string|null
- */
- public function getEndpoint()
- {
- return $this->container['endpoint'];
- }
-
- /**
- * Sets endpoint
- *
- * @param string|null $endpoint endpoint
- *
- * @return self
- */
- public function setEndpoint($endpoint)
- {
-
- if (is_null($endpoint)) {
- throw new \InvalidArgumentException('non-nullable endpoint cannot be null');
- }
-
- $this->container['endpoint'] = $endpoint;
-
- 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/UserSettings.php b/lib/Model/UserSettings.php
deleted file mode 100644
index 0a23671..0000000
--- a/lib/Model/UserSettings.php
+++ /dev/null
@@ -1,729 +0,0 @@
-
- */
-class UserSettings implements ModelInterface, ArrayAccess, \JsonSerializable
-{
- public const DISCRIMINATOR = null;
-
- /**
- * The original name of the model.
- *
- * @var string
- */
- protected static $openAPIModelName = 'UserSettings';
-
- /**
- * Array of property to type mappings. Used for (de)serialization
- *
- * @var string[]
- */
- protected static $openAPITypes = [
- 'email' => 'string',
- 'name' => 'string',
- 'receive_cash_notification' => 'bool',
- 'receive_drift_notification' => 'bool',
- 'user_trial_activated' => 'bool',
- 'activated_trial_date' => 'string',
- 'demo' => 'bool',
- 'api_enabled' => 'bool',
- 'drift_threshold' => 'float',
- 'preferred_currency' => '\SnapTrade\Model\Currency'
- ];
-
- /**
- * Array of property to format mappings. Used for (de)serialization
- *
- * @var string[]
- * @phpstan-var array
- * @psalm-var array
- */
- protected static $openAPIFormats = [
- 'email' => 'email',
- 'name' => null,
- 'receive_cash_notification' => null,
- 'receive_drift_notification' => null,
- 'user_trial_activated' => null,
- 'activated_trial_date' => 'dateTime',
- 'demo' => null,
- 'api_enabled' => null,
- 'drift_threshold' => null,
- 'preferred_currency' => null
- ];
-
- /**
- * Array of nullable properties. Used for (de)serialization
- *
- * @var boolean[]
- */
- protected static $openAPINullables = [
- 'email' => false,
- 'name' => false,
- 'receive_cash_notification' => false,
- 'receive_drift_notification' => false,
- 'user_trial_activated' => false,
- 'activated_trial_date' => false,
- 'demo' => false,
- 'api_enabled' => false,
- 'drift_threshold' => false,
- 'preferred_currency' => false
- ];
-
- /**
- * If a nullable field gets set to null, insert it here
- *
- * @var boolean[]
- */
- protected $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 = [
- 'email' => 'email',
- 'name' => 'name',
- 'receive_cash_notification' => 'receive_cash_notification',
- 'receive_drift_notification' => 'receive_drift_notification',
- 'user_trial_activated' => 'user_trial_activated',
- 'activated_trial_date' => 'activated_trial_date',
- 'demo' => 'demo',
- 'api_enabled' => 'api_enabled',
- 'drift_threshold' => 'drift_threshold',
- 'preferred_currency' => 'preferred_currency'
- ];
-
- /**
- * Array of attributes to setter functions (for deserialization of responses)
- *
- * @var string[]
- */
- protected static $setters = [
- 'email' => 'setEmail',
- 'name' => 'setName',
- 'receive_cash_notification' => 'setReceiveCashNotification',
- 'receive_drift_notification' => 'setReceiveDriftNotification',
- 'user_trial_activated' => 'setUserTrialActivated',
- 'activated_trial_date' => 'setActivatedTrialDate',
- 'demo' => 'setDemo',
- 'api_enabled' => 'setApiEnabled',
- 'drift_threshold' => 'setDriftThreshold',
- 'preferred_currency' => 'setPreferredCurrency'
- ];
-
- /**
- * Array of attributes to getter functions (for serialization of requests)
- *
- * @var string[]
- */
- protected static $getters = [
- 'email' => 'getEmail',
- 'name' => 'getName',
- 'receive_cash_notification' => 'getReceiveCashNotification',
- 'receive_drift_notification' => 'getReceiveDriftNotification',
- 'user_trial_activated' => 'getUserTrialActivated',
- 'activated_trial_date' => 'getActivatedTrialDate',
- 'demo' => 'getDemo',
- 'api_enabled' => 'getApiEnabled',
- 'drift_threshold' => 'getDriftThreshold',
- 'preferred_currency' => 'getPreferredCurrency'
- ];
-
- /**
- * 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('email', $data ?? [], null);
- $this->setIfExists('name', $data ?? [], null);
- $this->setIfExists('receive_cash_notification', $data ?? [], null);
- $this->setIfExists('receive_drift_notification', $data ?? [], null);
- $this->setIfExists('user_trial_activated', $data ?? [], null);
- $this->setIfExists('activated_trial_date', $data ?? [], null);
- $this->setIfExists('demo', $data ?? [], null);
- $this->setIfExists('api_enabled', $data ?? [], null);
- $this->setIfExists('drift_threshold', $data ?? [], null);
- $this->setIfExists('preferred_currency', $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 email
- *
- * @return string|null
- */
- public function getEmail()
- {
- return $this->container['email'];
- }
-
- /**
- * Sets email
- *
- * @param string|null $email email
- *
- * @return self
- */
- public function setEmail($email)
- {
-
- if (is_null($email)) {
- throw new \InvalidArgumentException('non-nullable email cannot be null');
- }
-
- $this->container['email'] = $email;
-
- return $this;
- }
-
- /**
- * Gets name
- *
- * @return string|null
- */
- public function getName()
- {
- return $this->container['name'];
- }
-
- /**
- * Sets name
- *
- * @param string|null $name name
- *
- * @return self
- */
- public function setName($name)
- {
-
- if (is_null($name)) {
- throw new \InvalidArgumentException('non-nullable name cannot be null');
- }
-
- $this->container['name'] = $name;
-
- return $this;
- }
-
- /**
- * Gets receive_cash_notification
- *
- * @return bool|null
- */
- public function getReceiveCashNotification()
- {
- return $this->container['receive_cash_notification'];
- }
-
- /**
- * Sets receive_cash_notification
- *
- * @param bool|null $receive_cash_notification receive_cash_notification
- *
- * @return self
- */
- public function setReceiveCashNotification($receive_cash_notification)
- {
-
- if (is_null($receive_cash_notification)) {
- throw new \InvalidArgumentException('non-nullable receive_cash_notification cannot be null');
- }
-
- $this->container['receive_cash_notification'] = $receive_cash_notification;
-
- return $this;
- }
-
- /**
- * Gets receive_drift_notification
- *
- * @return bool|null
- */
- public function getReceiveDriftNotification()
- {
- return $this->container['receive_drift_notification'];
- }
-
- /**
- * Sets receive_drift_notification
- *
- * @param bool|null $receive_drift_notification receive_drift_notification
- *
- * @return self
- */
- public function setReceiveDriftNotification($receive_drift_notification)
- {
-
- if (is_null($receive_drift_notification)) {
- throw new \InvalidArgumentException('non-nullable receive_drift_notification cannot be null');
- }
-
- $this->container['receive_drift_notification'] = $receive_drift_notification;
-
- return $this;
- }
-
- /**
- * Gets user_trial_activated
- *
- * @return bool|null
- */
- public function getUserTrialActivated()
- {
- return $this->container['user_trial_activated'];
- }
-
- /**
- * Sets user_trial_activated
- *
- * @param bool|null $user_trial_activated user_trial_activated
- *
- * @return self
- */
- public function setUserTrialActivated($user_trial_activated)
- {
-
- if (is_null($user_trial_activated)) {
- throw new \InvalidArgumentException('non-nullable user_trial_activated cannot be null');
- }
-
- $this->container['user_trial_activated'] = $user_trial_activated;
-
- return $this;
- }
-
- /**
- * Gets activated_trial_date
- *
- * @return string|null
- */
- public function getActivatedTrialDate()
- {
- return $this->container['activated_trial_date'];
- }
-
- /**
- * Sets activated_trial_date
- *
- * @param string|null $activated_trial_date activated_trial_date
- *
- * @return self
- */
- public function setActivatedTrialDate($activated_trial_date)
- {
-
- if (is_null($activated_trial_date)) {
- throw new \InvalidArgumentException('non-nullable activated_trial_date cannot be null');
- }
-
- $this->container['activated_trial_date'] = $activated_trial_date;
-
- return $this;
- }
-
- /**
- * Gets demo
- *
- * @return bool|null
- */
- public function getDemo()
- {
- return $this->container['demo'];
- }
-
- /**
- * Sets demo
- *
- * @param bool|null $demo demo
- *
- * @return self
- */
- public function setDemo($demo)
- {
-
- if (is_null($demo)) {
- throw new \InvalidArgumentException('non-nullable demo cannot be null');
- }
-
- $this->container['demo'] = $demo;
-
- return $this;
- }
-
- /**
- * Gets api_enabled
- *
- * @return bool|null
- */
- public function getApiEnabled()
- {
- return $this->container['api_enabled'];
- }
-
- /**
- * Sets api_enabled
- *
- * @param bool|null $api_enabled api_enabled
- *
- * @return self
- */
- public function setApiEnabled($api_enabled)
- {
-
- if (is_null($api_enabled)) {
- throw new \InvalidArgumentException('non-nullable api_enabled cannot be null');
- }
-
- $this->container['api_enabled'] = $api_enabled;
-
- return $this;
- }
-
- /**
- * Gets drift_threshold
- *
- * @return float|null
- */
- public function getDriftThreshold()
- {
- return $this->container['drift_threshold'];
- }
-
- /**
- * Sets drift_threshold
- *
- * @param float|null $drift_threshold drift_threshold
- *
- * @return self
- */
- public function setDriftThreshold($drift_threshold)
- {
-
- if (is_null($drift_threshold)) {
- throw new \InvalidArgumentException('non-nullable drift_threshold cannot be null');
- }
-
- $this->container['drift_threshold'] = $drift_threshold;
-
- return $this;
- }
-
- /**
- * Gets preferred_currency
- *
- * @return \SnapTrade\Model\Currency|null
- */
- public function getPreferredCurrency()
- {
- return $this->container['preferred_currency'];
- }
-
- /**
- * Sets preferred_currency
- *
- * @param \SnapTrade\Model\Currency|null $preferred_currency preferred_currency
- *
- * @return self
- */
- public function setPreferredCurrency($preferred_currency)
- {
-
- if (is_null($preferred_currency)) {
- throw new \InvalidArgumentException('non-nullable preferred_currency cannot be null');
- }
-
- $this->container['preferred_currency'] = $preferred_currency;
-
- 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/test/Model/AccountHoldingsAccountTest.php b/test/Model/AccountHoldingsAccountTest.php
index 6a6cd0c..c8bac60 100644
--- a/test/Model/AccountHoldingsAccountTest.php
+++ b/test/Model/AccountHoldingsAccountTest.php
@@ -29,7 +29,7 @@
* AccountHoldingsAccountTest Class Doc Comment
*
* @category Class
- * @description A wrapper object containing holdings information for a single account
+ * @description A wrapper object containing holdings information for a single account.
* @package SnapTrade
*/
class AccountHoldingsAccountTest extends TestCase
diff --git a/test/Model/AccountOrderRecordStatusTest.php b/test/Model/AccountOrderRecordStatusTest.php
index a8337c6..003e9be 100644
--- a/test/Model/AccountOrderRecordStatusTest.php
+++ b/test/Model/AccountOrderRecordStatusTest.php
@@ -29,7 +29,7 @@
* AccountOrderRecordStatusTest Class Doc Comment
*
* @category Class
- * @description AccountOrderRecordStatus
+ * @description Indicates the status of an order. SnapTrade does a best effort to map brokerage statuses to statuses in this enum.
* @package SnapTrade
*/
class AccountOrderRecordStatusTest extends TestCase
diff --git a/test/Model/AccountOrderRecordTest.php b/test/Model/AccountOrderRecordTest.php
index 1c4ceb8..4aac023 100644
--- a/test/Model/AccountOrderRecordTest.php
+++ b/test/Model/AccountOrderRecordTest.php
@@ -29,7 +29,7 @@
* AccountOrderRecordTest Class Doc Comment
*
* @category Class
- * @description Record of order in brokerageaccount
+ * @description Describes a single recent order in an account.
* @package SnapTrade
*/
class AccountOrderRecordTest extends TestCase
diff --git a/test/Model/BrokerageAuthorizationTypeTest.php b/test/Model/BrokerageAuthorizationTypeTest.php
deleted file mode 100644
index e635a6f..0000000
--- a/test/Model/BrokerageAuthorizationTypeTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "type"
- */
- public function testPropertyType()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/BrokerageSymbolSymbolTest.php b/test/Model/BrokerageSymbolSymbolTest.php
deleted file mode 100644
index efed6ff..0000000
--- a/test/Model/BrokerageSymbolSymbolTest.php
+++ /dev/null
@@ -1,164 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "id"
- */
- public function testPropertyId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "raw_symbol"
- */
- public function testPropertyRawSymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "description"
- */
- public function testPropertyDescription()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "currency"
- */
- public function testPropertyCurrency()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "exchange"
- */
- public function testPropertyExchange()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "type"
- */
- public function testPropertyType()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "currencies"
- */
- public function testPropertyCurrencies()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "figi_code"
- */
- public function testPropertyFigiCode()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "figi_instrument"
- */
- public function testPropertyFigiInstrument()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/BrokerageSymbolTest.php b/test/Model/BrokerageSymbolTest.php
deleted file mode 100644
index da24240..0000000
--- a/test/Model/BrokerageSymbolTest.php
+++ /dev/null
@@ -1,128 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "id"
- */
- public function testPropertyId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "brokerage_authorization"
- */
- public function testPropertyBrokerageAuthorization()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "description"
- */
- public function testPropertyDescription()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "allows_fractional_units"
- */
- public function testPropertyAllowsFractionalUnits()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "option_symbol"
- */
- public function testPropertyOptionSymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/CalculatedTradeTest.php b/test/Model/CalculatedTradeTest.php
deleted file mode 100644
index 9a955bc..0000000
--- a/test/Model/CalculatedTradeTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "id"
- */
- public function testPropertyId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "trades"
- */
- public function testPropertyTrades()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ExchangeTest.php b/test/Model/ExchangeTest.php
index d0ed3d3..055bceb 100644
--- a/test/Model/ExchangeTest.php
+++ b/test/Model/ExchangeTest.php
@@ -29,7 +29,7 @@
* ExchangeTest Class Doc Comment
*
* @category Class
- * @description Stock Exchange
+ * @description Describes a single stock or crypto exchange.
* @package SnapTrade
*/
class ExchangeTest extends TestCase
diff --git a/test/Model/ExcludedAssetTest.php b/test/Model/ExcludedAssetTest.php
deleted file mode 100644
index 2e76f0d..0000000
--- a/test/Model/ExcludedAssetTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/FigiInstrumentTest.php b/test/Model/FigiInstrumentTest.php
index b3bf77f..a47c215 100644
--- a/test/Model/FigiInstrumentTest.php
+++ b/test/Model/FigiInstrumentTest.php
@@ -29,7 +29,7 @@
* FigiInstrumentTest Class Doc Comment
*
* @category Class
- * @description Open FIGI Identifiers
+ * @description Financial Instrument Global Identifier (FIGI) information for the security. See [OpenFIGI](https://www.openfigi.com/) for more information.
* @package SnapTrade
*/
class FigiInstrumentTest extends TestCase
diff --git a/test/Model/JWTTest.php b/test/Model/JWTTest.php
deleted file mode 100644
index 75f4d52..0000000
--- a/test/Model/JWTTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "token"
- */
- public function testPropertyToken()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ModelAssetClassDetailsTest.php b/test/Model/ModelAssetClassDetailsTest.php
deleted file mode 100644
index de39256..0000000
--- a/test/Model/ModelAssetClassDetailsTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "model_asset_class"
- */
- public function testPropertyModelAssetClass()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "model_asset_class_target"
- */
- public function testPropertyModelAssetClassTarget()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ModelAssetClassTargetTest.php b/test/Model/ModelAssetClassTargetTest.php
deleted file mode 100644
index d08c51b..0000000
--- a/test/Model/ModelAssetClassTargetTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ModelAssetClassTest.php b/test/Model/ModelAssetClassTest.php
deleted file mode 100644
index 597aa42..0000000
--- a/test/Model/ModelAssetClassTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "id"
- */
- public function testPropertyId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "name"
- */
- public function testPropertyName()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ModelPortfolioAssetClassTest.php b/test/Model/ModelPortfolioAssetClassTest.php
deleted file mode 100644
index 753e40c..0000000
--- a/test/Model/ModelPortfolioAssetClassTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "model_asset_class"
- */
- public function testPropertyModelAssetClass()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "percent"
- */
- public function testPropertyPercent()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ModelPortfolioDetailsTest.php b/test/Model/ModelPortfolioDetailsTest.php
deleted file mode 100644
index cb80943..0000000
--- a/test/Model/ModelPortfolioDetailsTest.php
+++ /dev/null
@@ -1,101 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "model_portfolio"
- */
- public function testPropertyModelPortfolio()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "model_portfolio_security"
- */
- public function testPropertyModelPortfolioSecurity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "model_portfolio_asset_class"
- */
- public function testPropertyModelPortfolioAssetClass()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/ModelPortfolioSecurityTest.php b/test/Model/ModelPortfolioSecurityTest.php
deleted file mode 100644
index 575ce24..0000000
--- a/test/Model/ModelPortfolioSecurityTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "percent"
- */
- public function testPropertyPercent()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/OptionBrokerageSymbolTest.php b/test/Model/OptionBrokerageSymbolTest.php
index f31688d..21f94dc 100644
--- a/test/Model/OptionBrokerageSymbolTest.php
+++ b/test/Model/OptionBrokerageSymbolTest.php
@@ -29,7 +29,7 @@
* OptionBrokerageSymbolTest Class Doc Comment
*
* @category Class
- * @description Option Brokerage symbol
+ * @description Uniquely describes a security for the option position within an account. The distinction between this and the `option_symbol` child property is that this object is specific to a position within an account, while the `option_symbol` child property is universal across all brokerage accounts. The caller should rely on the `option_symbol` child property for most use cases.
* @package SnapTrade
*/
class OptionBrokerageSymbolTest extends TestCase
diff --git a/test/Model/OptionsPositionCurrencyTest.php b/test/Model/OptionsPositionCurrencyTest.php
index 682f56c..330e4ab 100644
--- a/test/Model/OptionsPositionCurrencyTest.php
+++ b/test/Model/OptionsPositionCurrencyTest.php
@@ -29,7 +29,7 @@
* OptionsPositionCurrencyTest Class Doc Comment
*
* @category Class
- * @description OptionsPositionCurrency
+ * @description The currency of the price. This field is deprecated and will be removed in a future version. The currency of the price is determined by the currency of the underlying security.
* @package SnapTrade
*/
class OptionsPositionCurrencyTest extends TestCase
diff --git a/test/Model/OptionsSymbolTest.php b/test/Model/OptionsSymbolTest.php
index 8c7d0a7..1ad509f 100644
--- a/test/Model/OptionsSymbolTest.php
+++ b/test/Model/OptionsSymbolTest.php
@@ -29,7 +29,7 @@
* OptionsSymbolTest Class Doc Comment
*
* @category Class
- * @description Options Symbol
+ * @description Uniquely describes an option security + exchange combination across all brokerages.
* @package SnapTrade
*/
class OptionsSymbolTest extends TestCase
@@ -134,22 +134,4 @@ public function testPropertyUnderlyingSymbol()
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
-
- /**
- * Test attribute "local_id"
- */
- public function testPropertyLocalId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "exchange_id"
- */
- public function testPropertyExchangeId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
}
diff --git a/test/Model/PortfolioGroupInfoTest.php b/test/Model/PortfolioGroupInfoTest.php
deleted file mode 100644
index ef5b17e..0000000
--- a/test/Model/PortfolioGroupInfoTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbols"
- */
- public function testPropertySymbols()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "quotable_symbols"
- */
- public function testPropertyQuotableSymbols()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "balances"
- */
- public function testPropertyBalances()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "positions"
- */
- public function testPropertyPositions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "target_positions"
- */
- public function testPropertyTargetPositions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "ideal_positions"
- */
- public function testPropertyIdealPositions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "excluded_positions"
- */
- public function testPropertyExcludedPositions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "calculated_trades"
- */
- public function testPropertyCalculatedTrades()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "brokerage_authorizations"
- */
- public function testPropertyBrokerageAuthorizations()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "accuracy"
- */
- public function testPropertyAccuracy()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "settings"
- */
- public function testPropertySettings()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/PortfolioGroupPositionTest.php b/test/Model/PortfolioGroupPositionTest.php
deleted file mode 100644
index 5bf15cf..0000000
--- a/test/Model/PortfolioGroupPositionTest.php
+++ /dev/null
@@ -1,101 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "price"
- */
- public function testPropertyPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "units"
- */
- public function testPropertyUnits()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/PortfolioGroupSettingsTest.php b/test/Model/PortfolioGroupSettingsTest.php
deleted file mode 100644
index 9d7c544..0000000
--- a/test/Model/PortfolioGroupSettingsTest.php
+++ /dev/null
@@ -1,119 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "buy_only"
- */
- public function testPropertyBuyOnly()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "cash_optimizer"
- */
- public function testPropertyCashOptimizer()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "notify_frequency"
- */
- public function testPropertyNotifyFrequency()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "drift_threshold"
- */
- public function testPropertyDriftThreshold()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "preferred_currency"
- */
- public function testPropertyPreferredCurrency()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/PortfolioGroupTest.php b/test/Model/PortfolioGroupTest.php
deleted file mode 100644
index 8b68d35..0000000
--- a/test/Model/PortfolioGroupTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "id"
- */
- public function testPropertyId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "name"
- */
- public function testPropertyName()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/PositionSymbolTest.php b/test/Model/PositionSymbolTest.php
index 2b0d8ce..1a07d95 100644
--- a/test/Model/PositionSymbolTest.php
+++ b/test/Model/PositionSymbolTest.php
@@ -29,7 +29,7 @@
* PositionSymbolTest Class Doc Comment
*
* @category Class
- * @description Symbol returned in position object
+ * @description Uniquely describes a security for the position within an account. The distinction between this and the `symbol` child property is that this object is specific to a position within an account, while the `symbol` child property is universal across all brokerage accounts. The caller should rely on the `symbol` child property for most use cases.
* @package SnapTrade
*/
class PositionSymbolTest extends TestCase
diff --git a/test/Model/RedirectTokenandPinTest.php b/test/Model/RedirectTokenandPinTest.php
deleted file mode 100644
index fe5304d..0000000
--- a/test/Model/RedirectTokenandPinTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "token"
- */
- public function testPropertyToken()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "pin"
- */
- public function testPropertyPin()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/SecurityTypeTest.php b/test/Model/SecurityTypeTest.php
index ebf2751..db5c0c8 100644
--- a/test/Model/SecurityTypeTest.php
+++ b/test/Model/SecurityTypeTest.php
@@ -29,7 +29,7 @@
* SecurityTypeTest Class Doc Comment
*
* @category Class
- * @description Security Type
+ * @description The type of security. For example, \"Common Stock\" or \"ETF\".
* @package SnapTrade
*/
class SecurityTypeTest extends TestCase
diff --git a/test/Model/SnapTradeAPIDisclaimerAcceptStatusTest.php b/test/Model/SnapTradeAPIDisclaimerAcceptStatusTest.php
deleted file mode 100644
index 2e2b813..0000000
--- a/test/Model/SnapTradeAPIDisclaimerAcceptStatusTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "accepted"
- */
- public function testPropertyAccepted()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "timestamp"
- */
- public function testPropertyTimestamp()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/StrategyImpactLegsInnerTest.php b/test/Model/StrategyImpactLegsInnerTest.php
deleted file mode 100644
index ddfc536..0000000
--- a/test/Model/StrategyImpactLegsInnerTest.php
+++ /dev/null
@@ -1,137 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "leg_id"
- */
- public function testPropertyLegId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol_id"
- */
- public function testPropertySymbolId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "leg_ratio_quantity"
- */
- public function testPropertyLegRatioQuantity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "side"
- */
- public function testPropertySide()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "avg_exec_price"
- */
- public function testPropertyAvgExecPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "last_exec_price"
- */
- public function testPropertyLastExecPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/StrategyImpactTest.php b/test/Model/StrategyImpactTest.php
deleted file mode 100644
index 9ee3561..0000000
--- a/test/Model/StrategyImpactTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "estimated_commissions"
- */
- public function testPropertyEstimatedCommissions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "buying_power_effect"
- */
- public function testPropertyBuyingPowerEffect()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "buying_power_result"
- */
- public function testPropertyBuyingPowerResult()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "maint_excess_effect"
- */
- public function testPropertyMaintExcessEffect()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "maint_excess_result"
- */
- public function testPropertyMaintExcessResult()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "trade_value_calculation"
- */
- public function testPropertyTradeValueCalculation()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "legs"
- */
- public function testPropertyLegs()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "side"
- */
- public function testPropertySide()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "effect"
- */
- public function testPropertyEffect()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "price"
- */
- public function testPropertyPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "strategy"
- */
- public function testPropertyStrategy()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/StrategyOrderPlaceOrdersInnerLegsInnerTest.php b/test/Model/StrategyOrderPlaceOrdersInnerLegsInnerTest.php
deleted file mode 100644
index c2d0404..0000000
--- a/test/Model/StrategyOrderPlaceOrdersInnerLegsInnerTest.php
+++ /dev/null
@@ -1,137 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "leg_id"
- */
- public function testPropertyLegId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol_id"
- */
- public function testPropertySymbolId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "leg_ratio_quantity"
- */
- public function testPropertyLegRatioQuantity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "side"
- */
- public function testPropertySide()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "avg_exec_price"
- */
- public function testPropertyAvgExecPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "last_exec_price"
- */
- public function testPropertyLastExecPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/StrategyOrderPlaceOrdersInnerTest.php b/test/Model/StrategyOrderPlaceOrdersInnerTest.php
deleted file mode 100644
index 845d0f7..0000000
--- a/test/Model/StrategyOrderPlaceOrdersInnerTest.php
+++ /dev/null
@@ -1,461 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "id"
- */
- public function testPropertyId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol_id"
- */
- public function testPropertySymbolId()
- {
- // 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 "filled_quantity"
- */
- public function testPropertyFilledQuantity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "canceled_quantity"
- */
- public function testPropertyCanceledQuantity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "side"
- */
- public function testPropertySide()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "order_type"
- */
- public function testPropertyOrderType()
- {
- // 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 "is_all_or_none"
- */
- public function testPropertyIsAllOrNone()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "is_anonymous"
- */
- public function testPropertyIsAnonymous()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "iceberg_quantity"
- */
- public function testPropertyIcebergQuantity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "min_quantity"
- */
- public function testPropertyMinQuantity()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "avg_exec_price"
- */
- public function testPropertyAvgExecPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "last_exec_price"
- */
- public function testPropertyLastExecPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "source"
- */
- public function testPropertySource()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "time_in_force"
- */
- public function testPropertyTimeInForce()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "gtd_date"
- */
- public function testPropertyGtdDate()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "state"
- */
- public function testPropertyState()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "rejection_reason"
- */
- public function testPropertyRejectionReason()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "chain_id"
- */
- public function testPropertyChainId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "creation_time"
- */
- public function testPropertyCreationTime()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "update_time"
- */
- public function testPropertyUpdateTime()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "notes"
- */
- public function testPropertyNotes()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "primary_route"
- */
- public function testPropertyPrimaryRoute()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "secondary_route"
- */
- public function testPropertySecondaryRoute()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "order_route"
- */
- public function testPropertyOrderRoute()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "venue_holding_order"
- */
- public function testPropertyVenueHoldingOrder()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "comission_charged"
- */
- public function testPropertyComissionCharged()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "exchange_order_id"
- */
- public function testPropertyExchangeOrderId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "is_significant_share_holder"
- */
- public function testPropertyIsSignificantShareHolder()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "is_insider"
- */
- public function testPropertyIsInsider()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "is_limit_offset_in_dollar"
- */
- public function testPropertyIsLimitOffsetInDollar()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "user_id"
- */
- public function testPropertyUserId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "placement_commission"
- */
- public function testPropertyPlacementCommission()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "legs"
- */
- public function testPropertyLegs()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "strategy_type"
- */
- public function testPropertyStrategyType()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "trigger_stop_price"
- */
- public function testPropertyTriggerStopPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "order_group_id"
- */
- public function testPropertyOrderGroupId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "order_class"
- */
- public function testPropertyOrderClass()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "is_cross_zero"
- */
- public function testPropertyIsCrossZero()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/StrategyOrderPlaceTest.php b/test/Model/StrategyOrderPlaceTest.php
deleted file mode 100644
index d4ebb37..0000000
--- a/test/Model/StrategyOrderPlaceTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "order_id"
- */
- public function testPropertyOrderId()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "orders"
- */
- public function testPropertyOrders()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/TradeExecutionStatusTest.php b/test/Model/TradeExecutionStatusTest.php
deleted file mode 100644
index 9416fb3..0000000
--- a/test/Model/TradeExecutionStatusTest.php
+++ /dev/null
@@ -1,155 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "symbol"
- */
- public function testPropertySymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "universal_symbol"
- */
- public function testPropertyUniversalSymbol()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "trade"
- */
- public function testPropertyTrade()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "state"
- */
- public function testPropertyState()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "filled_units"
- */
- public function testPropertyFilledUnits()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "action"
- */
- public function testPropertyAction()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "price"
- */
- public function testPropertyPrice()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "commissions"
- */
- public function testPropertyCommissions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "meta"
- */
- public function testPropertyMeta()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/TradeImpactTest.php b/test/Model/TradeImpactTest.php
deleted file mode 100644
index e3c502e..0000000
--- a/test/Model/TradeImpactTest.php
+++ /dev/null
@@ -1,119 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "account"
- */
- public function testPropertyAccount()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "currency"
- */
- public function testPropertyCurrency()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "remaining_cash"
- */
- public function testPropertyRemainingCash()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "estimated_commissions"
- */
- public function testPropertyEstimatedCommissions()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "forex_fees"
- */
- public function testPropertyForexFees()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/BrokerageSymbolOptionSymbolTest.php b/test/Model/UnderlyingSymbolExchangeTest.php
similarity index 69%
rename from test/Model/BrokerageSymbolOptionSymbolTest.php
rename to test/Model/UnderlyingSymbolExchangeTest.php
index 782ad2c..760bad2 100644
--- a/test/Model/BrokerageSymbolOptionSymbolTest.php
+++ b/test/Model/UnderlyingSymbolExchangeTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
@@ -82,72 +82,72 @@ public function testPropertyId()
}
/**
- * Test attribute "ticker"
+ * Test attribute "code"
*/
- public function testPropertyTicker()
+ public function testPropertyCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "option_type"
+ * Test attribute "mic_code"
*/
- public function testPropertyOptionType()
+ public function testPropertyMicCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "strike_price"
+ * Test attribute "name"
*/
- public function testPropertyStrikePrice()
+ public function testPropertyName()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "expiration_date"
+ * Test attribute "timezone"
*/
- public function testPropertyExpirationDate()
+ public function testPropertyTimezone()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "is_mini_option"
+ * Test attribute "start_time"
*/
- public function testPropertyIsMiniOption()
+ public function testPropertyStartTime()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "underlying_symbol"
+ * Test attribute "close_time"
*/
- public function testPropertyUnderlyingSymbol()
+ public function testPropertyCloseTime()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "local_id"
+ * Test attribute "suffix"
*/
- public function testPropertyLocalId()
+ public function testPropertySuffix()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "exchange_id"
+ * Test attribute "allows_cryptocurrency_symbols"
*/
- public function testPropertyExchangeId()
+ public function testPropertyAllowsCryptocurrencySymbols()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
diff --git a/test/Model/UnderlyingSymbolTest.php b/test/Model/UnderlyingSymbolTest.php
index 1ad10ff..1e18600 100644
--- a/test/Model/UnderlyingSymbolTest.php
+++ b/test/Model/UnderlyingSymbolTest.php
@@ -29,7 +29,7 @@
* UnderlyingSymbolTest Class Doc Comment
*
* @category Class
- * @description Underlying Symbol
+ * @description Symbol object for the underlying security of an option.
* @package SnapTrade
*/
class UnderlyingSymbolTest extends TestCase
@@ -90,6 +90,15 @@ public function testPropertySymbol()
$this->markTestIncomplete('Not implemented');
}
+ /**
+ * Test attribute "raw_symbol"
+ */
+ public function testPropertyRawSymbol()
+ {
+ // TODO: implement
+ $this->markTestIncomplete('Not implemented');
+ }
+
/**
* Test attribute "description"
*/
diff --git a/test/Model/TargetAssetTest.php b/test/Model/UnderlyingSymbolTypeTest.php
similarity index 69%
rename from test/Model/TargetAssetTest.php
rename to test/Model/UnderlyingSymbolTypeTest.php
index 6daa0b9..5940ce7 100644
--- a/test/Model/TargetAssetTest.php
+++ b/test/Model/UnderlyingSymbolTypeTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
@@ -82,18 +82,18 @@ public function testPropertyId()
}
/**
- * Test attribute "symbol"
+ * Test attribute "code"
*/
- public function testPropertySymbol()
+ public function testPropertyCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "percent"
+ * Test attribute "description"
*/
- public function testPropertyPercent()
+ public function testPropertyDescription()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
@@ -107,22 +107,4 @@ public function testPropertyIsSupported()
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
-
- /**
- * Test attribute "is_excluded"
- */
- public function testPropertyIsExcluded()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "meta"
- */
- public function testPropertyMeta()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
}
diff --git a/test/Model/ModelPortfolioTest.php b/test/Model/UniversalSymbolCurrencyTest.php
similarity index 81%
rename from test/Model/ModelPortfolioTest.php
rename to test/Model/UniversalSymbolCurrencyTest.php
index 7a145c8..2ff2502 100644
--- a/test/Model/ModelPortfolioTest.php
+++ b/test/Model/UniversalSymbolCurrencyTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
@@ -82,18 +82,18 @@ public function testPropertyId()
}
/**
- * Test attribute "name"
+ * Test attribute "code"
*/
- public function testPropertyName()
+ public function testPropertyCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "model_type"
+ * Test attribute "name"
*/
- public function testPropertyModelType()
+ public function testPropertyName()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
diff --git a/test/Model/TradeTest.php b/test/Model/UniversalSymbolExchangeTest.php
similarity index 71%
rename from test/Model/TradeTest.php
rename to test/Model/UniversalSymbolExchangeTest.php
index 617cee0..7cd361f 100644
--- a/test/Model/TradeTest.php
+++ b/test/Model/UniversalSymbolExchangeTest.php
@@ -1,6 +1,6 @@
markTestIncomplete('Not implemented');
@@ -82,63 +82,63 @@ public function testPropertyId()
}
/**
- * Test attribute "account"
+ * Test attribute "code"
*/
- public function testPropertyAccount()
+ public function testPropertyCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "symbol"
+ * Test attribute "mic_code"
*/
- public function testPropertySymbol()
+ public function testPropertyMicCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "universal_symbol"
+ * Test attribute "name"
*/
- public function testPropertyUniversalSymbol()
+ public function testPropertyName()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "action"
+ * Test attribute "timezone"
*/
- public function testPropertyAction()
+ public function testPropertyTimezone()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "units"
+ * Test attribute "start_time"
*/
- public function testPropertyUnits()
+ public function testPropertyStartTime()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "price"
+ * Test attribute "close_time"
*/
- public function testPropertyPrice()
+ public function testPropertyCloseTime()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
- * Test attribute "sequence"
+ * Test attribute "suffix"
*/
- public function testPropertySequence()
+ public function testPropertySuffix()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
diff --git a/test/Model/UniversalSymbolTest.php b/test/Model/UniversalSymbolTest.php
index eedc675..f8b424f 100644
--- a/test/Model/UniversalSymbolTest.php
+++ b/test/Model/UniversalSymbolTest.php
@@ -29,7 +29,7 @@
* UniversalSymbolTest Class Doc Comment
*
* @category Class
- * @description Universal symbol
+ * @description Uniquely describes a single security + exchange combination across all brokerages.
* @package SnapTrade
*/
class UniversalSymbolTest extends TestCase
diff --git a/test/Model/UserErrorLogTest.php b/test/Model/UserErrorLogTest.php
deleted file mode 100644
index d19dbd7..0000000
--- a/test/Model/UserErrorLogTest.php
+++ /dev/null
@@ -1,128 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "requested_at"
- */
- public function testPropertyRequestedAt()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "response"
- */
- public function testPropertyResponse()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "status_code"
- */
- public function testPropertyStatusCode()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "query_params"
- */
- public function testPropertyQueryParams()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "http_method"
- */
- public function testPropertyHttpMethod()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "endpoint"
- */
- public function testPropertyEndpoint()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}
diff --git a/test/Model/UserSettingsTest.php b/test/Model/UserSettingsTest.php
deleted file mode 100644
index 59e8fc2..0000000
--- a/test/Model/UserSettingsTest.php
+++ /dev/null
@@ -1,164 +0,0 @@
-markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "email"
- */
- public function testPropertyEmail()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "name"
- */
- public function testPropertyName()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "receive_cash_notification"
- */
- public function testPropertyReceiveCashNotification()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "receive_drift_notification"
- */
- public function testPropertyReceiveDriftNotification()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "user_trial_activated"
- */
- public function testPropertyUserTrialActivated()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "activated_trial_date"
- */
- public function testPropertyActivatedTrialDate()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "demo"
- */
- public function testPropertyDemo()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "api_enabled"
- */
- public function testPropertyApiEnabled()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "drift_threshold"
- */
- public function testPropertyDriftThreshold()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-
- /**
- * Test attribute "preferred_currency"
- */
- public function testPropertyPreferredCurrency()
- {
- // TODO: implement
- $this->markTestIncomplete('Not implemented');
- }
-}