Module: ClientTransactionId

Included in:
EppXml, EppXml::Contact, EppXml::Domain, EppXml::Keyrelay, EppXml::Session
Defined in:
lib/client_transaction_id.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cl_tridObject

Returns the value of attribute cl_trid.



2
3
4
# File 'lib/client_transaction_id.rb', line 2

def cl_trid
  @cl_trid
end

#cl_trid_prefixObject

Returns the value of attribute cl_trid_prefix.



2
3
4
# File 'lib/client_transaction_id.rb', line 2

def cl_trid_prefix
  @cl_trid_prefix
end

Instance Method Details

#clTRIDObject



9
10
11
12
13
14
# File 'lib/client_transaction_id.rb', line 9

def clTRID
  return nil if cl_trid == false
  return cl_trid if cl_trid
  return "#{cl_trid_prefix}-#{Time.now.to_i}" if cl_trid_prefix
  Time.now.to_i
end

#initialize(args = {}) ⇒ Object



4
5
6
7
# File 'lib/client_transaction_id.rb', line 4

def initialize(args = {})
  self.cl_trid = args[:cl_trid]
  self.cl_trid_prefix = args[:cl_trid_prefix]
end