Module: AppStoreConnectApi::Domain::AppAvailabilities

Included in:
AppStoreConnectApi::Domain
Defined in:
lib/app_store_connect_api/domain/app_availabilities.rb

Instance Method Summary collapse

Instance Method Details

#app_availability(app_availability_id, options = {}) ⇒ Object



7
8
9
# File 'lib/app_store_connect_api/domain/app_availabilities.rb', line 7

def app_availability(app_availability_id, options = {})
  get "/v1/appAvailabilities/#{app_availability_id}", options
end

#app_availability_available_territories(app_availability_id, options = {}) ⇒ Object



19
20
21
# File 'lib/app_store_connect_api/domain/app_availabilities.rb', line 19

def app_availability_available_territories(app_availability_id, options = {})
  get "/v1/appAvailabilities/#{app_availability_id}/availableTerritories", options
end

#create_app_availability(attributes, relationships) ⇒ Object



12
13
14
15
16
# File 'lib/app_store_connect_api/domain/app_availabilities.rb', line 12

def create_app_availability(attributes, relationships)
  post '/v1/appAvailabilities', data: { attributes: attributes,
                                        relationships: Utils::RelationshipMapper.expand(relationships, 'availableTerritories' => 'territories'),
                                        type: 'appAvailabilities' }
end