Class: CyberSource::NetworkTokensApi
- Inherits:
-
Object
- Object
- CyberSource::NetworkTokensApi
- Defined in:
- lib/cybersource_rest_client/api/network_tokens_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_card_art_asset(instrument_identifier_id, token_provider, asset_type, opts = {}) ⇒ InlineResponse2002
Retrieve Card Art Retrieves Card Art for a specific Instrument Identifier.
-
#get_card_art_asset_with_http_info(instrument_identifier_id, token_provider, asset_type, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Retrieve Card Art Retrieves Card Art for a specific Instrument Identifier.
-
#get_tokenized_card(tokenized_card_id, opts = {}) ⇒ InlineResponse2001
Retrieve a Tokenized Card |**Tokenized Cards**
A Tokenized Card represents a network token. -
#get_tokenized_card_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Retrieve a Tokenized Card |**Tokenized Cards**<br>A Tokenized Card represents a network token.
-
#initialize(api_client = ApiClient.default, config) ⇒ NetworkTokensApi
constructor
A new instance of NetworkTokensApi.
-
#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_token_payment_credentials(token_id, post_payment_credentials_request, opts = {}) ⇒ String
Generate Payment Credentials v2 Note: This resource will be replace by [payment credentials version 3](#/paths/~1tms~1v3~1tokens~1tokenId~1payment-credentials/post).
-
#post_token_payment_credentials_v3(token_id, post_payment_credentials_request, opts = {}) ⇒ InlineResponse2011
Generate Payment Credentials Latest Version v3 **Payment Credentials**
Contains payment information such as the network token, generated TAVV cryptogram for Visa & MasterCard, dynamic CVV for Amex, or DTVV cryptogram for VISA. -
#post_token_payment_credentials_v3_with_http_info(token_id, post_payment_credentials_request, opts = {}) ⇒ Array<(InlineResponse2011, Fixnum, Hash)>
Generate Payment Credentials Latest Version v3 **Payment Credentials**<br>Contains payment information such as the network token, generated TAVV cryptogram for Visa & MasterCard, dynamic CVV for Amex, or DTVV cryptogram for VISA.
-
#post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Generate Payment Credentials v2 Note: This resource will be replace by [payment credentials version 3](#/paths/~1tms~1v3~1tokens~1tokenId~1payment-credentials/post).
-
#post_tokenized_card(post_tokenized_card_request, opts = {}) ⇒ InlineResponse2001
Create a Tokenized Card **Tokenized cards**
A Tokenized card represents a network token. -
#post_tokenized_card_delete(tokenized_card_id, opts = {}) ⇒ nil
Delete a Tokenized Card This API attempts to delete a network token from the card association with a specified reason.
-
#post_tokenized_card_delete_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Tokenized Card This API attempts to delete a network token from the card association with a specified reason.
-
#post_tokenized_card_with_http_info(post_tokenized_card_request, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Create a Tokenized Card **Tokenized cards**<br>A Tokenized card represents a network token.
Constructor Details
#initialize(api_client = ApiClient.default, config) ⇒ NetworkTokensApi
Returns a new instance of NetworkTokensApi.
18 19 20 21 |
# File 'lib/cybersource_rest_client/api/network_tokens_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/network_tokens_api.rb', line 16 def api_client @api_client end |
Instance Method Details
#get_card_art_asset(instrument_identifier_id, token_provider, asset_type, opts = {}) ⇒ InlineResponse2002
Retrieve Card Art Retrieves Card Art for a specific Instrument Identifier. The Card Art is a visual representation of the cardholder’s payment card. Card Art is only available if a Network Token is successfully provisioned.
31 32 33 34 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 31 def get_card_art_asset(instrument_identifier_id, token_provider, asset_type, opts = {}) data, status_code, headers = get_card_art_asset_with_http_info(instrument_identifier_id, token_provider, asset_type, opts) return data, status_code, headers end |
#get_card_art_asset_with_http_info(instrument_identifier_id, token_provider, asset_type, opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Retrieve Card Art Retrieves Card Art for a specific Instrument Identifier. The Card Art is a visual representation of the cardholder's payment card. Card Art is only available if a Network Token is successfully provisioned.
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 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 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 43 def get_card_art_asset_with_http_info(instrument_identifier_id, token_provider, asset_type, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: NetworkTokensApi.get_card_art_asset ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'instrument_identifier_id' is set if @api_client.config.client_side_validation && instrument_identifier_id.nil? fail ArgumentError, "Missing the required parameter 'instrument_identifier_id' when calling NetworkTokensApi.get_card_art_asset" end # verify the required parameter 'token_provider' is set if @api_client.config.client_side_validation && token_provider.nil? fail ArgumentError, "Missing the required parameter 'token_provider' when calling NetworkTokensApi.get_card_art_asset" end # verify enum value if @api_client.config.client_side_validation && !['vts', 'mdes', 'amex', 'mscof'].include?(token_provider) fail ArgumentError, "invalid value for 'token_provider', must be one of vts, mdes, amex, mscof" end # verify the required parameter 'asset_type' is set if @api_client.config.client_side_validation && asset_type.nil? fail ArgumentError, "Missing the required parameter 'asset_type' when calling NetworkTokensApi.get_card_art_asset" end # verify enum value if @api_client.config.client_side_validation && !['card-art-combined', 'brand-logo', 'issuer-logo', 'icon-logo'].include?(asset_type) fail ArgumentError, "invalid value for 'asset_type', must be one of card-art-combined, brand-logo, issuer-logo, icon-logo" end # resource path local_var_path = 'tms/v2/tokens/{instrumentIdentifierId}/{tokenProvider}/assets/{assetType}'.sub('{' + 'instrumentIdentifierId' + '}', instrument_identifier_id.to_s).sub('{' + 'tokenProvider' + '}', token_provider.to_s).sub('{' + 'assetType' + '}', asset_type.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']) # 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_card_art_asset","get_card_art_asset_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_card_art_asset","get_card_art_asset_with_http_info"]) 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 => 'InlineResponse2002', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#get_card_art_asset\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 = {}) ⇒ InlineResponse2001
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. This API returns the details of a tokenized card stored in TMS. You can use this API to check the status of a tokenized card and retrieve details such as the last four digits of the underlying card, expiration date, and card type.
133 134 135 136 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 133 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<(InlineResponse2001, 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. This API returns the details of a tokenized card stored in TMS. You can use this API to check the status of a tokenized card and retrieve details such as the last four digits of the underlying card, expiration date, and card type.
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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 144 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: NetworkTokensApi.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 NetworkTokensApi.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"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["get_tokenized_card","get_tokenized_card_with_http_info"]) 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 => 'InlineResponse2001', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#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.
220 221 222 223 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 220 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.
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 262 263 264 265 266 267 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 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 232 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: NetworkTokensApi.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 NetworkTokensApi.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 NetworkTokensApi.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 NetworkTokensApi.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"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_issuer_life_cycle_simulation","post_issuer_life_cycle_simulation_with_http_info"]) 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, :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#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_token_payment_credentials(token_id, post_payment_credentials_request, opts = {}) ⇒ String
Generate Payment Credentials v2 Note: This resource will be replace by [payment credentials version 3](#/paths/~1tms~1v3~1tokens~1tokenId~1payment-credentials/post). The SDK will remain available for now; however, it will no longer be documented or maintain in the Developer Centre.
Token
A Token can represent your tokenized Customer, Payment Instrument, Instrument Identifier or Tokenized Card information.
**Payment Credentials**
Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.
Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument, Instrument Identifier or Tokenized Card.
Optionally, **authenticated identities** information from Passkey authentication can be provided to potentially achieve liability shift, which may result in the return of an e-commerce indicator of 5 if successful.
313 314 315 316 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 313 def post_token_payment_credentials(token_id, post_payment_credentials_request, opts = {}) data, status_code, headers = post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, opts) return data, status_code, headers end |
#post_token_payment_credentials_v3(token_id, post_payment_credentials_request, opts = {}) ⇒ InlineResponse2011
Generate Payment Credentials Latest Version v3 **Payment Credentials**
Contains payment information such as the network token, generated TAVV cryptogram for Visa & MasterCard, dynamic CVV for Amex, or DTVV cryptogram for VISA. This latest version (v3) returns the Primary Account Number details, if the network token is not present. The response is provided in JSON Web Encryption (JWE) format.
Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument, Instrument Identifier or Tokenized Card.
Optionally, **authenticated identities** information from Passkey authentication can be provided to potentially achieve liability shift, which may result in the return of an e-commerce indicator of 5 if successful.
403 404 405 406 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 403 def post_token_payment_credentials_v3(token_id, post_payment_credentials_request, opts = {}) data, status_code, headers = post_token_payment_credentials_v3_with_http_info(token_id, post_payment_credentials_request, opts) return data, status_code, headers end |
#post_token_payment_credentials_v3_with_http_info(token_id, post_payment_credentials_request, opts = {}) ⇒ Array<(InlineResponse2011, Fixnum, Hash)>
Generate Payment Credentials Latest Version v3 **Payment Credentials**<br>Contains payment information such as the network token, generated TAVV cryptogram for Visa & MasterCard, dynamic CVV for Amex, or DTVV cryptogram for VISA. This latest version (v3) returns the Primary Account Number details, if the network token is not present. The response is provided in JSON Web Encryption (JWE) format. <br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument, Instrument Identifier or Tokenized Card.<br>Optionally, **authenticated identities** information from Passkey authentication can be provided to potentially achieve liability shift, which may result in the return of an e-commerce indicator of 5 if successful.
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 440 441 442 443 444 445 446 447 448 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 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 415 def post_token_payment_credentials_v3_with_http_info(token_id, post_payment_credentials_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: NetworkTokensApi.post_token_payment_credentials_v3 ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling NetworkTokensApi.post_token_payment_credentials_v3" end # verify the required parameter 'post_payment_credentials_request' is set if @api_client.config.client_side_validation && post_payment_credentials_request.nil? fail ArgumentError, "Missing the required parameter 'post_payment_credentials_request' when calling NetworkTokensApi.post_token_payment_credentials_v3" end # resource path local_var_path = 'tms/v3/tokens/{tokenId}/payment-credentials'.sub('{' + 'tokenId' + '}', token_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/jose;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(post_payment_credentials_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostPaymentCredentialsRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_token_payment_credentials_v3","post_token_payment_credentials_v3_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_token_payment_credentials_v3","post_token_payment_credentials_v3_with_http_info"]) 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 => 'InlineResponse2011', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#post_token_payment_credentials_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" rescue puts 'Cannot write to log' end end return data, status_code, headers end |
#post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Generate Payment Credentials v2 Note: This resource will be replace by [payment credentials version 3](#/paths/~1tms~1v3~1tokens~1tokenId~1payment-credentials/post). The SDK will remain available for now; however, it will no longer be documented or maintain in the Developer Centre.<br> Token<br>A Token can represent your tokenized Customer, Payment Instrument, Instrument Identifier or Tokenized Card information.<br> **Payment Credentials**<br>Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.<br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument, Instrument Identifier or Tokenized Card.<br>Optionally, **authenticated identities** information from Passkey authentication can be provided to potentially achieve liability shift, which may result in the return of an e-commerce indicator of 5 if successful.
325 326 327 328 329 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 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 325 def post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: NetworkTokensApi.post_token_payment_credentials ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'token_id' is set if @api_client.config.client_side_validation && token_id.nil? fail ArgumentError, "Missing the required parameter 'token_id' when calling NetworkTokensApi.post_token_payment_credentials" end # verify the required parameter 'post_payment_credentials_request' is set if @api_client.config.client_side_validation && post_payment_credentials_request.nil? fail ArgumentError, "Missing the required parameter 'post_payment_credentials_request' when calling NetworkTokensApi.post_token_payment_credentials" end # resource path local_var_path = 'tms/v2/tokens/{tokenId}/payment-credentials'.sub('{' + 'tokenId' + '}', token_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/jose;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(post_payment_credentials_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostPaymentCredentialsRequest1', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_token_payment_credentials","post_token_payment_credentials_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_token_payment_credentials","post_token_payment_credentials_with_http_info"]) 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 => 'String', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#post_token_payment_credentials\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(post_tokenized_card_request, opts = {}) ⇒ InlineResponse2001
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. This API submits a request to the card association to create a network token. If successful, a tokenized card will be created in TMS to represent the network token.
492 493 494 495 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 492 def post_tokenized_card(post_tokenized_card_request, opts = {}) data, status_code, headers = post_tokenized_card_with_http_info(post_tokenized_card_request, opts) return data, status_code, headers end |
#post_tokenized_card_delete(tokenized_card_id, opts = {}) ⇒ nil
Delete a Tokenized Card This API attempts to delete a network token from the card association with a specified reason. | If successful, the corresponding tokenized card will be deleted. | The reason for deletion can be specified to provide context for the deletion operation.
577 578 579 580 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 577 def post_tokenized_card_delete(tokenized_card_id, opts = {}) data, status_code, headers = post_tokenized_card_delete_with_http_info(tokenized_card_id, opts) return data, status_code, headers end |
#post_tokenized_card_delete_with_http_info(tokenized_card_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Tokenized Card This API attempts to delete a network token from the card association with a specified reason. | If successful, the corresponding tokenized card will be deleted. | The reason for deletion can be specified to provide context for the deletion operation.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 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 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 589 def post_tokenized_card_delete_with_http_info(tokenized_card_id, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: NetworkTokensApi.post_tokenized_card_delete ...' 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 NetworkTokensApi.post_tokenized_card_delete" end # resource path local_var_path = 'tms/v2/tokenized-cards/{tokenizedCardId}/delete'.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) post_body = @api_client.object_to_http_body(opts[:'post_tokenized_card_delete_request']) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'TmsTokenizedCardDeleteRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_tokenized_card_delete","post_tokenized_card_delete_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_tokenized_card_delete","post_tokenized_card_delete_with_http_info"]) 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, :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#post_tokenized_card_delete\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_with_http_info(post_tokenized_card_request, opts = {}) ⇒ Array<(InlineResponse2001, 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. This API submits a request to the card association to create a network token. If successful, a tokenized card will be created in TMS to represent the network token.
503 504 505 506 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 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/cybersource_rest_client/api/network_tokens_api.rb', line 503 def post_tokenized_card_with_http_info(post_tokenized_card_request, opts = {}) if @api_client.config.debugging begin raise @api_client.config.logger.debug 'Calling API: NetworkTokensApi.post_tokenized_card ...' rescue puts 'Cannot write to log' end end # verify the required parameter 'post_tokenized_card_request' is set if @api_client.config.client_side_validation && post_tokenized_card_request.nil? fail ArgumentError, "Missing the required parameter 'post_tokenized_card_request' when calling NetworkTokensApi.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(post_tokenized_card_request) sdk_tracker = SdkTracker.new post_body = sdk_tracker.insert_developer_id_tracker(post_body, 'PostTokenizedCardRequest', @api_client.config.host, @api_client.merchantconfig.defaultDeveloperId) inbound_mle_status = "optional" if MLEUtility.check_is_mle_for_API(@api_client.merchantconfig, inbound_mle_status, ["post_tokenized_card","post_tokenized_card_with_http_info"]) begin post_body = MLEUtility.encrypt_request_payload(@api_client.merchantconfig, post_body) rescue raise end end is_response_mle_for_api = MLEUtility.check_is_response_mle_for_api(@api_client.merchantconfig, ["post_tokenized_card","post_tokenized_card_with_http_info"]) 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 => 'InlineResponse2001', :isResponseMLEForApi => is_response_mle_for_api) if @api_client.config.debugging begin raise @api_client.config.logger.debug "API called: NetworkTokensApi#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 |