Class: TencentCloud::Tdid::V20210519::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20210519/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential, region, profile = nil) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/v20210519/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2021-05-19'
    api_endpoint = 'tdid.tencentcloudapi.com'
    sdk_version = 'TDID_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#CheckChain(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::CheckChainResponse`

Parameters:

  • request:

    Request instance for CheckChain.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/v20210519/client.rb', line 39

def CheckChain(request)
  body = send_request('CheckChain', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CheckChainResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateCredential(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::CreateCredentialResponse`

Parameters:

  • request:

    Request instance for CreateCredential.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/v20210519/client.rb', line 65

def CreateCredential(request)
  body = send_request('CreateCredential', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateCredentialResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateSelectiveCredential(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::CreateSelectiveCredentialResponse`

Parameters:

  • request:

    Request instance for CreateSelectiveCredential.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/v20210519/client.rb', line 91

def CreateSelectiveCredential(request)
  body = send_request('CreateSelectiveCredential', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateSelectiveCredentialResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateTDid(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::CreateTDidResponse`

Parameters:

  • request:

    Request instance for CreateTDid.



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/v20210519/client.rb', line 117

def CreateTDid(request)
  body = send_request('CreateTDid', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTDidResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateTDidByPrivateKey(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::CreateTDidByPrivateKeyResponse`

Parameters:

  • request:

    Request instance for CreateTDidByPrivateKey.



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/v20210519/client.rb', line 143

def CreateTDidByPrivateKey(request)
  body = send_request('CreateTDidByPrivateKey', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTDidByPrivateKeyResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateTDidByPublicKey(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::CreateTDidByPublicKeyResponse`

Parameters:

  • request:

    Request instance for CreateTDidByPublicKey.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/v20210519/client.rb', line 169

def CreateTDidByPublicKey(request)
  body = send_request('CreateTDidByPublicKey', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTDidByPublicKeyResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetAuthorityIssuer(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::GetAuthorityIssuerResponse`

Parameters:

  • request:

    Request instance for GetAuthorityIssuer.



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/v20210519/client.rb', line 195

def GetAuthorityIssuer(request)
  body = send_request('GetAuthorityIssuer', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetAuthorityIssuerResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetCptInfo(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::GetCptInfoResponse`

Parameters:

  • request:

    Request instance for GetCptInfo.



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/v20210519/client.rb', line 221

def GetCptInfo(request)
  body = send_request('GetCptInfo', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetCptInfoResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetCredentialStatus(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::GetCredentialStatusResponse`

Parameters:

  • request:

    Request instance for GetCredentialStatus.



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/v20210519/client.rb', line 247

def GetCredentialStatus(request)
  body = send_request('GetCredentialStatus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetCredentialStatusResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetDidDocument(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::GetDidDocumentResponse`

Parameters:

  • request:

    Request instance for GetDidDocument.



273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/v20210519/client.rb', line 273

def GetDidDocument(request)
  body = send_request('GetDidDocument', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetDidDocumentResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#RegisterCpt(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::RegisterCptResponse`

Parameters:

  • request:

    Request instance for RegisterCpt.



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/v20210519/client.rb', line 299

def RegisterCpt(request)
  body = send_request('RegisterCpt', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = RegisterCptResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#SetCredentialStatus(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::SetCredentialStatusResponse`

Parameters:

  • request:

    Request instance for SetCredentialStatus.



325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/v20210519/client.rb', line 325

def SetCredentialStatus(request)
  body = send_request('SetCredentialStatus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SetCredentialStatusResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#VerifyCredential(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tdid::V20210519::VerifyCredentialResponse`

Parameters:

  • request:

    Request instance for VerifyCredential.



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/v20210519/client.rb', line 351

def VerifyCredential(request)
  body = send_request('VerifyCredential', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = VerifyCredentialResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end