Class: Twilio::REST::Accounts::V1::BulkContactsList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Accounts::V1::BulkContactsList
- Defined in:
- lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb
Instance Method Summary collapse
-
#create(items: nil) ⇒ BulkContactsInstance
Create the BulkContactsInstance.
-
#initialize(version) ⇒ BulkContactsList
constructor
Initialize the BulkContactsList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ BulkContactsList
Initialize the BulkContactsList
26 27 28 29 30 31 32 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 26 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/Contacts/Bulk" end |
Instance Method Details
#create(items: nil) ⇒ BulkContactsInstance
Create the BulkContactsInstance
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 37 def create( items: nil ) data = Twilio::Values.of({ 'Items' => Twilio.serialize_list(items) { |e| Twilio.serialize_object(e) }, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) BulkContactsInstance.new( @version, payload, ) end |
#to_s ⇒ Object
Provide a user friendly representation
62 63 64 |
# File 'lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb', line 62 def to_s '#<Twilio.Accounts.V1.BulkContactsList>' end |