spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb in fastlane-2.154.0 vs spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb in fastlane-2.155.0
- old
+ new
@@ -41,8 +41,49 @@
def get_profiles(filter: {}, includes: nil, limit: nil, sort: nil)
params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
Client.instance.get("profiles", params)
end
+
+ def post_profiles(bundle_id_id: nil, certificates: nil, devices: nil, attributes: {})
+ body = {
+ data: {
+ attributes: attributes,
+ type: "profiles",
+ relationships: {
+ bundleId: {
+ data: {
+ type: "bundleIds",
+ id: bundle_id_id
+ }
+ },
+ certificates: {
+ data: certificates.map do |certificate|
+ {
+ type: "certificates",
+ id: certificate
+ }
+ end
+ },
+ devices: {
+ data: (devices || []).map do |certificate|
+ {
+ type: "devices",
+ id: devices
+ }
+ end
+ }
+ }
+ }
+ }
+
+ Client.instance.post("profiles", body)
+ end
+
+ def delete_profile(profile_id: nil)
+ raise "Profile id is nil" if profile_id.nil?
+
+ Client.instance.delete("profiles/#{profile_id}")
+ end
end
end
end