Class: IndexeaClient::PaymentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/indexea_client/api/payment_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PaymentApi

Returns a new instance of PaymentApi.



16
17
18
# File 'lib/indexea_client/api/payment_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/indexea_client/api/payment_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#payment_alipay(opts = {}) ⇒ nil

接受支付宝的支付结果

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


22
23
24
25
# File 'lib/indexea_client/api/payment_api.rb', line 22

def payment_alipay(opts = {})
  payment_alipay_with_http_info(opts)
  nil
end

#payment_alipay_return(opts = {}) ⇒ nil

支付宝平台支付完毕后调整到该接口

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


68
69
70
71
# File 'lib/indexea_client/api/payment_api.rb', line 68

def payment_alipay_return(opts = {})
  payment_alipay_return_with_http_info(opts)
  nil
end

#payment_alipay_return_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

支付宝平台支付完毕后调整到该接口

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/indexea_client/api/payment_api.rb', line 76

def payment_alipay_return_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_alipay_return ...'
  end
  # resource path
  local_var_path = '/payment/alipay'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_alipay_return\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_alipay_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

接受支付宝的支付结果

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/indexea_client/api/payment_api.rb', line 30

def payment_alipay_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_alipay ...'
  end
  # resource path
  local_var_path = '/payment/alipay'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_alipay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_apply_invoice(body, type, app, opts = {}) ⇒ PaymentInvoice

申请发票

Parameters:

  • body

    申请开发票的订单编号列表

  • type

    发票类型

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



117
118
119
120
# File 'lib/indexea_client/api/payment_api.rb', line 117

def payment_apply_invoice(body, type, app, opts = {})
  data, _status_code, _headers = payment_apply_invoice_with_http_info(body, type, app, opts)
  data
end

#payment_apply_invoice_with_http_info(body, type, app, opts = {}) ⇒ Array<(PaymentInvoice, Integer, Hash)>

申请发票

Parameters:

  • body

    申请开发票的订单编号列表

  • type

    发票类型

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PaymentInvoice, Integer, Hash)>)

    PaymentInvoice data, response status code and response headers



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/indexea_client/api/payment_api.rb', line 128

def payment_apply_invoice_with_http_info(body, type, app, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_apply_invoice ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.payment_apply_invoice"
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling PaymentApi.payment_apply_invoice"
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_apply_invoice"
  end
  # resource path
  local_var_path = '/payment/{app}/invoices'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = type

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'PaymentInvoice' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_apply_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_begin_pay(app, ident, type, opts = {}) ⇒ PayResult

支付订单 选择支付方式,开始支付

Parameters:

  • app

    应用标识

  • ident

    订单号

  • type

    支付方式

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



187
188
189
190
# File 'lib/indexea_client/api/payment_api.rb', line 187

def payment_begin_pay(app, ident, type, opts = {})
  data, _status_code, _headers = payment_begin_pay_with_http_info(app, ident, type, opts)
  data
end

#payment_begin_pay_with_http_info(app, ident, type, opts = {}) ⇒ Array<(PayResult, Integer, Hash)>

支付订单 选择支付方式,开始支付

Parameters:

  • app

    应用标识

  • ident

    订单号

  • type

    支付方式

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PayResult, Integer, Hash)>)

    PayResult data, response status code and response headers



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/indexea_client/api/payment_api.rb', line 199

def payment_begin_pay_with_http_info(app, ident, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_begin_pay ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_begin_pay"
  end
  # verify the required parameter 'ident' is set
  if @api_client.config.client_side_validation && ident.nil?
    fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_begin_pay"
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling PaymentApi.payment_begin_pay"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['none', 'alipay', 'wepay', 'bank', 'paypal', 'stripe'].include?(type)
    fail ArgumentError, "invalid value for 'type', must be one of none, alipay, wepay, bank, paypal, stripe"
  end
  # resource path
  local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = type

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'PayResult' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_begin_pay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_buy(body, app, opts = {}) ⇒ PaymentOrder

下单购买

Parameters:

  • body
  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



258
259
260
261
# File 'lib/indexea_client/api/payment_api.rb', line 258

def payment_buy(body, app, opts = {})
  data, _status_code, _headers = payment_buy_with_http_info(body, app, opts)
  data
end

#payment_buy_with_http_info(body, app, opts = {}) ⇒ Array<(PaymentOrder, Integer, Hash)>

下单购买

Parameters:

  • body
  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PaymentOrder, Integer, Hash)>)

    PaymentOrder data, response status code and response headers



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/indexea_client/api/payment_api.rb', line 268

