Class: Chargify2::Direct::ResponseParameters
- Inherits:
-
Object
- Object
- Chargify2::Direct::ResponseParameters
- Defined in:
- lib/chargify2/direct.rb
Overview
There is no need to instantiate a ResponseParameters instance directly. Use Direct#response_parameters instead.
Instance Attribute Summary collapse
-
#api_id ⇒ Object
readonly
Returns the value of attribute api_id.
-
#call_id ⇒ Object
readonly
Returns the value of attribute call_id.
-
#nonce ⇒ Object
readonly
Returns the value of attribute nonce.
-
#result_code ⇒ Object
readonly
Returns the value of attribute result_code.
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(params, client) ⇒ ResponseParameters
constructor
A new instance of ResponseParameters.
- #success? ⇒ Boolean
- #verified? ⇒ Boolean
Constructor Details
#initialize(params, client) ⇒ ResponseParameters
Returns a new instance of ResponseParameters.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/chargify2/direct.rb', line 107 def initialize(params, client) args = params.recursive_symbolize_keys @api_id = client.api_id @secret = client.api_secret @status_code = args[:status_code] @timestamp = args[:timestamp] @nonce = args[:nonce] @result_code = args[:result_code] @call_id = args[:call_id] @signature = args[:signature] validate_args end |
Instance Attribute Details
#api_id ⇒ Object (readonly)
Returns the value of attribute api_id.
98 99 100 |
# File 'lib/chargify2/direct.rb', line 98 def api_id @api_id end |
#call_id ⇒ Object (readonly)
Returns the value of attribute call_id.
103 104 105 |
# File 'lib/chargify2/direct.rb', line 103 def call_id @call_id end |
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
100 101 102 |
# File 'lib/chargify2/direct.rb', line 100 def nonce @nonce end |
#result_code ⇒ Object (readonly)
Returns the value of attribute result_code.
102 103 104 |
# File 'lib/chargify2/direct.rb', line 102 def result_code @result_code end |
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
104 105 106 |
# File 'lib/chargify2/direct.rb', line 104 def secret @secret end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
105 106 107 |
# File 'lib/chargify2/direct.rb', line 105 def signature @signature end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
101 102 103 |
# File 'lib/chargify2/direct.rb', line 101 def status_code @status_code end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
99 100 101 |
# File 'lib/chargify2/direct.rb', line 99 def @timestamp end |
Instance Method Details
#success? ⇒ Boolean
128 129 130 |
# File 'lib/chargify2/direct.rb', line 128 def success? status_code.to_s == '200' end |