Sha256: d7f775cd3e4fe62997602fa5915ad1df6646846f770d83569f379946bdccd040

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

require_relative '../model'
module Spaceship
  class ConnectAPI
    class IdfaDeclaration
      include Spaceship::ConnectAPI::Model

      attr_accessor :serves_ads
      attr_accessor :attributes_app_installation_to_previous_ad
      attr_accessor :attributes_action_with_previous_ad
      attr_accessor :honors_limited_ad_tracking

      module AppStoreAgeRating
        FOUR_PLUS = "FOUR_PLUS"
      end

      attr_mapping({
        "servesAds" => "serves_ads",
        "attributesAppInstallationToPreviousAd" => "attributes_app_installation_to_previous_ad",
        "attributesActionWithPreviousAd" => "attributes_action_with_previous_ad",
        "honorsLimitedAdTracking" => "honors_limited_ad_tracking"
      })

      def self.type
        return "idfaDeclarations"
      end

      #
      # API
      #

      def update(client: nil, attributes: nil)
        client ||= Spaceship::ConnectAPI
        attributes = reverse_attr_mapping(attributes)
        client.patch_idfa_declaration(idfa_declaration_id: id, attributes: attributes)
      end

      def delete!(client: nil)
        client ||= Spaceship::ConnectAPI
        client.delete_idfa_declaration(idfa_declaration_id: id)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastlane_hotfix-2.187.0 spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb