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

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.



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

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.



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

def brazil_age_rating
  @brazil_age_rating
end

#kids_age_bandObject

Returns the value of attribute kids_age_band.



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

def kids_age_band
  @kids_age_band
end

#primary_categoryObject

Returns the value of attribute primary_category.



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

def primary_category
  @primary_category
end

#primary_subcategory_oneObject

Returns the value of attribute primary_subcategory_one.



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

def primary_subcategory_one
  @primary_subcategory_one
end

#primary_subcategory_twoObject

Returns the value of attribute primary_subcategory_two.



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

def primary_subcategory_two
  @primary_subcategory_two
end

#secondary_categoryObject

Returns the value of attribute secondary_category.



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

def secondary_category
  @secondary_category
end

#secondary_subcategory_oneObject

Returns the value of attribute secondary_subcategory_one.



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

def secondary_subcategory_one
  @secondary_subcategory_one
end

#secondary_subcategory_twoObject

Returns the value of attribute secondary_subcategory_two.



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

def secondary_subcategory_two
  @secondary_subcategory_two
end

Class Method Details

.typeObject



61
62
63
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 61

def self.type
  return "appInfos"
end

Instance Method Details

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

App Info Localizations



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

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



79
80
81
82
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 79

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



88
89
90
91
92
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 88

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



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

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



69
70
71
72
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 69

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



74
75
76
77
# File 'spaceship/lib/spaceship/connect_api/models/app_info.rb', line 74

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