Class: Bullion::Models::Account

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/bullion/models/account.rb

Overview

ACMEv2 Account model

Instance Method Summary collapse

Instance Method Details

#kidObject



14
15
16
# File 'lib/bullion/models/account.rb', line 14

def kid
  id
end

#start_order(identifiers:, not_before: nil, not_after: nil) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/bullion/models/account.rb', line 18

def start_order(identifiers:, not_before: nil, not_after: nil)
  order = Order.new
  order.not_before = not_before if not_before
  order.not_after = not_after if not_after
  order. = self
  order.status = "pending"
  order.identifiers = identifiers
  order.save

  order.prep_authorizations!

  order
end