Module: ADIWG::Mdtranslator::Writers::MdJson::Allocation

Defined in:
lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_allocation.rb

Class Method Summary collapse

Class Method Details

.build(hAllocation) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_allocation.rb', line 21

def self.build(hAllocation)

   Jbuilder.new do |json|
      json.sourceAllocationId hAllocation[:id]
      json.amount hAllocation[:amount]
      json.currency hAllocation[:currency]
      json.sourceId hAllocation[:sourceId]
      json.recipientId hAllocation[:recipientId]
      json.responsibleParty @Namespace.json_map(hAllocation[:responsibleParties], ResponsibleParty)
      json.matching hAllocation[:matching]
      json.onlineResource @Namespace.json_map(hAllocation[:onlineResources], OnlineResource)
      json.comment hAllocation[:comment]
   end

end