kabustation_client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +188 -0
  4. data/Rakefile +10 -0
  5. data/docs/ApiSoftLimitResponse.md +32 -0
  6. data/docs/AuthApi.md +72 -0
  7. data/docs/BoardSuccess.md +142 -0
  8. data/docs/BoardSuccessBuy1.md +24 -0
  9. data/docs/BoardSuccessBuy10.md +20 -0
  10. data/docs/BoardSuccessBuy2.md +20 -0
  11. data/docs/BoardSuccessBuy3.md +20 -0
  12. data/docs/BoardSuccessBuy4.md +20 -0
  13. data/docs/BoardSuccessBuy5.md +20 -0
  14. data/docs/BoardSuccessBuy6.md +20 -0
  15. data/docs/BoardSuccessBuy7.md +20 -0
  16. data/docs/BoardSuccessBuy8.md +20 -0
  17. data/docs/BoardSuccessBuy9.md +20 -0
  18. data/docs/BoardSuccessSell1.md +24 -0
  19. data/docs/BoardSuccessSell10.md +20 -0
  20. data/docs/BoardSuccessSell2.md +20 -0
  21. data/docs/BoardSuccessSell3.md +20 -0
  22. data/docs/BoardSuccessSell4.md +20 -0
  23. data/docs/BoardSuccessSell5.md +20 -0
  24. data/docs/BoardSuccessSell6.md +20 -0
  25. data/docs/BoardSuccessSell7.md +20 -0
  26. data/docs/BoardSuccessSell8.md +20 -0
  27. data/docs/BoardSuccessSell9.md +20 -0
  28. data/docs/ErrorResponse.md +20 -0
  29. data/docs/ExchangeResponse.md +28 -0
  30. data/docs/InfoApi.md +924 -0
  31. data/docs/MarginPremiumResponse.md +22 -0
  32. data/docs/MarginPremiumResponseDayTrade.md +26 -0
  33. data/docs/MarginPremiumResponseGeneralMargin.md +26 -0
  34. data/docs/OrderApi.md +275 -0
  35. data/docs/OrderSuccess.md +20 -0
  36. data/docs/OrdersSuccess.md +58 -0
  37. data/docs/OrdersSuccessDetailsInner.md +44 -0
  38. data/docs/Positions.md +20 -0
  39. data/docs/PositionsDeriv.md +20 -0
  40. data/docs/PositionsSuccess.md +58 -0
  41. data/docs/PrimaryExchangeResponse.md +20 -0
  42. data/docs/RankingByCategoryResponse.md +22 -0
  43. data/docs/RankingByCategoryResponseRankingInner.md +34 -0
  44. data/docs/RankingByMarginResponse.md +22 -0
  45. data/docs/RankingByMarginResponseRankingInner.md +36 -0
  46. data/docs/RankingByTickCountResponse.md +22 -0
  47. data/docs/RankingByTickCountResponseRankingInner.md +46 -0
  48. data/docs/RankingByTradeValueResponse.md +22 -0
  49. data/docs/RankingByTradeValueResponseRankingInner.md +42 -0
  50. data/docs/RankingByTradeVolumeResponse.md +22 -0
  51. data/docs/RankingByTradeVolumeResponseRankingInner.md +42 -0
  52. data/docs/RankingDefaultResponse.md +22 -0
  53. data/docs/RankingDefaultResponseRankingInner.md +42 -0
  54. data/docs/RankingGet200Response.md +57 -0
  55. data/docs/RegistSuccess.md +18 -0
  56. data/docs/RegisterApi.md +206 -0
  57. data/docs/RegulationsResponse.md +20 -0
  58. data/docs/RegulationsResponseRegulationsInfoInner.md +30 -0
  59. data/docs/RequestCancelOrder.md +20 -0
  60. data/docs/RequestRegister.md +18 -0
  61. data/docs/RequestRegisterSymbolsInner.md +20 -0
  62. data/docs/RequestSendOrder.md +52 -0
  63. data/docs/RequestSendOrderDerivFuture.md +42 -0
  64. data/docs/RequestSendOrderDerivFutureReverseLimitOrder.md +24 -0
  65. data/docs/RequestSendOrderDerivOption.md +42 -0
  66. data/docs/RequestSendOrderReverseLimitOrder.md +26 -0
  67. data/docs/RequestToken.md +18 -0
  68. data/docs/RequestUnregister.md +18 -0
  69. data/docs/SymbolNameSuccess.md +20 -0
  70. data/docs/SymbolSuccess.md +64 -0
  71. data/docs/TokenSuccess.md +20 -0
  72. data/docs/UnregisterAllSuccess.md +18 -0
  73. data/docs/WalletApi.md +535 -0
  74. data/docs/WalletCashSuccess.md +22 -0
  75. data/docs/WalletFutureSuccess.md +22 -0
  76. data/docs/WalletMarginSuccess.md +24 -0
  77. data/docs/WalletOptionSuccess.md +22 -0
  78. data/git_push.sh +57 -0
  79. data/kabustation_client.gemspec +39 -0
  80. data/lib/kabustation_client/api/auth_api.rb +90 -0
  81. data/lib/kabustation_client/api/info_api.rb +1044 -0
  82. data/lib/kabustation_client/api/order_api.rb +322 -0
  83. data/lib/kabustation_client/api/register_api.rb +236 -0
  84. data/lib/kabustation_client/api/wallet_api.rb +558 -0
  85. data/lib/kabustation_client/api_client.rb +393 -0
  86. data/lib/kabustation_client/api_error.rb +58 -0
  87. data/lib/kabustation_client/configuration.rb +295 -0
  88. data/lib/kabustation_client/models/api_soft_limit_response.rb +285 -0
  89. data/lib/kabustation_client/models/board_success.rb +816 -0
  90. data/lib/kabustation_client/models/board_success_buy1.rb +246 -0
  91. data/lib/kabustation_client/models/board_success_buy10.rb +226 -0
  92. data/lib/kabustation_client/models/board_success_buy2.rb +226 -0
  93. data/lib/kabustation_client/models/board_success_buy3.rb +226 -0
  94. data/lib/kabustation_client/models/board_success_buy4.rb +226 -0
  95. data/lib/kabustation_client/models/board_success_buy5.rb +226 -0
  96. data/lib/kabustation_client/models/board_success_buy6.rb +226 -0
  97. data/lib/kabustation_client/models/board_success_buy7.rb +226 -0
  98. data/lib/kabustation_client/models/board_success_buy8.rb +226 -0
  99. data/lib/kabustation_client/models/board_success_buy9.rb +226 -0
  100. data/lib/kabustation_client/models/board_success_sell1.rb +246 -0
  101. data/lib/kabustation_client/models/board_success_sell10.rb +226 -0
  102. data/lib/kabustation_client/models/board_success_sell2.rb +226 -0
  103. data/lib/kabustation_client/models/board_success_sell3.rb +226 -0
  104. data/lib/kabustation_client/models/board_success_sell4.rb +226 -0
  105. data/lib/kabustation_client/models/board_success_sell5.rb +226 -0
  106. data/lib/kabustation_client/models/board_success_sell6.rb +226 -0
  107. data/lib/kabustation_client/models/board_success_sell7.rb +226 -0
  108. data/lib/kabustation_client/models/board_success_sell8.rb +226 -0
  109. data/lib/kabustation_client/models/board_success_sell9.rb +226 -0
  110. data/lib/kabustation_client/models/error_response.rb +225 -0
  111. data/lib/kabustation_client/models/exchange_response.rb +265 -0
  112. data/lib/kabustation_client/models/margin_premium_response.rb +233 -0
  113. data/lib/kabustation_client/models/margin_premium_response_day_trade.rb +256 -0
  114. data/lib/kabustation_client/models/margin_premium_response_general_margin.rb +256 -0
  115. data/lib/kabustation_client/models/order_success.rb +225 -0
  116. data/lib/kabustation_client/models/orders_success.rb +417 -0
  117. data/lib/kabustation_client/models/orders_success_details_inner.rb +345 -0
  118. data/lib/kabustation_client/models/positions.rb +225 -0
  119. data/lib/kabustation_client/models/positions_deriv.rb +225 -0
  120. data/lib/kabustation_client/models/positions_success.rb +415 -0
  121. data/lib/kabustation_client/models/primary_exchange_response.rb +225 -0
  122. data/lib/kabustation_client/models/ranking_by_category_response.rb +237 -0
  123. data/lib/kabustation_client/models/ranking_by_category_response_ranking_inner.rb +295 -0
  124. data/lib/kabustation_client/models/ranking_by_margin_response.rb +237 -0
  125. data/lib/kabustation_client/models/ranking_by_margin_response_ranking_inner.rb +305 -0
  126. data/lib/kabustation_client/models/ranking_by_tick_count_response.rb +237 -0
  127. data/lib/kabustation_client/models/ranking_by_tick_count_response_ranking_inner.rb +355 -0
  128. data/lib/kabustation_client/models/ranking_by_trade_value_response.rb +237 -0
  129. data/lib/kabustation_client/models/ranking_by_trade_value_response_ranking_inner.rb +335 -0
  130. data/lib/kabustation_client/models/ranking_by_trade_volume_response.rb +237 -0
  131. data/lib/kabustation_client/models/ranking_by_trade_volume_response_ranking_inner.rb +335 -0
  132. data/lib/kabustation_client/models/ranking_default_response.rb +237 -0
  133. data/lib/kabustation_client/models/ranking_default_response_ranking_inner.rb +335 -0
  134. data/lib/kabustation_client/models/ranking_get200_response.rb +109 -0
  135. data/lib/kabustation_client/models/regist_success.rb +217 -0
  136. data/lib/kabustation_client/models/regulations_response.rb +227 -0
  137. data/lib/kabustation_client/models/regulations_response_regulations_info_inner.rb +275 -0
  138. data/lib/kabustation_client/models/request_cancel_order.rb +239 -0
  139. data/lib/kabustation_client/models/request_register.rb +216 -0
  140. data/lib/kabustation_client/models/request_register_symbols_inner.rb +225 -0
  141. data/lib/kabustation_client/models/request_send_order.rb +470 -0
  142. data/lib/kabustation_client/models/request_send_order_deriv_future.rb +406 -0
  143. data/lib/kabustation_client/models/request_send_order_deriv_future_reverse_limit_order.rb +274 -0
  144. data/lib/kabustation_client/models/request_send_order_deriv_option.rb +406 -0
  145. data/lib/kabustation_client/models/request_send_order_reverse_limit_order.rb +291 -0
  146. data/lib/kabustation_client/models/request_token.rb +222 -0
  147. data/lib/kabustation_client/models/request_unregister.rb +217 -0
  148. data/lib/kabustation_client/models/symbol_name_success.rb +225 -0
  149. data/lib/kabustation_client/models/symbol_success.rb +445 -0
  150. data/lib/kabustation_client/models/token_success.rb +225 -0
  151. data/lib/kabustation_client/models/unregister_all_success.rb +215 -0
  152. data/lib/kabustation_client/models/wallet_cash_success.rb +235 -0
  153. data/lib/kabustation_client/models/wallet_future_success.rb +235 -0
  154. data/lib/kabustation_client/models/wallet_margin_success.rb +245 -0
  155. data/lib/kabustation_client/models/wallet_option_success.rb +235 -0
  156. data/lib/kabustation_client/version.rb +15 -0
  157. data/lib/kabustation_client.rb +112 -0
  158. data/spec/api/auth_api_spec.rb +47 -0
  159. data/spec/api/info_api_spec.rb +222 -0
  160. data/spec/api/order_api_spec.rb +87 -0
  161. data/spec/api/register_api_spec.rb +73 -0
  162. data/spec/api/wallet_api_spec.rb +135 -0
  163. data/spec/models/api_soft_limit_response_spec.rb +78 -0
  164. data/spec/models/board_success_buy10_spec.rb +42 -0
  165. data/spec/models/board_success_buy1_spec.rb +54 -0
  166. data/spec/models/board_success_buy2_spec.rb +42 -0
  167. data/spec/models/board_success_buy3_spec.rb +42 -0
  168. data/spec/models/board_success_buy4_spec.rb +42 -0
  169. data/spec/models/board_success_buy5_spec.rb +42 -0
  170. data/spec/models/board_success_buy6_spec.rb +42 -0
  171. data/spec/models/board_success_buy7_spec.rb +42 -0
  172. data/spec/models/board_success_buy8_spec.rb +42 -0
  173. data/spec/models/board_success_buy9_spec.rb +42 -0
  174. data/spec/models/board_success_sell10_spec.rb +42 -0
  175. data/spec/models/board_success_sell1_spec.rb +54 -0
  176. data/spec/models/board_success_sell2_spec.rb +42 -0
  177. data/spec/models/board_success_sell3_spec.rb +42 -0
  178. data/spec/models/board_success_sell4_spec.rb +42 -0
  179. data/spec/models/board_success_sell5_spec.rb +42 -0
  180. data/spec/models/board_success_sell6_spec.rb +42 -0
  181. data/spec/models/board_success_sell7_spec.rb +42 -0
  182. data/spec/models/board_success_sell8_spec.rb +42 -0
  183. data/spec/models/board_success_sell9_spec.rb +42 -0
  184. data/spec/models/board_success_spec.rb +408 -0
  185. data/spec/models/error_response_spec.rb +42 -0
  186. data/spec/models/exchange_response_spec.rb +66 -0
  187. data/spec/models/margin_premium_response_day_trade_spec.rb +60 -0
  188. data/spec/models/margin_premium_response_general_margin_spec.rb +60 -0
  189. data/spec/models/margin_premium_response_spec.rb +48 -0
  190. data/spec/models/order_success_spec.rb +42 -0
  191. data/spec/models/orders_success_details_inner_spec.rb +114 -0
  192. data/spec/models/orders_success_spec.rb +156 -0
  193. data/spec/models/positions_deriv_spec.rb +42 -0
  194. data/spec/models/positions_spec.rb +42 -0
  195. data/spec/models/positions_success_spec.rb +156 -0
  196. data/spec/models/primary_exchange_response_spec.rb +42 -0
  197. data/spec/models/ranking_by_category_response_ranking_inner_spec.rb +84 -0
  198. data/spec/models/ranking_by_category_response_spec.rb +48 -0
  199. data/spec/models/ranking_by_margin_response_ranking_inner_spec.rb +90 -0
  200. data/spec/models/ranking_by_margin_response_spec.rb +48 -0
  201. data/spec/models/ranking_by_tick_count_response_ranking_inner_spec.rb +120 -0
  202. data/spec/models/ranking_by_tick_count_response_spec.rb +48 -0
  203. data/spec/models/ranking_by_trade_value_response_ranking_inner_spec.rb +108 -0
  204. data/spec/models/ranking_by_trade_value_response_spec.rb +48 -0
  205. data/spec/models/ranking_by_trade_volume_response_ranking_inner_spec.rb +108 -0
  206. data/spec/models/ranking_by_trade_volume_response_spec.rb +48 -0
  207. data/spec/models/ranking_default_response_ranking_inner_spec.rb +108 -0
  208. data/spec/models/ranking_default_response_spec.rb +48 -0
  209. data/spec/models/ranking_get200_response_spec.rb +32 -0
  210. data/spec/models/regist_success_spec.rb +36 -0
  211. data/spec/models/regulations_response_regulations_info_inner_spec.rb +72 -0
  212. data/spec/models/regulations_response_spec.rb +42 -0
  213. data/spec/models/request_cancel_order_spec.rb +42 -0
  214. data/spec/models/request_register_spec.rb +36 -0
  215. data/spec/models/request_register_symbols_inner_spec.rb +42 -0
  216. data/spec/models/request_send_order_deriv_future_reverse_limit_order_spec.rb +54 -0
  217. data/spec/models/request_send_order_deriv_future_spec.rb +108 -0
  218. data/spec/models/request_send_order_deriv_option_spec.rb +108 -0
  219. data/spec/models/request_send_order_reverse_limit_order_spec.rb +60 -0
  220. data/spec/models/request_send_order_spec.rb +138 -0
  221. data/spec/models/request_token_spec.rb +36 -0
  222. data/spec/models/request_unregister_spec.rb +36 -0
  223. data/spec/models/symbol_name_success_spec.rb +42 -0
  224. data/spec/models/symbol_success_spec.rb +174 -0
  225. data/spec/models/token_success_spec.rb +42 -0
  226. data/spec/models/unregister_all_success_spec.rb +36 -0
  227. data/spec/models/wallet_cash_success_spec.rb +48 -0
  228. data/spec/models/wallet_future_success_spec.rb +48 -0
  229. data/spec/models/wallet_margin_success_spec.rb +54 -0
  230. data/spec/models/wallet_option_success_spec.rb +48 -0
  231. data/spec/spec_helper.rb +111 -0
  232. metadata +387 -0
