Class: ShopifyApiBruv::Resources::Graphql::ResourceResponse
- Inherits:
-
Object
- Object
- ShopifyApiBruv::Resources::Graphql::ResourceResponse
- Defined in:
- lib/shopify_api_bruv/resources/graphql/resource_response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#throttle_status ⇒ Object
Returns the value of attribute throttle_status.
Instance Method Summary collapse
- #as_open_struct ⇒ Object
-
#initialize(body:, query:) ⇒ ResourceResponse
constructor
A new instance of ResourceResponse.
Constructor Details
#initialize(body:, query:) ⇒ ResourceResponse
Returns a new instance of ResourceResponse.
9 10 11 |
# File 'lib/shopify_api_bruv/resources/graphql/resource_response.rb', line 9 def initialize(body:, query:) parse_body(body:, query:) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
7 8 9 |
# File 'lib/shopify_api_bruv/resources/graphql/resource_response.rb', line 7 def data @data end |
#extensions ⇒ Object
Returns the value of attribute extensions.
7 8 9 |
# File 'lib/shopify_api_bruv/resources/graphql/resource_response.rb', line 7 def extensions @extensions end |
#throttle_status ⇒ Object
Returns the value of attribute throttle_status.
7 8 9 |
# File 'lib/shopify_api_bruv/resources/graphql/resource_response.rb', line 7 def throttle_status @throttle_status end |
Instance Method Details
#as_open_struct ⇒ Object
13 14 15 16 17 |
# File 'lib/shopify_api_bruv/resources/graphql/resource_response.rb', line 13 def as_open_struct # rubocop:disable Style/OpenStructUse JSON.parse(data.to_json, object_class: OpenStruct) # rubocop:enable Style/OpenStructUse end |