Class: Spaceship::ConnectAPI::AppInfo

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

Defined Under Namespace

Modules: AppStoreAgeRating, AppStoreState, State

Constant Summary collapse

ESSENTIAL_INCLUDES =
[
  "primaryCategory",
  "primarySubcategoryOne",
  "primarySubcategoryTwo",
  "secondaryCategory",
  "secondarySubcategoryOne",
  "secondarySubcategoryTwo"
].join(",")

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_age_ratingObject

Returns the value of attribute app_store_age_rating.



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

def app_store_age_rating
  @app_store_age_rating
end

#app_store_stateObject

Returns the value of attribute app_store_state.



7
8
9
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 7

def app_store_state
  @app_store_state
end

#brazil_age_ratingObject

Returns the value of attribute brazil_age_rating.



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

def brazil_age_rating
  @brazil_age_rating
end

#kids_age_bandObject

Returns the value of attribute kids_age_band.



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

def kids_age_band
  @kids_age_band
end

#primary_categoryObject

Returns the value of attribute primary_category.



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

def primary_category
  @primary_category
end

#primary_subcategory_oneObject

Returns the value of attribute primary_subcategory_one.



14
15
16
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 14

def primary_subcategory_one
  @primary_subcategory_one
end

#primary_subcategory_twoObject

Returns the value of attribute primary_subcategory_two.



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

def primary_subcategory_two
  @primary_subcategory_two
end

#secondary_categoryObject

Returns the value of attribute secondary_category.



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

def secondary_category
  @secondary_category
end

#secondary_subcategory_oneObject

Returns the value of attribute secondary_subcategory_one.



17
18
19
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 17

def secondary_subcategory_one
  @secondary_subcategory_one
end

#secondary_subcategory_twoObject

Returns the value of attribute secondary_subcategory_two.



18
19
20
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 18

def secondary_subcategory_two
  @secondary_subcategory_two
end

#stateObject

Returns the value of attribute state.



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

def state
  @state
end

Class Method Details

.typeObject



85
86
87
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 85

def self.type
  return "appInfos"
end

Instance Method Details

#create_app_info_localization(client: nil, attributes: nil) ⇒ Object

App Info Localizations



122
123
124
125
126
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 122

def create_app_info_localization(client: nil, attributes: nil)
  client ||= Spaceship::ConnectAPI
  resp = client.post_app_info_localization(app_info_id: id, attributes: attributes)
  return resp.to_models.first
end

#delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object



103
104
105
106
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 103

def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
  client ||= Spaceship::ConnectAPI
  client.delete_app_info(app_info_id: id)
end

#fetch_age_rating_declaration(client: nil) ⇒ Object

Age Rating Declaration



112
113
114
115
116
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 112

def fetch_age_rating_declaration(client: nil)
  client ||= Spaceship::ConnectAPI
  resp = client.get_age_rating_declaration(app_info_id: id)
  return resp.to_models.first
end

#get_app_info_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object



128
129
130
131
132
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 128

def get_app_info_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
  client ||= Spaceship::ConnectAPI
  resp = client.get_app_info_localizations(app_info_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
  return resp.to_models
end

#update(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object

API



93
94
95
96
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 93

def update(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
  client ||= Spaceship::ConnectAPI
  client.patch_app_info(app_info_id: id).first
end

#update_categories(client: nil, category_id_map: nil) ⇒ Object



98
99
100
101
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 98

def update_categories(client: nil, category_id_map: nil)
  client ||= Spaceship::ConnectAPI
  client.patch_app_info_categories(app_info_id: id, category_id_map: category_id_map).first
end