Class: ShopifyAPI::ResourceFeedback

Inherits:
Base show all
Includes:
DisablePrefixCheck
Defined in:
lib/shopify_api/resources/resource_feedback.rb

Defined Under Namespace

Classes: ExistingFeedbackSaved

Constant Summary collapse

EXISTING_FEEDBACK_SAVED_ERROR_MESSAGE =
'WARNING: Attempted call to ShopifyAPI::ResourceFeedback#save' \
'after it was already persisted. Updating an existing ShopifyAPI::ResourceFeedback is not supported.'

Instance Method Summary collapse

Methods inherited from Base

activate_session, #as_json, clear_session, #encode, #headers, init_prefix, init_prefix_explicit, #persisted?

Methods included from Countable

#count

Methods inherited from ActiveResource::Base

delete, headers

Instance Method Details

#saveObject



14
15
16
17
# File 'lib/shopify_api/resources/resource_feedback.rb', line 14

def save
  return super unless persisted?
  raise ExistingFeedbackSaved.new(EXISTING_FEEDBACK_SAVED_ERROR_MESSAGE)
end