Class: Coarnotify::Client::NotifyResponse
- Inherits:
-
Object
- Object
- Coarnotify::Client::NotifyResponse
- Defined in:
- lib/coarnotify/client.rb
Overview
An object representing the response from a COAR Notify inbox.
This contains the action that was carried out on the server:
-
CREATED - a new resource was created
-
ACCEPTED - the request was accepted, but the resource was not yet created
In the event that the resource is created, then there will also be a location URL which will give you access to the resource
Constant Summary collapse
- CREATED =
"created"- ACCEPTED =
"accepted"
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
-
#initialize(action, location = nil) ⇒ NotifyResponse
constructor
Construct a new NotifyResponse object with the action (created or accepted) and the location URL (optional).
Constructor Details
#initialize(action, location = nil) ⇒ NotifyResponse
Construct a new NotifyResponse object with the action (created or accepted) and the location URL (optional)
31 32 33 34 |
# File 'lib/coarnotify/client.rb', line 31 def initialize(action, location = nil) @action = action @location = location end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
25 26 27 |
# File 'lib/coarnotify/client.rb', line 25 def action @action end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
25 26 27 |
# File 'lib/coarnotify/client.rb', line 25 def location @location end |