Class: Fawry::FawryCallback

Inherits:
Object
  • Object
show all
Includes:
Utils
Defined in:
lib/fawry/fawry_callback.rb

Constant Summary

Constants included from Utils

Utils::TRUTH_VALUES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#enrich_object

Constructor Details

#initialize(callback_params, opts) ⇒ FawryCallback

Returns a new instance of FawryCallback.



9
10
11
12
13
# File 'lib/fawry/fawry_callback.rb', line 9

def initialize(callback_params, opts)
  @callback_params = callback_params
  @fawry_secure_key = Fawry.configuration.fawry_secure_key || ENV.fetch('FAWRY_SECURE_KEY')
  @options = opts
end

Instance Attribute Details

#callback_paramsObject (readonly)

Returns the value of attribute callback_params.



7
8
9
# File 'lib/fawry/fawry_callback.rb', line 7

def callback_params
  @callback_params
end

#fawry_secure_keyObject (readonly)

Returns the value of attribute fawry_secure_key.



7
8
9
# File 'lib/fawry/fawry_callback.rb', line 7

def fawry_secure_key
  @fawry_secure_key
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/fawry/fawry_callback.rb', line 7

def options
  @options
end

Instance Method Details

#parseObject



15
16
17
18
19
20
# File 'lib/fawry/fawry_callback.rb', line 15

def parse
  verify_callback_signature!
  build_callback

  self
end