Class: TencentCloud::Ic::V20190307::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Ic::V20190307::Client
- Defined in:
- lib/v20190307/client.rb
Instance Method Summary collapse
-
#DescribeApp(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeAppResponse`.
-
#DescribeCard(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeCardResponse`.
-
#DescribeCards(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeCardsResponse`.
-
#DescribeSms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeSmsResponse`.
-
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
-
#ModifyUserCardRemark(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::ModifyUserCardRemarkResponse`.
-
#PayForExtendData(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::PayForExtendDataResponse`.
-
#RenewCards(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::RenewCardsResponse`.
-
#SendMultiSms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::SendMultiSmsResponse`.
-
#SendSms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::SendSmsResponse`.
Constructor Details
#initialize(credential, region, profile = nil) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/v20190307/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2019-03-07' api_endpoint = 'ic.tencentcloudapi.com' sdk_version = 'IC_' + File.read(File.('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end |
Instance Method Details
#DescribeApp(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeAppResponse`
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/v20190307/client.rb', line 37 def DescribeApp(request) body = send_request('DescribeApp', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeAppResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeCard(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeCardResponse`
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/v20190307/client.rb', line 61 def DescribeCard(request) body = send_request('DescribeCard', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeCardResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeCards(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeCardsResponse`
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/v20190307/client.rb', line 85 def DescribeCards(request) body = send_request('DescribeCards', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeCardsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeSms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::DescribeSmsResponse`
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/v20190307/client.rb', line 109 def DescribeSms(request) body = send_request('DescribeSms', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeSmsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#ModifyUserCardRemark(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::ModifyUserCardRemarkResponse`
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/v20190307/client.rb', line 133 def ModifyUserCardRemark(request) body = send_request('ModifyUserCardRemark', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifyUserCardRemarkResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#PayForExtendData(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::PayForExtendDataResponse`
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/v20190307/client.rb', line 157 def PayForExtendData(request) body = send_request('PayForExtendData', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = PayForExtendDataResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#RenewCards(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::RenewCardsResponse`
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/v20190307/client.rb', line 186 def RenewCards(request) body = send_request('RenewCards', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = RenewCardsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#SendMultiSms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::SendMultiSmsResponse`
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/v20190307/client.rb', line 210 def SendMultiSms(request) body = send_request('SendMultiSms', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = SendMultiSmsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#SendSms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::ic::V20190307::SendSmsResponse`
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/v20190307/client.rb', line 234 def SendSms(request) body = send_request('SendSms', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = SendSmsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |