Module: Assently::ApiMappers::CaseMapper

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

Class Method Summary collapse

Class Method Details

.to_api(signature_case) ⇒ Object



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

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