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,445 @@
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 SymbolSuccess
18
+ # 銘柄コード
19
+ attr_accessor :symbol
20
+
21
+ # 銘柄名
22
+ attr_accessor :symbol_name
23
+
24
+ # 銘柄略称<br>※株式・先物・オプション銘柄の場合のみ
25
+ attr_accessor :display_name
26
+
27
+ # 市場コード<br>※株式・先物・オプション銘柄の場合のみ <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> <tr> <td>2</td> <td>日通し</td> </tr> <tr> <td>23</td> <td>日中</td> </tr> <tr> <td>24</td> <td>夜間</td> </tr> </tbody> </table>
28
+ attr_accessor :exchange
29
+
30
+ # 市場名称<br>※株式・先物・オプション銘柄の場合のみ
31
+ attr_accessor :exchange_name
32
+
33
+ # 業種コード名<br>※株式銘柄の場合のみ <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>0050</td> <td>水産・農林業</td> </tr> <tr> <td>1050</td> <td>鉱業</td> </tr> <tr> <td>2050</td> <td>建設業</td> </tr> <tr> <td>3050</td> <td>食料品</td> </tr> <tr> <td>3100</td> <td>繊維製品</td> </tr> <tr> <td>3150</td> <td>パルプ・紙</td> </tr> <tr> <td>3200</td> <td>化学</td> </tr> <tr> <td>3250</td> <td>医薬品</td> </tr> <tr> <td>3300</td> <td>石油・石炭製品</td> </tr> <tr> <td>3350</td> <td>ゴム製品</td> </tr> <tr> <td>3400</td> <td>ガラス・土石製品</td> </tr> <tr> <td>3450</td> <td>鉄鋼</td> </tr> <tr> <td>3500</td> <td>非鉄金属</td> </tr> <tr> <td>3550</td> <td>金属製品</td> </tr> <tr> <td>3600</td> <td>機械</td> </tr> <tr> <td>3650</td> <td>電気機器</td> </tr> <tr> <td>3700</td> <td>輸送用機器</td> </tr> <tr> <td>3750</td> <td>精密機器</td> </tr> <tr> <td>3800</td> <td>その他製品</td> </tr> <tr> <td>4050</td> <td>電気・ガス業</td> </tr> <tr> <td>5050</td> <td>陸運業</td> </tr> <tr> <td>5100</td> <td>海運業</td> </tr> <tr> <td>5150</td> <td>空運業</td> </tr> <tr> <td>5200</td> <td>倉庫・運輸関連業</td> </tr> <tr> <td>5250</td> <td>情報・通信業</td> </tr> <tr> <td>6050</td> <td>卸売業</td> </tr> <tr> <td>6100</td> <td>小売業</td> </tr> <tr> <td>7050</td> <td>銀行業</td> </tr> <tr> <td>7100</td> <td>証券、商品先物取引業</td> </tr> <tr> <td>7150</td> <td>保険業</td> </tr> <tr> <td>7200</td> <td>その他金融業</td> </tr> <tr> <td>8050</td> <td>不動産業</td> </tr> <tr> <td>9050</td> <td>サービス業</td> </tr> <tr> <td>9999</td> <td>その他</td> </tr> </tbody> </table>
34
+ attr_accessor :bis_category
35
+
36
+ # 時価総額<br>※株式銘柄の場合のみ<br>追加情報出力フラグ:falseの場合、null
37
+ attr_accessor :total_market_value
38
+
39
+ # 発行済み株式数(千株)<br>※株式銘柄の場合のみ<br>追加情報出力フラグ:falseの場合、null
40
+ attr_accessor :total_stocks
41
+
42
+ # 売買単位<br>※株式・先物・オプション銘柄の場合のみ
43
+ attr_accessor :trading_unit
44
+
45
+ # 決算期日<br>※株式銘柄の場合のみ<br>追加情報出力フラグ:falseの場合、null
46
+ attr_accessor :fiscal_year_end_basic
47
+
48
+ # 呼値グループ<br> ※株式・先物・オプション銘柄の場合のみ<br> ※各呼値コードが対応する商品は以下となります。<BR>  株式の呼値の単位の詳細は [JPXページ](https://www.jpx.co.jp/equities/trading/domestic/07.html) をご覧ください。<BR>  10000:株式(TOPIX500採用銘柄以外) <br>  10003:株式(TOPIX500採用銘柄)<br>  10118 : 日経平均先物<br>  10119 : 日経225mini<br>  10318 : 日経平均オプション<br>  10706 : ミニTOPIX先物<br>  10718 : TOPIX先物<br>  12122 : JPX日経400指数先物<br>  14473 : NYダウ先物<br>  14515 : 日経平均VI先物<br>  15411 : グロース250先物<br>  15569 : 東証REIT指数先物<br>  17163 : TOPIXCore30指数先物<br> <table> <thead> <tr> <th>呼値コード</th> <th>値段の水準</th> <th>呼値単位</th> </tr> </thead> <tbody> <tr> <td>10000</td> <td>3000円以下</td> <td>1</td> </tr> <tr> <td>10000</td> <td>5000円以下</td> <td>5</td> </tr> <tr> <td>10000</td> <td>30000円以下</td> <td>10</td> </tr> <tr> <td>10000</td> <td>50000円以下</td> <td>50</td> </tr> <tr> <td>10000</td> <td>300000円以下</td> <td>100</td> </tr> <tr> <td>10000</td> <td>500000円以下</td> <td>500</td> </tr> <tr> <td>10000</td> <td>3000000円以下</td> <td>1000</td> </tr> <tr> <td>10000</td> <td>5000000円以下</td> <td>5000</td> </tr> <tr> <td>10000</td> <td>30000000円以下</td> <td>10000</td> </tr> <tr> <td>10000</td> <td>50000000円以下</td> <td>50000</td> </tr> <tr> <td>10000</td> <td>50000000円超</td> <td>100000</td> </tr> <tr> <td>10003</td> <td>1000円以下</td> <td>0.1</td> </tr> <tr> <td>10003</td> <td>3000円以下</td> <td>0.5</td> </tr> <tr> <td>10003</td> <td>10000円以下</td> <td>1</td> </tr> <tr> <td>10003</td> <td>30000円以下</td> <td>5</td> </tr> <tr> <td>10003</td> <td>100000円以下</td> <td>10</td> </tr> <tr> <td>10003</td> <td>300000円以下</td> <td>50</td> </tr> <tr> <td>10003</td> <td>1000000円以下</td> <td>100</td> </tr> <tr> <td>10003</td> <td>3000000円以下</td> <td>500</td> </tr> <tr> <td>10003</td> <td>10000000円以下</td> <td>1000</td> </tr> <tr> <td>10003</td> <td>30000000円以下</td> <td>5000</td> </tr> <tr> <td>10003</td> <td>30000000円超</td> <td>10000</td> </tr> <tr> <td>10118</td> <td>-</td> <td>10</td> </tr> <tr> <td>10119</td> <td>-</td> <td>5</td> </tr> <tr> <td>10318</td> <td>100円以下</td> <td>1</td> </tr> <tr> <td>10318</td> <td>1000円以下</td> <td>5</td> </tr> <tr> <td>10318</td> <td>1000円超</td> <td>10</td> </tr> <tr> <td>10706</td> <td>-</td> <td>0.25</td> </tr> <tr> <td>10718</td> <td>-</td> <td>0.5</td> </tr> <tr> <td>12122</td> <td>-</td> <td>5</td> </tr> <tr> <td>14473</td> <td>-</td> <td>1</td> </tr> <tr> <td>14515</td> <td>-</td> <td>0.05</td> </tr> <tr> <td>15411</td> <td>-</td> <td>1</td> </tr> <tr> <td>15569</td> <td>-</td> <td>0.5</td> </tr> <tr> <td>17163</td> <td>-</td> <td>0.5</td> </tr> </tbody> </table>
49
+ attr_accessor :price_range_group
50
+
51
+ # 一般信用買建フラグ<br>※trueのとき、一般信用(長期)または一般信用(デイトレ)が買建可能<br>※株式銘柄の場合のみ
52
+ attr_accessor :kc_margin_buy
53
+
54
+ # 一般信用売建フラグ<br>※trueのとき、一般信用(長期)または一般信用(デイトレ)が売建可能<br>※株式銘柄の場合のみ
55
+ attr_accessor :kc_margin_sell
56
+
57
+ # 制度信用買建フラグ<br>※trueのとき制度信用買建可能<br>※株式銘柄の場合のみ
58
+ attr_accessor :margin_buy
59
+
60
+ # 制度信用売建フラグ<br>※trueのとき制度信用売建可能<br>※株式銘柄の場合のみ
61
+ attr_accessor :margin_sell
62
+
63
+ # 値幅上限<br>※株式・先物・オプション銘柄の場合のみ
64
+ attr_accessor :upper_limit
65
+
66
+ # 値幅下限<br>※株式・先物・オプション銘柄の場合のみ
67
+ attr_accessor :lower_limit
68
+
69
+ # 原資産コード<br>※先物・オプション銘柄の場合のみ <table> <thead> <tr> <th>定義値</th> <th>説明</th> </tr> </thead> <tbody> <tr> <td>NK225</td> <td>日経225</td> </tr> <tr> <td>NK300</td> <td>日経300</td> </tr> <tr> <td>GROWTH</td> <td>グロース250先物</td> </tr> <tr> <td>JPX400</td> <td>JPX日経400</td> </tr> <tr> <td>TOPIX</td> <td>TOPIX</td> </tr> <tr> <td>NKVI</td> <td>日経平均VI</td> </tr> <tr> <td>DJIA</td> <td>NYダウ</td> </tr> <tr> <td>TSEREITINDEX</td> <td>東証REIT指数</td> </tr> <tr> <td>TOPIXCORE30</td> <td>TOPIX Core30</td> </tr> </tbody> </table>
70
+ attr_accessor :underlyer
71
+
72
+ # 限月-年月<br>※「限月-年月」は「年(yyyy)/月(MM)」で表示します。<br>※先物・オプション銘柄の場合のみ
73
+ attr_accessor :deriv_month
74
+
75
+ # 取引開始日<br>※先物・オプション銘柄の場合のみ
76
+ attr_accessor :trade_start
77
+
78
+ # 取引終了日<br>※先物・オプション銘柄の場合のみ
79
+ attr_accessor :trade_end
80
+
81
+ # 権利行使価格<br>※オプション銘柄の場合のみ
82
+ attr_accessor :strike_price
83
+
84
+ # プット/コール区分<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> </tbody> </table>
85
+ attr_accessor :put_or_call
86
+
87
+ # 清算値<br>※先物銘柄の場合のみ<br>追加情報出力フラグ:falseの場合、null
88
+ attr_accessor :clearing_price
89
+
90
+ # Attribute mapping from ruby-style variable name to JSON key.
91
+ def self.attribute_map
92
+ {
93
+ :'symbol' => :'Symbol',
94
+ :'symbol_name' => :'SymbolName',
95
+ :'display_name' => :'DisplayName',
96
+ :'exchange' => :'Exchange',
97
+ :'exchange_name' => :'ExchangeName',
98
+ :'bis_category' => :'BisCategory',
99
+ :'total_market_value' => :'TotalMarketValue',
100
+ :'total_stocks' => :'TotalStocks',
101
+ :'trading_unit' => :'TradingUnit',
102
+ :'fiscal_year_end_basic' => :'FiscalYearEndBasic',
103
+ :'price_range_group' => :'PriceRangeGroup',
104
+ :'kc_margin_buy' => :'KCMarginBuy',
105
+ :'kc_margin_sell' => :'KCMarginSell',
106
+ :'margin_buy' => :'MarginBuy',
107
+ :'margin_sell' => :'MarginSell',
108
+ :'upper_limit' => :'UpperLimit',
109
+ :'lower_limit' => :'LowerLimit',
110
+ :'underlyer' => :'Underlyer',
111
+ :'deriv_month' => :'DerivMonth',
112
+ :'trade_start' => :'TradeStart',
113
+ :'trade_end' => :'TradeEnd',
114
+ :'strike_price' => :'StrikePrice',
115
+ :'put_or_call' => :'PutOrCall',
116
+ :'clearing_price' => :'ClearingPrice'
117
+ }
118
+ end
119
+
120
+ # Returns all the JSON keys this model knows about
121
+ def self.acceptable_attributes
122
+ attribute_map.values
123
+ end
124
+
125
+ # Attribute type mapping.
126
+ def self.openapi_types
127
+ {
128
+ :'symbol' => :'String',
129
+ :'symbol_name' => :'String',
130
+ :'display_name' => :'String',
131
+ :'exchange' => :'Integer',
132
+ :'exchange_name' => :'String',
133
+ :'bis_category' => :'String',
134
+ :'total_market_value' => :'Float',
135
+ :'total_stocks' => :'Float',
136
+ :'trading_unit' => :'Float',
137
+ :'fiscal_year_end_basic' => :'Integer',
138
+ :'price_range_group' => :'String',
139
+ :'kc_margin_buy' => :'Boolean',
140
+ :'kc_margin_sell' => :'Boolean',
141
+ :'margin_buy' => :'Boolean',
142
+ :'margin_sell' => :'Boolean',
143
+ :'upper_limit' => :'Float',
144
+ :'lower_limit' => :'Float',
145
+ :'underlyer' => :'String',
146
+ :'deriv_month' => :'String',
147
+ :'trade_start' => :'Integer',
148
+ :'trade_end' => :'Integer',
149
+ :'strike_price' => :'Float',
150
+ :'put_or_call' => :'Integer',
151
+ :'clearing_price' => :'Float'
152
+ }
153
+ end
154
+
155
+ # List of attributes with nullable: true
156
+ def self.openapi_nullable
157
+ Set.new([
158
+ ])
159
+ end
160
+
161
+ # Initializes the object
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ def initialize(attributes = {})
164
+ if (!attributes.is_a?(Hash))
165
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KabustationClient::SymbolSuccess` initialize method"
166
+ end
167
+
168
+ # check to see if the attribute exists and convert string to symbol for hash key
169
+ attributes = attributes.each_with_object({}) { |(k, v), h|
170
+ if (!self.class.attribute_map.key?(k.to_sym))
171
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KabustationClient::SymbolSuccess`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
172
+ end
173
+ h[k.to_sym] = v
174
+ }
175
+
176
+ if attributes.key?(:'symbol')
177
+ self.symbol = attributes[:'symbol']
178
+ end
179
+
180
+ if attributes.key?(:'symbol_name')
181
+ self.symbol_name = attributes[:'symbol_name']
182
+ end
183
+
184
+ if attributes.key?(:'display_name')
185
+ self.display_name = attributes[:'display_name']
186
+ end
187
+
188
+ if attributes.key?(:'exchange')
189
+ self.exchange = attributes[:'exchange']
190
+ end
191
+
192
+ if attributes.key?(:'exchange_name')
193
+ self.exchange_name = attributes[:'exchange_name']
194
+ end
195
+
196
+ if attributes.key?(:'bis_category')
197
+ self.bis_category = attributes[:'bis_category']
198
+ end
199
+
200
+ if attributes.key?(:'total_market_value')
201
+ self.total_market_value = attributes[:'total_market_value']
202
+ end
203
+
204
+ if attributes.key?(:'total_stocks')
205
+ self.total_stocks = attributes[:'total_stocks']
206
+ end
207
+
208
+ if attributes.key?(:'trading_unit')
209
+ self.trading_unit = attributes[:'trading_unit']
210
+ end
211
+
212
+ if attributes.key?(:'fiscal_year_end_basic')
213
+ self.fiscal_year_end_basic = attributes[:'fiscal_year_end_basic']
214
+ end
215
+
216
+ if attributes.key?(:'price_range_group')
217
+ self.price_range_group = attributes[:'price_range_group']
218
+ end
219
+
220
+ if attributes.key?(:'kc_margin_buy')
221
+ self.kc_margin_buy = attributes[:'kc_margin_buy']
222
+ end
223
+
224
+ if attributes.key?(:'kc_margin_sell')
225
+ self.kc_margin_sell = attributes[:'kc_margin_sell']
226
+ end
227
+
228
+ if attributes.key?(:'margin_buy')
229
+ self.margin_buy = attributes[:'margin_buy']
230
+ end
231
+
232
+ if attributes.key?(:'margin_sell')
233
+ self.margin_sell = attributes[:'margin_sell']
234
+ end
235
+
236
+ if attributes.key?(:'upper_limit')
237
+ self.upper_limit = attributes[:'upper_limit']
238
+ end
239
+
240
+ if attributes.key?(:'lower_limit')
241
+ self.lower_limit = attributes[:'lower_limit']
242
+ end
243
+
244
+ if attributes.key?(:'underlyer')
245
+ self.underlyer = attributes[:'underlyer']
246
+ end
247
+
248
+ if attributes.key?(:'deriv_month')
249
+ self.deriv_month = attributes[:'deriv_month']
250
+ end
251
+
252
+ if attributes.key?(:'trade_start')
253
+ self.trade_start = attributes[:'trade_start']
254
+ end
255
+
256
+ if attributes.key?(:'trade_end')
257
+ self.trade_end = attributes[:'trade_end']
258
+ end
259
+
260
+ if attributes.key?(:'strike_price')
261
+ self.strike_price = attributes[:'strike_price']
262
+ end
263
+
264
+ if attributes.key?(:'put_or_call')
265
+ self.put_or_call = attributes[:'put_or_call']
266
+ end
267
+
268
+ if attributes.key?(:'clearing_price')
269
+ self.clearing_price = attributes[:'clearing_price']
270
+ end
271
+ end
272
+
273
+ # Show invalid properties with the reasons. Usually used together with valid?
274
+ # @return Array for valid properties with the reasons
275
+ def list_invalid_properties
276
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
277
+ invalid_properties = Array.new
278
+ invalid_properties
279
+ end
280
+
281
+ # Check to see if the all the properties in the model are valid
282
+ # @return true if the model is valid
283
+ def valid?
284
+ warn '[DEPRECATED] the `valid?` method is obsolete'
285
+ true
286
+ end
287
+
288
+ # Checks equality by comparing each attribute.
289
+ # @param [Object] Object to be compared
290
+ def ==(o)
291
+ return true if self.equal?(o)
292
+ self.class == o.class &&
293
+ symbol == o.symbol &&
294
+ symbol_name == o.symbol_name &&
295
+ display_name == o.display_name &&
296
+ exchange == o.exchange &&
297
+ exchange_name == o.exchange_name &&
298
+ bis_category == o.bis_category &&
299
+ total_market_value == o.total_market_value &&
300
+ total_stocks == o.total_stocks &&
301
+ trading_unit == o.trading_unit &&
302
+ fiscal_year_end_basic == o.fiscal_year_end_basic &&
303
+ price_range_group == o.price_range_group &&
304
+ kc_margin_buy == o.kc_margin_buy &&
305
+ kc_margin_sell == o.kc_margin_sell &&
306
+ margin_buy == o.margin_buy &&
307
+ margin_sell == o.margin_sell &&
308
+ upper_limit == o.upper_limit &&
309
+ lower_limit == o.lower_limit &&
310
+ underlyer == o.underlyer &&
311
+ deriv_month == o.deriv_month &&
312
+ trade_start == o.trade_start &&
313
+ trade_end == o.trade_end &&
314
+ strike_price == o.strike_price &&
315
+ put_or_call == o.put_or_call &&
316
+ clearing_price == o.clearing_price
317
+ end
318
+
319
+ # @see the `==` method
320
+ # @param [Object] Object to be compared
321
+ def eql?(o)
322
+ self == o
323
+ end
324
+
325
+ # Calculates hash code according to all attributes.
326
+ # @return [Integer] Hash code
327
+ def hash
328
+ [symbol, symbol_name, display_name, exchange, exchange_name, bis_category, total_market_value, total_stocks, trading_unit, fiscal_year_end_basic, price_range_group, kc_margin_buy, kc_margin_sell, margin_buy, margin_sell, upper_limit, lower_limit, underlyer, deriv_month, trade_start, trade_end, strike_price, put_or_call, clearing_price].hash
329
+ end
330
+
331
+ # Builds the object from hash
332
+ # @param [Hash] attributes Model attributes in the form of hash
333
+ # @return [Object] Returns the model itself
334
+ def self.build_from_hash(attributes)
335
+ return nil unless attributes.is_a?(Hash)
336
+ attributes = attributes.transform_keys(&:to_sym)
337
+ transformed_hash = {}
338
+ openapi_types.each_pair do |key, type|
339
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
340
+ transformed_hash["#{key}"] = nil
341
+ elsif type =~ /\AArray<(.*)>/i
342
+ # check to ensure the input is an array given that the attribute
343
+ # is documented as an array but the input is not
344
+ if attributes[attribute_map[key]].is_a?(Array)
345
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
346
+ end
347
+ elsif !attributes[attribute_map[key]].nil?
348
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
349
+ end
350
+ end
351
+ new(transformed_hash)
352
+ end
353
+
354
+ # Deserializes the data based on type
355
+ # @param string type Data type
356
+ # @param string value Value to be deserialized
357
+ # @return [Object] Deserialized data
358
+ def self._deserialize(type, value)
359
+ case type.to_sym
360
+ when :Time
361
+ Time.parse(value)
362
+ when :Date
363
+ Date.parse(value)
364
+ when :String
365
+ value.to_s
366
+ when :Integer
367
+ value.to_i
368
+ when :Float
369
+ value.to_f
370
+ when :Boolean
371
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
372
+ true
373
+ else
374
+ false
375
+ end
376
+ when :Object
377
+ # generic object (usually a Hash), return directly
378
+ value
379
+ when /\AArray<(?<inner_type>.+)>\z/
380
+ inner_type = Regexp.last_match[:inner_type]
381
+ value.map { |v| _deserialize(inner_type, v) }
382
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
383
+ k_type = Regexp.last_match[:k_type]
384
+ v_type = Regexp.last_match[:v_type]
385
+ {}.tap do |hash|
386
+ value.each do |k, v|
387
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
388
+ end
389
+ end
390
+ else # model
391
+ # models (e.g. Pet) or oneOf
392
+ klass = KabustationClient.const_get(type)
393
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
394
+ end
395
+ end
396
+
397
+ # Returns the string representation of the object
398
+ # @return [String] String presentation of the object
399
+ def to_s
400
+ to_hash.to_s
401
+ end
402
+
403
+ # to_body is an alias to to_hash (backward compatibility)
404
+ # @return [Hash] Returns the object in the form of hash
405
+ def to_body
406
+ to_hash
407
+ end
408
+
409
+ # Returns the object in the form of hash
410
+ # @return [Hash] Returns the object in the form of hash
411
+ def to_hash
412
+ hash = {}
413
+ self.class.attribute_map.each_pair do |attr, param|
414
+ value = self.send(attr)
415
+ if value.nil?
416
+ is_nullable = self.class.openapi_nullable.include?(attr)
417
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
418
+ end
419
+
420
+ hash[param] = _to_hash(value)
421
+ end
422
+ hash
423
+ end
424
+
425
+ # Outputs non-array value in the form of hash
426
+ # For object, use to_hash. Otherwise, just return the value
427
+ # @param [Object] value Any valid value
428
+ # @return [Hash] Returns the value in the form of hash
429
+ def _to_hash(value)
430
+ if value.is_a?(Array)
431
+ value.compact.map { |v| _to_hash(v) }
432
+ elsif value.is_a?(Hash)
433
+ {}.tap do |hash|
434
+ value.each { |k, v| hash[k] = _to_hash(v) }
435
+ end
436
+ elsif value.respond_to? :to_hash
437
+ value.to_hash
438
+ else
439
+ value
440
+ end
441
+ end
442
+
443
+ end
444
+
445
+ end
@@ -0,0 +1,225 @@
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 TokenSuccess
18
+ # 結果コード<br>0が成功。それ以外はエラーコード。
19
+ attr_accessor :result_code
20
+
21
+ # APIトークン
22
+ attr_accessor :token
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'result_code' => :'ResultCode',
28
+ :'token' => :'Token'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'result_code' => :'Integer',
41
+ :'token' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KabustationClient::TokenSuccess` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KabustationClient::TokenSuccess`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'result_code')
67
+ self.result_code = attributes[:'result_code']
68
+ end
69
+
70
+ if attributes.key?(:'token')
71
+ self.token = attributes[:'token']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ result_code == o.result_code &&
96
+ token == o.token
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [result_code, token].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ attributes = attributes.transform_keys(&:to_sym)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
121
+ elsif type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
126
+ end
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
129
+ end
130
+ end
131
+ new(transformed_hash)
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def self._deserialize(type, value)
139
+ case type.to_sym
140
+ when :Time
141
+ Time.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :Boolean
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ # models (e.g. Pet) or oneOf
172
+ klass = KabustationClient.const_get(type)
173
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
174
+ end
175
+ end
176
+
177
+ # Returns the string representation of the object
178
+ # @return [String] String presentation of the object
179
+ def to_s
180
+ to_hash.to_s
181
+ end
182
+
183
+ # to_body is an alias to to_hash (backward compatibility)
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_body
186
+ to_hash
187
+ end
188
+
189
+ # Returns the object in the form of hash
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_hash
192
+ hash = {}
193
+ self.class.attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ # Outputs non-array value in the form of hash
206
+ # For object, use to_hash. Otherwise, just return the value
207
+ # @param [Object] value Any valid value
208
+ # @return [Hash] Returns the value in the form of hash
209
+ def _to_hash(value)
210
+ if value.is_a?(Array)
211
+ value.compact.map { |v| _to_hash(v) }
212
+ elsif value.is_a?(Hash)
213
+ {}.tap do |hash|
214
+ value.each { |k, v| hash[k] = _to_hash(v) }
215
+ end
216
+ elsif value.respond_to? :to_hash
217
+ value.to_hash
218
+ else
219
+ value
220
+ end
221
+ end
222
+
223
+ end
224
+
225
+ end