Sha256: e552ead77394789e2f5aad957ac569f25248f79bcb8f1531679978c8f6c61a5f
Contents?: true
Size: 917 Bytes
Versions: 7
Compression:
Stored size: 917 Bytes
Contents
module ShopifyCli class PartnersAPI class Organizations class << self def fetch_all(ctx) resp = PartnersAPI.query(ctx, 'all_organizations') resp['data']['organizations']['nodes'].map do |org| org['stores'] = org['stores']['nodes'] org end end def fetch(ctx, id:) resp = PartnersAPI.query(ctx, 'find_organization', id: id) org = resp['data']['organizations']['nodes'].first return nil if org.nil? org['stores'] = org['stores']['nodes'] org end def fetch_with_app(ctx) resp = PartnersAPI.query(ctx, 'all_orgs_with_apps') resp['data']['organizations']['nodes'].map do |org| org['stores'] = org['stores']['nodes'] org['apps'] = org['apps']['nodes'] org end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems