Class: ShopifyAPI::ProductResourceFeedback

Inherits:
Rest::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2021_10/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2022_01/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb

Instance Attribute Summary collapse

Attributes inherited from Rest::Base

#errors, #original_state

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rest::Base

base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, has_many?, has_one?, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, #save, #save!, #to_hash

Constructor Details

#initialize(session: ShopifyAPI::Context.active_session) ⇒ ProductResourceFeedback

Returns a new instance of ProductResourceFeedback.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 12

def initialize(session: ShopifyAPI::Context.active_session)
  super(session: session)

  @created_at = T.let(nil, T.nilable(String))
  @feedback_generated_at = T.let(nil, T.nilable(String))
  @messages = T.let(nil, T.nilable(T::Array[T.untyped]))
  @product_id = T.let(nil, T.nilable(Integer))
  @resource_id = T.let(nil, T.nilable(Integer))
  @resource_type = T.let(nil, T.nilable(String))
  @resource_updated_at = T.let(nil, T.nilable(String))
  @state = T.let(nil, T.nilable(String))
  @updated_at = T.let(nil, T.nilable(String))
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base

Instance Attribute Details

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at.



34
35
36
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 34

def created_at
  @created_at
end

#feedback_generated_at ⇒ Object (readonly)

Returns the value of attribute feedback_generated_at.



36
37
38
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 36

def feedback_generated_at
  @feedback_generated_at
end

#messages ⇒ Object (readonly)

Returns the value of attribute messages.



38
39
40
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 38

def messages
  @messages
end

#product_id ⇒ Object (readonly)

Returns the value of attribute product_id.



40
41
42
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 40

def product_id
  @product_id
end

#resource_id ⇒ Object (readonly)

Returns the value of attribute resource_id.



42
43
44
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 42

def resource_id
  @resource_id
end

#resource_type ⇒ Object (readonly)

Returns the value of attribute resource_type.



44
45
46
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 44

def resource_type
  @resource_type
end

#resource_updated_at ⇒ Object (readonly)

Returns the value of attribute resource_updated_at.



46
47
48
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 46

def resource_updated_at
  @resource_updated_at
end

#state ⇒ Object (readonly)

Returns the value of attribute state.



48
49
50
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 48

def state
  @state
end

#updated_at ⇒ Object (readonly)

Returns the value of attribute updated_at.



50
51
52
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 50

def updated_at
  @updated_at
end

Class Method Details

.all(product_id: nil, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 67

def all(
  product_id: nil,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {product_id: product_id},
    params: {}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[ProductResourceFeedback])
end

.json_body_name ⇒ Object



56
57
58
# File 'lib/shopify_api/rest/resources/2021_07/product_resource_feedback.rb', line 56

def json_body_name()
  "resource_feedback"
end