Sha256: fcdb70080e01bbebf9c6416af0e27f27af0338aa73ec0449182febb626c9c411

Contents?: true

Size: 1.54 KB

Versions: 2

Compression:

Stored size: 1.54 KB

Contents

require_relative '../model'
require_relative './app_store_review_attachment'

module Spaceship
  class ConnectAPI
    class AppStoreReviewDetail
      include Spaceship::ConnectAPI::Model

      attr_accessor :contact_first_name
      attr_accessor :contact_last_name
      attr_accessor :contact_phone
      attr_accessor :contact_email
      attr_accessor :demo_account_name
      attr_accessor :demo_account_password
      attr_accessor :demo_account_required
      attr_accessor :notes

      attr_accessor :app_store_review_attachments

      attr_mapping({
        "contactFirstName" => "contact_first_name",
        "contactLastName" => "contact_last_name",
        "contactPhone" => "contact_phone",
        "contactEmail" => "contact_email",
        "demoAccountName" => "demo_account_name",
        "demoAccountPassword" => "demo_account_password",
        "demoAccountRequired" => "demo_account_required",
        "notes" => "notes",

        "appStoreReviewAttachments" => "app_store_review_attachments"
      })

      def self.type
        return "appStoreReviewDetails"
      end

      #
      # API
      #

      def update(attributes: nil)
        attributes = reverse_attr_mapping(attributes)
        return Spaceship::ConnectAPI.patch_app_store_review_detail(app_store_review_detail_id: id, attributes: attributes)
      end

      def upload_attachment(path: nil)
        return Spaceship::ConnectAPI::AppStoreReviewAttachment.create(app_store_review_detail_id: id, path: path)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb
fastlane_hotfix-2.165.0 spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb