Module: Egree::ApiMappers::CaseMapper

Defined in:
lib/egree/api_mappers/case_mapper.rb

Class Method Summary collapse

Class Method Details

.to_api(signature_case) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/egree/api_mappers/case_mapper.rb', line 9

def self.to_api signature_case
  {
    "Name" => signature_case.name,
    "Documents" => signature_case.documents.map { |document|
      Egree::ApiMappers::DocumentMapper.to_api(document)
    },
    "Parties" => signature_case.parties.map { |party|
      Egree::ApiMappers::PartyMapper.to_api(party)
    },
    "AllowedSignatureTypes" => signature_case.signature_types
  }.merge(Egree::ApiMappers::ReferenceIdMapper.to_api(signature_case.reference_id))
end