Class: Fastlane::Actions::HuaweiAppgalleryConnectWithdrawReviewAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb

Class Method Summary collapse

Class Method Details

.authorsObject



21
22
23
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 21

def self.authors
  ["Shreejan Shrestha"]
end

.available_optionsObject



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 33

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :client_id,
                                 env_name: "HUAWEI_APPGALLERY_CONNECT_CLIENT_ID",
                                 description: "Huawei AppGallery Connect Client ID",
                                 optional: false,
                                 type: String),

    FastlaneCore::ConfigItem.new(key: :client_secret,
                                 env_name: "HUAWEI_APPGALLERY_CONNECT_CLIENT_SECRET",
                                 description: "Huawei AppGallery Connect Client Secret",
                                 optional: false,
                                 type: String),

    FastlaneCore::ConfigItem.new(key: :app_id,
                                 env_name: "HUAWEI_APPGALLERY_CONNECT_APP_ID",
                                 description: "Huawei AppGallery Connect App ID",
                                 optional: false,
                                 type: String)
  ]
end

.descriptionObject



17
18
19
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 17

def self.description
  "Withdraw an app version currently under AppGallery review"
end

.detailsObject



29
30
31
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 29

def self.details
  "Withdraws an app version from review so it can be updated and submitted again"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 55

def self.is_supported?(platform)
  [:android].include?(platform)
end

.return_valueObject



25
26
27
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 25

def self.return_value
  "Returns true when AppGallery accepts the review withdrawal"
end

.run(params) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/fastlane/plugin/huawei_appgallery_connect/actions/huawei_appgallery_connect_withdraw_review.rb', line 7

def self.run(params)
  token = Helper::HuaweiAppgalleryConnectHelper.get_token(params[:client_id], params[:client_secret])

  if token.nil?
    UI.user_error!("Cannot retrieve token, please check your client ID and client secret")
  end

  Helper::HuaweiAppgalleryConnectHelper.withdraw_app_review(token, params[:client_id], params[:app_id])
end