Class: ShopifyAPI::Rest::BaseErrors
- Inherits:
-
Object
- Object
- ShopifyAPI::Rest::BaseErrors
- Extended by:
- T::Sig
- Defined in:
- lib/shopify_api/rest/base_errors.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
- #codes ⇒ Object
- #full_messages ⇒ Object
-
#initialize ⇒ BaseErrors
constructor
A new instance of BaseErrors.
Constructor Details
#initialize ⇒ BaseErrors
Returns a new instance of BaseErrors.
13 14 15 |
# File 'lib/shopify_api/rest/base_errors.rb', line 13 def initialize @errors = T.let([], T::Array[ShopifyAPI::Errors::HttpResponseError]) end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
10 11 12 |
# File 'lib/shopify_api/rest/base_errors.rb', line 10 def errors @errors end |
Instance Method Details
#codes ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/shopify_api/rest/base_errors.rb', line 23 def codes codes = [] @errors.each do |error| codes << error.code end codes end |
#full_messages ⇒ Object
18 19 20 |
# File 'lib/shopify_api/rest/base_errors.rb', line 18 def @errors.join("\n") end |