Class: Ksef::Sessions::Online::Session
- Inherits:
-
Data
- Object
- Data
- Ksef::Sessions::Online::Session
- Defined in:
- lib/ksef/sessions/online.rb
Overview
POST /sessions/online — 201. The session reference and the moment it dies.
Instance Attribute Summary collapse
-
#encryptor ⇒ Object
readonly
Returns the value of attribute encryptor.
-
#reference_number ⇒ Object
readonly
Returns the value of attribute reference_number.
-
#valid_until ⇒ Object
readonly
Returns the value of attribute valid_until.
Instance Method Summary collapse
-
#expired?(now = Time.now) ⇒ Boolean
Twelve hours from creation (§11); the API closes it automatically at this point, so a long-running batch should check rather than assume.
- #to_s ⇒ Object
Instance Attribute Details
#encryptor ⇒ Object (readonly)
Returns the value of attribute encryptor
31 32 33 |
# File 'lib/ksef/sessions/online.rb', line 31 def encryptor @encryptor end |
#reference_number ⇒ Object (readonly)
Returns the value of attribute reference_number
31 32 33 |
# File 'lib/ksef/sessions/online.rb', line 31 def reference_number @reference_number end |
#valid_until ⇒ Object (readonly)
Returns the value of attribute valid_until
31 32 33 |
# File 'lib/ksef/sessions/online.rb', line 31 def valid_until @valid_until end |
Instance Method Details
#expired?(now = Time.now) ⇒ Boolean
Twelve hours from creation (§11); the API closes it automatically at this point, so a long-running batch should check rather than assume.
34 |
# File 'lib/ksef/sessions/online.rb', line 34 def expired?(now = Time.now) = !valid_until.nil? && valid_until <= now |
#to_s ⇒ Object
36 |
# File 'lib/ksef/sessions/online.rb', line 36 def to_s = reference_number |