Sha256: 07daea374520827edc40b71c826296baeee816ddf3d4c97681a23da3ad6d1817

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

module AppStoreConnectApi
  module Domain
    module AppAvailabilities
      # @see https://developer.apple.com/documentation/appstoreconnectapi/read_the_availability_for_an_app
      def app_availability(app_availability_id, options = {})
        get "/v1/appAvailabilities/#{app_availability_id}", options
      end

      # @see https://developer.apple.com/documentation/appstoreconnectapi/modify_territory_availability_for_an_app
      def create_app_availability(attributes, relationships)
        post '/v1/appAvailabilities', data: { attributes: attributes,
                                              relationships: Utils::RelationshipMapper.expand(relationships, 'availableTerritories' => 'territories'),
                                              type: 'appAvailabilities' }
      end

      # @see https://developer.apple.com/documentation/appstoreconnectapi/list_territory_availability_for_an_app
      def app_availability_available_territories(app_availability_id, options = {})
        get "/v1/appAvailabilities/#{app_availability_id}/availableTerritories", options
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
rocleung_as_api_client-1.0.0 lib/app_store_connect_api/domain/app_availabilities.rb
rocleung_as_api_client-0.38.0 lib/app_store_connect_api/domain/app_availabilities.rb
app_store_connect_api_client-0.35.0 lib/app_store_connect_api/domain/app_availabilities.rb