Sha256: f794089cb7f27b2dba3a14cfb54537b11e385d8f73dc784cfc09acc12cc5b6d4
Contents?: true
Size: 684 Bytes
Versions: 3
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true require "shopify_cli" module Extension module Tasks module Converters module RegistrationConverter ID_FIELD = "id" TYPE_FIELD = "type" TITLE_FIELD = "title" DRAFT_VERSION_FIELD = "draftVersion" def self.from_hash(context, hash) context.abort(context.message("tasks.errors.parse_error")) if hash.nil? Models::Registration.new( id: hash[ID_FIELD].to_i, type: hash[TYPE_FIELD], title: hash[TITLE_FIELD], draft_version: VersionConverter.from_hash(context, hash[DRAFT_VERSION_FIELD]) ) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems