Class: ColorMeShop::ChargeApi

Inherits:
Object
  • Object
show all
Defined in:
lib/color_me_shop/api/charge_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ChargeApi

Returns a new instance of ChargeApi.



19
20
21
# File 'lib/color_me_shop/api/charge_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/color_me_shop/api/charge_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#activate_application_charge(application_charge_id, opts = {}) ⇒ Object

スポット課金データをアクティベートするスポット課金データをアクティベートするAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


27
28
29
30
# File 'lib/color_me_shop/api/charge_api.rb', line 27

def activate_application_charge(application_charge_id, opts = {})
  data, _status_code, _headers = activate_application_charge_with_http_info(application_charge_id, opts)
  data
end

#activate_application_charge_with_http_info(application_charge_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

スポット課金データをアクティベートするスポット課金データをアクティベートするAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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
65
66
67
68
69
70
71
72
73
# File 'lib/color_me_shop/api/charge_api.rb', line 37

def activate_application_charge_with_http_info(application_charge_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.activate_application_charge ...'
  end
  # verify the required parameter 'application_charge_id' is set
  if @api_client.config.client_side_validation && application_charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_charge_id' when calling ChargeApi.activate_application_charge"
  end
  # resource path
  local_var_path = '/v1/application_charges/{applicationChargeId}/activate.json'.sub('{' + 'applicationChargeId' + '}', application_charge_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#activate_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#activate_recurring_application_charge(recurring_application_charge_id, opts = {}) ⇒ Object

月額課金データをアクティベートする月額課金データをアクティベートするAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


79
80
81
82
# File 'lib/color_me_shop/api/charge_api.rb', line 79

def activate_recurring_application_charge(recurring_application_charge_id, opts = {})
  data, _status_code, _headers = activate_recurring_application_charge_with_http_info(recurring_application_charge_id, opts)
  data
end

#activate_recurring_application_charge_with_http_info(recurring_application_charge_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

月額課金データをアクティベートする月額課金データをアクティベートするAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/color_me_shop/api/charge_api.rb', line 89

def activate_recurring_application_charge_with_http_info(recurring_application_charge_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.activate_recurring_application_charge ...'
  end
  # verify the required parameter 'recurring_application_charge_id' is set
  if @api_client.config.client_side_validation && recurring_application_charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'recurring_application_charge_id' when calling ChargeApi.activate_recurring_application_charge"
  end
  # resource path
  local_var_path = '/v1/recurring_application_charges/{recurringApplicationChargeId}/activate.json'.sub('{' + 'recurringApplicationChargeId' + '}', recurring_application_charge_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#activate_recurring_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#cancel_recurring_application_charge(recurring_application_charge_id, opts = {}) ⇒ Object

月額課金データをキャンセルする月額課金データをキャンセルするAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


131
132
133
134
# File 'lib/color_me_shop/api/charge_api.rb', line 131

def cancel_recurring_application_charge(recurring_application_charge_id, opts = {})
  data, _status_code, _headers = cancel_recurring_application_charge_with_http_info(recurring_application_charge_id, opts)
  data
end

#cancel_recurring_application_charge_with_http_info(recurring_application_charge_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

月額課金データをキャンセルする月額課金データをキャンセルするAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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
# File 'lib/color_me_shop/api/charge_api.rb', line 141

def cancel_recurring_application_charge_with_http_info(recurring_application_charge_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.cancel_recurring_application_charge ...'
  end
  # verify the required parameter 'recurring_application_charge_id' is set
  if @api_client.config.client_side_validation && recurring_application_charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'recurring_application_charge_id' when calling ChargeApi.cancel_recurring_application_charge"
  end
  # resource path
  local_var_path = '/v1/recurring_application_charges/{recurringApplicationChargeId}/cancel.json'.sub('{' + 'recurringApplicationChargeId' + '}', recurring_application_charge_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#cancel_recurring_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_application_charge(application_charge_id, opts = {}) ⇒ Object

スポット課金データの取得スポット課金データを取得するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


183
184
185
186
# File 'lib/color_me_shop/api/charge_api.rb', line 183

def get_application_charge(application_charge_id, opts = {})
  data, _status_code, _headers = get_application_charge_with_http_info(application_charge_id, opts)
  data
end

#get_application_charge_with_http_info(application_charge_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

スポット課金データの取得スポット課金データを取得するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



193
194
195
196
197
198
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
# File 'lib/color_me_shop/api/charge_api.rb', line 193

def get_application_charge_with_http_info(application_charge_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.get_application_charge ...'
  end
  # verify the required parameter 'application_charge_id' is set
  if @api_client.config.client_side_validation && application_charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'application_charge_id' when calling ChargeApi.get_application_charge"
  end
  # resource path
  local_var_path = '/v1/application_charges/{applicationChargeId}.json'.sub('{' + 'applicationChargeId' + '}', application_charge_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#get_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_application_charges(opts = {}) ⇒ Object

スポット課金一覧の取得スポット課金一覧を取得するAPIです。

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    レスポンスの件数を指定します。指定がない場合は10件。最大50件。

  • :since_id (Integer)

    指定した課金ID以降のデータを返します。

Returns:

  • (Object)


236
237
238
239
# File 'lib/color_me_shop/api/charge_api.rb', line 236

def get_application_charges(opts = {})
  data, _status_code, _headers = get_application_charges_with_http_info(opts)
  data
end

#get_application_charges_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

スポット課金一覧の取得スポット課金一覧を取得するAPIです。

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    レスポンスの件数を指定します。指定がない場合は10件。最大50件。

  • :since_id (Integer)

    指定した課金ID以降のデータを返します。

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/color_me_shop/api/charge_api.rb', line 247

def get_application_charges_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.get_application_charges ...'
  end
  # resource path
  local_var_path = '/v1/application_charges.json'

  # query parameters
  query_params = {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'since_id'] = opts[:'since_id'] if !opts[:'since_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#get_application_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_recurring_application_charge(recurring_application_charge_id, opts = {}) ⇒ Object

月額課金データの取得月額課金データを取得するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


287
288
289
290
# File 'lib/color_me_shop/api/charge_api.rb', line 287

def get_recurring_application_charge(recurring_application_charge_id, opts = {})
  data, _status_code, _headers = get_recurring_application_charge_with_http_info(recurring_application_charge_id, opts)
  data
end

#get_recurring_application_charge_with_http_info(recurring_application_charge_id, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

月額課金データの取得月額課金データを取得するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/color_me_shop/api/charge_api.rb', line 297

def get_recurring_application_charge_with_http_info(recurring_application_charge_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.get_recurring_application_charge ...'
  end
  # verify the required parameter 'recurring_application_charge_id' is set
  if @api_client.config.client_side_validation && recurring_application_charge_id.nil?
    fail ArgumentError, "Missing the required parameter 'recurring_application_charge_id' when calling ChargeApi.get_recurring_application_charge"
  end
  # resource path
  local_var_path = '/v1/recurring_application_charges/{recurringApplicationChargeId}.json'.sub('{' + 'recurringApplicationChargeId' + '}', recurring_application_charge_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#get_recurring_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_recurring_application_charges(opts = {}) ⇒ Object

月額課金一覧の取得月額課金一覧を取得するAPIです。

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    レスポンスの件数を指定します。指定がない場合は10件。最大50件。

  • :since_id (Integer)

    指定した課金ID以降のデータを返します。

Returns:

  • (Object)


340
341
342
343
# File 'lib/color_me_shop/api/charge_api.rb', line 340

def get_recurring_application_charges(opts = {})
  data, _status_code, _headers = get_recurring_application_charges_with_http_info(opts)
  data
end

#get_recurring_application_charges_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

月額課金一覧の取得月額課金一覧を取得するAPIです。

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    レスポンスの件数を指定します。指定がない場合は10件。最大50件。

  • :since_id (Integer)

    指定した課金ID以降のデータを返します。

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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
376
377
378
379
380
381
382
383
384
385
# File 'lib/color_me_shop/api/charge_api.rb', line 351

def get_recurring_application_charges_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.get_recurring_application_charges ...'
  end
  # resource path
  local_var_path = '/v1/recurring_application_charges.json'

  # query parameters
  query_params = {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'since_id'] = opts[:'since_id'] if !opts[:'since_id'].nil?

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#get_recurring_application_charges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_application_charge(unknown_base_type, opts = {}) ⇒ Object

スポット課金データの作成スポット課金データを作成するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


391
392
393
394
# File 'lib/color_me_shop/api/charge_api.rb', line 391

def post_application_charge(unknown_base_type, opts = {})
  data, _status_code, _headers = post_application_charge_with_http_info(unknown_base_type, opts)
  data
end

#post_application_charge_with_http_info(unknown_base_type, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

スポット課金データの作成スポット課金データを作成するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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
436
437
438
439
# File 'lib/color_me_shop/api/charge_api.rb', line 401

def post_application_charge_with_http_info(unknown_base_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.post_application_charge ...'
  end
  # verify the required parameter 'unknown_base_type' is set
  if @api_client.config.client_side_validation && unknown_base_type.nil?
    fail ArgumentError, "Missing the required parameter 'unknown_base_type' when calling ChargeApi.post_application_charge"
  end
  # resource path
  local_var_path = '/v1/application_charges.json'

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(unknown_base_type)
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#post_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_recurring_application_charge(unknown_base_type, opts = {}) ⇒ Object

月額課金データの作成月額課金データを作成するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Object)


445
446
447
448
# File 'lib/color_me_shop/api/charge_api.rb', line 445

def post_recurring_application_charge(unknown_base_type, opts = {})
  data, _status_code, _headers = post_recurring_application_charge_with_http_info(unknown_base_type, opts)
  data
end

#post_recurring_application_charge_with_http_info(unknown_base_type, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

月額課金データの作成月額課金データを作成するAPIです。

Parameters:

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

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



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
490
491
492
493
# File 'lib/color_me_shop/api/charge_api.rb', line 455

def post_recurring_application_charge_with_http_info(unknown_base_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ChargeApi.post_recurring_application_charge ...'
  end
  # verify the required parameter 'unknown_base_type' is set
  if @api_client.config.client_side_validation && unknown_base_type.nil?
    fail ArgumentError, "Missing the required parameter 'unknown_base_type' when calling ChargeApi.post_recurring_application_charge"
  end
  # resource path
  local_var_path = '/v1/recurring_application_charges.json'

  # query parameters
  query_params = {}

  # header parameters
  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 = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(unknown_base_type)
  auth_names = ['OAuth2']
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ChargeApi#post_recurring_application_charge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end