def payment_buy_with_http_info(body, app, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_buy ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.payment_buy"
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_buy"
  end
  # resource path
  local_var_path = '/payment/{app}/orders'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'PaymentOrder' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_buy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_delete_invoice(app, id, opts = {}) ⇒ BOOLEAN

删除发票

Parameters:

  • app

    应用标识

  • id

    发票编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (BOOLEAN)


320
321
322
323
# File 'lib/indexea_client/api/payment_api.rb', line 320

def payment_delete_invoice(app, id, opts = {})
  data, _status_code, _headers = payment_delete_invoice_with_http_info(app, id, opts)
  data
end

#payment_delete_invoice_with_http_info(app, id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>

删除发票

Parameters:

  • app

    应用标识

  • id

    发票编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BOOLEAN, Integer, Hash)>)

    BOOLEAN data, response status code and response headers



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/indexea_client/api/payment_api.rb', line 330

def payment_delete_invoice_with_http_info(app, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_delete_invoice ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_delete_invoice"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PaymentApi.payment_delete_invoice"
  end
  # resource path
  local_var_path = '/payment/{app}/invoices'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'BOOLEAN' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_delete_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_delete_order(app, ident, opts = {}) ⇒ BOOLEAN

取消订单

Parameters:

  • app

    应用标识

  • ident

    订单号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (BOOLEAN)


381
382
383
384
# File 'lib/indexea_client/api/payment_api.rb', line 381

def payment_delete_order(app, ident, opts = {})
  data, _status_code, _headers = payment_delete_order_with_http_info(app, ident, opts)
  data
end

#payment_delete_order_with_http_info(app, ident, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>

取消订单

Parameters:

  • app

    应用标识

  • ident

    订单号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BOOLEAN, Integer, Hash)>)

    BOOLEAN data, response status code and response headers



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/indexea_client/api/payment_api.rb', line 391

def payment_delete_order_with_http_info(app, ident, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_delete_order ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_delete_order"
  end
  # verify the required parameter 'ident' is set
  if @api_client.config.client_side_validation && ident.nil?
    fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_delete_order"
  end
  # resource path
  local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'BOOLEAN' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_delete_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_invoices(app, opts = {}) ⇒ Array<PaymentInvoice>

获取发票列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



440
441
442
443
# File 'lib/indexea_client/api/payment_api.rb', line 440

def payment_invoices(app, opts = {})
  data, _status_code, _headers = payment_invoices_with_http_info(app, opts)
  data
end

#payment_invoices_with_http_info(app, opts = {}) ⇒ Array<(Array<PaymentInvoice>, Integer, Hash)>

获取发票列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<PaymentInvoice>, Integer, Hash)>)

    Array<PaymentInvoice> data, response status code and response headers



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# File 'lib/indexea_client/api/payment_api.rb', line 449

def payment_invoices_with_http_info(app, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_invoices ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_invoices"
  end
  # resource path
  local_var_path = '/payment/{app}/invoices'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'Array<PaymentInvoice>' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_order(app, ident, opts = {}) ⇒ PaymentOrder

获取订单详情 获取订单详情

Parameters:

  • app

    应用标识

  • ident

    订单号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



496
497
498
499
# File 'lib/indexea_client/api/payment_api.rb', line 496

def payment_order(app, ident, opts = {})
  data, _status_code, _headers = payment_order_with_http_info(app, ident, opts)
  data
end

#payment_order_with_http_info(app, ident, opts = {}) ⇒ Array<(PaymentOrder, Integer, Hash)>

获取订单详情 获取订单详情

Parameters:

  • app

    应用标识

  • ident

    订单号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PaymentOrder, Integer, Hash)>)

    PaymentOrder data, response status code and response headers



