indexea_client 0.0.9

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.
Files changed (301) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +3413 -0
  4. data/Rakefile +8 -0
  5. data/docs/AccountApi.md +685 -0
  6. data/docs/AccountBean.md +27 -0
  7. data/docs/AccountPasswdBody.md +8 -0
  8. data/docs/AccountPortraitBody.md +7 -0
  9. data/docs/AccountProfileBody.md +8 -0
  10. data/docs/AccountResetpwdBody.md +9 -0
  11. data/docs/AccountSigninBody.md +9 -0
  12. data/docs/AccountSignupBody.md +10 -0
  13. data/docs/AccountsFeedbackBody.md +8 -0
  14. data/docs/AccountsMessageBody.md +8 -0
  15. data/docs/AnalyzeObject.md +8 -0
  16. data/docs/AnalyzeToken.md +11 -0
  17. data/docs/AppBean.md +23 -0
  18. data/docs/AppCompanyBody.md +22 -0
  19. data/docs/AppIndexBody.md +7 -0
  20. data/docs/AppLogAccount.md +9 -0
  21. data/docs/AppLogBean.md +19 -0
  22. data/docs/AppLogsBean.md +9 -0
  23. data/docs/AppMentorBean.md +14 -0
  24. data/docs/AppOauthBody.md +7 -0
  25. data/docs/AppOauthBody1.md +7 -0
  26. data/docs/AppOauthresetsecretBody.md +7 -0
  27. data/docs/AppTokensBody.md +7 -0
  28. data/docs/AppTokensBody1.md +7 -0
  29. data/docs/AppWidgetBody.md +7 -0
  30. data/docs/AppsApi.md +1843 -0
  31. data/docs/AppsAppBody.md +8 -0
  32. data/docs/AppsBody.md +8 -0
  33. data/docs/AutoCompleteItem.md +9 -0
  34. data/docs/BlacklistBean.md +12 -0
  35. data/docs/Bulletin.md +15 -0
  36. data/docs/CompanyBean.md +24 -0
  37. data/docs/ContactForm.md +11 -0
  38. data/docs/CrawlerLog.md +14 -0
  39. data/docs/CrawlerLogs.md +8 -0
  40. data/docs/CrawlerTask.md +16 -0
  41. data/docs/FieldsApi.md +215 -0
  42. data/docs/GlobalApi.md +258 -0
  43. data/docs/GlobalOptionForm.md +8 -0
  44. data/docs/IndexBean.md +26 -0
  45. data/docs/IndexFieldBean.md +8 -0
  46. data/docs/IndexForm.md +15 -0
  47. data/docs/IndexRebuildForm.md +12 -0
  48. data/docs/IndexSettings.md +10 -0
  49. data/docs/IndexSettingsBody.md +7 -0
  50. data/docs/IndexStatBean.md +14 -0
  51. data/docs/IndexSynonymsflushBody.md +7 -0
  52. data/docs/IndexTask.md +13 -0
  53. data/docs/IndexTemplate.md +17 -0
  54. data/docs/IndexTemplates.md +8 -0
  55. data/docs/IndexUploadBody.md +7 -0
  56. data/docs/IndicesApi.md +1620 -0
  57. data/docs/IntelligentMapping.md +8 -0
  58. data/docs/KeywordBindingBean.md +14 -0
  59. data/docs/MentorForm.md +8 -0
  60. data/docs/Message.md +18 -0
  61. data/docs/MessageApi.md +262 -0
  62. data/docs/Messages.md +8 -0
  63. data/docs/OauthAppBean.md +20 -0
  64. data/docs/OpenidBean.md +10 -0
  65. data/docs/OptionForm.md +10 -0
  66. data/docs/OrdersIdentBody.md +7 -0
  67. data/docs/PayResult.md +9 -0
  68. data/docs/PaymentApi.md +788 -0
  69. data/docs/PaymentInvoice.md +15 -0
  70. data/docs/PaymentOrder.md +25 -0
  71. data/docs/PaymentRecord.md +13 -0
  72. data/docs/PaymentService.md +12 -0
  73. data/docs/QueriesApi.md +1821 -0
  74. data/docs/QueryActionBean.md +27 -0
  75. data/docs/QueryBean.md +22 -0
  76. data/docs/QueryForm.md +15 -0
  77. data/docs/QueryNode.md +10 -0
  78. data/docs/QuerySortField.md +9 -0
  79. data/docs/QueryVariableBean.md +17 -0
  80. data/docs/RecommendApi.md +365 -0
  81. data/docs/RecommendBean.md +18 -0
  82. data/docs/RecordFilter.md +10 -0
  83. data/docs/RecordsApi.md +286 -0
  84. data/docs/SearchApi.md +646 -0
  85. data/docs/SearchEstimateResult.md +11 -0
  86. data/docs/SearchWord.md +8 -0
  87. data/docs/StatIndexBean.md +14 -0
  88. data/docs/StatsApi.md +245 -0
  89. data/docs/SynonymsBean.md +14 -0
  90. data/docs/TokenBean.md +12 -0
  91. data/docs/TriggerBean.md +13 -0
  92. data/docs/TriggerLogBean.md +15 -0
  93. data/docs/ValueOfField.md +8 -0
  94. data/docs/WidgetBean.md +21 -0
  95. data/docs/WidgetForm.md +13 -0
  96. data/docs/WidgetLogo.md +7 -0
  97. data/docs/WidgetLogoBody.md +7 -0
  98. data/docs/WidgetStatusForm.md +8 -0
  99. data/docs/WidgetsApi.md +573 -0
  100. data/git_push.sh +55 -0
  101. data/indexea_client.gemspec +38 -0
  102. data/lib/indexea_client/api/account_api.rb +846 -0
  103. data/lib/indexea_client/api/apps_api.rb +2271 -0
  104. data/lib/indexea_client/api/fields_api.rb +289 -0
  105. data/lib/indexea_client/api/global_api.rb +326 -0
  106. data/lib/indexea_client/api/indices_api.rb +2076 -0
  107. data/lib/indexea_client/api/message_api.rb +337 -0
  108. data/lib/indexea_client/api/payment_api.rb +975 -0
  109. data/lib/indexea_client/api/queries_api.rb +2320 -0
  110. data/lib/indexea_client/api/recommend_api.rb +461 -0
  111. data/lib/indexea_client/api/records_api.rb +375 -0
  112. data/lib/indexea_client/api/search_api.rb +892 -0
  113. data/lib/indexea_client/api/stats_api.rb +312 -0
  114. data/lib/indexea_client/api/widgets_api.rb +741 -0
  115. data/lib/indexea_client/api_client.rb +391 -0
  116. data/lib/indexea_client/api_error.rb +57 -0
  117. data/lib/indexea_client/configuration.rb +205 -0
  118. data/lib/indexea_client/models/account_bean.rb +396 -0
  119. data/lib/indexea_client/models/account_passwd_body.rb +227 -0
  120. data/lib/indexea_client/models/account_portrait_body.rb +206 -0
  121. data/lib/indexea_client/models/account_profile_body.rb +228 -0
  122. data/lib/indexea_client/models/account_resetpwd_body.rb +240 -0
  123. data/lib/indexea_client/models/account_signin_body.rb +237 -0
  124. data/lib/indexea_client/models/account_signup_body.rb +254 -0
  125. data/lib/indexea_client/models/accounts_feedback_body.rb +262 -0
  126. data/lib/indexea_client/models/accounts_message_body.rb +226 -0
  127. data/lib/indexea_client/models/analyze_object.rb +216 -0
  128. data/lib/indexea_client/models/analyze_token.rb +243 -0
  129. data/lib/indexea_client/models/app_bean.rb +360 -0
  130. data/lib/indexea_client/models/app_company_body.rb +357 -0
  131. data/lib/indexea_client/models/app_index_body.rb +212 -0
  132. data/lib/indexea_client/models/app_log_account.rb +224 -0
  133. data/lib/indexea_client/models/app_log_bean.rb +318 -0
  134. data/lib/indexea_client/models/app_logs_bean.rb +229 -0
  135. data/lib/indexea_client/models/app_mentor_bean.rb +277 -0
  136. data/lib/indexea_client/models/app_oauth_body.rb +206 -0
  137. data/lib/indexea_client/models/app_oauth_body_1.rb +212 -0
  138. data/lib/indexea_client/models/app_oauthresetsecret_body.rb +212 -0
  139. data/lib/indexea_client/models/app_tokens_body.rb +212 -0
  140. data/lib/indexea_client/models/app_tokens_body_1.rb +212 -0
  141. data/lib/indexea_client/models/app_widget_body.rb +212 -0
  142. data/lib/indexea_client/models/apps_app_body.rb +216 -0
  143. data/lib/indexea_client/models/apps_body.rb +221 -0
  144. data/lib/indexea_client/models/auto_complete_item.rb +224 -0
  145. data/lib/indexea_client/models/blacklist_bean.rb +258 -0
  146. data/lib/indexea_client/models/bulletin.rb +312 -0
  147. data/lib/indexea_client/models/company_bean.rb +378 -0
  148. data/lib/indexea_client/models/contact_form.rb +258 -0
  149. data/lib/indexea_client/models/crawler_log.rb +270 -0
  150. data/lib/indexea_client/models/crawler_logs.rb +217 -0
  151. data/lib/indexea_client/models/crawler_task.rb +288 -0
  152. data/lib/indexea_client/models/global_option_form.rb +218 -0
  153. data/lib/indexea_client/models/index_bean.rb +390 -0
  154. data/lib/indexea_client/models/index_field_bean.rb +217 -0
  155. data/lib/indexea_client/models/index_form.rb +283 -0
  156. data/lib/indexea_client/models/index_rebuild_form.rb +254 -0
  157. data/lib/indexea_client/models/index_settings.rb +234 -0
  158. data/lib/indexea_client/models/index_settings_body.rb +212 -0
  159. data/lib/indexea_client/models/index_stat_bean.rb +270 -0
  160. data/lib/indexea_client/models/index_synonymsflush_body.rb +212 -0
  161. data/lib/indexea_client/models/index_task.rb +261 -0
  162. data/lib/indexea_client/models/index_template.rb +299 -0
  163. data/lib/indexea_client/models/index_templates.rb +219 -0
  164. data/lib/indexea_client/models/index_upload_body.rb +208 -0
  165. data/lib/indexea_client/models/intelligent_mapping.rb +217 -0
  166. data/lib/indexea_client/models/keyword_binding_bean.rb +274 -0
  167. data/lib/indexea_client/models/mentor_form.rb +220 -0
  168. data/lib/indexea_client/models/message.rb +306 -0
  169. data/lib/indexea_client/models/messages.rb +217 -0
  170. data/lib/indexea_client/models/oauth_app_bean.rb +329 -0
  171. data/lib/indexea_client/models/openid_bean.rb +238 -0
  172. data/lib/indexea_client/models/option_form.rb +287 -0
  173. data/lib/indexea_client/models/orders_ident_body.rb +206 -0
  174. data/lib/indexea_client/models/pay_result.rb +258 -0
  175. data/lib/indexea_client/models/payment_invoice.rb +283 -0
  176. data/lib/indexea_client/models/payment_order.rb +412 -0
  177. data/lib/indexea_client/models/payment_record.rb +261 -0
  178. data/lib/indexea_client/models/payment_service.rb +258 -0
  179. data/lib/indexea_client/models/query_action_bean.rb +391 -0
  180. data/lib/indexea_client/models/query_bean.rb +348 -0
  181. data/lib/indexea_client/models/query_form.rb +285 -0
  182. data/lib/indexea_client/models/query_node.rb +234 -0
  183. data/lib/indexea_client/models/query_sort_field.rb +264 -0
  184. data/lib/indexea_client/models/query_variable_bean.rb +335 -0
  185. data/lib/indexea_client/models/recommend_bean.rb +318 -0
  186. data/lib/indexea_client/models/record_filter.rb +242 -0
  187. data/lib/indexea_client/models/search_estimate_result.rb +242 -0
  188. data/lib/indexea_client/models/search_word.rb +218 -0
  189. data/lib/indexea_client/models/stat_index_bean.rb +270 -0
  190. data/lib/indexea_client/models/synonyms_bean.rb +274 -0
  191. data/lib/indexea_client/models/token_bean.rb +252 -0
  192. data/lib/indexea_client/models/trigger_bean.rb +263 -0
  193. data/lib/indexea_client/models/trigger_log_bean.rb +279 -0
  194. data/lib/indexea_client/models/value_of_field.rb +217 -0
  195. data/lib/indexea_client/models/widget_bean.rb +387 -0
  196. data/lib/indexea_client/models/widget_form.rb +328 -0
  197. data/lib/indexea_client/models/widget_logo.rb +206 -0
  198. data/lib/indexea_client/models/widget_logo_body.rb +206 -0
  199. data/lib/indexea_client/models/widget_status_form.rb +223 -0
  200. data/lib/indexea_client/version.rb +14 -0
  201. data/lib/indexea_client.rb +133 -0
  202. data/spec/api/account_api_spec.rb +200 -0
  203. data/spec/api/apps_api_spec.rb +492 -0
  204. data/spec/api/fields_api_spec.rb +86 -0
  205. data/spec/api/global_api_spec.rb +98 -0
  206. data/spec/api/indices_api_spec.rb +434 -0
  207. data/spec/api/message_api_spec.rb +96 -0
  208. data/spec/api/payment_api_spec.rb +227 -0
  209. data/spec/api/queries_api_spec.rb +482 -0
  210. data/spec/api/recommend_api_spec.rb +125 -0
  211. data/spec/api/records_api_spec.rb +107 -0
  212. data/spec/api/search_api_spec.rb +220 -0
  213. data/spec/api/stats_api_spec.rb +99 -0
  214. data/spec/api/widgets_api_spec.rb +174 -0
  215. data/spec/api_client_spec.rb +225 -0
  216. data/spec/base_object_spec.rb +109 -0
  217. data/spec/configuration_spec.rb +41 -0
  218. data/spec/models/account_bean_spec.rb +160 -0
  219. data/spec/models/account_passwd_body_spec.rb +46 -0
  220. data/spec/models/account_portrait_body_spec.rb +40 -0
  221. data/spec/models/account_profile_body_spec.rb +46 -0
  222. data/spec/models/account_resetpwd_body_spec.rb +52 -0
  223. data/spec/models/account_signin_body_spec.rb +52 -0
  224. data/spec/models/account_signup_body_spec.rb +58 -0
  225. data/spec/models/accounts_feedback_body_spec.rb +50 -0
  226. data/spec/models/accounts_message_body_spec.rb +46 -0
  227. data/spec/models/analyze_object_spec.rb +46 -0
  228. data/spec/models/analyze_token_spec.rb +64 -0
  229. data/spec/models/app_bean_spec.rb +136 -0
  230. data/spec/models/app_company_body_spec.rb +130 -0
  231. data/spec/models/app_index_body_spec.rb +40 -0
  232. data/spec/models/app_log_account_spec.rb +52 -0
  233. data/spec/models/app_log_bean_spec.rb +112 -0
  234. data/spec/models/app_logs_bean_spec.rb +52 -0
  235. data/spec/models/app_mentor_bean_spec.rb +82 -0
  236. data/spec/models/app_oauth_body_1_spec.rb +40 -0
  237. data/spec/models/app_oauth_body_spec.rb +40 -0
  238. data/spec/models/app_oauthresetsecret_body_spec.rb +40 -0
  239. data/spec/models/app_tokens_body_1_spec.rb +40 -0
  240. data/spec/models/app_tokens_body_spec.rb +40 -0
  241. data/spec/models/app_widget_body_spec.rb +40 -0
  242. data/spec/models/apps_app_body_spec.rb +46 -0
  243. data/spec/models/apps_body_spec.rb +46 -0
  244. data/spec/models/auto_complete_item_spec.rb +52 -0
  245. data/spec/models/blacklist_bean_spec.rb +70 -0
  246. data/spec/models/bulletin_spec.rb +92 -0
  247. data/spec/models/company_bean_spec.rb +142 -0
  248. data/spec/models/contact_form_spec.rb +64 -0
  249. data/spec/models/crawler_log_spec.rb +82 -0
  250. data/spec/models/crawler_logs_spec.rb +46 -0
  251. data/spec/models/crawler_task_spec.rb +94 -0
  252. data/spec/models/global_option_form_spec.rb +46 -0
  253. data/spec/models/index_bean_spec.rb +154 -0
  254. data/spec/models/index_field_bean_spec.rb +46 -0
  255. data/spec/models/index_form_spec.rb +88 -0
  256. data/spec/models/index_rebuild_form_spec.rb +70 -0
  257. data/spec/models/index_settings_body_spec.rb +40 -0
  258. data/spec/models/index_settings_spec.rb +58 -0
  259. data/spec/models/index_stat_bean_spec.rb +82 -0
  260. data/spec/models/index_synonymsflush_body_spec.rb +40 -0
  261. data/spec/models/index_task_spec.rb +76 -0
  262. data/spec/models/index_template_spec.rb +100 -0
  263. data/spec/models/index_templates_spec.rb +46 -0
  264. data/spec/models/index_upload_body_spec.rb +40 -0
  265. data/spec/models/intelligent_mapping_spec.rb +46 -0
  266. data/spec/models/keyword_binding_bean_spec.rb +82 -0
  267. data/spec/models/mentor_form_spec.rb +46 -0
  268. data/spec/models/message_spec.rb +106 -0
  269. data/spec/models/messages_spec.rb +46 -0
  270. data/spec/models/oauth_app_bean_spec.rb +118 -0
  271. data/spec/models/openid_bean_spec.rb +58 -0
  272. data/spec/models/option_form_spec.rb +62 -0
  273. data/spec/models/orders_ident_body_spec.rb +40 -0
  274. data/spec/models/pay_result_spec.rb +56 -0
  275. data/spec/models/payment_invoice_spec.rb +88 -0
  276. data/spec/models/payment_order_spec.rb +152 -0
  277. data/spec/models/payment_record_spec.rb +76 -0
  278. data/spec/models/payment_service_spec.rb +70 -0
  279. data/spec/models/query_action_bean_spec.rb +160 -0
  280. data/spec/models/query_bean_spec.rb +130 -0
  281. data/spec/models/query_form_spec.rb +88 -0
  282. data/spec/models/query_node_spec.rb +58 -0
  283. data/spec/models/query_sort_field_spec.rb +56 -0
  284. data/spec/models/query_variable_bean_spec.rb +104 -0
  285. data/spec/models/recommend_bean_spec.rb +106 -0
  286. data/spec/models/record_filter_spec.rb +58 -0
  287. data/spec/models/search_estimate_result_spec.rb +64 -0
  288. data/spec/models/search_word_spec.rb +46 -0
  289. data/spec/models/stat_index_bean_spec.rb +82 -0
  290. data/spec/models/synonyms_bean_spec.rb +82 -0
  291. data/spec/models/token_bean_spec.rb +70 -0
  292. data/spec/models/trigger_bean_spec.rb +76 -0
  293. data/spec/models/trigger_log_bean_spec.rb +88 -0
  294. data/spec/models/value_of_field_spec.rb +46 -0
  295. data/spec/models/widget_bean_spec.rb +132 -0
  296. data/spec/models/widget_form_spec.rb +84 -0
  297. data/spec/models/widget_logo_body_spec.rb +40 -0
  298. data/spec/models/widget_logo_spec.rb +40 -0
  299. data/spec/models/widget_status_form_spec.rb +46 -0
  300. data/spec/spec_helper.rb +110 -0
  301. metadata +501 -0
