Class: ShopifyAPI::GraphQL::Bulk::Operation
- Inherits:
-
Object
- Object
- ShopifyAPI::GraphQL::Bulk::Operation
- Defined in:
- lib/shopify_api/graphql/bulk/operation.rb,
lib/shopify_api/graphql/bulk/operation/result.rb
Defined Under Namespace
Classes: Result
Constant Summary collapse
- STATUSES =
%w[ CANCELED CANCELING COMPLETED CREATED EXPIRED FAILED RUNNING ].freeze
Instance Attribute Summary collapse
-
#completed_at ⇒ Object
readonly
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(data, options = nil) ⇒ Operation
constructor
A new instance of Operation.
Constructor Details
#initialize(data, options = nil) ⇒ Operation
Returns a new instance of Operation.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/shopify_api/graphql/bulk/operation.rb', line 41 def initialize(data, = nil) ||= {} url = data[:url] || data[:partial_data_url] @data = data @created_at = Time.parse(@data[:created_at]) @completed_at = Time.parse(@data[:completed_at]) if @data[:completed_at] @results = parse_results(url) if url && [:parse_results] != false end |
Instance Attribute Details
#completed_at ⇒ Object (readonly)
Returns the value of attribute completed_at.
39 40 41 |
# File 'lib/shopify_api/graphql/bulk/operation.rb', line 39 def completed_at @completed_at end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
39 40 41 |
# File 'lib/shopify_api/graphql/bulk/operation.rb', line 39 def created_at @created_at end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
39 40 41 |
# File 'lib/shopify_api/graphql/bulk/operation.rb', line 39 def results @results end |