Class: Spaceship::ConnectAPI::ResolutionCenterThread

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb

Defined Under Namespace

Modules: ThreadType

Instance Attribute Summary collapse

Attributes included from Model

#id, #reverse_attr_map

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

#attr_mapping, included, #initialize, #reverse_attr_mapping, #to_json, #update_attributes

Instance Attribute Details

#app_store_versionObject

Returns the value of attribute app_store_version.



16
17
18
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 16

def app_store_version
  @app_store_version
end

#can_developer_add_nodeObject

Returns the value of attribute can_developer_add_node.



9
10
11
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 9

def can_developer_add_node
  @can_developer_add_node
end

#created_dateObject

Returns the value of attribute created_date.



12
13
14
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 12

def created_date
  @created_date
end

#last_message_response_dateObject

Returns the value of attribute last_message_response_date.



13
14
15
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 13

def last_message_response_date
  @last_message_response_date
end

#objectionable_contentObject

Returns the value of attribute objectionable_content.



10
11
12
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 10

def objectionable_content
  @objectionable_content
end

#resolution_center_messagesObject

Returns the value of attribute resolution_center_messages.



15
16
17
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 15

def resolution_center_messages
  @resolution_center_messages
end

#stateObject

Returns the value of attribute state.



8
9
10
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 8

def state
  @state
end

#thread_typeObject

Returns the value of attribute thread_type.



11
12
13
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 11

def thread_type
  @thread_type
end

Class Method Details

.all(client: nil, filter:, includes: nil) ⇒ Object

API



48
49
50
51
52
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 48

def self.all(client: nil, filter:, includes: nil)
  client ||= Spaceship::ConnectAPI
  resps = client.get_resolution_center_threads(filter: filter, includes: includes).all_pages
  return resps.flat_map(&:to_models)
end

.typeObject



40
41
42
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 40

def self.type
  return "resolutionCenterThreads"
end

Instance Method Details

#fetch_messages(client: nil, filter: {}, includes: nil) ⇒ Object



54
55
56
57
58
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 54

def fetch_messages(client: nil, filter: {}, includes: nil)
  client ||= Spaceship::ConnectAPI
  resps = client.get_resolution_center_messages(thread_id: id, filter: filter, includes: includes).all_pages
  return resps.flat_map(&:to_models)
end

#fetch_rejection_reasons(client: nil, includes: nil) ⇒ Object



60
61
62
63
64
# File 'spaceship/lib/spaceship/connect_api/models/resolution_center_thread.rb', line 60

def fetch_rejection_reasons(client: nil, includes: nil)
  client ||= Spaceship::ConnectAPI
  resp = client.get_review_rejection(filter: { 'resolutionCenterMessage.resolutionCenterThread': id }, includes: includes)
  return resp.to_models
end