Class: CirroIO::Client::GigInvitation

Inherits:
Base
  • Object
show all
Includes:
BulkActionHelper
Defined in:
lib/cirro_io/client/gig_invitation.rb

Instance Method Summary collapse

Methods included from BulkActionHelper

#format_to_dashed_keys

Methods inherited from Base

custom_connection, custom_post, #initialize, site=

Constructor Details

This class inherits a constructor from CirroIO::Client::Base

Instance Method Details

#bulk_create_with(worker_filter, auto_accept: false) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/cirro_io/client/gig_invitation.rb', line 9

def bulk_create_with(worker_filter, auto_accept: false)
  payload = { data: { attributes: attributes.merge(worker_filter: worker_filter.attributes, auto_accept:) } }

  response = self.class.custom_post("bulk/gigs/#{gig.id}/gig_invitations", format_to_dashed_keys(payload))

  self.class.parser.parse(self.class, response)
end