Class: PCPServerSDK::Models::ActionType

Inherits:
Object
  • Object
show all
Defined in:
lib/PCP-server-Ruby-SDK/models/action_type.rb

Constant Summary collapse

REDIRECT =

The customer needs to be redirected using the details found in redirectData

"REDIRECT".freeze
SHOW_FORM =

The customer needs to be shown a form with the fields found in formFields

"SHOW_FORM".freeze
SHOW_INSTRUCTIONS =

The customer needs to be shown payment instruction using the details found in showData

"SHOW_INSTRUCTIONS".freeze
SHOW_TRANSACTION_RESULTS =

The customer needs to be shown the transaction results using the details found in showData

"SHOW_TRANSACTION_RESULTS".freeze
MOBILE_THREEDS_CHALLENGE =

The customer needs to complete a challenge as part of the 3D Secure authentication inside your mobile app

"MOBILE_THREEDS_CHALLENGE".freeze
CALL_THIRD_PARTY =

The merchant needs to call a third party using the data found in thirdPartyData

"CALL_THIRD_PARTY".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



14
15
16
# File 'lib/PCP-server-Ruby-SDK/models/action_type.rb', line 14

def self.all_vars
  @all_vars ||= [REDIRECT, SHOW_FORM, SHOW_INSTRUCTIONS, SHOW_TRANSACTION_RESULTS, MOBILE_THREEDS_CHALLENGE, CALL_THIRD_PARTY].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



21
22
23
# File 'lib/PCP-server-Ruby-SDK/models/action_type.rb', line 21

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



28
29
30
31
# File 'lib/PCP-server-Ruby-SDK/models/action_type.rb', line 28

def build_from_hash(value)
  return value if ActionType.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #ActionType"
end