snaptrade 2.0.210 → 2.0.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a43ae165ab0fc248a19c003b269d0b98a4b48d8e28dea5044d119946c1cf11f
4
- data.tar.gz: 50ff8983c367af245cdfe1bbd65db5158fd6bb74ecec7136b7cfa24bd85a3286
3
+ metadata.gz: a61e87e25d9559648084c04fc57b2c0fa4f4b7c7eb316091f23172bf2a8ff392
4
+ data.tar.gz: 859c58b73eae3ef31fbff3e9a1b81cb6dc12f3ffffb08169d1f72e65a27b0332
5
5
  SHA512:
6
- metadata.gz: 68521f4050bcd62fa6ec10eb0b86210cb999ffe40d941e304100c44179e436c7b047918ffc07ce279e8d0254f0ddc1987abedd21e999cfe274d215186daf50f2
7
- data.tar.gz: da9f62f8c80072072a55d0bebaa7c5c5a64d59f114da0ef146af8e6b4f78e10a5ee0b92869b91bd70e70425324a9a718d880e5ff3db5a67e2242ea9e61d5a9e6
6
+ metadata.gz: b5f4df0490eba163d86f194ed1e9bbf1aa575fb2dd3a3c2cfa7888b173d5e3435881da32ca80e87a0d95da2bc3f90a48bf9a86c54a4378b712dfa6f398a90fd3
7
+ data.tar.gz: 7f7a5221532b56d1f1fc228d75a2556153f7e76a9e3013982250da243d48cf5f94ef17db34cb47c959f9d3dba0c8dbd27bd2bdb1e3ff3ec6bcca53e936e31de7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.210)
4
+ snaptrade (2.0.211)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect brokerage accounts to your app for live positions and trading
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v2.0.210-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.210)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.211-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.211)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -94,7 +94,7 @@ Connect brokerage accounts to your app for live positions and trading
94
94
  Add to Gemfile:
95
95
 
96
96
  ```ruby
97
- gem 'snaptrade', '~> 2.0.210'
97
+ gem 'snaptrade', '~> 2.0.211'
98
98
  ```
99
99
 
100
100
  ## Getting Started<a id="getting-started"></a>
@@ -31,6 +31,9 @@ module SnapTrade
31
31
  # Expiration date of the option contract.
32
32
  attr_accessor :expiration_date
33
33
 
34
+ # Number of underlying shares per contract. Standard options are 100, mini options are 10.
35
+ attr_accessor :multiplier
36
+
34
37
  # Human-readable description of the option contract.
35
38
  attr_accessor :description
36
39
 
@@ -45,6 +48,7 @@ module SnapTrade
45
48
  :'option_type' => :'option_type',
46
49
  :'strike_price' => :'strike_price',
47
50
  :'expiration_date' => :'expiration_date',
51
+ :'multiplier' => :'multiplier',
48
52
  :'description' => :'description',
49
53
  :'underlying' => :'underlying'
50
54
  }
@@ -64,6 +68,7 @@ module SnapTrade
64
68
  :'option_type' => :'OptionType',
65
69
  :'strike_price' => :'Float',
66
70
  :'expiration_date' => :'Date',
71
+ :'multiplier' => :'Float',
67
72
  :'description' => :'String',
68
73
  :'underlying' => :'UnderlyingOptionInstrument'
69
74
  }
@@ -115,6 +120,10 @@ module SnapTrade
115
120
  self.expiration_date = attributes[:'expiration_date']
116
121
  end
117
122
 
123
+ if attributes.key?(:'multiplier')
124
+ self.multiplier = attributes[:'multiplier']
125
+ end
126
+
118
127
  if attributes.key?(:'description')
119
128
  self.description = attributes[:'description']
120
129
  end
@@ -152,6 +161,10 @@ module SnapTrade
152
161
  invalid_properties.push('invalid value for "expiration_date", expiration_date cannot be nil.')
153
162
  end
154
163
 
164
+ if @multiplier.nil?
165
+ invalid_properties.push('invalid value for "multiplier", multiplier cannot be nil.')
166
+ end
167
+
155
168
  if @underlying.nil?
156
169
  invalid_properties.push('invalid value for "underlying", underlying cannot be nil.')
157
170
  end
@@ -168,6 +181,7 @@ module SnapTrade
168
181
  return false if @option_type.nil?
169
182
  return false if @strike_price.nil?
170
183
  return false if @expiration_date.nil?
184
+ return false if @multiplier.nil?
171
185
  return false if @underlying.nil?
172
186
  true
173
187
  end
@@ -183,6 +197,7 @@ module SnapTrade
183
197
  option_type == o.option_type &&
184
198
  strike_price == o.strike_price &&
185
199
  expiration_date == o.expiration_date &&
200
+ multiplier == o.multiplier &&
186
201
  description == o.description &&
187
202
  underlying == o.underlying
188
203
  end
@@ -196,7 +211,7 @@ module SnapTrade
196
211
  # Calculates hash code according to all attributes.
197
212
  # @return [Integer] Hash code
198
213
  def hash
199
- [kind, id, symbol, option_type, strike_price, expiration_date, description, underlying].hash
214
+ [kind, id, symbol, option_type, strike_price, expiration_date, multiplier, description, underlying].hash
200
215
  end
201
216
 
202
217
  # Builds the object from hash
@@ -8,5 +8,5 @@ Contact: api@snaptrade.com
8
8
  =end
9
9
 
10
10
  module SnapTrade
11
- VERSION = '2.0.210'
11
+ VERSION = '2.0.211'
12
12
  end
@@ -56,6 +56,12 @@ describe SnapTrade::OptionInstrument do
56
56
  end
57
57
  end
58
58
 
59
+ describe 'test attribute "multiplier"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
59
65
  describe 'test attribute "description"' do
60
66
  it 'should work' do
61
67
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptrade
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.210
4
+ version: 2.0.211
5
5
  platform: ruby
6
6
  authors:
7
7
  - SnapTrade