ish_models 0.0.33.151 → 0.0.33.152

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/warbler/ameritrade.rb +8 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c1a8feb3d93c76b4cc923c63ec58f7c07b6ef717b5fb1e6ab3887e0b1afa79a
4
- data.tar.gz: a37d65e4328947be9d323288ca68d526c17099eefd22b8a9660963b153ea6f68
3
+ metadata.gz: eda424943e1eef920292be882d4c3d0f4de268fb556d4e85b0f099c793a577e2
4
+ data.tar.gz: 5c74167f789c8ac201c90a01c3f4c4a16bfd2ea965b2191990ab6c57daae7717
5
5
  SHA512:
6
- metadata.gz: ad692619a0b561c876c23c2dd541bf93f894885a8c3f3a8aee9718dfb8c6e1c5f5de68acebc61955f5e2765320fe7ca12042b80b69700fb9db3f65a4e97239ca
7
- data.tar.gz: c5cee4bb7423bbe1dfde9faea1eb1ec48f7ab9cf570c1c5377c29237ff4667416d42db1e15f3a186cdcb12f875e6b24ea55f0d8bb3a6a9a2647c4df03b9d832a
6
+ metadata.gz: 8f98bc72d8dc91b8061b28bfeec8954d283c3e811c6dc7a6e7cb2e574818417232f154c9d5271cf28a25e76f500dc637454c77c9bcb9fe43e86bb8f6a3f789fd
7
+ data.tar.gz: 5a6858c1ca87bf1c3d3dc293a01263682f5dede179c1bb07380eb70c7f1a0a4451106419263b1f9c421895a49d2307a7224ad9bed0773629e05c22e24152adab
@@ -60,18 +60,23 @@ class ::Warbler::Ameritrade::Api
60
60
  opts = {}
61
61
 
62
62
  # validate input
63
- validOpts = %i| contractType strike symbol|
63
+ validOpts = %i| contractType strike |
64
64
  validOpts.each do |s|
65
65
  if _opts[s]
66
66
  opts[s] = _opts[s]
67
67
  else
68
- raise Ish::InputError.new("invalid input, missing #{s}")
68
+ raise Ish::InputError.new("Invalid input, missing '#{s}'.")
69
69
  end
70
70
  end
71
71
  if _opts[:date]
72
72
  opts[:fromDate] = opts[:toDate] = _opts[:date]
73
73
  else
74
- raise Ish::InputError.new("invalid input, missing 'date'")
74
+ raise Ish::InputError.new("Invalid input, missing 'date'.")
75
+ end
76
+ if _opts[:ticker]
77
+ opts[:symbol] = _opts[:ticker].upcase
78
+ else
79
+ raise Ish::InputError.new("Invalid input, missing 'ticker'.")
75
80
  end
76
81
 
77
82
  query = { apikey: ::TD_AME[:apiKey], strikeCount: 1 }.merge opts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.151
4
+ version: 0.0.33.152
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox