Class: CyberSource::TokenizedCardApi
- Inherits:
-
Object
- Object
- CyberSource::TokenizedCardApi
- Defined in:
- lib/cybersource_rest_client/api/tokenized_card_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_tokenized_card(tokenized_card_id, opts = {}) ⇒ nil
Delete a Tokenized Card | | | | | — | — | — | | The Network Token will attempt to be deleted from the card association and if successful the corresponding TMS Network Token will be deleted.
-
#delete_tokenized_card_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Tokenized Card | | | | | — | — | — | | The Network Token will attempt to be deleted from the card association and if successful the corresponding TMS Network Token will be deleted.
-
#get_tokenized_card(tokenized_card_id, opts = {}) ⇒ TokenizedcardRequest
Retrieve a Tokenized Card | | | | | — | — | — | |**Tokenized Cards**
A Tokenized Card represents a network token. -
#get_tokenized_card_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(TokenizedcardRequest, Fixnum, Hash)>
Retrieve a Tokenized Card | | | | | — | — | — | |**Tokenized Cards**<br>A Tokenized Card represents a network token.
-
#initialize(api_client = ApiClient.default, config) ⇒ TokenizedCardApi
constructor
A new instance of TokenizedCardApi.
-
#post_issuer_life_cycle_simulation(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts = {}) ⇒ nil
Simulate Issuer Life Cycle Management Events **Lifecycle Management Events**
Simulates an issuer life cycle manegement event for updates on the tokenized card. -
#post_issuer_life_cycle_simulation_with_http_info(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Simulate Issuer Life Cycle Management Events **Lifecycle Management Events**<br>Simulates an issuer life cycle manegement event for updates on the tokenized card.
-
#post_tokenized_card(tokenizedcard_request, opts = {}) ⇒ TokenizedcardRequest
Create a Tokenized Card | | | | | — | — | — | |**Tokenized cards**
A Tokenized card represents a network token. -
#post_tokenized_card_with_http_info(tokenizedcard_request, opts = {}) ⇒ Array<(TokenizedcardRequest, Fixnum, Hash)>
Create a Tokenized Card | | | | | — | — | — | |**Tokenized cards**<br>A Tokenized card represents a network token.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ TokenizedCardApi
Returns a new instance of TokenizedCardApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 18 def initialize(api_client = ApiClient.default, config) @api_client = api_client @api_client.set_configuration(config) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
16 17 18 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#delete_tokenized_card(tokenized_card_id, opts = {}) ⇒ nil
Delete a Tokenized Card | | | | | — | — | — | | The Network Token will attempt to be deleted from the card association and if successful the corresponding TMS Network Token will be deleted.
30 31 32 33 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 30 def delete_tokenized_card(tokenized_card_id, opts = {}) data, status_code, headers = delete_tokenized_card_with_http_info(tokenized_card_id, opts) return data, status_code, headers end |
#delete_tokenized_card_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Tokenized Card | | | | | — | — | — | | The Network Token will attempt to be deleted from the card association and if successful the corresponding TMS Network Token will be deleted.
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 41 def delete_tokenized_card_with_http_info(tokenized_card_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: TokenizedCardApi.delete_tokenized_card ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'tokenized_card_id' is set if @api_client.config.client_side_validation && tokenized_card_id.nil? fail ArgumentError, "Missing the required parameter 'tokenized_card_id' when calling TokenizedCardApi.delete_tokenized_card" end # resource path local_var_path = 'tms/v2/tokenized-cards/{tokenizedCardId}'.sub('{' + 'tokenizedCardId' + '}', tokenized_card_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;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? # form parameters form_params = {} # http body (model) if 'DELETE' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["delete_tokenized_card","delete_tokenized_card_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end auth_names = [] 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) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: TokenizedCardApi#delete_tokenized_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#get_tokenized_card(tokenized_card_id, opts = {}) ⇒ TokenizedcardRequest
Retrieve a Tokenized Card | | | | | — | — | — | |**Tokenized Cards**
A Tokenized Card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.
107 108 109 110 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 107 def get_tokenized_card(tokenized_card_id, opts = {}) data, status_code, headers = get_tokenized_card_with_http_info(tokenized_card_id, opts) return data, status_code, headers end |
#get_tokenized_card_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(TokenizedcardRequest, Fixnum, Hash)>
Retrieve a Tokenized Card | | | | | — | — | — | |**Tokenized Cards**<br>A Tokenized Card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.
118 119 120 121 122 123 124 125 126 127 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 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 118 def get_tokenized_card_with_http_info(tokenized_card_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: TokenizedCardApi.get_tokenized_card ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'tokenized_card_id' is set if @api_client.config.client_side_validation && tokenized_card_id.nil? fail ArgumentError, "Missing the required parameter 'tokenized_card_id' when calling TokenizedCardApi.get_tokenized_card" end # resource path local_var_path = 'tms/v2/tokenized-cards/{tokenizedCardId}'.sub('{' + 'tokenizedCardId' + '}', tokenized_card_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;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? # form parameters form_params = {} # http body (model) if 'GET' == 'POST' post_body = '{}' else post_body = nil end inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["get_tokenized_card","get_tokenized_card_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end 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 => 'TokenizedcardRequest') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: TokenizedCardApi#get_tokenized_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#post_issuer_life_cycle_simulation(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts = {}) ⇒ nil
Simulate Issuer Life Cycle Management Events **Lifecycle Management Events**
Simulates an issuer life cycle manegement event for updates on the tokenized card. The events that can be simulated are: - Token status changes (e.g. active, suspended, deleted) - Updates to the underlying card, including card art changes, expiration date changes, and card number suffix. Note: This is only available in CAS environment.
186 187 188 189 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 186 def post_issuer_life_cycle_simulation(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts = {}) data, status_code, headers = post_issuer_life_cycle_simulation_with_http_info(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts) return data, status_code, headers end |
#post_issuer_life_cycle_simulation_with_http_info(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Simulate Issuer Life Cycle Management Events **Lifecycle Management Events**<br>Simulates an issuer life cycle manegement event for updates on the tokenized card. The events that can be simulated are: - Token status changes (e.g. active, suspended, deleted) - Updates to the underlying card, including card art changes, expiration date changes, and card number suffix. Note: This is only available in CAS environment.
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 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 198 def post_issuer_life_cycle_simulation_with_http_info(profile_id, tokenized_card_id, post_issuer_life_cycle_simulation_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: TokenizedCardApi.post_issuer_life_cycle_simulation ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TokenizedCardApi.post_issuer_life_cycle_simulation" end # verify the required parameter 'tokenized_card_id' is set if @api_client.config.client_side_validation && tokenized_card_id.nil? fail ArgumentError, "Missing the required parameter 'tokenized_card_id' when calling TokenizedCardApi.post_issuer_life_cycle_simulation" end # verify the required parameter 'post_issuer_life_cycle_simulation_request' is set if @api_client.config.client_side_validation && post_issuer_life_cycle_simulation_request.nil? fail ArgumentError, "Missing the required parameter 'post_issuer_life_cycle_simulation_request' when calling TokenizedCardApi.post_issuer_life_cycle_simulation" end # resource path local_var_path = 'tms/v2/tokenized-cards/{tokenizedCardId}/issuer-life-cycle-event-simulations'.sub('{' + 'tokenizedCardId' + '}', tokenized_card_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;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) header_params[:'profile-id'] = profile_id # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(post_issuer_life_cycle_simulation_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostIssuerLifeCycleSimulationRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_issuer_life_cycle_simulation","post_issuer_life_cycle_simulation_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end 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) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: TokenizedCardApi#post_issuer_life_cycle_simulation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#post_tokenized_card(tokenizedcard_request, opts = {}) ⇒ TokenizedcardRequest
Create a Tokenized Card | | | | | — | — | — | |**Tokenized cards**
A Tokenized card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.
270 271 272 273 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 270 def post_tokenized_card(tokenizedcard_request, opts = {}) data, status_code, headers = post_tokenized_card_with_http_info(tokenizedcard_request, opts) return data, status_code, headers end |
#post_tokenized_card_with_http_info(tokenizedcard_request, opts = {}) ⇒ Array<(TokenizedcardRequest, Fixnum, Hash)>
Create a Tokenized Card | | | | | — | — | — | |**Tokenized cards**<br>A Tokenized card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires.
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 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/cybersource_rest_client/api/tokenized_card_api.rb', line 281 def post_tokenized_card_with_http_info(tokenizedcard_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: TokenizedCardApi.post_tokenized_card ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'tokenizedcard_request' is set if @api_client.config.client_side_validation && tokenizedcard_request.nil? fail ArgumentError, "Missing the required parameter 'tokenizedcard_request' when calling TokenizedCardApi.post_tokenized_card" end # resource path local_var_path = 'tms/v2/tokenized-cards' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json;charset=utf-8']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json;charset=utf-8']) header_params[:'profile-id'] = opts[:'profile_id'] if !opts[:'profile_id'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(tokenizedcard_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'TokenizedcardRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "false" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_tokenized_card","post_tokenized_card_with_http_info"]) post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) end 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 => 'TokenizedcardRequest') if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: TokenizedCardApi#post_tokenized_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |