spaceship/lib/spaceship/connect_api/models/user_invitation.rb in fastlane-2.167.0 vs spaceship/lib/spaceship/connect_api/models/user_invitation.rb in fastlane-2.168.0

- old
+ new

@@ -40,20 +40,23 @@ # # Managing invitations # - def self.all(filter: {}, includes: nil, sort: nil) - resps = Spaceship::ConnectAPI.get_user_invitations(filter: filter, includes: includes, sort: sort).all_pages + def self.all(client: nil, filter: {}, includes: nil, sort: nil) + client ||= Spaceship::ConnectAPI + resps = client.get_user_invitations(filter: filter, includes: includes, sort: sort).all_pages return resps.flat_map(&:to_models) end - def self.find(email: nil, includes: nil) - return all(filter: { email: email }, includes: includes) + def self.find(client: nil, email: nil, includes: nil) + client ||= Spaceship::ConnectAPI + return all(client: client, filter: { email: email }, includes: includes) end - def delete! - Spaceship::ConnectAPI.delete_user_invitation(user_invitation_id: id) + def delete!(client: nil) + client ||= Spaceship::ConnectAPI + client.delete_user_invitation(user_invitation_id: id) end end end end