@@ -0,0 +1,975 @@
1
+ =begin
2
+ #Indexea OpenAPI
3
+
4
+ #OpenAPI of Indexea
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: indexea.com@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.54
10
+ =end
11
+
12
+ module IndexeaClient
13
+ class PaymentApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # 接受支付宝的支付结果
20
+ # @param [Hash] opts the optional parameters
21
+ # @return [nil]
22
+ def payment_alipay(opts = {})
23
+ payment_alipay_with_http_info(opts)
24
+ nil
25
+ end
26
+
27
+ # 接受支付宝的支付结果
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
30
+ def payment_alipay_with_http_info(opts = {})
31
+ if @api_client.config.debugging
32
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_alipay ...'
33
+ end
34
+ # resource path
35
+ local_var_path = '/payment/alipay'
36
+
37
+ # query parameters
38
+ query_params = opts[:query_params] || {}
39
+
40
+ # header parameters
41
+ header_params = opts[:header_params] || {}
42
+
43
+ # form parameters
44
+ form_params = opts[:form_params] || {}
45
+
46
+ # http body (model)
47
+ post_body = opts[:body]
48
+
49
+ return_type = opts[:return_type]
50
+
51
+ auth_names = opts[:auth_names] || []
52
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
53
+ :header_params => header_params,
54
+ :query_params => query_params,
55
+ :form_params => form_params,
56
+ :body => post_body,
57
+ :auth_names => auth_names,
58
+ :return_type => return_type)
59
+
60
+ if @api_client.config.debugging
61
+ @api_client.config.logger.debug "API called: PaymentApi#payment_alipay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
62
+ end
63
+ return data, status_code, headers
64
+ end
65
+ # 支付宝平台支付完毕后调整到该接口
66
+ # @param [Hash] opts the optional parameters
67
+ # @return [nil]
68
+ def payment_alipay_return(opts = {})
69
+ payment_alipay_return_with_http_info(opts)
70
+ nil
71
+ end
72
+
73
+ # 支付宝平台支付完毕后调整到该接口
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
76
+ def payment_alipay_return_with_http_info(opts = {})
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_alipay_return ...'
79
+ end
80
+ # resource path
81
+ local_var_path = '/payment/alipay'
82
+
83
+ # query parameters
84
+ query_params = opts[:query_params] || {}
85
+
86
+ # header parameters
87
+ header_params = opts[:header_params] || {}
88
+
89
+ # form parameters
90
+ form_params = opts[:form_params] || {}
91
+
92
+ # http body (model)
93
+ post_body = opts[:body]
94
+
95
+ return_type = opts[:return_type]
96
+
97
+ auth_names = opts[:auth_names] || []
98
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
99
+ :header_params => header_params,
100
+ :query_params => query_params,
101
+ :form_params => form_params,
102
+ :body => post_body,
103
+ :auth_names => auth_names,
104
+ :return_type => return_type)
105
+
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "API called: PaymentApi#payment_alipay_return\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
+ end
109
+ return data, status_code, headers
110
+ end
111
+ # 申请发票
112
+ # @param body 申请开发票的订单编号列表
113
+ # @param type 发票类型
114
+ # @param app 应用标识
115
+ # @param [Hash] opts the optional parameters
116
+ # @return [PaymentInvoice]
117
+ def payment_apply_invoice(body, type, app, opts = {})
118
+ data, _status_code, _headers = payment_apply_invoice_with_http_info(body, type, app, opts)
119
+ data
120
+ end
121
+
122
+ # 申请发票
123
+ # @param body 申请开发票的订单编号列表
124
+ # @param type 发票类型
125
+ # @param app 应用标识
126
+ # @param [Hash] opts the optional parameters
127
+ # @return [Array<(PaymentInvoice, Integer, Hash)>] PaymentInvoice data, response status code and response headers
128
+ def payment_apply_invoice_with_http_info(body, type, app, opts = {})
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_apply_invoice ...'
131
+ end
132
+ # verify the required parameter 'body' is set
133
+ if @api_client.config.client_side_validation && body.nil?
134
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.payment_apply_invoice"
135
+ end
136
+ # verify the required parameter 'type' is set
137
+ if @api_client.config.client_side_validation && type.nil?
138
+ fail ArgumentError, "Missing the required parameter 'type' when calling PaymentApi.payment_apply_invoice"
139
+ end
140
+ # verify the required parameter 'app' is set
141
+ if @api_client.config.client_side_validation && app.nil?
142
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_apply_invoice"
143
+ end
144
+ # resource path
145
+ local_var_path = '/payment/{app}/invoices'.sub('{' + 'app' + '}', app.to_s)
146
+
147
+ # query parameters
148
+ query_params = opts[:query_params] || {}
149
+ query_params[:'type'] = type
150
+
151
+ # header parameters
152
+ header_params = opts[:header_params] || {}
153
+ # HTTP header 'Accept' (if needed)
154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
155
+ # HTTP header 'Content-Type'
156
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
157
+
158
+ # form parameters
159
+ form_params = opts[:form_params] || {}
160
+
161
+ # http body (model)
162
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
163
+
164
+ return_type = opts[:return_type] || 'PaymentInvoice'
165
+
166
+ auth_names = opts[:auth_names] || ['TokenAuth']
167
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
168
+ :header_params => header_params,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body,
172
+ :auth_names => auth_names,
173
+ :return_type => return_type)
174
+
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug "API called: PaymentApi#payment_apply_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
177
+ end
178
+ return data, status_code, headers
179
+ end
180
+ # 支付订单
181
+ # 选择支付方式,开始支付
182
+ # @param app 应用标识
183
+ # @param ident 订单号
184
+ # @param type 支付方式
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [PayResult]
187
+ def payment_begin_pay(app, ident, type, opts = {})
188
+ data, _status_code, _headers = payment_begin_pay_with_http_info(app, ident, type, opts)
189
+ data
190
+ end
191
+
192
+ # 支付订单
193
+ # 选择支付方式,开始支付
194
+ # @param app 应用标识
195
+ # @param ident 订单号
196
+ # @param type 支付方式
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [Array<(PayResult, Integer, Hash)>] PayResult data, response status code and response headers
199
+ def payment_begin_pay_with_http_info(app, ident, type, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_begin_pay ...'
202
+ end
203
+ # verify the required parameter 'app' is set
204
+ if @api_client.config.client_side_validation && app.nil?
205
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_begin_pay"
206
+ end
207
+ # verify the required parameter 'ident' is set
208
+ if @api_client.config.client_side_validation && ident.nil?
209
+ fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_begin_pay"
210
+ end
211
+ # verify the required parameter 'type' is set
212
+ if @api_client.config.client_side_validation && type.nil?
213
+ fail ArgumentError, "Missing the required parameter 'type' when calling PaymentApi.payment_begin_pay"
214
+ end
215
+ # verify enum value
216
+ if @api_client.config.client_side_validation && !['none', 'alipay', 'wepay', 'bank', 'paypal', 'stripe'].include?(type)
217
+ fail ArgumentError, "invalid value for 'type', must be one of none, alipay, wepay, bank, paypal, stripe"
218
+ end
219
+ # resource path
220
+ local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)
221
+
222
+ # query parameters
223
+ query_params = opts[:query_params] || {}
224
+ query_params[:'type'] = type
225
+
226
+ # header parameters
227
+ header_params = opts[:header_params] || {}
228
+ # HTTP header 'Accept' (if needed)
229
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
230
+
231
+ # form parameters
232
+ form_params = opts[:form_params] || {}
233
+
234
+ # http body (model)
235
+ post_body = opts[:body]
236
+
237
+ return_type = opts[:return_type] || 'PayResult'
238
+
239
+ auth_names = opts[:auth_names] || ['TokenAuth']
240
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type)
247
+
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: PaymentApi#payment_begin_pay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+ # 下单购买
254
+ # @param body
255
+ # @param app 应用标识
256
+ # @param [Hash] opts the optional parameters
257
+ # @return [PaymentOrder]
258
+ def payment_buy(body, app, opts = {})
259
+ data, _status_code, _headers = payment_buy_with_http_info(body, app, opts)
260
+ data
261
+ end
262
+
263
+ # 下单购买
264
+ # @param body
265
+ # @param app 应用标识
266
+ # @param [Hash] opts the optional parameters
267
+ # @return [Array<(PaymentOrder, Integer, Hash)>] PaymentOrder data, response status code and response headers
268
+ def payment_buy_with_http_info(body, app, opts = {})
269
+ if @api_client.config.debugging
270
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_buy ...'
271
+ end
272
+ # verify the required parameter 'body' is set
273
+ if @api_client.config.client_side_validation && body.nil?
274
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.payment_buy"
275
+ end
276
+ # verify the required parameter 'app' is set
277
+ if @api_client.config.client_side_validation && app.nil?
278
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_buy"
279
+ end
280
+ # resource path
281
+ local_var_path = '/payment/{app}/orders'.sub('{' + 'app' + '}', app.to_s)
282
+
283
+ # query parameters
284
+ query_params = opts[:query_params] || {}
285
+
286
+ # header parameters
287
+ header_params = opts[:header_params] || {}
288
+ # HTTP header 'Accept' (if needed)
289
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
290
+ # HTTP header 'Content-Type'
291
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
292
+
293
+ # form parameters
294
+ form_params = opts[:form_params] || {}
295
+
296
+ # http body (model)
297
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
298
+
299
+ return_type = opts[:return_type] || 'PaymentOrder'
300
+
301
+ auth_names = opts[:auth_names] || ['TokenAuth']
302
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
303
+ :header_params => header_params,
304
+ :query_params => query_params,
305
+ :form_params => form_params,
306
+ :body => post_body,
307
+ :auth_names => auth_names,
308
+ :return_type => return_type)
309
+
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug "API called: PaymentApi#payment_buy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
312
+ end
313
+ return data, status_code, headers
314
+ end
315
+ # 删除发票
316
+ # @param app 应用标识
317
+ # @param id 发票编号
318
+ # @param [Hash] opts the optional parameters
319
+ # @return [BOOLEAN]
320
+ def payment_delete_invoice(app, id, opts = {})
321
+ data, _status_code, _headers = payment_delete_invoice_with_http_info(app, id, opts)
322
+ data
323
+ end
324
+
325
+ # 删除发票
326
+ # @param app 应用标识
327
+ # @param id 发票编号
328
+ # @param [Hash] opts the optional parameters
329
+ # @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
330
+ def payment_delete_invoice_with_http_info(app, id, opts = {})
331
+ if @api_client.config.debugging
332
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_delete_invoice ...'
333
+ end
334
+ # verify the required parameter 'app' is set
335
+ if @api_client.config.client_side_validation && app.nil?
336
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_delete_invoice"
337
+ end
338
+ # verify the required parameter 'id' is set
339
+ if @api_client.config.client_side_validation && id.nil?
340
+ fail ArgumentError, "Missing the required parameter 'id' when calling PaymentApi.payment_delete_invoice"
341
+ end
342
+ # resource path
343
+ local_var_path = '/payment/{app}/invoices'.sub('{' + 'app' + '}', app.to_s)
344
+
345
+ # query parameters
346
+ query_params = opts[:query_params] || {}
347
+ query_params[:'id'] = id
348
+
349
+ # header parameters
350
+ header_params = opts[:header_params] || {}
351
+ # HTTP header 'Accept' (if needed)
352
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
353
+
354
+ # form parameters
355
+ form_params = opts[:form_params] || {}
356
+
357
+ # http body (model)
358
+ post_body = opts[:body]
359
+
360
+ return_type = opts[:return_type] || 'BOOLEAN'
361
+
362
+ auth_names = opts[:auth_names] || ['TokenAuth']
363
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
364
+ :header_params => header_params,
365
+ :query_params => query_params,
366
+ :form_params => form_params,
367
+ :body => post_body,
368
+ :auth_names => auth_names,
369
+ :return_type => return_type)
370
+
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug "API called: PaymentApi#payment_delete_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
373
+ end
374
+ return data, status_code, headers
375
+ end
376
+ # 取消订单
377
+ # @param app 应用标识
378
+ # @param ident 订单号
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [BOOLEAN]
381
+ def payment_delete_order(app, ident, opts = {})
382
+ data, _status_code, _headers = payment_delete_order_with_http_info(app, ident, opts)
383
+ data
384
+ end
385
+
386
+ # 取消订单
387
+ # @param app 应用标识
388
+ # @param ident 订单号
389
+ # @param [Hash] opts the optional parameters
390
+ # @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
391
+ def payment_delete_order_with_http_info(app, ident, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_delete_order ...'
394
+ end
395
+ # verify the required parameter 'app' is set
396
+ if @api_client.config.client_side_validation && app.nil?
397
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_delete_order"
398
+ end
399
+ # verify the required parameter 'ident' is set
400
+ if @api_client.config.client_side_validation && ident.nil?
401
+ fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_delete_order"
402
+ end
403
+ # resource path
404
+ local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)
405
+
406
+ # query parameters
407
+ query_params = opts[:query_params] || {}
408
+
409
+ # header parameters
410
+ header_params = opts[:header_params] || {}
411
+ # HTTP header 'Accept' (if needed)
412
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
413
+
414
+ # form parameters
415
+ form_params = opts[:form_params] || {}
416
+
417
+ # http body (model)
418
+ post_body = opts[:body]
419
+
420
+ return_type = opts[:return_type] || 'BOOLEAN'
421
+
422
+ auth_names = opts[:auth_names] || ['TokenAuth']
423
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
424
+ :header_params => header_params,
425
+ :query_params => query_params,
426
+ :form_params => form_params,
427
+ :body => post_body,
428
+ :auth_names => auth_names,
429
+ :return_type => return_type)
430
+
431
+ if @api_client.config.debugging
432
+ @api_client.config.logger.debug "API called: PaymentApi#payment_delete_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
433
+ end
434
+ return data, status_code, headers
435
+ end
436
+ # 获取发票列表
437
+ # @param app 应用标识
438
+ # @param [Hash] opts the optional parameters
439
+ # @return [Array<PaymentInvoice>]
440
+ def payment_invoices(app, opts = {})
441
+ data, _status_code, _headers = payment_invoices_with_http_info(app, opts)
442
+ data
443
+ end
444
+
445
+ # 获取发票列表
446
+ # @param app 应用标识
447
+ # @param [Hash] opts the optional parameters
448
+ # @return [Array<(Array<PaymentInvoice>, Integer, Hash)>] Array<PaymentInvoice> data, response status code and response headers
449
+ def payment_invoices_with_http_info(app, opts = {})
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_invoices ...'
452
+ end
453
+ # verify the required parameter 'app' is set
454
+ if @api_client.config.client_side_validation && app.nil?
455
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_invoices"
456
+ end
457
+ # resource path
458
+ local_var_path = '/payment/{app}/invoices'.sub('{' + 'app' + '}', app.to_s)
459
+
460
+ # query parameters
461
+ query_params = opts[:query_params] || {}
462
+
463
+ # header parameters
464
+ header_params = opts[:header_params] || {}
465
+ # HTTP header 'Accept' (if needed)
466
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
467
+
468
+ # form parameters
469
+ form_params = opts[:form_params] || {}
470
+
471
+ # http body (model)
472
+ post_body = opts[:body]
473
+
474
+ return_type = opts[:return_type] || 'Array<PaymentInvoice>'
475
+
476
+ auth_names = opts[:auth_names] || ['TokenAuth']
477
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
478
+ :header_params => header_params,
479
+ :query_params => query_params,
480
+ :form_params => form_params,
481
+ :body => post_body,
482
+ :auth_names => auth_names,
483
+ :return_type => return_type)
484
+
485
+ if @api_client.config.debugging
486
+ @api_client.config.logger.debug "API called: PaymentApi#payment_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
487
+ end
488
+ return data, status_code, headers
489
+ end
490
+ # 获取订单详情
491
+ # 获取订单详情
492
+ # @param app 应用标识
493
+ # @param ident 订单号
494
+ # @param [Hash] opts the optional parameters
495
+ # @return [PaymentOrder]
496
+ def payment_order(app, ident, opts = {})
497
+ data, _status_code, _headers = payment_order_with_http_info(app, ident, opts)
498
+ data
499
+ end
500
+
501
+ # 获取订单详情
502
+ # 获取订单详情
503
+ # @param app 应用标识
504
+ # @param ident 订单号
505
+ # @param [Hash] opts the optional parameters
506
+ # @return [Array<(PaymentOrder, Integer, Hash)>] PaymentOrder data, response status code and response headers
507
+ def payment_order_with_http_info(app, ident, opts = {})
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_order ...'
510
+ end
511
+ # verify the required parameter 'app' is set
512
+ if @api_client.config.client_side_validation && app.nil?
513
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_order"
514
+ end
515
+ # verify the required parameter 'ident' is set
516
+ if @api_client.config.client_side_validation && ident.nil?
517
+ fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_order"
518
+ end
519
+ # resource path
520
+ local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)
521
+
522
+ # query parameters
523
+ query_params = opts[:query_params] || {}
524
+
525
+ # header parameters
526
+ header_params = opts[:header_params] || {}
527
+ # HTTP header 'Accept' (if needed)
528
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
529
+
530
+ # form parameters
531
+ form_params = opts[:form_params] || {}
532
+
533
+ # http body (model)
534
+ post_body = opts[:body]
535
+
536
+ return_type = opts[:return_type] || 'PaymentOrder'
537
+
538
+ auth_names = opts[:auth_names] || ['TokenAuth']
539
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
540
+ :header_params => header_params,
541
+ :query_params => query_params,
542
+ :form_params => form_params,
543
+ :body => post_body,
544
+ :auth_names => auth_names,
545
+ :return_type => return_type)
546
+
547
+ if @api_client.config.debugging
548
+ @api_client.config.logger.debug "API called: PaymentApi#payment_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
549
+ end
550
+ return data, status_code, headers
551
+ end
552
+ # 订单列表
553
+ # 获取应用的订单列表
554
+ # @param app 应用标识
555
+ # @param [Hash] opts the optional parameters
556
+ # @return [Array<PaymentOrder>]
557
+ def payment_orders(app, opts = {})
558
+ data, _status_code, _headers = payment_orders_with_http_info(app, opts)
559
+ data
560
+ end
561
+
562
+ # 订单列表
563
+ # 获取应用的订单列表
564
+ # @param app 应用标识
565
+ # @param [Hash] opts the optional parameters
566
+ # @return [Array<(Array<PaymentOrder>, Integer, Hash)>] Array<PaymentOrder> data, response status code and response headers
567
+ def payment_orders_with_http_info(app, opts = {})
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_orders ...'
570
+ end
571
+ # verify the required parameter 'app' is set
572
+ if @api_client.config.client_side_validation && app.nil?
573
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_orders"
574
+ end
575
+ # resource path
576
+ local_var_path = '/payment/{app}/orders'.sub('{' + 'app' + '}', app.to_s)
577
+
578
+ # query parameters
579
+ query_params = opts[:query_params] || {}
580
+
581
+ # header parameters
582
+ header_params = opts[:header_params] || {}
583
+ # HTTP header 'Accept' (if needed)
584
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
585
+
586
+ # form parameters
587
+ form_params = opts[:form_params] || {}
588
+
589
+ # http body (model)
590
+ post_body = opts[:body]
591
+
592
+ return_type = opts[:return_type] || 'Array<PaymentOrder>'
593
+
594
+ auth_names = opts[:auth_names] || ['TokenAuth']
595
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
596
+ :header_params => header_params,
597
+ :query_params => query_params,
598
+ :form_params => form_params,
599
+ :body => post_body,
600
+ :auth_names => auth_names,
601
+ :return_type => return_type)
602
+
603
+ if @api_client.config.debugging
604
+ @api_client.config.logger.debug "API called: PaymentApi#payment_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
605
+ end
606
+ return data, status_code, headers
607
+ end
608
+ # 获取未曾开票的订单列表
609
+ # @param app 应用标识
610
+ # @param [Hash] opts the optional parameters
611
+ # @return [Array<PaymentOrder>]
612
+ def payment_orders_without_invoice(app, opts = {})
613
+ data, _status_code, _headers = payment_orders_without_invoice_with_http_info(app, opts)
614
+ data
615
+ end
616
+
617
+ # 获取未曾开票的订单列表
618
+ # @param app 应用标识
619
+ # @param [Hash] opts the optional parameters
620
+ # @return [Array<(Array<PaymentOrder>, Integer, Hash)>] Array<PaymentOrder> data, response status code and response headers
621
+ def payment_orders_without_invoice_with_http_info(app, opts = {})
622
+ if @api_client.config.debugging
623
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_orders_without_invoice ...'
624
+ end
625
+ # verify the required parameter 'app' is set
626
+ if @api_client.config.client_side_validation && app.nil?
627
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_orders_without_invoice"
628
+ end
629
+ # resource path
630
+ local_var_path = '/payment/{app}/orders_without_invoice'.sub('{' + 'app' + '}', app.to_s)
631
+
632
+ # query parameters
633
+ query_params = opts[:query_params] || {}
634
+
635
+ # header parameters
636
+ header_params = opts[:header_params] || {}
637
+ # HTTP header 'Accept' (if needed)
638
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
639
+
640
+ # form parameters
641
+ form_params = opts[:form_params] || {}
642
+
643
+ # http body (model)
644
+ post_body = opts[:body]
645
+
646
+ return_type = opts[:return_type] || 'Array<PaymentOrder>'
647
+
648
+ auth_names = opts[:auth_names] || ['TokenAuth']
649
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
650
+ :header_params => header_params,
651
+ :query_params => query_params,
652
+ :form_params => form_params,
653
+ :body => post_body,
654
+ :auth_names => auth_names,
655
+ :return_type => return_type)
656
+
657
+ if @api_client.config.debugging
658
+ @api_client.config.logger.debug "API called: PaymentApi#payment_orders_without_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
659
+ end
660
+ return data, status_code, headers
661
+ end
662
+ # 获取套餐价格
663
+ # @param app 应用标识
664
+ # @param service 配额信息
665
+ # @param [Hash] opts the optional parameters
666
+ # @return [PaymentService]
667
+ def payment_price(app, service, opts = {})
668
+ data, _status_code, _headers = payment_price_with_http_info(app, service, opts)
669
+ data
670
+ end
671
+
672
+ # 获取套餐价格
673
+ # @param app 应用标识
674
+ # @param service 配额信息
675
+ # @param [Hash] opts the optional parameters
676
+ # @return [Array<(PaymentService, Integer, Hash)>] PaymentService data, response status code and response headers
677
+ def payment_price_with_http_info(app, service, opts = {})
678
+ if @api_client.config.debugging
679
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_price ...'
680
+ end
681
+ # verify the required parameter 'app' is set
682
+ if @api_client.config.client_side_validation && app.nil?
683
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_price"
684
+ end
685
+ # verify the required parameter 'service' is set
686
+ if @api_client.config.client_side_validation && service.nil?
687
+ fail ArgumentError, "Missing the required parameter 'service' when calling PaymentApi.payment_price"
688
+ end
689
+ # resource path
690
+ local_var_path = '/payment/{app}/price'.sub('{' + 'app' + '}', app.to_s)
691
+
692
+ # query parameters
693
+ query_params = opts[:query_params] || {}
694
+ query_params[:'service'] = service
695
+
696
+ # header parameters
697
+ header_params = opts[:header_params] || {}
698
+ # HTTP header 'Accept' (if needed)
699
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
700
+
701
+ # form parameters
702
+ form_params = opts[:form_params] || {}
703
+
704
+ # http body (model)
705
+ post_body = opts[:body]
706
+
707
+ return_type = opts[:return_type] || 'PaymentService'
708
+
709
+ auth_names = opts[:auth_names] || ['TokenAuth']
710
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
711
+ :header_params => header_params,
712
+ :query_params => query_params,
713
+ :form_params => form_params,
714
+ :body => post_body,
715
+ :auth_names => auth_names,
716
+ :return_type => return_type)
717
+
718
+ if @api_client.config.debugging
719
+ @api_client.config.logger.debug "API called: PaymentApi#payment_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
720
+ end
721
+ return data, status_code, headers
722
+ end
723
+ # 获取订单回执图片
724
+ # 查看回执图片
725
+ # @param app 应用标识
726
+ # @param ident 订单号
727
+ # @param id 回执编号
728
+ # @param [Hash] opts the optional parameters
729
+ # @return [String]
730
+ def payment_receipt(app, ident, id, opts = {})
731
+ data, _status_code, _headers = payment_receipt_with_http_info(app, ident, id, opts)
732
+ data
733
+ end
734
+
735
+ # 获取订单回执图片
736
+ # 查看回执图片
737
+ # @param app 应用标识
738
+ # @param ident 订单号
739
+ # @param id 回执编号
740
+ # @param [Hash] opts the optional parameters
741
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
742
+ def payment_receipt_with_http_info(app, ident, id, opts = {})
743
+ if @api_client.config.debugging
744
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_receipt ...'
745
+ end
746
+ # verify the required parameter 'app' is set
747
+ if @api_client.config.client_side_validation && app.nil?
748
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_receipt"
749
+ end
750
+ # verify the required parameter 'ident' is set
751
+ if @api_client.config.client_side_validation && ident.nil?
752
+ fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_receipt"
753
+ end
754
+ # verify the required parameter 'id' is set
755
+ if @api_client.config.client_side_validation && id.nil?
756
+ fail ArgumentError, "Missing the required parameter 'id' when calling PaymentApi.payment_receipt"
757
+ end
758
+ # resource path
759
+ local_var_path = '/payment/{app}/orders'.sub('{' + 'app' + '}', app.to_s)
760
+
761
+ # query parameters
762
+ query_params = opts[:query_params] || {}
763
+ query_params[:'ident'] = ident
764
+ query_params[:'id'] = id
765
+
766
+ # header parameters
767
+ header_params = opts[:header_params] || {}
768
+ # HTTP header 'Accept' (if needed)
769
+ header_params['Accept'] = @api_client.select_header_accept(['default'])
770
+
771
+ # form parameters
772
+ form_params = opts[:form_params] || {}
773
+
774
+ # http body (model)
775
+ post_body = opts[:body]
776
+
777
+ return_type = opts[:return_type] || 'String'
778
+
779
+ auth_names = opts[:auth_names] || ['TokenAuth']
780
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
781
+ :header_params => header_params,
782
+ :query_params => query_params,
783
+ :form_params => form_params,
784
+ :body => post_body,
785
+ :auth_names => auth_names,
786
+ :return_type => return_type)
787
+
788
+ if @api_client.config.debugging
789
+ @api_client.config.logger.debug "API called: PaymentApi#payment_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
790
+ end
791
+ return data, status_code, headers
792
+ end
793
+ # 联系销售获取私有化报价
794
+ # 获取私有化方案、报价等信息
795
+ # @param body 客户联系信息
796
+ # @param app 应用标识
797
+ # @param [Hash] opts the optional parameters
798
+ # @return [BOOLEAN]
799
+ def payment_request_contact(body, app, opts = {})
800
+ data, _status_code, _headers = payment_request_contact_with_http_info(body, app, opts)
801
+ data
802
+ end
803
+
804
+ # 联系销售获取私有化报价
805
+ # 获取私有化方案、报价等信息
806
+ # @param body 客户联系信息
807
+ # @param app 应用标识
808
+ # @param [Hash] opts the optional parameters
809
+ # @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
810
+ def payment_request_contact_with_http_info(body, app, opts = {})
811
+ if @api_client.config.debugging
812
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_request_contact ...'
813
+ end
814
+ # verify the required parameter 'body' is set
815
+ if @api_client.config.client_side_validation && body.nil?
816
+ fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.payment_request_contact"
817
+ end
818
+ # verify the required parameter 'app' is set
819
+ if @api_client.config.client_side_validation && app.nil?
820
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_request_contact"
821
+ end
822
+ # resource path
823
+ local_var_path = '/payment/{app}/contact'.sub('{' + 'app' + '}', app.to_s)
824
+
825
+ # query parameters
826
+ query_params = opts[:query_params] || {}
827
+
828
+ # header parameters
829
+ header_params = opts[:header_params] || {}
830
+ # HTTP header 'Accept' (if needed)
831
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
832
+ # HTTP header 'Content-Type'
833
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
834
+
835
+ # form parameters
836
+ form_params = opts[:form_params] || {}
837
+
838
+ # http body (model)
839
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
840
+
841
+ return_type = opts[:return_type] || 'BOOLEAN'
842
+
843
+ auth_names = opts[:auth_names] || ['TokenAuth']
844
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
845
+ :header_params => header_params,
846
+ :query_params => query_params,
847
+ :form_params => form_params,
848
+ :body => post_body,
849
+ :auth_names => auth_names,
850
+ :return_type => return_type)
851
+
852
+ if @api_client.config.debugging
853
+ @api_client.config.logger.debug "API called: PaymentApi#payment_request_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
854
+ end
855
+ return data, status_code, headers
856
+ end
857
+ # 上传转账回执
858
+ # 用户在完成银行转账后,通过该接口上传转账回执
859
+ # @param receipt
860
+ # @param app 应用标识
861
+ # @param ident 订单号
862
+ # @param [Hash] opts the optional parameters
863
+ # @return [PaymentOrder]
864
+ def payment_upload_receipt(receipt, app, ident, opts = {})
865
+ data, _status_code, _headers = payment_upload_receipt_with_http_info(receipt, app, ident, opts)
866
+ data
867
+ end
868
+
869
+ # 上传转账回执
870
+ # 用户在完成银行转账后,通过该接口上传转账回执
871
+ # @param receipt
872
+ # @param app 应用标识
873
+ # @param ident 订单号
874
+ # @param [Hash] opts the optional parameters
875
+ # @return [Array<(PaymentOrder, Integer, Hash)>] PaymentOrder data, response status code and response headers
876
+ def payment_upload_receipt_with_http_info(receipt, app, ident, opts = {})
877
+ if @api_client.config.debugging
878
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_upload_receipt ...'
879
+ end
880
+ # verify the required parameter 'receipt' is set
881
+ if @api_client.config.client_side_validation && receipt.nil?
882
+ fail ArgumentError, "Missing the required parameter 'receipt' when calling PaymentApi.payment_upload_receipt"
883
+ end
884
+ # verify the required parameter 'app' is set
885
+ if @api_client.config.client_side_validation && app.nil?
886
+ fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_upload_receipt"
887
+ end
888
+ # verify the required parameter 'ident' is set
889
+ if @api_client.config.client_side_validation && ident.nil?
890
+ fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_upload_receipt"
891
+ end
892
+ # resource path
893
+ local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)
894
+
895
+ # query parameters
896
+ query_params = opts[:query_params] || {}
897
+
898
+ # header parameters
899
+ header_params = opts[:header_params] || {}
900
+ # HTTP header 'Accept' (if needed)
901
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
902
+ # HTTP header 'Content-Type'
903
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
904
+
905
+ # form parameters
906
+ form_params = opts[:form_params] || {}
907
+ form_params['receipt'] = receipt
908
+
909
+ # http body (model)
910
+ post_body = opts[:body]
911
+
912
+ return_type = opts[:return_type] || 'PaymentOrder'
913
+
914
+ auth_names = opts[:auth_names] || ['TokenAuth']
915
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
916
+ :header_params => header_params,
917
+ :query_params => query_params,
918
+ :form_params => form_params,
919
+ :body => post_body,
920
+ :auth_names => auth_names,
921
+ :return_type => return_type)
922
+
923
+ if @api_client.config.debugging
924
+ @api_client.config.logger.debug "API called: PaymentApi#payment_upload_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
925
+ end
926
+ return data, status_code, headers
927
+ end
928
+ # 接受微信支付的支付结果
929
+ # @param [Hash] opts the optional parameters
930
+ # @return [nil]
931
+ def payment_wepay(opts = {})
932
+ payment_wepay_with_http_info(opts)
933
+ nil
934
+ end
935
+
936
+ # 接受微信支付的支付结果
937
+ # @param [Hash] opts the optional parameters
938
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
939
+ def payment_wepay_with_http_info(opts = {})
940
+ if @api_client.config.debugging
941
+ @api_client.config.logger.debug 'Calling API: PaymentApi.payment_wepay ...'
942
+ end
943
+ # resource path
944
+ local_var_path = '/payment/wepay'
945
+
946
+ # query parameters
947
+ query_params = opts[:query_params] || {}
948
+
949
+ # header parameters
950
+ header_params = opts[:header_params] || {}
951
+
952
+ # form parameters
953
+ form_params = opts[:form_params] || {}
954
+
955
+ # http body (model)
956
+ post_body = opts[:body]
957
+
958
+ return_type = opts[:return_type]
959
+
960
+ auth_names = opts[:auth_names] || []
961
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
962
+ :header_params => header_params,
963
+ :query_params => query_params,
964
+ :form_params => form_params,
965
+ :body => post_body,
966
+ :auth_names => auth_names,
967
+ :return_type => return_type)
968
+
969
+ if @api_client.config.debugging
970
+ @api_client.config.logger.debug "API called: PaymentApi#payment_wepay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
971
+ end
972
+ return data, status_code, headers
973
+ end
974
+ end
975
+ end