Module: AppStoreConnectApi::Utils::RelationshipMapper

Defined in:
lib/app_store_connect_api/utils/relationship_mapper.rb

Class Method Summary collapse

Class Method Details

.expand(relationships, type_translations = {}) ⇒ Object



7
8
9
10
11
# File 'lib/app_store_connect_api/utils/relationship_mapper.rb', line 7

def expand(relationships, type_translations = {})
  relationships.each_with_object({}) do |(relationship_type, resource_id), result|
    result[relationship_type] = { data: expand_relationship(resource_id, relationship_type, type_translations) }
  end
end

.resource_keys(ids, resource_type, type_translations = {}) ⇒ Object



13
14
15
# File 'lib/app_store_connect_api/utils/relationship_mapper.rb', line 13

def resource_keys(ids, resource_type, type_translations = {})
  ids.map { |id| resource_key id, resource_type, type_translations }
end