507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/indexea_client/api/payment_api.rb', line 507

def payment_order_with_http_info(app, ident, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_order ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_order"
  end
  # verify the required parameter 'ident' is set
  if @api_client.config.client_side_validation && ident.nil?
    fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_order"
  end
  # resource path
  local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'PaymentOrder' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_orders(app, opts = {}) ⇒ Array<PaymentOrder>

订单列表 获取应用的订单列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



557
558
559
560
# File 'lib/indexea_client/api/payment_api.rb', line 557

def payment_orders(app, opts = {})
  data, _status_code, _headers = payment_orders_with_http_info(app, opts)
  data
end

#payment_orders_with_http_info(app, opts = {}) ⇒ Array<(Array<PaymentOrder>, Integer, Hash)>

订单列表 获取应用的订单列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<PaymentOrder>, Integer, Hash)>)

    Array<PaymentOrder> data, response status code and response headers



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/indexea_client/api/payment_api.rb', line 567

def payment_orders_with_http_info(app, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_orders ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_orders"
  end
  # resource path
  local_var_path = '/payment/{app}/orders'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'Array<PaymentOrder>' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_orders_without_invoice(app, opts = {}) ⇒ Array<PaymentOrder>

获取未曾开票的订单列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



612
613
614
615
# File 'lib/indexea_client/api/payment_api.rb', line 612

def payment_orders_without_invoice(app, opts = {})
  data, _status_code, _headers = payment_orders_without_invoice_with_http_info(app, opts)
  data
end

#payment_orders_without_invoice_with_http_info(app, opts = {}) ⇒ Array<(Array<PaymentOrder>, Integer, Hash)>

获取未曾开票的订单列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<PaymentOrder>, Integer, Hash)>)

    Array<PaymentOrder> data, response status code and response headers



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
# File 'lib/indexea_client/api/payment_api.rb', line 621

def payment_orders_without_invoice_with_http_info(app, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_orders_without_invoice ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_orders_without_invoice"
  end
  # resource path
  local_var_path = '/payment/{app}/orders_without_invoice'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'Array<PaymentOrder>' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_orders_without_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_price(app, service, opts = {}) ⇒ PaymentService

获取套餐价格

Parameters:

  • app

    应用标识

  • service

    配额信息

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



667
668
669
670
# File 'lib/indexea_client/api/payment_api.rb', line 667

def payment_price(app, service, opts = {})
  data, _status_code, _headers = payment_price_with_http_info(app, service, opts)
  data
end

#payment_price_with_http_info(app, service, opts = {}) ⇒ Array<(PaymentService, Integer, Hash)>

获取套餐价格

Parameters:

  • app

    应用标识

  • service

    配额信息

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PaymentService, Integer, Hash)>)

    PaymentService data, response status code and response headers



677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File 'lib/indexea_client/api/payment_api.rb', line 677

def payment_price_with_http_info(app, service, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_price ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_price"
  end
  # verify the required parameter 'service' is set
  if @api_client.config.client_side_validation && service.nil?
    fail ArgumentError, "Missing the required parameter 'service' when calling PaymentApi.payment_price"
  end
  # resource path
  local_var_path = '/payment/{app}/price'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'service'] = service

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'PaymentService' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_price\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_receipt(app, ident, id, opts = {}) ⇒ String

获取订单回执图片 查看回执图片

Parameters:

  • app

    应用标识

  • ident

    订单号

  • id

    回执编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


730
731
732
733
# File 'lib/indexea_client/api/payment_api.rb', line 730

def payment_receipt(app, ident, id, opts = {})
  data, _status_code, _headers = payment_receipt_with_http_info(app, ident, id, opts)
  data
end

#payment_receipt_with_http_info(app, ident, id, opts = {}) ⇒ Array<(String, Integer, Hash)>

获取订单回执图片 查看回执图片

Parameters:

  • app

    应用标识

  • ident

    订单号

  • id

    回执编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
