class ShopifyGraphql::Response
Attributes
data[RW]
errors[R]
extensions[R]
raw[R]
Public Class Methods
new(response)
click to toggle source
# File lib/shopify_graphql/response.rb, line 6 def initialize(response) @raw = response @data = response.data @extensions = response.extensions @errors = response.errors end
Public Instance Methods
points_left()
click to toggle source
# File lib/shopify_graphql/response.rb, line 13 def points_left extensions&.cost&.throttleStatus&.currentlyAvailable end
points_limit()
click to toggle source
# File lib/shopify_graphql/response.rb, line 17 def points_limit extensions&.cost&.throttleStatus&.maximumAvailable end
points_maxed?(threshold: 0)
click to toggle source
# File lib/shopify_graphql/response.rb, line 25 def points_maxed?(threshold: 0) points_left < threshold end
points_restore_rate()
click to toggle source
# File lib/shopify_graphql/response.rb, line 21 def points_restore_rate extensions&.cost&.throttleStatus&.restoreRate end