gitlab_support_readiness 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 322f32c5b1347111c6546cab83120538806148efd451f5d6b406abf2bd100110
|
4
|
+
data.tar.gz: fe095b0303f8385f9e2716789fec729cf7102a45687b55876012e26f535b8649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2971c436d14b76a4718af776e07492e9ddb8d69c1d2435b2e2a41a365b2cbe7f735ce5de018b34911e576939db1739d343f981f6ba5e62d2fa87941245b8e9a
|
7
|
+
data.tar.gz: 24f4f50ebaa586a78feb5effb0e415bf4f6786ef01fe695df2b5044b3a3e08d94cc65a2cf36cf7ec09974aa1ad9de830030901c3fbfceaff4ef29a08588d807f
|
@@ -74,6 +74,359 @@ module Readiness
|
|
74
74
|
false
|
75
75
|
end
|
76
76
|
|
77
|
+
##
|
78
|
+
# Return an Array of accounts from Salesforce for Global support
|
79
|
+
#
|
80
|
+
# @author Jason Colyer
|
81
|
+
# @since 1.0.26
|
82
|
+
# @param client [Object] An instance of {Readiness::Salesforce::Client}
|
83
|
+
# @return [Array]
|
84
|
+
# @example
|
85
|
+
# config = Readiness::Salesforce::Configuration.new
|
86
|
+
# config.api_version = '58.0'
|
87
|
+
# config.client_id = ENV.fetch('SFDC_CLIENTID')
|
88
|
+
# config.client_secret = ENV.fetch('SFDC_CLIENTSECRET')
|
89
|
+
# config.password = ENV.fetch('SFDC_PASSWORD')
|
90
|
+
# config.security_token = ENV.fetch('SFDC_SECURITYTOKEN')
|
91
|
+
# config.username = ENV.fetch('SFDC_USERNAME')
|
92
|
+
# client = Readiness::Salesforce::Client.new(config)
|
93
|
+
# accounts = Readiness::Salesforce::Accounts.global_accounts(client)
|
94
|
+
# pp accounts.count
|
95
|
+
# # => 51234
|
96
|
+
def self.global_accounts(client)
|
97
|
+
query = Queries.new(global_sync_query_string)
|
98
|
+
results = Queries.run!(client, query)
|
99
|
+
results.map { |r| global_sync_object(r) }
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Return an Array of accounts from Salesforce for US Government support
|
104
|
+
#
|
105
|
+
# @author Jason Colyer
|
106
|
+
# @since 1.0.26
|
107
|
+
# @param client [Object] An instance of {Readiness::Salesforce::Client}
|
108
|
+
# @return [Array]
|
109
|
+
# @example
|
110
|
+
# config = Readiness::Salesforce::Configuration.new
|
111
|
+
# config.api_version = '58.0'
|
112
|
+
# config.client_id = ENV.fetch('SFDC_CLIENTID')
|
113
|
+
# config.client_secret = ENV.fetch('SFDC_CLIENTSECRET')
|
114
|
+
# config.password = ENV.fetch('SFDC_PASSWORD')
|
115
|
+
# config.security_token = ENV.fetch('SFDC_SECURITYTOKEN')
|
116
|
+
# config.username = ENV.fetch('SFDC_USERNAME')
|
117
|
+
# client = Readiness::Salesforce::Client.new(config)
|
118
|
+
# accounts = Readiness::Salesforce::Accounts.usgov_accounts(client)
|
119
|
+
# pp accounts.count
|
120
|
+
# # => 7125
|
121
|
+
def self.usgov_accounts(client)
|
122
|
+
query = Queries.new(usgov_sync_query_string)
|
123
|
+
results = Queries.run!(client, query)
|
124
|
+
results.map { |r| usgov_sync_object(r) }
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# Return a Hash used for the account sync for Global support
|
129
|
+
#
|
130
|
+
# @author Jason Colyer
|
131
|
+
# @since 1.0.26
|
132
|
+
def self.global_sync_object(account)
|
133
|
+
subscriptions = account_subscriptions(account)
|
134
|
+
expiration = account_expiration(account)
|
135
|
+
type = account_type(account, expiration)
|
136
|
+
partner = %w[alliance_partner open_partner select_partner].include?(type)
|
137
|
+
{
|
138
|
+
"name" => "#{Digest::SHA1.hexdigest(account.Account_ID_18__c)[0..7]} #{account.Name}",
|
139
|
+
"salesforce_id" => account.Account_ID_18__c,
|
140
|
+
"sfdc_short_id" => account.Account_ID_18__c[..-4],
|
141
|
+
"support_level" => (partner ? 'ultimate' : global_highest_support_level(subscriptions)),
|
142
|
+
"aar" => account_arr(account).to_f,
|
143
|
+
"sales_segmentation" => account_market_segment(account),
|
144
|
+
"account_owner" => account.Account_Owner_Calc__c,
|
145
|
+
"type" => type,
|
146
|
+
"technical_account_manager" => account.Technical_Account_Manager_Name__c,
|
147
|
+
"solutions_architect" => account.Solutions_Architect_Lookup__r&.Name,
|
148
|
+
"seats_decimal" => account_seats(account).to_f,
|
149
|
+
"org_region" => account_region(account),
|
150
|
+
"health_score" => account_health_score(account),
|
151
|
+
"expiration_date" => expiration,
|
152
|
+
"restricted_account" => (account.Restricted_Account__c == 'Restricted Party'),
|
153
|
+
"greatly_expired" => (partner ? false : Date.parse(expiration) <= Date.today.years_ago(3)),
|
154
|
+
"sub_consumption_ai" => subscriptions.include?('sub_consumption_ai'),
|
155
|
+
"sub_consumption_cicd_minutes" => subscriptions.include?('sub_consumption_cicd_minutes'),
|
156
|
+
"sub_consumption_eap" => subscriptions.include?('sub_consumption_eap'),
|
157
|
+
"sub_consumption_storage" => subscriptions.include?('sub_consumption_storage'),
|
158
|
+
"sub_proserv" => subscriptions.include?('sub_proserv'),
|
159
|
+
"sub_dotcom_premium" => subscriptions.include?('sub_dotcom_premium'),
|
160
|
+
"sub_dotcom_ultimate" => subscriptions.include?('sub_dotcom_ultimate'),
|
161
|
+
"sub_sm_starter" => subscriptions.include?('sub_sm_starter'),
|
162
|
+
"sub_sm_premium" => subscriptions.include?('sub_sm_premium'),
|
163
|
+
"sub_sm_ultimate" => subscriptions.include?('sub_sm_ultimate'),
|
164
|
+
"sub_usgov_12x5" => subscriptions.include?('sub_usgov_12x5'),
|
165
|
+
"sub_usgov_24x7" => subscriptions.include?('sub_usgov_24x7'),
|
166
|
+
"sub_gitlab_dedicated" => subscriptions.include?('sub_gitlab_dedicated'),
|
167
|
+
"sub_edu" => subscriptions.include?('sub_edu'),
|
168
|
+
"sub_oss" => subscriptions.include?('sub_oss'),
|
169
|
+
"sub_community_other" => subscriptions.include?('sub_community_other'),
|
170
|
+
"sub_ss_ase" => subscriptions.include?('sub_ss_ase'),
|
171
|
+
"sub_other" => subscriptions.include?('sub_other'),
|
172
|
+
"partner_customer" => account_is_partner_customer?(account, type),
|
173
|
+
"not_in_sfdc" => false,
|
174
|
+
"support_hold" => account.Support_Hold__c,
|
175
|
+
"sold_to" => account_sold_to(account)
|
176
|
+
}
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Return a Hash used for the account sync for US Government support
|
181
|
+
#
|
182
|
+
# @author Jason Colyer
|
183
|
+
# @since 1.0.26
|
184
|
+
def self.usgov_sync_object(account)
|
185
|
+
subscriptions = account_subscriptions(account)
|
186
|
+
expiration = account_expiration(account)
|
187
|
+
type = account_type(account, expiration)
|
188
|
+
partner = %w[alliance_partner open_partner select_partner].include?(type)
|
189
|
+
{
|
190
|
+
"name" => "#{Digest::SHA1.hexdigest(account.Account_ID_18__c)[0..7]} #{account.Name}",
|
191
|
+
"salesforce_id" => account.Account_ID_18__c,
|
192
|
+
"sfdc_short_id" => account.Account_ID_18__c[..-4],
|
193
|
+
"support_level" => usgov_highest_support_level(subscriptions),
|
194
|
+
"arr" => account_arr(account).to_f,
|
195
|
+
"market_segment" => account_market_segment(account),
|
196
|
+
"account_owner" => account.Account_Owner_Calc__c,
|
197
|
+
"type" => type,
|
198
|
+
"technical_account_manager" => account.Technical_Account_Manager_Name__c,
|
199
|
+
"solutions_architect" => account.Solutions_Architect_Lookup__r&.Name,
|
200
|
+
"number_of_seats" => account_seats(account).to_f,
|
201
|
+
"health_score" => account_health_score(account),
|
202
|
+
"expiration_date" => expiration,
|
203
|
+
"restricted_account" => (account.Restricted_Account__c == 'Restricted Party'),
|
204
|
+
"greatly_expired" => (partner ? false : Date.parse(expiration) <= Date.today.years_ago(3)),
|
205
|
+
"sub_consumption_ai" => subscriptions.include?('sub_consumption_ai'),
|
206
|
+
"sub_consumption_cicd_minutes" => subscriptions.include?('sub_consumption_cicd_minutes'),
|
207
|
+
"sub_consumption_eap" => subscriptions.include?('sub_consumption_eap'),
|
208
|
+
"sub_consumption_storage" => subscriptions.include?('sub_consumption_storage'),
|
209
|
+
"sub_proserv" => subscriptions.include?('sub_proserv'),
|
210
|
+
"sub_dotcom_premium" => subscriptions.include?('sub_dotcom_premium'),
|
211
|
+
"sub_dotcom_ultimate" => subscriptions.include?('sub_dotcom_ultimate'),
|
212
|
+
"sub_sm_starter" => subscriptions.include?('sub_sm_starter'),
|
213
|
+
"sub_sm_premium" => subscriptions.include?('sub_sm_premium'),
|
214
|
+
"sub_sm_ultimate" => subscriptions.include?('sub_sm_ultimate'),
|
215
|
+
"sub_usgov_12x5" => subscriptions.include?('sub_usgov_12x5'),
|
216
|
+
"sub_usgov_24x7" => subscriptions.include?('sub_usgov_24x7'),
|
217
|
+
"sub_gitlab_dedicated" => subscriptions.include?('sub_gitlab_dedicated'),
|
218
|
+
"sub_edu" => subscriptions.include?('sub_edu'),
|
219
|
+
"sub_oss" => subscriptions.include?('sub_oss'),
|
220
|
+
"sub_community_other" => subscriptions.include?('sub_community_other'),
|
221
|
+
"sub_ss_ase" => subscriptions.include?('sub_ss_ase'),
|
222
|
+
"sub_other" => subscriptions.include?('sub_other'),
|
223
|
+
"not_in_sfdc" => false,
|
224
|
+
"support_hold" => account.Support_Hold__c
|
225
|
+
}
|
226
|
+
end
|
227
|
+
|
228
|
+
##
|
229
|
+
# Return an Array of subscriptions used for the account sync
|
230
|
+
#
|
231
|
+
# @author Jason Colyer
|
232
|
+
# @since 1.0.26
|
233
|
+
def self.account_subscriptions(account)
|
234
|
+
subs = []
|
235
|
+
return subs if account.Zuora__R00N40000001lGjTEAU__r.nil?
|
236
|
+
|
237
|
+
account.Zuora__R00N40000001lGjTEAU__r.each do |sub|
|
238
|
+
next if Date.parse(sub.Zuora__EffectiveEndDate__c) < Date.today
|
239
|
+
|
240
|
+
subs.push('sub_consumption_ai') if SubscriptionDefinitions.consumption_ai.include? sub.Name
|
241
|
+
subs.push('sub_consumption_cicd_minutes') if SubscriptionDefinitions.consumption_cicd_minutes.include? sub.Name
|
242
|
+
subs.push('sub_consumption_eap') if SubscriptionDefinitions.consumption_eap.include? sub.Name
|
243
|
+
subs.push('sub_consumption_storage') if SubscriptionDefinitions.consumption_storage.include? sub.Name
|
244
|
+
subs.push('sub_proserv') if SubscriptionDefinitions.proserv.include? sub.Name
|
245
|
+
subs.push('sub_dotcom_premium') if SubscriptionDefinitions.dotcom_premium.include? sub.Name
|
246
|
+
subs.push('sub_dotcom_ultimate') if SubscriptionDefinitions.dotcom_ultimate.include? sub.Name
|
247
|
+
subs.push('sub_sm_starter') if SubscriptionDefinitions.sm_starter.include? sub.Name
|
248
|
+
subs.push('sub_sm_premium') if SubscriptionDefinitions.sm_premium.include? sub.Name
|
249
|
+
subs.push('sub_sm_ultimate') if SubscriptionDefinitions.sm_ultimate.include? sub.Name
|
250
|
+
subs.push('sub_usgov_12x5') if SubscriptionDefinitions.usgov_12x5.include? sub.Name
|
251
|
+
subs.push('sub_usgov_24x7') if SubscriptionDefinitions.usgov_24x7.include? sub.Name
|
252
|
+
subs.push('sub_gitlab_dedicated') if SubscriptionDefinitions.gitlab_dedicated.include? sub.Name
|
253
|
+
subs.push('sub_edu') if SubscriptionDefinitions.edu.include? sub.Name
|
254
|
+
subs.push('sub_oss') if SubscriptionDefinitions.oss.include? sub.Name
|
255
|
+
subs.push('sub_community_other') if SubscriptionDefinitions.community_other.include? sub.Name
|
256
|
+
subs.push('sub_ss_ase') if SubscriptionDefinitions.ss_ase.include? sub.Name
|
257
|
+
subs.push('sub_usgov_24x7') if SubscriptionDefinitions.fedramp.include? sub.Name
|
258
|
+
subs.push('sub_gitlab_dedicated') if SubscriptionDefinitions.fedramp.include? sub.Name
|
259
|
+
subs.push('sub_other') if subs.count.zero?
|
260
|
+
end
|
261
|
+
subs.compact.uniq
|
262
|
+
end
|
263
|
+
|
264
|
+
##
|
265
|
+
# Returns an accounts latest expiration
|
266
|
+
#
|
267
|
+
# @author Jason Colyer
|
268
|
+
# @since 1.0.26
|
269
|
+
def self.account_expiration(account)
|
270
|
+
return '1970-01-01' if account.Zuora__R00N40000001lGjTEAU__r.nil?
|
271
|
+
|
272
|
+
account.Zuora__R00N40000001lGjTEAU__r.map(&:Zuora__EffectiveEndDate__c).max
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# Returns an accounts type
|
277
|
+
#
|
278
|
+
# @author Jason Colyer
|
279
|
+
# @since 1.0.26
|
280
|
+
def self.account_type(account, expiration)
|
281
|
+
return 'alliance_partner' if %w[0014M00001sDiGEQA0].include?(account.Account_ID_18__c)
|
282
|
+
return 'open_partner' if account.Type == 'Partner' && account.Partner_Track__c == 'Open'
|
283
|
+
return 'select_partner' if account.Type == 'Partner' && account.Partner_Track__c == 'Select'
|
284
|
+
return 'former_customer' if Date.parse(expiration) < Date.today
|
285
|
+
|
286
|
+
'customer'
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# Returns an accounts ARR
|
291
|
+
#
|
292
|
+
# @author Jason Colyer
|
293
|
+
# @since 1.0.26
|
294
|
+
def self.account_arr(account)
|
295
|
+
total = 0
|
296
|
+
return total if account.Zuora__R00N40000001lGjTEAU__r.nil?
|
297
|
+
|
298
|
+
account.Zuora__R00N40000001lGjTEAU__r.each do |subscription|
|
299
|
+
next if Date.parse(subscription.Zuora__EffectiveEndDate__c) < Date.today
|
300
|
+
|
301
|
+
total += subscription.Zuora__TotalContractValue__c.to_i
|
302
|
+
end
|
303
|
+
total
|
304
|
+
end
|
305
|
+
|
306
|
+
##
|
307
|
+
# Returns an accounts market segment
|
308
|
+
#
|
309
|
+
# @author Jason Colyer
|
310
|
+
# @since 1.0.26
|
311
|
+
def self.account_market_segment(account)
|
312
|
+
account.Ultimate_Parent_Sales_Segment_Employees__c.downcase
|
313
|
+
rescue NoMethodError
|
314
|
+
'unknown'
|
315
|
+
end
|
316
|
+
|
317
|
+
##
|
318
|
+
# Returns an accounts seat count
|
319
|
+
#
|
320
|
+
# @author Jason Colyer
|
321
|
+
# @since 1.0.26
|
322
|
+
def self.account_seats(account)
|
323
|
+
total = 0
|
324
|
+
return total if account.Zuora__R00N40000001lGjTEAU__r.nil?
|
325
|
+
|
326
|
+
account.Zuora__R00N40000001lGjTEAU__r.each do |subscription|
|
327
|
+
next if Date.parse(subscription.Zuora__EffectiveEndDate__c) < Date.today
|
328
|
+
|
329
|
+
total += subscription.Zuora__Quantity__c.to_i
|
330
|
+
end
|
331
|
+
total
|
332
|
+
end
|
333
|
+
|
334
|
+
##
|
335
|
+
# Returns an accounts region
|
336
|
+
#
|
337
|
+
# @author Jason Colyer
|
338
|
+
# @since 1.0.26
|
339
|
+
def self.account_region(account)
|
340
|
+
return nil if account.Account_Demographics_Geo__c.nil?
|
341
|
+
return nil unless %w[amer apac emea latam ncsa noram].include? account.Account_Demographics_Geo__c.to_s.downcase
|
342
|
+
|
343
|
+
"org_region_#{account.Account_Demographics_Geo__c.to_s.downcase}"
|
344
|
+
end
|
345
|
+
|
346
|
+
##
|
347
|
+
# Returns an accounts health score
|
348
|
+
#
|
349
|
+
# @author Jason Colyer
|
350
|
+
# @since 1.0.26
|
351
|
+
def self.account_health_score(account)
|
352
|
+
account.GS_Health_Score_Color__c.downcase
|
353
|
+
rescue NoMethodError
|
354
|
+
nil
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# Returns if an account is a partner customer or not
|
359
|
+
#
|
360
|
+
# @author Jason Colyer
|
361
|
+
# @since 1.0.26
|
362
|
+
def self.account_is_partner_customer?(account, type)
|
363
|
+
return false if account.Latest_Sold_To_Contact__r.nil?
|
364
|
+
return false if type != 'customer'
|
365
|
+
return true if account.Latest_Sold_To_Contact__r.Email == 'ecopo@us.ibm.com'
|
366
|
+
|
367
|
+
false
|
368
|
+
end
|
369
|
+
|
370
|
+
##
|
371
|
+
# Returns an accounts highest support level for the Global support sync
|
372
|
+
#
|
373
|
+
# @author Jason Colyer
|
374
|
+
# @since 1.0.26
|
375
|
+
def self.global_highest_support_level(subscriptions)
|
376
|
+
return 'ultimate' if subscriptions.include? 'sub_sm_ultimate'
|
377
|
+
return 'gold' if subscriptions.include? 'sub_dotcom_ultimate'
|
378
|
+
return 'ultimate' if subscriptions.include? 'sub_gitlab_dedicated'
|
379
|
+
return 'premium' if subscriptions.include? 'sub_sm_premium'
|
380
|
+
return 'silver' if subscriptions.include? 'sub_dotcom_premium'
|
381
|
+
return 'starter' if subscriptions.include? 'sub_sm_starter'
|
382
|
+
return 'consumption_only' if subscriptions.include? 'sub_consumption_ai'
|
383
|
+
return 'consumption_only' if subscriptions.include? 'sub_consumption_cicd_minutes'
|
384
|
+
return 'consumption_only' if subscriptions.include? 'sub_consumption_eap'
|
385
|
+
return 'consumption_only' if subscriptions.include? 'sub_consumption_storage'
|
386
|
+
return 'custom' if subscriptions.include? 'sub_usgov_12x5'
|
387
|
+
return 'custom' if subscriptions.include? 'sub_usgov_24x7'
|
388
|
+
return 'custom' if subscriptions.include? 'sub_ss_ase'
|
389
|
+
return 'community' if subscriptions.include? 'sub_edu'
|
390
|
+
return 'community' if subscriptions.include? 'sub_oss'
|
391
|
+
return 'community' if subscriptions.include? 'sub_community_other'
|
392
|
+
return 'other' if subscriptions.include? 'sub_proserv'
|
393
|
+
return 'sub_other' if subscriptions.include? 'sub_proserv'
|
394
|
+
|
395
|
+
'expired'
|
396
|
+
end
|
397
|
+
|
398
|
+
##
|
399
|
+
# Returns an accounts highest support level for the US Government support sync
|
400
|
+
#
|
401
|
+
# @author Jason Colyer
|
402
|
+
# @since 1.0.26
|
403
|
+
def self.usgov_highest_support_level(subscriptions)
|
404
|
+
return 'ultimate' if subscriptions.include? 'sub_sm_ultimate'
|
405
|
+
return 'ultimate' if subscriptions.include? 'sub_gitlab_dedicated'
|
406
|
+
return 'premium' if subscriptions.include? 'sub_sm_premium'
|
407
|
+
return 'starter' if subscriptions.include? 'sub_sm_starter'
|
408
|
+
return 'custom' if subscriptions.include? 'sub_usgov_12x5'
|
409
|
+
return 'custom' if subscriptions.include? 'sub_usgov_24x7'
|
410
|
+
|
411
|
+
'expired'
|
412
|
+
end
|
413
|
+
|
414
|
+
##
|
415
|
+
# Returns an accounts sold to
|
416
|
+
#
|
417
|
+
# @author Jason Colyer
|
418
|
+
# @since 1.0.26
|
419
|
+
def self.account_sold_to(account)
|
420
|
+
return nil if account.Zuora__R00N40000001kyLcEAI__r.nil?
|
421
|
+
return nil if account.Zuora__R00N40000001kyLcEAI__r.first.Zuora__SoldToWorkEmail__c == 'ecopo@us.ibm.com'
|
422
|
+
|
423
|
+
{
|
424
|
+
"salesforce_id" => account.Account_ID_18__c,
|
425
|
+
"email" => account.Zuora__R00N40000001kyLcEAI__r.first.Zuora__SoldToWorkEmail__c,
|
426
|
+
"name" => account.Zuora__R00N40000001kyLcEAI__r.first.Name
|
427
|
+
}
|
428
|
+
end
|
429
|
+
|
77
430
|
##
|
78
431
|
# Provides the String needed to make a specific type of SOQL query
|
79
432
|
#
|
@@ -104,6 +457,115 @@ module Readiness
|
|
104
457
|
Account_ID_18__c = '#{aid}'
|
105
458
|
STRING
|
106
459
|
end
|
460
|
+
|
461
|
+
##
|
462
|
+
# Provides the String needed to make a specific type of SOQL query
|
463
|
+
#
|
464
|
+
# @author Jason Colyer
|
465
|
+
# @since 1.0.26
|
466
|
+
# @param aid [String] The ID of the Account to check
|
467
|
+
# @return [String]
|
468
|
+
def self.global_sync_query_string
|
469
|
+
<<~QUERY
|
470
|
+
SELECT
|
471
|
+
Account_ID_18__c,
|
472
|
+
Name,
|
473
|
+
Type,
|
474
|
+
Ultimate_Parent_Sales_Segment_Employees__c,
|
475
|
+
Account_Owner_Calc__c,
|
476
|
+
Technical_Account_Manager_Name__c,
|
477
|
+
GS_Health_Score_Color__c,
|
478
|
+
Restricted_Account__c,
|
479
|
+
Solutions_Architect_Lookup__r.Name,
|
480
|
+
Account_Demographics_Geo__c,
|
481
|
+
Latest_Sold_To_Contact__r.Email,
|
482
|
+
Latest_Sold_To_Contact__r.Name,
|
483
|
+
Partner_Track__c,
|
484
|
+
Partners_Partner_Type__c,
|
485
|
+
Support_Hold__c,
|
486
|
+
(
|
487
|
+
SELECT
|
488
|
+
Id,
|
489
|
+
Name,
|
490
|
+
Zuora__ProductName__c,
|
491
|
+
Zuora__EffectiveEndDate__c,
|
492
|
+
Zuora__Quantity__c,
|
493
|
+
Zuora__TotalContractValue__c,
|
494
|
+
Subscription_Status__c
|
495
|
+
FROM Zuora__R00N40000001lGjTEAU__r
|
496
|
+
WHERE
|
497
|
+
Zuora__EffectiveEndDate__c != NULL
|
498
|
+
),
|
499
|
+
(
|
500
|
+
SELECT
|
501
|
+
Name,
|
502
|
+
Zuora__SoldToWorkEmail__c
|
503
|
+
FROM Zuora__R00N40000001kyLcEAI__r
|
504
|
+
WHERE
|
505
|
+
IsDeleted = false
|
506
|
+
ORDER BY CreatedDate ASC
|
507
|
+
LIMIT 1
|
508
|
+
)
|
509
|
+
FROM Account
|
510
|
+
WHERE
|
511
|
+
Type != 'Prospect' AND
|
512
|
+
(
|
513
|
+
Type IN ('Customer', 'Former Customer') OR
|
514
|
+
(
|
515
|
+
Type = 'Partner' AND
|
516
|
+
Partners_Partner_Status__c IN ('Authorized', 'Former') AND
|
517
|
+
Partners_Partner_Type__c IN ('Alliance', 'Channel') AND
|
518
|
+
Partner_Track__c IN ('Open', 'Select', 'Technology')
|
519
|
+
)
|
520
|
+
)
|
521
|
+
QUERY
|
522
|
+
end
|
523
|
+
|
524
|
+
##
|
525
|
+
# Provides the String needed to make a specific type of SOQL query
|
526
|
+
#
|
527
|
+
# @author Jason Colyer
|
528
|
+
# @since 1.0.26
|
529
|
+
# @param aid [String] The ID of the Account to check
|
530
|
+
# @return [String]
|
531
|
+
def self.usgov_sync_query_string
|
532
|
+
<<~QUERY
|
533
|
+
SELECT
|
534
|
+
Account_ID_18__c,
|
535
|
+
Name,
|
536
|
+
Ultimate_Parent_Sales_Segment_Employees__c,
|
537
|
+
Account_Owner_Calc__c,
|
538
|
+
Technical_Account_Manager_Name__c,
|
539
|
+
GS_Health_Score_Color__c,
|
540
|
+
Restricted_Account__c,
|
541
|
+
Solutions_Architect_Lookup__r.Name,
|
542
|
+
Support_Hold__c,
|
543
|
+
(
|
544
|
+
SELECT
|
545
|
+
Id,
|
546
|
+
Name,
|
547
|
+
Zuora__ProductName__c,
|
548
|
+
Zuora__EffectiveEndDate__c,
|
549
|
+
Zuora__Quantity__c,
|
550
|
+
Zuora__TotalContractValue__c,
|
551
|
+
Subscription_Status__c
|
552
|
+
FROM Zuora__R00N40000001lGjTEAU__r
|
553
|
+
)
|
554
|
+
FROM Account
|
555
|
+
WHERE
|
556
|
+
Type IN ('Customer', 'Former Customer') AND
|
557
|
+
(
|
558
|
+
(
|
559
|
+
Account_Demographics_Territory__c LIKE 'PUBSEC%' AND
|
560
|
+
Account_Demographics_Territory__c != 'PUBSEC_' AND
|
561
|
+
(
|
562
|
+
NOT Account_Demographics_Territory__c LIKE '%SLED%'
|
563
|
+
)
|
564
|
+
) OR
|
565
|
+
Support_Instance__c = 'federal-support'
|
566
|
+
)
|
567
|
+
QUERY
|
568
|
+
end
|
107
569
|
end
|
108
570
|
end
|
109
571
|
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Defines the module Readiness.
|
4
|
+
module Readiness
|
5
|
+
# Defines the module Salesforce
|
6
|
+
module Salesforce
|
7
|
+
##
|
8
|
+
# Defines the class Contacts within the module {Readiness::Salesforce}.
|
9
|
+
#
|
10
|
+
# @author Jason Colyer
|
11
|
+
# @since 1.0.26
|
12
|
+
class Contacts < Readiness::Client
|
13
|
+
##
|
14
|
+
# Return an Array of contacts from Salesforce for US Government support
|
15
|
+
#
|
16
|
+
# @author Jason Colyer
|
17
|
+
# @since 1.0.26
|
18
|
+
# @param client [Object] An instance of {Readiness::Salesforce::Client}
|
19
|
+
# @return [Array]
|
20
|
+
# @example
|
21
|
+
# config = Readiness::Salesforce::Configuration.new
|
22
|
+
# config.api_version = '58.0'
|
23
|
+
# config.client_id = ENV.fetch('SFDC_CLIENTID')
|
24
|
+
# config.client_secret = ENV.fetch('SFDC_CLIENTSECRET')
|
25
|
+
# config.password = ENV.fetch('SFDC_PASSWORD')
|
26
|
+
# config.security_token = ENV.fetch('SFDC_SECURITYTOKEN')
|
27
|
+
# config.username = ENV.fetch('SFDC_USERNAME')
|
28
|
+
# client = Readiness::Salesforce::Client.new(config)
|
29
|
+
# contacts = Readiness::Salesforce::Contacts.usgov_contacts(client)
|
30
|
+
# pp contacts.count
|
31
|
+
# # => 1769
|
32
|
+
def self.usgov_contacts(client)
|
33
|
+
query = Queries.new(usgov_sync_query_string)
|
34
|
+
results = Queries.run!(client, query)
|
35
|
+
contacts = results.map { |r| usgov_sync_object(r) }.compact.uniq
|
36
|
+
grouped = contacts.group_by { |a| a['email'] }.values
|
37
|
+
duplicates = grouped.select { |a| a.size > 1 }.flatten
|
38
|
+
(contacts - duplicates).compact.uniq
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Return a Hash used for the contact sync for US Government support
|
43
|
+
#
|
44
|
+
# @author Jason Colyer
|
45
|
+
# @since 1.0.26
|
46
|
+
def self.usgov_sync_object(contact)
|
47
|
+
{
|
48
|
+
"name" => contact.Name,
|
49
|
+
"email" => contact.Email.downcase,
|
50
|
+
"org" => "#{Digest::SHA1.hexdigest(contact.Account.Account_ID_18__c)[0..7]} #{contact.Account.Name}",
|
51
|
+
"salesforce_id" => contact.Account.Account_ID_18__c,
|
52
|
+
"not_in_sfdc" => false
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Return a String used for the contact sync for US Government support
|
58
|
+
#
|
59
|
+
# @author Jason Colyer
|
60
|
+
# @since 1.0.26
|
61
|
+
def self.usgov_sync_query_string
|
62
|
+
<<~QUERY
|
63
|
+
SELECT
|
64
|
+
Name,
|
65
|
+
Email,
|
66
|
+
Account.Account_ID_18__c,
|
67
|
+
Account.Name,
|
68
|
+
Role__c
|
69
|
+
FROM Contact
|
70
|
+
WHERE
|
71
|
+
Inactive_Contact__c = false AND
|
72
|
+
Name != '' AND
|
73
|
+
Email != '' AND
|
74
|
+
Role__c INCLUDES ('Gitlab Admin') AND
|
75
|
+
(
|
76
|
+
NOT Email LIKE '%gitlab.com'
|
77
|
+
) AND
|
78
|
+
(
|
79
|
+
(
|
80
|
+
Account.Account_Demographics_Territory__c LIKE 'PUBSEC%' AND
|
81
|
+
Account.Account_Demographics_Territory__c != 'PUBSEC_' AND
|
82
|
+
(
|
83
|
+
NOT Account.Account_Demographics_Territory__c LIKE '%SLED%'
|
84
|
+
)
|
85
|
+
) OR
|
86
|
+
Account.Support_Instance__c = 'federal-support'
|
87
|
+
)
|
88
|
+
QUERY
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,608 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Defines the module Readiness.
|
4
|
+
module Readiness
|
5
|
+
# Defines the module Salesforce
|
6
|
+
module Salesforce
|
7
|
+
##
|
8
|
+
# Defines the class SubscriptionDefinitions within the module {Readiness::Salesforce}.
|
9
|
+
#
|
10
|
+
# @author Jason Colyer
|
11
|
+
# @since 1.0.26
|
12
|
+
class SubscriptionDefinitions < Readiness::Client
|
13
|
+
##
|
14
|
+
# Defines Consumption => AI subscriptions
|
15
|
+
#
|
16
|
+
# @author Jason Colyer
|
17
|
+
# @since 1.0.26
|
18
|
+
# @return [Array]
|
19
|
+
def self.consumption_ai
|
20
|
+
[
|
21
|
+
'Dedicated - GitLab Duo Enterprise - 1 Year',
|
22
|
+
'Dedicated - GitLab Duo Enterprise - 2 Year',
|
23
|
+
'Dedicated - GitLab Duo Enterprise - 3 Year',
|
24
|
+
'Dedicated - GitLab Duo Enterprise - 4 Year',
|
25
|
+
'Dedicated - GitLab Duo Enterprise - 5 Year',
|
26
|
+
'Dedicated - GitLab Duo Enterprise - Monthly',
|
27
|
+
'Dedicated - GitLab Duo Pro - 1 Year',
|
28
|
+
'Dedicated - GitLab Duo Pro - 2 Year',
|
29
|
+
'Dedicated - GitLab Duo Pro - 3 Year',
|
30
|
+
'Dedicated - GitLab Duo Pro - 4 Year',
|
31
|
+
'Dedicated - GitLab Duo Pro - 5 Year',
|
32
|
+
'Dedicated - GitLab Duo Pro - Monthly',
|
33
|
+
'SaaS - GitLab Duo Enterprise - 1 Year',
|
34
|
+
'SaaS - GitLab Duo Enterprise - 2 Year',
|
35
|
+
'SaaS - GitLab Duo Enterprise - 3 Year',
|
36
|
+
'SaaS - GitLab Duo Enterprise - 4 Year',
|
37
|
+
'SaaS - GitLab Duo Enterprise - 5 Year',
|
38
|
+
'SaaS - GitLab Duo Enterprise - Monthly',
|
39
|
+
'SaaS - GitLab Duo Pro - 1 Year',
|
40
|
+
'SaaS - GitLab Duo Pro - 2 Year',
|
41
|
+
'SaaS - GitLab Duo Pro - 3 Year',
|
42
|
+
'SaaS - GitLab Duo Pro - 4 Year',
|
43
|
+
'SaaS - GitLab Duo Pro - 5 Year',
|
44
|
+
'SaaS - GitLab Duo Pro - Monthly',
|
45
|
+
'Self-Managed - GitLab Duo Enterprise - 1 Year',
|
46
|
+
'Self-Managed - GitLab Duo Enterprise - 2 Year',
|
47
|
+
'Self-Managed - GitLab Duo Enterprise - 3 Year',
|
48
|
+
'Self-Managed - GitLab Duo Enterprise - 4 Year',
|
49
|
+
'Self-Managed - GitLab Duo Enterprise - 5 Year',
|
50
|
+
'Self-Managed - GitLab Duo Enterprise - Monthly',
|
51
|
+
'Self-Managed - GitLab Duo Pro - 1 Year',
|
52
|
+
'Self-Managed - GitLab Duo Pro - 2 Year',
|
53
|
+
'Self-Managed - GitLab Duo Pro - 3 Year',
|
54
|
+
'Self-Managed - GitLab Duo Pro - 4 Year',
|
55
|
+
'Self-Managed - GitLab Duo Pro - 5 Year',
|
56
|
+
'Self-Managed - GitLab Duo Pro - Monthly'
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# Defines Consumption => CI/CD Minutes subscriptions
|
62
|
+
#
|
63
|
+
# @author Jason Colyer
|
64
|
+
# @since 1.0.26
|
65
|
+
# @return [Array]
|
66
|
+
def self.consumption_cicd_minutes
|
67
|
+
[
|
68
|
+
'1,000 CI Minutes',
|
69
|
+
'1,000 Compute Minutes',
|
70
|
+
'Annual CI Minutes Pack (DO NOT USE)'
|
71
|
+
]
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Defines Consumption => EAP subscriptions
|
76
|
+
#
|
77
|
+
# @author Jason Colyer
|
78
|
+
# @since 1.0.26
|
79
|
+
# @return [Array]
|
80
|
+
def self.consumption_eap
|
81
|
+
[
|
82
|
+
'Dedicated - Enterprise Agile Planning - 1 Year',
|
83
|
+
'Dedicated - Enterprise Agile Planning - 2 Year',
|
84
|
+
'Dedicated - Enterprise Agile Planning - 3 Year',
|
85
|
+
'Dedicated - Enterprise Agile Planning - 4 Year',
|
86
|
+
'Dedicated - Enterprise Agile Planning - 5 Year',
|
87
|
+
'Dedicated - Enterprise Agile Planning - Monthly',
|
88
|
+
'SaaS - Enterprise Agile Planning - 1 Year',
|
89
|
+
'SaaS - Enterprise Agile Planning - 2 Year',
|
90
|
+
'SaaS - Enterprise Agile Planning - 3 Year',
|
91
|
+
'SaaS - Enterprise Agile Planning - 4 Year',
|
92
|
+
'SaaS - Enterprise Agile Planning - 5 Year',
|
93
|
+
'SaaS - Enterprise Agile Planning - Monthly',
|
94
|
+
'Self-Managed - Enterprise Agile Planning - 1 Year',
|
95
|
+
'Self-Managed - Enterprise Agile Planning - 2 Year',
|
96
|
+
'Self-Managed - Enterprise Agile Planning - 3 Year',
|
97
|
+
'Self-Managed - Enterprise Agile Planning - 4 Year',
|
98
|
+
'Self-Managed - Enterprise Agile Planning - 5 Year',
|
99
|
+
'Self-Managed - Enterprise Agile Planning - Monthly'
|
100
|
+
]
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Defines Consumption => Storage subscriptions
|
105
|
+
#
|
106
|
+
# @author Jason Colyer
|
107
|
+
# @since 1.0.26
|
108
|
+
# @return [Array]
|
109
|
+
def self.consumption_storage
|
110
|
+
[
|
111
|
+
'Dedicated - Storage 10GB - 1 Year',
|
112
|
+
'Dedicated - Storage 10GB - 2 Year',
|
113
|
+
'Dedicated - Storage 10GB - 3 Year',
|
114
|
+
'Dedicated - Storage 10GB - Monthly',
|
115
|
+
'GitLab Dedicated for US Public Sector - Storage 10GB - 1 Year',
|
116
|
+
'GitLab Dedicated for US Public Sector - Storage 10GB - 2 Year',
|
117
|
+
'GitLab Dedicated for US Public Sector - Storage 10GB - 3 Year',
|
118
|
+
'GitLab Dedicated for US Public Sector - Storage 10GB - Monthly',
|
119
|
+
'Gitlab Storage 10GB - 1 Year'
|
120
|
+
]
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Defines ProServ subscriptions
|
125
|
+
#
|
126
|
+
# @author Jason Colyer
|
127
|
+
# @since 1.0.26
|
128
|
+
# @return [Array]
|
129
|
+
def self.proserv
|
130
|
+
[
|
131
|
+
'#movingtogitlab',
|
132
|
+
'Admin Training',
|
133
|
+
'CI/CD Modernization Workshop',
|
134
|
+
'Consulting Block - 1 Year',
|
135
|
+
'Consulting Block (48 Hours)',
|
136
|
+
'CSM Services',
|
137
|
+
'Custom PS Education Services',
|
138
|
+
'Dedicated - Administration Fee [2XLarge] - 1 Year',
|
139
|
+
'Dedicated - Administration Fee [2XLarge] - 2 Year',
|
140
|
+
'Dedicated - Administration Fee [2XLarge] - 3 Year',
|
141
|
+
'Dedicated - Administration Fee [2XLarge] - Monthly',
|
142
|
+
'Dedicated - Administration Fee [3XLarge] - 1 Year',
|
143
|
+
'Dedicated - Administration Fee [3XLarge] - 2 Year',
|
144
|
+
'Dedicated - Administration Fee [3XLarge] - 3 Year',
|
145
|
+
'Dedicated - Administration Fee [3XLarge] - Monthly',
|
146
|
+
'Dedicated - Administration Fee [Large] - 1 Year',
|
147
|
+
'Dedicated - Administration Fee [Large] - 2 Year',
|
148
|
+
'Dedicated - Administration Fee [Large] - 2 Year',
|
149
|
+
'Dedicated - Administration Fee [Large] - 3 Year',
|
150
|
+
'Dedicated - Administration Fee [Large] - Monthly',
|
151
|
+
'Dedicated - Administration Fee [Medium] - 1 Year',
|
152
|
+
'Dedicated - Administration Fee [Medium] - 2 Year',
|
153
|
+
'Dedicated - Administration Fee [Medium] - 3 Year',
|
154
|
+
'Dedicated - Administration Fee [Medium] - Monthly',
|
155
|
+
'Dedicated - Administration Fee [Small] - 1 Year',
|
156
|
+
'Dedicated - Administration Fee [Small] - 2 Year',
|
157
|
+
'Dedicated - Administration Fee [Small] - 3 Year',
|
158
|
+
'Dedicated - Administration Fee [Small] - Monthly',
|
159
|
+
'Dedicated - Administration Fee [XLarge] - 1 Year',
|
160
|
+
'Dedicated - Administration Fee [XLarge] - 2 Year',
|
161
|
+
'Dedicated - Administration Fee [XLarge] - 3 Year',
|
162
|
+
'Dedicated - Administration Fee [XLarge] - Monthly',
|
163
|
+
'Dedicated Implementation Services',
|
164
|
+
'EdCast Settlement Revenue',
|
165
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [XLarge] - 1 Year',
|
166
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [XLarge] - 2 Year',
|
167
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [XLarge] - 3 Year',
|
168
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [XLarge] - Monthly',
|
169
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [2XLarge] - 1 Year',
|
170
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [2XLarge] - 2 Year',
|
171
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [2XLarge] - 3 Year',
|
172
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [2XLarge] - Monthly',
|
173
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [3XLarge] - 1 Year',
|
174
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [3XLarge] - 2 Year',
|
175
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [3XLarge] - 3 Year',
|
176
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [3XLarge] - Monthly',
|
177
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Large] - 1 Year',
|
178
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Large] - 2 Year',
|
179
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Large] - 3 Year',
|
180
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Large] - Monthly',
|
181
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Medium] - 1 Year',
|
182
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Medium] - 2 Year',
|
183
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Medium] - 3 Year',
|
184
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Medium] - Monthly',
|
185
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Small] - 1 Year',
|
186
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Small] - 2 Year',
|
187
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Small] - 3 Year',
|
188
|
+
'GitLab Dedicated for US Public Sector - Administration Fee [Small] - Monthly',
|
189
|
+
'GitLab Agile Portfolio Management Training - Onsite',
|
190
|
+
'GitLab Agile Portfolio Management Training - Remote',
|
191
|
+
'GitLab Certification Exam',
|
192
|
+
'GitLab CI/CD Training - Onsite',
|
193
|
+
'GitLab CI/CD Training - Remote',
|
194
|
+
'GitLab DevSecOps Fundamentals Training - Remote',
|
195
|
+
'GitLab for System Administrators Training - Onsite',
|
196
|
+
'GitLab for System Administrators Training - Remote',
|
197
|
+
'GitLab Geo',
|
198
|
+
'GitLab Geo | 2 Year',
|
199
|
+
'GitLab Geo | 2 Year',
|
200
|
+
'GitLab Geo | 3 Year',
|
201
|
+
'GitLab Health Check - Self-Managed',
|
202
|
+
'GitLab Private 1-Day Training Classroom - Remote',
|
203
|
+
'GitLab Public 1-Day Training Seat - Remote',
|
204
|
+
'GitLab Security Essentials Training - Onsite',
|
205
|
+
'GitLab Security Essentials Training - Remote',
|
206
|
+
'GitLab Service Package',
|
207
|
+
'GitLab Service Package B',
|
208
|
+
'GitLab Service Package C',
|
209
|
+
'GitLab Service Package D',
|
210
|
+
'GitLab System Administration Training - Onsite',
|
211
|
+
'GitLab System Administration Training - Remote',
|
212
|
+
'GitLab with Git Fundamentals Training - Onsite',
|
213
|
+
'GitLab with Git Fundamentals Training - Remote',
|
214
|
+
'Hourly Consulting',
|
215
|
+
'Implementation Quick Start',
|
216
|
+
'Implementation Quick Start (High Availability)',
|
217
|
+
'Implementation QuickStart - GitLab.com',
|
218
|
+
'Implementation QuickStart - Self Managed (HA)',
|
219
|
+
'Implementation Support',
|
220
|
+
'InnerSourcing Training - At your site',
|
221
|
+
'InnerSourcing Training - Remote for your team',
|
222
|
+
'Jenkins Integration',
|
223
|
+
'JIRA Integration',
|
224
|
+
'LDAP Integration',
|
225
|
+
'Migration Quickstart',
|
226
|
+
'Migration+',
|
227
|
+
'New Component',
|
228
|
+
'OLD: ProServ Training Per-Seat Add-on',
|
229
|
+
'Pivotal Cloud Foundry',
|
230
|
+
'ProServ Training Per-Seat Add-on',
|
231
|
+
'Quarter',
|
232
|
+
'Quick Start with HA (less than 10,000 users)',
|
233
|
+
'Quick Start without HA, less than 500 users',
|
234
|
+
'Training LMS Settlement Revenue',
|
235
|
+
'Training Workshop',
|
236
|
+
'Training Workshop | OneTime',
|
237
|
+
'Travel Expenses',
|
238
|
+
'Ultimate QuickStart - DevSecOps Workshop'
|
239
|
+
]
|
240
|
+
end
|
241
|
+
|
242
|
+
##
|
243
|
+
# Defines GitLab.com => Premium subscriptions
|
244
|
+
#
|
245
|
+
# @author Jason Colyer
|
246
|
+
# @since 1.0.26
|
247
|
+
# @return [Array]
|
248
|
+
def self.dotcom_premium
|
249
|
+
[
|
250
|
+
'SaaS - Premium - 1 Year',
|
251
|
+
'SaaS - Premium - 2 Year',
|
252
|
+
'SaaS - Premium - 3 Year',
|
253
|
+
'SaaS - Premium - 4 Year',
|
254
|
+
'SaaS - Premium - 5 Year',
|
255
|
+
'SaaS - Premium - Monthly',
|
256
|
+
'Silver Plan',
|
257
|
+
'Silver Plan - 2 Year',
|
258
|
+
'Silver Plan - 3 Year',
|
259
|
+
'Silver Plan - 4 Year',
|
260
|
+
'Silver Plan - 5 Year',
|
261
|
+
'Silver Plan - Monthly'
|
262
|
+
]
|
263
|
+
end
|
264
|
+
|
265
|
+
##
|
266
|
+
# Defines GitLab.com => Ultimate subscriptions
|
267
|
+
#
|
268
|
+
# @author Jason Colyer
|
269
|
+
# @since 1.0.26
|
270
|
+
# @return [Array]
|
271
|
+
def self.dotcom_ultimate
|
272
|
+
[
|
273
|
+
'[EDU Enterprise-Large] SaaS - Ultimate - 1 Year',
|
274
|
+
'[EDU Enterprise-Medium] SaaS - Ultimate - 1 Year',
|
275
|
+
'[EDU Enterprise-Small] SaaS - Ultimate - 1 Year',
|
276
|
+
'[EDU Enterprise-XLarge] SaaS - Ultimate - 1 Year',
|
277
|
+
'[EDU Program] SaaS - Support - 1 Year',
|
278
|
+
'[OSS Program] SaaS - Support - 1 Year',
|
279
|
+
'[Startups Program] SaaS - Support - 1 Year',
|
280
|
+
'Gold - 1 Year (Reporter Access)',
|
281
|
+
'Gold - 1 year EDU-Enterprise-Large (SaaS)',
|
282
|
+
'Gold - 1 year EDU-Enterprise-Large (Self-Hosted)',
|
283
|
+
'Gold - 1 year EDU-Enterprise-Medium (SaaS)',
|
284
|
+
'Gold - 1 year EDU-Enterprise-Medium (Self-Hosted)',
|
285
|
+
'Gold - 1 year EDU-Enterprise-Small (SaaS)',
|
286
|
+
'Gold - 1 year EDU-Enterprise-Small (Self-Hosted)',
|
287
|
+
'Gold - 1 year EDU-Enterprise-XLarge (SaaS)',
|
288
|
+
'Gold - 1 year EDU-Enterprise-XLarge (Self-Hosted)',
|
289
|
+
'Gold - 2 Year (Reporter Access)',
|
290
|
+
'Gold - 3 Year (Reporter Access)',
|
291
|
+
'Gold - Monthly',
|
292
|
+
'Gold Plan',
|
293
|
+
'Gold Plan - 1 Year (Y Combinator) w/ Support',
|
294
|
+
'Gold Plan - 2 Year',
|
295
|
+
'Gold Plan - 3 Year',
|
296
|
+
'Gold Plan - 4 Year',
|
297
|
+
'Gold Plan - 5 Year',
|
298
|
+
'SaaS - Ultimate - 1 Year',
|
299
|
+
'SaaS - Ultimate - 2 Year',
|
300
|
+
'SaaS - Ultimate - 3 Year',
|
301
|
+
'SaaS - Ultimate - 4 Year',
|
302
|
+
'SaaS - Ultimate - 5 Year',
|
303
|
+
'SaaS - Ultimate - Monthly'
|
304
|
+
]
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# Defines Self-Managed => Starter subscriptions
|
309
|
+
#
|
310
|
+
# @author Jason Colyer
|
311
|
+
# @since 1.0.26
|
312
|
+
# @return [Array]
|
313
|
+
def self.sm_starter
|
314
|
+
[
|
315
|
+
'Education (Starter) - 1 Year',
|
316
|
+
'Education (Starter) - 2 Year',
|
317
|
+
'Education (Starter) - 3 Year',
|
318
|
+
'Education (Starter) - 4 Year',
|
319
|
+
'Education (Starter) - 5 Year',
|
320
|
+
'Education (Starter) - Monthly',
|
321
|
+
'GitLab EE Starter',
|
322
|
+
'GitLab EE Starter | 2 Year',
|
323
|
+
'Standard | 2 Years',
|
324
|
+
'Standard | 3 Years',
|
325
|
+
'Standard | 4 Years',
|
326
|
+
'Standard | 5 Years',
|
327
|
+
'Standard | Annual',
|
328
|
+
'Starter - 1 Year',
|
329
|
+
'Starter - 2 Year',
|
330
|
+
'Starter - 3 Year',
|
331
|
+
'Starter - 4 Year',
|
332
|
+
'Starter - 5 Year',
|
333
|
+
'Starter - Monthly',
|
334
|
+
'Starter - Monthly - 1 Year',
|
335
|
+
'Starter - Monthly - 2 Year',
|
336
|
+
'Starter - Monthly - 3 Year',
|
337
|
+
'Starter - Monthly - 4 Year',
|
338
|
+
'Starter - Monthly - 5 Year'
|
339
|
+
]
|
340
|
+
end
|
341
|
+
|
342
|
+
##
|
343
|
+
# Defines Self-Managed => Premium subscriptions
|
344
|
+
#
|
345
|
+
# @author Jason Colyer
|
346
|
+
# @since 1.0.26
|
347
|
+
# @return [Array]
|
348
|
+
def self.sm_premium
|
349
|
+
[
|
350
|
+
'Education (Premium) - 1 Year',
|
351
|
+
'GitLab EE Premium',
|
352
|
+
'GitLab EE Premium | 3 Years',
|
353
|
+
'GitLab EE Premium | 5 Years',
|
354
|
+
'GitLab Enterprise Premium',
|
355
|
+
'Premium - 1 Year',
|
356
|
+
'Premium - 1 Year - Eval',
|
357
|
+
'Premium - 1 Year (Guest Access)',
|
358
|
+
'Premium - 1 Year (Reporter Access',
|
359
|
+
'Premium - 2 Year',
|
360
|
+
'Premium - 3 Year',
|
361
|
+
'Premium - 4 Year',
|
362
|
+
'Premium - 5 Year',
|
363
|
+
'Premium - Monthly',
|
364
|
+
'Premium - Monthly - 1 Year',
|
365
|
+
'Premium - Monthly - 2 Year',
|
366
|
+
'Premium - Monthly - 3 Year',
|
367
|
+
'Premium - Monthly - 4 Year',
|
368
|
+
'Premium - Monthly - 5 Year',
|
369
|
+
'Premium - monthly (Guest Access)',
|
370
|
+
'Premium Support',
|
371
|
+
'Premium Support - 3 Years',
|
372
|
+
'Self-Managed - Premium - 1 Year',
|
373
|
+
'Self-Managed - Premium - 2 Year',
|
374
|
+
'Self-Managed - Premium - 3 Year',
|
375
|
+
'Self-Managed - Premium - 4 Year',
|
376
|
+
'Self-Managed - Premium - 5 Year',
|
377
|
+
'Self-Managed - Premium - Monthly'
|
378
|
+
]
|
379
|
+
end
|
380
|
+
|
381
|
+
##
|
382
|
+
# Defines Self-Managed => Ultimate subscriptions
|
383
|
+
#
|
384
|
+
# @author Jason Colyer
|
385
|
+
# @since 1.0.26
|
386
|
+
# @return [Array]
|
387
|
+
def self.sm_ultimate
|
388
|
+
[
|
389
|
+
'[EDU Enterprise-Large] Self-Managed - Ultimate - 1 Year',
|
390
|
+
'[EDU Enterprise-Medium] Self-Managed - Ultimate - 1 Year',
|
391
|
+
'[EDU Enterprise-Small] Self-Managed - Ultimate - 1 Year',
|
392
|
+
'[EDU Enterprise-XLarge] Self-Managed - Ultimate - 1 Year',
|
393
|
+
'[EDU Program] Self-Managed - Support - 1 Year',
|
394
|
+
'[EDU Program] Self-Managed - Support - 3 Year',
|
395
|
+
'[OSS Program] Self-Managed - Support - 1 Year',
|
396
|
+
'[Startups Program] Self-Managed - Support - 1 Year',
|
397
|
+
'Education (Ultimate) - 1 Year',
|
398
|
+
'Education (Ultimate) - 2 Year',
|
399
|
+
'Education (Ultimate) - 3 Year',
|
400
|
+
'Education (Ultimate) - 3 Year',
|
401
|
+
'EE License',
|
402
|
+
'GitLab EE Ultimate',
|
403
|
+
'GitLab EE Ultimate | 2 Year',
|
404
|
+
'GitLab EE Ultimate | 3 Year',
|
405
|
+
'GitLab EE Ultimate | 5 Year',
|
406
|
+
'GitLab EE Ultimate | Monthly',
|
407
|
+
'GitLab Enterprise Edition',
|
408
|
+
'GitLab Enterprise Edition - Monthly',
|
409
|
+
'GitLab Enterprise Edition | 2 Years',
|
410
|
+
'GitLab Enterprise Edition | 3 Years',
|
411
|
+
'GitLab Enterprise Edition | 4 Years',
|
412
|
+
'GitLab Enterprise Edition | 5 Years',
|
413
|
+
'Plus | 2 Years',
|
414
|
+
'Plus | 3 Years',
|
415
|
+
'Plus | 4 Years',
|
416
|
+
'Plus | 5 Years',
|
417
|
+
'Plus | Annual',
|
418
|
+
'Plus | Annual - 2 Year',
|
419
|
+
'Self-Managed - Ultimate - 1 Year',
|
420
|
+
'Self-Managed - Ultimate - 2 Year',
|
421
|
+
'Self-Managed - Ultimate - 3 Year',
|
422
|
+
'Self-Managed - Ultimate - 4 Year',
|
423
|
+
'Self-Managed - Ultimate - 5 Year',
|
424
|
+
'Self-Managed - Ultimate - Monthly',
|
425
|
+
'Ultimate - 1 Year',
|
426
|
+
'Ultimate - 1 Year (EDU or OSS) w/ Support',
|
427
|
+
'Ultimate - 1 Year (Guest Access)',
|
428
|
+
'Ultimate - 1 Year (Reporter Access)',
|
429
|
+
'Ultimate - 1 Year (Y Combinator) w/ Support',
|
430
|
+
'Ultimate - 1 year EDU-Enterprise-Large (SaaS)',
|
431
|
+
'Ultimate - 1 year EDU-Enterprise-Large (Self-Hosted)',
|
432
|
+
'Ultimate - 1 year EDU-Enterprise-Medium (SaaS)',
|
433
|
+
'Ultimate - 1 year EDU-Enterprise-Medium (Self-Hosted)',
|
434
|
+
'Ultimate - 1 year EDU-Enterprise-Small (SaaS)',
|
435
|
+
'Ultimate - 1 year EDU-Enterprise-Small (Self-Hosted)',
|
436
|
+
'Ultimate - 1 year EDU-Enterprise-XLarge (SaaS)',
|
437
|
+
'Ultimate - 1 year EDU-Enterprise-XLarge (Self-Hosted)',
|
438
|
+
'Ultimate - 2 Year',
|
439
|
+
'Ultimate - 2 Year (Reporter Access)',
|
440
|
+
'Ultimate - 3 Year',
|
441
|
+
'Ultimate - 3 Year (EDU or OSS) w/ Support',
|
442
|
+
'Ultimate - 4 Year',
|
443
|
+
'Ultimate - 5 Year',
|
444
|
+
'Ultimate - Monthly',
|
445
|
+
'Ultimate - Monthly - 1 Year',
|
446
|
+
'Ultimate - Monthly - 2 Year',
|
447
|
+
'Ultimate - Monthly - 3 Year',
|
448
|
+
'Ultimate - Monthly - 4 Year',
|
449
|
+
'Ultimate - Monthly - 5 Year',
|
450
|
+
'Ultimate Pack - 1 Year (AWS)',
|
451
|
+
'Ultimate Pack - 2 Year (AWS)',
|
452
|
+
'Ultimate Pack - 3 Year (AWS)',
|
453
|
+
'Ultimate Pack - 4 Year (AWS)',
|
454
|
+
'Ultimate Pack - 5 User Pack (AWS Hourly)',
|
455
|
+
'Ultimate Pack - 5 Year (AWS)'
|
456
|
+
]
|
457
|
+
end
|
458
|
+
|
459
|
+
##
|
460
|
+
# Defines US Government => 12x5 subscriptions
|
461
|
+
#
|
462
|
+
# @author Jason Colyer
|
463
|
+
# @since 1.0.26
|
464
|
+
# @return [Array]
|
465
|
+
def self.usgov_12x5
|
466
|
+
[
|
467
|
+
'12x5 US Citizen Support - 1 Year',
|
468
|
+
'12x5 US Citizen Support - 2 Year',
|
469
|
+
'12x5 US Citizen Support - 3 Year',
|
470
|
+
'12x5 US Citizen Support - 4 Year',
|
471
|
+
'12x5 US Citizen Support - 5 Year',
|
472
|
+
'12x5 US Citizen Support - Monthly'
|
473
|
+
]
|
474
|
+
end
|
475
|
+
|
476
|
+
##
|
477
|
+
# Defines US Government => 24x7 subscriptions
|
478
|
+
#
|
479
|
+
# @author Jason Colyer
|
480
|
+
# @since 1.0.26
|
481
|
+
# @return [Array]
|
482
|
+
def self.usgov_24x7
|
483
|
+
[
|
484
|
+
'24x7 US Citizen Support - 1 Year',
|
485
|
+
'24x7 US Citizen Support - 2 Year',
|
486
|
+
'24x7 US Citizen Support - 3 Year',
|
487
|
+
'24x7 US Citizen Support - 4 Year',
|
488
|
+
'24x7 US Citizen Support - 5 Year',
|
489
|
+
'24x7 US Citizen Support - Monthly'
|
490
|
+
]
|
491
|
+
end
|
492
|
+
|
493
|
+
##
|
494
|
+
# Defines GitLab Dedicated subscriptions
|
495
|
+
#
|
496
|
+
# @author Jason Colyer
|
497
|
+
# @since 1.0.26
|
498
|
+
# @return [Array]
|
499
|
+
def self.gitlab_dedicated
|
500
|
+
[
|
501
|
+
'Dedicated - Ultimate - 1 Year',
|
502
|
+
'Dedicated - Ultimate - 2 Year',
|
503
|
+
'Dedicated - Ultimate - 3 Year',
|
504
|
+
'Dedicated - Ultimate - 4 Year',
|
505
|
+
'Dedicated - Ultimate - 5 Year',
|
506
|
+
'Dedicated - Ultimate - Monthly'
|
507
|
+
]
|
508
|
+
end
|
509
|
+
|
510
|
+
##
|
511
|
+
# Defines FedRAMP subscriptions
|
512
|
+
#
|
513
|
+
# @author Jason Colyer
|
514
|
+
# @since 1.0.26
|
515
|
+
# @return [Array]
|
516
|
+
def self.fedramp
|
517
|
+
[
|
518
|
+
'GitLab Dedicated for US Public Sector - Ultimate - 1 Year',
|
519
|
+
'GitLab Dedicated for US Public Sector - Ultimate - 2 Year',
|
520
|
+
'GitLab Dedicated for US Public Sector - Ultimate - 3 Year',
|
521
|
+
'GitLab Dedicated for US Public Sector - Ultimate - Monthly'
|
522
|
+
]
|
523
|
+
end
|
524
|
+
|
525
|
+
##
|
526
|
+
# Defines Community => EDU subscriptions
|
527
|
+
#
|
528
|
+
# @author Jason Colyer
|
529
|
+
# @since 1.0.26
|
530
|
+
# @return [Array]
|
531
|
+
def self.edu
|
532
|
+
[
|
533
|
+
'[EDU Program] SaaS - Ultimate - 1 Year',
|
534
|
+
'[EDU Program] Self-Managed - Ultimate - 1 Year',
|
535
|
+
'[EDU Program] Self-Managed - Ultimate - 3 Year',
|
536
|
+
'Gold Plan - 1 Year (EDU or OSS)',
|
537
|
+
'Ultimate - 1 Year (EDU or OSS)',
|
538
|
+
'Ultimate - 1 Year (Y Combinator)'
|
539
|
+
]
|
540
|
+
end
|
541
|
+
|
542
|
+
##
|
543
|
+
# Defines Community => OSS subscriptions
|
544
|
+
#
|
545
|
+
# @author Jason Colyer
|
546
|
+
# @since 1.0.26
|
547
|
+
# @return [Array]
|
548
|
+
def self.oss
|
549
|
+
[
|
550
|
+
'[OSS Program] SaaS - Ultimate - 1 Year',
|
551
|
+
'[OSS Program] SaaS - Ultimate - 1 Year',
|
552
|
+
'[OSS Program] Self-Managed - Support - 3 Year',
|
553
|
+
'[OSS Program] Self-Managed - Ultimate - 1 Year',
|
554
|
+
'[OSS Program] Self-Managed - Ultimate - 3 Year'
|
555
|
+
]
|
556
|
+
end
|
557
|
+
|
558
|
+
##
|
559
|
+
# Defines Community => Other subscriptions
|
560
|
+
#
|
561
|
+
# @author Jason Colyer
|
562
|
+
# @since 1.0.26
|
563
|
+
# @return [Array]
|
564
|
+
def self.community_other
|
565
|
+
[
|
566
|
+
'[Startups Program] SaaS - Ultimate - 1 Year',
|
567
|
+
'[Startups Program] Self-Managed - Ultimate - 1 Year',
|
568
|
+
'Gold Plan - 1 Year (Y Combinator)'
|
569
|
+
]
|
570
|
+
end
|
571
|
+
|
572
|
+
##
|
573
|
+
# Defines Support Services => ASE subscriptions
|
574
|
+
#
|
575
|
+
# @author Jason Colyer
|
576
|
+
# @since 1.0.26
|
577
|
+
# @return [Array]
|
578
|
+
def self.ss_ase
|
579
|
+
[
|
580
|
+
'Dedicated - Success Plan Services - 1 Year',
|
581
|
+
'Dedicated - Success Plan Services - 2 Year',
|
582
|
+
'Dedicated - Success Plan Services - 3 Year',
|
583
|
+
'Dedicated - Success Plan Services - Monthly',
|
584
|
+
'SaaS - Assigned Support Engineer - 1 Year',
|
585
|
+
'SaaS - Assigned Support Engineer - 2 Year',
|
586
|
+
'SaaS - Assigned Support Engineer - 3 Year',
|
587
|
+
'SaaS - Assigned Support Engineer - 4 Year',
|
588
|
+
'SaaS - Assigned Support Engineer - 5 Year',
|
589
|
+
'SaaS - Assigned Support Engineer - Monthly',
|
590
|
+
'SaaS - Success Plan Services - 1 Year',
|
591
|
+
'SaaS - Success Plan Services - 3 Year',
|
592
|
+
'SaaS - Success Plan Services - Monthly',
|
593
|
+
'SaaS- Success Plan Services - 2 Year',
|
594
|
+
'Self-Managed - Assigned Support Engineer - 1 Year',
|
595
|
+
'Self-Managed - Assigned Support Engineer - 2 Year',
|
596
|
+
'Self-Managed - Assigned Support Engineer - 3 Year',
|
597
|
+
'Self-Managed - Assigned Support Engineer - 4 Year',
|
598
|
+
'Self-Managed - Assigned Support Engineer - 5 Year',
|
599
|
+
'Self-Managed - Assigned Support Engineer - Monthly',
|
600
|
+
'Self-Managed - Success Plan Services - 1 Year',
|
601
|
+
'Self-Managed - Success Plan Services - 2 Year',
|
602
|
+
'Self-Managed - Success Plan Services - 3 Year',
|
603
|
+
'Self-Managed - Success Plan Services - Monthly'
|
604
|
+
]
|
605
|
+
end
|
606
|
+
end
|
607
|
+
end
|
608
|
+
end
|
@@ -9,8 +9,10 @@ module Readiness
|
|
9
9
|
module Salesforce
|
10
10
|
require "#{__dir__}/salesforce/accounts"
|
11
11
|
require "#{__dir__}/salesforce/cases"
|
12
|
+
require "#{__dir__}/salesforce/contacts"
|
12
13
|
require "#{__dir__}/salesforce/client"
|
13
14
|
require "#{__dir__}/salesforce/configuration"
|
14
15
|
require "#{__dir__}/salesforce/queries"
|
16
|
+
require "#{__dir__}/salesforce/subscription_definitions"
|
15
17
|
end
|
16
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_support_readiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Colyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -289,7 +289,9 @@ files:
|
|
289
289
|
- lib/support_readiness/salesforce/cases.rb
|
290
290
|
- lib/support_readiness/salesforce/client.rb
|
291
291
|
- lib/support_readiness/salesforce/configuration.rb
|
292
|
+
- lib/support_readiness/salesforce/contacts.rb
|
292
293
|
- lib/support_readiness/salesforce/queries.rb
|
294
|
+
- lib/support_readiness/salesforce/subscription_definitions.rb
|
293
295
|
- lib/support_readiness/slack.rb
|
294
296
|
- lib/support_readiness/slack/client.rb
|
295
297
|
- lib/support_readiness/slack/configuration.rb
|