# File 'lib/indexea_client/api/payment_api.rb', line 742

def payment_receipt_with_http_info(app, ident, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_receipt ...'
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_receipt"
  end
  # verify the required parameter 'ident' is set
  if @api_client.config.client_side_validation && ident.nil?
    fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_receipt"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PaymentApi.payment_receipt"
  end
  # resource path
  local_var_path = '/payment/{app}/orders'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ident'] = ident
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['default'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'String' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_request_contact(body, app, opts = {}) ⇒ BOOLEAN

联系销售获取私有化报价 获取私有化方案、报价等信息

Parameters:

  • body

    客户联系信息

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (BOOLEAN)


799
800
801
802
# File 'lib/indexea_client/api/payment_api.rb', line 799

def payment_request_contact(body, app, opts = {})
  data, _status_code, _headers = payment_request_contact_with_http_info(body, app, opts)
  data
end

#payment_request_contact_with_http_info(body, app, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>

联系销售获取私有化报价 获取私有化方案、报价等信息

Parameters:

  • body

    客户联系信息

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BOOLEAN, Integer, Hash)>)

    BOOLEAN data, response status code and response headers



810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/indexea_client/api/payment_api.rb', line 810

def payment_request_contact_with_http_info(body, app, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_request_contact ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PaymentApi.payment_request_contact"
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_request_contact"
  end
  # resource path
  local_var_path = '/payment/{app}/contact'.sub('{' + 'app' + '}', app.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'BOOLEAN' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_request_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_upload_receipt(receipt, app, ident, opts = {}) ⇒ PaymentOrder

上传转账回执 用户在完成银行转账后,通过该接口上传转账回执

Parameters:

  • receipt
  • app

    应用标识

  • ident

    订单号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



864
865
866
867
# File 'lib/indexea_client/api/payment_api.rb', line 864

def payment_upload_receipt(receipt, app, ident, opts = {})
  data, _status_code, _headers = payment_upload_receipt_with_http_info(receipt, app, ident, opts)
  data
end

#payment_upload_receipt_with_http_info(receipt, app, ident, opts = {}) ⇒ Array<(PaymentOrder, Integer, Hash)>

上传转账回执 用户在完成银行转账后,通过该接口上传转账回执

Parameters:

  • receipt
  • app

    应用标识

  • ident

    订单号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PaymentOrder, Integer, Hash)>)

    PaymentOrder data, response status code and response headers



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
# File 'lib/indexea_client/api/payment_api.rb', line 876

def payment_upload_receipt_with_http_info(receipt, app, ident, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_upload_receipt ...'
  end
  # verify the required parameter 'receipt' is set
  if @api_client.config.client_side_validation && receipt.nil?
    fail ArgumentError, "Missing the required parameter 'receipt' when calling PaymentApi.payment_upload_receipt"
  end
  # verify the required parameter 'app' is set
  if @api_client.config.client_side_validation && app.nil?
    fail ArgumentError, "Missing the required parameter 'app' when calling PaymentApi.payment_upload_receipt"
  end
  # verify the required parameter 'ident' is set
  if @api_client.config.client_side_validation && ident.nil?
    fail ArgumentError, "Missing the required parameter 'ident' when calling PaymentApi.payment_upload_receipt"
  end
  # resource path
  local_var_path = '/payment/{app}/orders/{ident}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'ident' + '}', ident.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['receipt'] = receipt

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'PaymentOrder' 

  auth_names = opts[:auth_names] || ['TokenAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_upload_receipt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#payment_wepay(opts = {}) ⇒ nil

接受微信支付的支付结果

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


931
932
933
934
# File 'lib/indexea_client/api/payment_api.rb', line 931

def payment_wepay(opts = {})
  payment_wepay_with_http_info(opts)
  nil
end

#payment_wepay_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

接受微信支付的支付结果

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'lib/indexea_client/api/payment_api.rb', line 939

def payment_wepay_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PaymentApi.payment_wepay ...'
  end
  # resource path
  local_var_path = '/payment/wepay'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PaymentApi#payment_wepay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end