Class: Esignatur::Status
- Inherits:
-
Object
- Object
- Esignatur::Status
- Includes:
- ApiResource
- Defined in:
- lib/esignatur/status.rb
Overview
esignatur status representation More info: api.esignatur.dk/Documentation/Status
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(order:, attributes: {}, api:) ⇒ Status
constructor
A new instance of Status.
Methods included from ApiResource
Constructor Details
#initialize(order:, attributes: {}, api:) ⇒ Status
13 14 15 16 17 |
# File 'lib/esignatur/status.rb', line 13 def initialize(order:, attributes: {}, api:) @attributes = attributes @order = order @api = api end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
11 12 13 |
# File 'lib/esignatur/status.rb', line 11 def api @api end |
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
11 12 13 |
# File 'lib/esignatur/status.rb', line 11 def attributes @attributes end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
11 12 13 |
# File 'lib/esignatur/status.rb', line 11 def order @order end |
Instance Method Details
#fetch ⇒ Object
19 20 21 22 23 |
# File 'lib/esignatur/status.rb', line 19 def fetch response = api_get("status/get/#{order.id}") @attributes = response.json_body if errors.empty? self end |