Class: FatZebra::ThreeDSecure
- Inherits:
-
APIResource
- Object
- FatZebraObject
- APIResource
- FatZebra::ThreeDSecure
- Defined in:
- lib/fat_zebra/three_d_secure.rb
Overview
FatZebra ThreeDSecure
Manage 3DS2 authentication for the Cybersource REST API
-
setup
-
enrollment
-
validation
Constant Summary collapse
- CHECK_ENROLLMENT_REQUIRED_FIELDS =
i[ merchant_username card_token amount currency reference verification device_channel reference_id return_url acs_window_size browser_accept_content browser_language browser_java_enabled browser_color_depth browser_screen_height browser_screen_width browser_time_difference browser_user_agent ].freeze
- VALIDATE_AUTHENTICATION_REQUIRED_FIELDS =
i[ merchant_username card_token amount currency authentication_transaction_id ].freeze
Instance Attribute Summary
Attributes inherited from FatZebraObject
Attributes included from ObjectHelper
Class Method Summary collapse
-
.check_enrollment(params = {}, options = {}) ⇒ FatZebra::ThreeDSecure
Enrols card.
- .resource_name ⇒ Object
- .resource_path ⇒ Object
-
.setup(params = {}, options = {}) ⇒ FatZebra::ThreeDSecure
Sets up a 3ds request.
-
.validate_authentication(params = {}, options = {}) ⇒ FatZebra::ThreeDSecure
Validates card.
Methods inherited from APIResource
Methods included from APIHelper
included, #request, #resource_name, #resource_path
Methods inherited from FatZebraObject
initialize_from, #load_response_api, #update_from
Methods included from Validation
#errors, #valid!, #valid?, #validates
Methods included from ObjectHelper
#[], #[]=, #add_accessor, #add_accessors, #add_data, #initialize, #inspect, #keys, #method_missing, #remove_accessor, #to_hash, #to_json, #update_attributes
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FatZebra::ObjectHelper
Class Method Details
.check_enrollment(params = {}, options = {}) ⇒ FatZebra::ThreeDSecure
Enrols card
84 85 86 87 88 89 |
# File 'lib/fat_zebra/three_d_secure.rb', line 84 def check_enrollment(params = {}, = {}) valid!(params, :check_enrollment) if respond_to?(:valid!) response = request(:post, "#{resource_path}/check_enrollment", params, ) initialize_from(response) end |
.resource_name ⇒ Object
55 56 57 |
# File 'lib/fat_zebra/three_d_secure.rb', line 55 def resource_name 'three_d_secure' end |
.resource_path ⇒ Object
59 60 61 |
# File 'lib/fat_zebra/three_d_secure.rb', line 59 def resource_path "/sdk/#{resource_name}" end |
.setup(params = {}, options = {}) ⇒ FatZebra::ThreeDSecure
Sets up a 3ds request
70 71 72 73 74 75 |
# File 'lib/fat_zebra/three_d_secure.rb', line 70 def setup(params = {}, = {}) valid!(params, :setup) if respond_to?(:valid!) response = request(:post, "#{resource_path}/setup", params, ) initialize_from(response) end |
.validate_authentication(params = {}, options = {}) ⇒ FatZebra::ThreeDSecure
Validates card
98 99 100 101 102 103 |
# File 'lib/fat_zebra/three_d_secure.rb', line 98 def validate_authentication(params = {}, = {}) valid!(params, :validate_authentication) if respond_to?(:valid!) response = request(:post, "#{resource_path}/validate_authentication", params, ) initialize_from(response) end |