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
Instance Method Details
#certificate ⇒ Object
34 35 36 |
# File 'lib/bullion/models/order.rb', line 34 def certificate Certificate.find(certificate_id) end |
#init_values ⇒ Object
16 17 18 19 20 |
# File 'lib/bullion/models/order.rb', line 16 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
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/bullion/models/order.rb', line 22 def identifiers.each do |identifier| = Authorization.new .order = self .identifier = identifier .save .prep_challenges! end end |