Sha256: 892394b3c00447185b430d15002b19e7130bcd15e828022d43a62589f57db927
Contents?: true
Size: 714 Bytes
Versions: 17
Compression:
Stored size: 714 Bytes
Contents
# frozen_string_literal: true require 'shopify_cli' module Extension module Tasks module Converters module AppConverter API_KEY_FIELD = 'apiKey' API_SECRET_KEYS_FIELD = 'apiSecretKeys' API_SECRET_FIELD = 'secret' TITLE_FIELD = 'title' ORGANIZATION_NAME_FIELD = 'businessName' def self.from_hash(hash, organization = {}) return nil if hash.nil? Models::App.new( api_key: hash[API_KEY_FIELD], secret: hash[API_SECRET_KEYS_FIELD].first[API_SECRET_FIELD], title: hash[TITLE_FIELD], business_name: organization[ORGANIZATION_NAME_FIELD] ) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems