Class: ShopifyAPI::ProductResourceFeedback

Inherits:
Rest::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2022_07/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2022_10/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2023_01/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2023_04/product_resource_feedback.rb,
lib/shopify_api/rest/resources/2023_07/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?, json_response_body_names, #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.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb', line 16

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_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#feedback_generated_atObject (readonly)

Returns the value of attribute feedback_generated_at.



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

def feedback_generated_at
  @feedback_generated_at
end

#messagesObject (readonly)

Returns the value of attribute messages.



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

def messages
  @messages
end

#product_idObject (readonly)

Returns the value of attribute product_id.



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

def product_id
  @product_id
end

#resource_idObject (readonly)

Returns the value of attribute resource_id.



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

def resource_id
  @resource_id
end

#resource_typeObject (readonly)

Returns the value of attribute resource_type.



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

def resource_type
  @resource_type
end

#resource_updated_atObject (readonly)

Returns the value of attribute resource_updated_at.



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

def resource_updated_at
  @resource_updated_at
end

#stateObject (readonly)

Returns the value of attribute state.



52
53
54
# File 'lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb', line 52

def state
  @state
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



54
55
56
# File 'lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb', line 54

def updated_at
  @updated_at
end

Class Method Details

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



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb', line 71

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_nameObject



60
61
62
# File 'lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb', line 60

def json_body_name()
  "resource_feedback"
end