Skip to content

📦 SQA::Portfolio::Trade

Description

Represents a single trade

Source Information

Defined in: lib/sqa/portfolio.rb:27

Inherits from: Struct

🔨 Instance Methods

#ticker=(value)

Sets the attribute ticker

Parameters

Name Type Description
value Object the value to set the attribute ticker to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#ticker()

Returns the value of attribute ticker

Returns

Type: Object

the current value of ticker

Source Location

lib/sqa/portfolio.rb:27


#action=(value)

Sets the attribute action

Parameters

Name Type Description
value Object the value to set the attribute action to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#action()

Returns the value of attribute action

Returns

Type: Object

the current value of action

Source Location

lib/sqa/portfolio.rb:27


#shares=(value)

Sets the attribute shares

Parameters

Name Type Description
value Object the value to set the attribute shares to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#shares()

Returns the value of attribute shares

Returns

Type: Object

the current value of shares

Source Location

lib/sqa/portfolio.rb:27


#price=(value)

Sets the attribute price

Parameters

Name Type Description
value Object the value to set the attribute price to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#price()

Returns the value of attribute price

Returns

Type: Object

the current value of price

Source Location

lib/sqa/portfolio.rb:27


#date=(value)

Sets the attribute date

Parameters

Name Type Description
value Object the value to set the attribute date to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#date()

Returns the value of attribute date

Returns

Type: Object

the current value of date

Source Location

lib/sqa/portfolio.rb:27


#total=(value)

Sets the attribute total

Parameters

Name Type Description
value Object the value to set the attribute total to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#total()

Returns the value of attribute total

Returns

Type: Object

the current value of total

Source Location

lib/sqa/portfolio.rb:27


#commission=(value)

Sets the attribute commission

Parameters

Name Type Description
value Object the value to set the attribute commission to.

Returns

Type: Object

the newly set value

Source Location

lib/sqa/portfolio.rb:27


#commission()

Returns the value of attribute commission

Returns

Type: Object

the current value of commission

Source Location

lib/sqa/portfolio.rb:27


#to_h()

Source Location

lib/sqa/portfolio.rb:28


📝 Attributes

🔄 ticker read/write

Returns the value of attribute ticker

🔄 action read/write

Returns the value of attribute action

🔄 shares read/write

Returns the value of attribute shares

🔄 price read/write

Returns the value of attribute price

🔄 date read/write

Returns the value of attribute date

🔄 total read/write

Returns the value of attribute total

🔄 commission read/write

Returns the value of attribute commission