Class: Grape::Idempotency::Configuration
- Inherits:
-
Object
- Object
- Grape::Idempotency::Configuration
- Defined in:
- lib/grape/idempotency.rb
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
-
#conflict_error_response ⇒ Object
Returns the value of attribute conflict_error_response.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#idempotency_key_header ⇒ Object
Returns the value of attribute idempotency_key_header.
-
#request_id_header ⇒ Object
Returns the value of attribute request_id_header.
-
#storage ⇒ Object
Returns the value of attribute storage.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
140 141 142 143 144 145 146 147 148 |
# File 'lib/grape/idempotency.rb', line 140 def initialize @storage = nil @expires_in = 216_000 @idempotency_key_header = "idempotency-key" @request_id_header = "x-request-id" @conflict_error_response = { "error" => "You are using the same idempotent key for two different requests" } end |
Instance Attribute Details
#conflict_error_response ⇒ Object
Returns the value of attribute conflict_error_response.
136 137 138 |
# File 'lib/grape/idempotency.rb', line 136 def conflict_error_response @conflict_error_response end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
136 137 138 |
# File 'lib/grape/idempotency.rb', line 136 def expires_in @expires_in end |
#idempotency_key_header ⇒ Object
Returns the value of attribute idempotency_key_header.
136 137 138 |
# File 'lib/grape/idempotency.rb', line 136 def idempotency_key_header @idempotency_key_header end |
#request_id_header ⇒ Object
Returns the value of attribute request_id_header.
136 137 138 |
# File 'lib/grape/idempotency.rb', line 136 def request_id_header @request_id_header end |
#storage ⇒ Object
Returns the value of attribute storage.
136 137 138 |
# File 'lib/grape/idempotency.rb', line 136 def storage @storage end |