Class: Bullion::Models::Order
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Bullion::Models::Order
- Defined in:
- lib/bullion/models/order.rb
Overview
ACMEv2 Order model
Instance Method Summary collapse
-
#domains ⇒ Object
Used to extract domains from order (mostly for comparison with CSR).
- #init_values ⇒ Object
- #prep_authorizations! ⇒ Object
Instance Method Details
#domains ⇒ Object
Used to extract domains from order (mostly for comparison with CSR)
44 |
# File 'lib/bullion/models/order.rb', line 44 def domains = identifiers.map { it["value"] } |
#init_values ⇒ Object
25 26 27 28 29 |
# File 'lib/bullion/models/order.rb', line 25 def init_values self.expires ||= Time.now + (60 * 60) self.not_before ||= Time.now self.not_after ||= Time.now + (60 * 60 * 24 * 90) # 90 days end |
#prep_authorizations! ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/bullion/models/order.rb', line 31 def identifiers.each do |identifier| = Authorization.new .order = self .identifier = identifier .save .prep_challenges! end end |