@@ -0,0 +1,470 @@
1
+ =begin
2
+ #kabuステーションAPI
3
+
4
+ ## 定義情報 REST APIのコード一覧、エンドポイントは下記リンク参照 - [REST APIコード一覧](../ptal/error.html)
5
+
6
+ The version of the OpenAPI document: 1.5
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module KabustationClient
17
+ class RequestSendOrder
18
+ # 注文パスワード
19
+ attr_accessor :password
20
+
21
+ # 銘柄コード
22
+ attr_accessor :symbol
23
+
24
+ # 市場コード <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>東証</td> </tr> <tr> <td>3</td> <td>名証</td> </tr> <tr> <td>5</td> <td>福証</td> </tr> <tr> <td>6</td> <td>札証</td> </tr> </tbody> </table>
25
+ attr_accessor :exchange
26
+
27
+ # 商品種別 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>株式</td> </tr> </tbody> </table>
28
+ attr_accessor :security_type
29
+
30
+ # 売買区分 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>売</td> </tr> <tr> <td>2</td> <td>買</td> </tr> </tbody> </table>
31
+ attr_accessor :side
32
+
33
+ # 信用区分 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>現物</td> </tr> <tr> <td>2</td> <td>新規</td> </tr> <tr> <td>3</td> <td>返済</td> </tr> </tbody> </table>
34
+ attr_accessor :cash_margin
35
+
36
+ # 信用取引区分<br>※現物取引の場合は指定不要。<br>※信用取引の場合、必須。 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>制度信用</td> </tr> <tr> <td>2</td> <td>一般信用(長期)</td> </tr> <tr> <td>3</td> <td>一般信用(デイトレ)</td> </tr> </tbody> </table>
37
+ attr_accessor :margin_trade_type
38
+
39
+ # 1株あたりのプレミアム料(円)<br> ※プレミアム料の刻値は、プレミアム料取得APIのレスポンスにある\"TickMarginPremium\"にてご確認ください。<br> ※入札受付中(19:30~20:30)プレミアム料入札可能銘柄の場合、「MarginPremiumUnit」は必須となります。<br> ※入札受付中(19:30~20:30)のプレミアム料入札可能銘柄以外の場合は、「MarginPremiumUnit」の記載は無視されます。<br> ※入札受付中以外の時間帯では、「MarginPremiumUnit」の記載は無視されます。
40
+ attr_accessor :margin_premium_unit
41
+
42
+ # 受渡区分<br>※現物買は指定必須。<br>※現物売は「0(指定なし)」を設定<br>※信用新規は「0(指定なし)」を設定<br>※信用返済は指定必須 <br>※auマネーコネクトが有効の場合にのみ、「3」を設定可能 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>指定なし</td> </tr> <tr> <td>2</td> <td>お預り金</td> </tr> <tr> <td>3</td> <td>auマネーコネクト</td> </tr> </tbody> </table>
43
+ attr_accessor :deliv_type
44
+
45
+ # 資産区分(預り区分)<br>※現物買は、指定必須。<br>※現物売は、「' '」 半角スペース2つを指定必須。<br>※信用新規と信用返済は、「11」を指定するか、または指定なしでも可。指定しない場合は「11」が自動的にセットされます。 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>(半角スペース2つ)</td> <td>現物売の場合</td> </tr> <tr> <td>02</td> <td>保護</td> </tr> <tr> <td>AA</td> <td>信用代用</td> </tr> <tr> <td>11</td> <td>信用取引</td> </tr> </tbody> </table>
46
+ attr_accessor :fund_type
47
+
48
+ # 口座種別 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>一般</td> </tr> <tr> <td>4</td> <td>特定</td> </tr> <tr> <td>12</td> <td>法人</td> </tr> </tbody> </table>
49
+ attr_accessor :account_type
50
+
51
+ # 注文数量<br>※信用一括返済の場合、返済したい合計数量を入力してください。
52
+ attr_accessor :qty
53
+
54
+ # 決済順序<br>※信用返済の場合、必須。<br>※ClosePositionOrderとClosePositionsはどちらか一方のみ指定可能。<br>※ClosePositionOrderとClosePositionsを両方指定した場合、エラー。 <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>日付(古い順)、損益(高い順)</td> </tr> <tr> <td>1</td> <td>日付(古い順)、損益(低い順)</td> </tr> <tr> <td>2</td> <td>日付(新しい順)、損益(高い順)</td> </tr> <tr> <td>3</td> <td>日付(新しい順)、損益(低い順)</td> </tr> <tr> <td>4</td> <td>損益(高い順)、日付(古い順)</td> </tr> <tr> <td>5</td> <td>損益(高い順)、日付(新しい順)</td> </tr> <tr> <td>6</td> <td>損益(低い順)、日付(古い順)</td> </tr> <tr> <td>7</td> <td>損益(低い順)、日付(新しい順)</td> </tr> </tbody> </table>
55
+ attr_accessor :close_position_order
56
+
57
+ # 返済建玉指定<br>※信用返済の場合、必須。<br>※ClosePositionOrderとClosePositionsはどちらか一方のみ指定可能。<br>※ClosePositionOrderとClosePositionsを両方指定した場合、エラー。<br>※信用一括返済の場合、各建玉IDと返済したい数量を入力してください。<br>※建玉IDは「E」から始まる番号です。
58
+ attr_accessor :close_positions
59
+
60
+ # 執行条件 <table> <thead> <tr> <th>定義値</th> <th>説明</th> <th>”Price\"の指定</th> </tr> </thead> <tbody> <tr> <td>10</td> <td>成行</td> <td>0</td> </tr> <tr> <td>13</td> <td>寄成(前場)</td> <td>0</td> </tr> <tr> <td>14</td> <td>寄成(後場)</td> <td>0</td> </tr> <tr> <td>15</td> <td>引成(前場)</td> <td>0</td> </tr> <tr> <td>16</td> <td>引成(後場)</td> <td>0</td> </tr> <tr> <td>17</td> <td>IOC成行</td> <td>0</td> </tr> <tr> <td>20</td> <td>指値</td> <td>発注したい金額</td> </tr> <tr> <td>21</td> <td>寄指(前場)</td> <td>発注したい金額</td> </tr> <tr> <td>22</td> <td>寄指(後場)</td> <td>発注したい金額</td> </tr> <tr> <td>23</td> <td>引指(前場)</td> <td>発注したい金額</td> </tr> <tr> <td>24</td> <td>引指(後場)</td> <td>発注したい金額</td> </tr> <tr> <td>25</td> <td>不成(前場)</td> <td>発注したい金額</td> </tr> <tr> <td>26</td> <td>不成(後場)</td> <td>発注したい金額</td> </tr> <tr> <td>27</td> <td>IOC指値</td> <td>発注したい金額</td> </tr> <tr> <td>30</td> <td>逆指値</td> <td>指定なし<br>※AfterHitPriceで指定ください</td> </tr> </tbody> </table>
61
+ attr_accessor :front_order_type
62
+
63
+ # 注文価格<br>※FrontOrderTypeで成行を指定した場合、0を指定する。<br>※詳細について、”FrontOrderType”をご確認ください。
64
+ attr_accessor :price
65
+
66
+ # 注文有効期限<br> yyyyMMdd形式。<br> 「0」を指定すると、kabuステーション上の発注画面の「本日」に対応する日付として扱います。<br> 「本日」は直近の注文可能日となり、以下のように設定されます。<br> 引けまでの間 : 当日<br> 引け後 : 翌取引所営業日<br> 休前日 : 休日明けの取引所営業日<br> ※ 日替わりはkabuステーションが日付変更通知を受信したタイミングです。
67
+ attr_accessor :expire_day
68
+
69
+ attr_accessor :reverse_limit_order
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'password' => :'Password',
75
+ :'symbol' => :'Symbol',
76
+ :'exchange' => :'Exchange',
77
+ :'security_type' => :'SecurityType',
78
+ :'side' => :'Side',
79
+ :'cash_margin' => :'CashMargin',
80
+ :'margin_trade_type' => :'MarginTradeType',
81
+ :'margin_premium_unit' => :'MarginPremiumUnit',
82
+ :'deliv_type' => :'DelivType',
83
+ :'fund_type' => :'FundType',
84
+ :'account_type' => :'AccountType',
85
+ :'qty' => :'Qty',
86
+ :'close_position_order' => :'ClosePositionOrder',
87
+ :'close_positions' => :'ClosePositions',
88
+ :'front_order_type' => :'FrontOrderType',
89
+ :'price' => :'Price',
90
+ :'expire_day' => :'ExpireDay',
91
+ :'reverse_limit_order' => :'ReverseLimitOrder'
92
+ }
93
+ end
94
+
95
+ # Returns all the JSON keys this model knows about
96
+ def self.acceptable_attributes
97
+ attribute_map.values
98
+ end
99
+
100
+ # Attribute type mapping.
101
+ def self.openapi_types
102
+ {
103
+ :'password' => :'String',
104
+ :'symbol' => :'String',
105
+ :'exchange' => :'Integer',
106
+ :'security_type' => :'Integer',
107
+ :'side' => :'String',
108
+ :'cash_margin' => :'Integer',
109
+ :'margin_trade_type' => :'Integer',
110
+ :'margin_premium_unit' => :'Float',
111
+ :'deliv_type' => :'Integer',
112
+ :'fund_type' => :'String',
113
+ :'account_type' => :'Integer',
114
+ :'qty' => :'Integer',
115
+ :'close_position_order' => :'Integer',
116
+ :'close_positions' => :'Array<Positions>',
117
+ :'front_order_type' => :'Integer',
118
+ :'price' => :'Float',
119
+ :'expire_day' => :'Integer',
120
+ :'reverse_limit_order' => :'RequestSendOrderReverseLimitOrder'
121
+ }
122
+ end
123
+
124
+ # List of attributes with nullable: true
125
+ def self.openapi_nullable
126
+ Set.new([
127
+ ])
128
+ end
129
+
130
+ # Initializes the object
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ def initialize(attributes = {})
133
+ if (!attributes.is_a?(Hash))
134
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KabustationClient::RequestSendOrder` initialize method"
135
+ end
136
+
137
+ # check to see if the attribute exists and convert string to symbol for hash key
138
+ attributes = attributes.each_with_object({}) { |(k, v), h|
139
+ if (!self.class.attribute_map.key?(k.to_sym))
140
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KabustationClient::RequestSendOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
141
+ end
142
+ h[k.to_sym] = v
143
+ }
144
+
145
+ if attributes.key?(:'password')
146
+ self.password = attributes[:'password']
147
+ else
148
+ self.password = nil
149
+ end
150
+
151
+ if attributes.key?(:'symbol')
152
+ self.symbol = attributes[:'symbol']
153
+ else
154
+ self.symbol = nil
155
+ end
156
+
157
+ if attributes.key?(:'exchange')
158
+ self.exchange = attributes[:'exchange']
159
+ else
160
+ self.exchange = nil
161
+ end
162
+
163
+ if attributes.key?(:'security_type')
164
+ self.security_type = attributes[:'security_type']
165
+ else
166
+ self.security_type = nil
167
+ end
168
+
169
+ if attributes.key?(:'side')
170
+ self.side = attributes[:'side']
171
+ else
172
+ self.side = nil
173
+ end
174
+
175
+ if attributes.key?(:'cash_margin')
176
+ self.cash_margin = attributes[:'cash_margin']
177
+ else
178
+ self.cash_margin = nil
179
+ end
180
+
181
+ if attributes.key?(:'margin_trade_type')
182
+ self.margin_trade_type = attributes[:'margin_trade_type']
183
+ end
184
+
185
+ if attributes.key?(:'margin_premium_unit')
186
+ self.margin_premium_unit = attributes[:'margin_premium_unit']
187
+ end
188
+
189
+ if attributes.key?(:'deliv_type')
190
+ self.deliv_type = attributes[:'deliv_type']
191
+ else
192
+ self.deliv_type = nil
193
+ end
194
+
195
+ if attributes.key?(:'fund_type')
196
+ self.fund_type = attributes[:'fund_type']
197
+ end
198
+
199
+ if attributes.key?(:'account_type')
200
+ self.account_type = attributes[:'account_type']
201
+ else
202
+ self.account_type = nil
203
+ end
204
+
205
+ if attributes.key?(:'qty')
206
+ self.qty = attributes[:'qty']
207
+ else
208
+ self.qty = nil
209
+ end
210
+
211
+ if attributes.key?(:'close_position_order')
212
+ self.close_position_order = attributes[:'close_position_order']
213
+ end
214
+
215
+ if attributes.key?(:'close_positions')
216
+ if (value = attributes[:'close_positions']).is_a?(Array)
217
+ self.close_positions = value
218
+ end
219
+ end
220
+
221
+ if attributes.key?(:'front_order_type')
222
+ self.front_order_type = attributes[:'front_order_type']
223
+ else
224
+ self.front_order_type = nil
225
+ end
226
+
227
+ if attributes.key?(:'price')
228
+ self.price = attributes[:'price']
229
+ else
230
+ self.price = nil
231
+ end
232
+
233
+ if attributes.key?(:'expire_day')
234
+ self.expire_day = attributes[:'expire_day']
235
+ else
236
+ self.expire_day = nil
237
+ end
238
+
239
+ if attributes.key?(:'reverse_limit_order')
240
+ self.reverse_limit_order = attributes[:'reverse_limit_order']
241
+ end
242
+ end
243
+
244
+ # Show invalid properties with the reasons. Usually used together with valid?
245
+ # @return Array for valid properties with the reasons
246
+ def list_invalid_properties
247
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
248
+ invalid_properties = Array.new
249
+ if @password.nil?
250
+ invalid_properties.push('invalid value for "password", password cannot be nil.')
251
+ end
252
+
253
+ if @symbol.nil?
254
+ invalid_properties.push('invalid value for "symbol", symbol cannot be nil.')
255
+ end
256
+
257
+ if @exchange.nil?
258
+ invalid_properties.push('invalid value for "exchange", exchange cannot be nil.')
259
+ end
260
+
261
+ if @security_type.nil?
262
+ invalid_properties.push('invalid value for "security_type", security_type cannot be nil.')
263
+ end
264
+
265
+ if @side.nil?
266
+ invalid_properties.push('invalid value for "side", side cannot be nil.')
267
+ end
268
+
269
+ if @cash_margin.nil?
270
+ invalid_properties.push('invalid value for "cash_margin", cash_margin cannot be nil.')
271
+ end
272
+
273
+ if @deliv_type.nil?
274
+ invalid_properties.push('invalid value for "deliv_type", deliv_type cannot be nil.')
275
+ end
276
+
277
+ if @account_type.nil?
278
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
279
+ end
280
+
281
+ if @qty.nil?
282
+ invalid_properties.push('invalid value for "qty", qty cannot be nil.')
283
+ end
284
+
285
+ if @front_order_type.nil?
286
+ invalid_properties.push('invalid value for "front_order_type", front_order_type cannot be nil.')
287
+ end
288
+
289
+ if @price.nil?
290
+ invalid_properties.push('invalid value for "price", price cannot be nil.')
291
+ end
292
+
293
+ if @expire_day.nil?
294
+ invalid_properties.push('invalid value for "expire_day", expire_day cannot be nil.')
295
+ end
296
+
297
+ invalid_properties
298
+ end
299
+
300
+ # Check to see if the all the properties in the model are valid
301
+ # @return true if the model is valid
302
+ def valid?
303
+ warn '[DEPRECATED] the `valid?` method is obsolete'
304
+ return false if @password.nil?
305
+ return false if @symbol.nil?
306
+ return false if @exchange.nil?
307
+ return false if @security_type.nil?
308
+ return false if @side.nil?
309
+ return false if @cash_margin.nil?
310
+ return false if @deliv_type.nil?
311
+ return false if @account_type.nil?
312
+ return false if @qty.nil?
313
+ return false if @front_order_type.nil?
314
+ return false if @price.nil?
315
+ return false if @expire_day.nil?
316
+ true
317
+ end
318
+
319
+ # Checks equality by comparing each attribute.
320
+ # @param [Object] Object to be compared
321
+ def ==(o)
322
+ return true if self.equal?(o)
323
+ self.class == o.class &&
324
+ password == o.password &&
325
+ symbol == o.symbol &&
326
+ exchange == o.exchange &&
327
+ security_type == o.security_type &&
328
+ side == o.side &&
329
+ cash_margin == o.cash_margin &&
330
+ margin_trade_type == o.margin_trade_type &&
331
+ margin_premium_unit == o.margin_premium_unit &&
332
+ deliv_type == o.deliv_type &&
333
+ fund_type == o.fund_type &&
334
+ account_type == o.account_type &&
335
+ qty == o.qty &&
336
+ close_position_order == o.close_position_order &&
337
+ close_positions == o.close_positions &&
338
+ front_order_type == o.front_order_type &&
339
+ price == o.price &&
340
+ expire_day == o.expire_day &&
341
+ reverse_limit_order == o.reverse_limit_order
342
+ end
343
+
344
+ # @see the `==` method
345
+ # @param [Object] Object to be compared
346
+ def eql?(o)
347
+ self == o
348
+ end
349
+
350
+ # Calculates hash code according to all attributes.
351
+ # @return [Integer] Hash code
352
+ def hash
353
+ [password, symbol, exchange, security_type, side, cash_margin, margin_trade_type, margin_premium_unit, deliv_type, fund_type, account_type, qty, close_position_order, close_positions, front_order_type, price, expire_day, reverse_limit_order].hash
354
+ end
355
+
356
+ # Builds the object from hash
357
+ # @param [Hash] attributes Model attributes in the form of hash
358
+ # @return [Object] Returns the model itself
359
+ def self.build_from_hash(attributes)
360
+ return nil unless attributes.is_a?(Hash)
361
+ attributes = attributes.transform_keys(&:to_sym)
362
+ transformed_hash = {}
363
+ openapi_types.each_pair do |key, type|
364
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
365
+ transformed_hash["#{key}"] = nil
366
+ elsif type =~ /\AArray<(.*)>/i
367
+ # check to ensure the input is an array given that the attribute
368
+ # is documented as an array but the input is not
369
+ if attributes[attribute_map[key]].is_a?(Array)
370
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
371
+ end
372
+ elsif !attributes[attribute_map[key]].nil?
373
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
374
+ end
375
+ end
376
+ new(transformed_hash)
377
+ end
378
+
379
+ # Deserializes the data based on type
380
+ # @param string type Data type
381
+ # @param string value Value to be deserialized
382
+ # @return [Object] Deserialized data
383
+ def self._deserialize(type, value)
384
+ case type.to_sym
385
+ when :Time
386
+ Time.parse(value)
387
+ when :Date
388
+ Date.parse(value)
389
+ when :String
390
+ value.to_s
391
+ when :Integer
392
+ value.to_i
393
+ when :Float
394
+ value.to_f
395
+ when :Boolean
396
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
397
+ true
398
+ else
399
+ false
400
+ end
401
+ when :Object
402
+ # generic object (usually a Hash), return directly
403
+ value
404
+ when /\AArray<(?<inner_type>.+)>\z/
405
+ inner_type = Regexp.last_match[:inner_type]
406
+ value.map { |v| _deserialize(inner_type, v) }
407
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
408
+ k_type = Regexp.last_match[:k_type]
409
+ v_type = Regexp.last_match[:v_type]
410
+ {}.tap do |hash|
411
+ value.each do |k, v|
412
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
413
+ end
414
+ end
415
+ else # model
416
+ # models (e.g. Pet) or oneOf
417
+ klass = KabustationClient.const_get(type)
418
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
419
+ end
420
+ end
421
+
422
+ # Returns the string representation of the object
423
+ # @return [String] String presentation of the object
424
+ def to_s
425
+ to_hash.to_s
426
+ end
427
+
428
+ # to_body is an alias to to_hash (backward compatibility)
429
+ # @return [Hash] Returns the object in the form of hash
430
+ def to_body
431
+ to_hash
432
+ end
433
+
434
+ # Returns the object in the form of hash
435
+ # @return [Hash] Returns the object in the form of hash
436
+ def to_hash
437
+ hash = {}
438
+ self.class.attribute_map.each_pair do |attr, param|
439
+ value = self.send(attr)
440
+ if value.nil?
441
+ is_nullable = self.class.openapi_nullable.include?(attr)
442
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
443
+ end
444
+
445
+ hash[param] = _to_hash(value)
446
+ end
447
+ hash
448
+ end
449
+
450
+ # Outputs non-array value in the form of hash
451
+ # For object, use to_hash. Otherwise, just return the value
452
+ # @param [Object] value Any valid value
453
+ # @return [Hash] Returns the value in the form of hash
454
+ def _to_hash(value)
455
+ if value.is_a?(Array)
456
+ value.compact.map { |v| _to_hash(v) }
457
+ elsif value.is_a?(Hash)
458
+ {}.tap do |hash|
459
+ value.each { |k, v| hash[k] = _to_hash(v) }
460
+ end
461
+ elsif value.respond_to? :to_hash
462
+ value.to_hash
463
+ else
464
+ value
465
+ end
466
+ end
467
+
468
+ end
469
+
470
+ end