Class: Twilio::REST::Memory::V1::BulkList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Memory::V1::BulkList
- Defined in:
- lib/twilio-ruby/rest/memory/v1/bulk.rb
Defined Under Namespace
Classes: ProfileData, UpdateProfilesBulkRequest
Instance Method Summary collapse
-
#initialize(version, store_id: nil) ⇒ BulkList
constructor
Initialize the BulkList.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(update_profiles_bulk_request: nil) ⇒ BulkInstance
Update the BulkInstance.
-
#update_with_metadata(update_profiles_bulk_request: nil) ⇒ BulkInstance
Update the BulkInstanceMetadata.
Constructor Details
#initialize(version, store_id: nil) ⇒ BulkList
Initialize the BulkList
53 54 55 56 57 58 59 60 61 |
# File 'lib/twilio-ruby/rest/memory/v1/bulk.rb', line 53 def initialize(version, store_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Path Solution @solution = { store_id: store_id } @uri = "/Stores/#{@solution[:store_id]}/Profiles/Bulk" end |
Instance Method Details
#to_s ⇒ Object
Provide a user friendly representation
114 115 116 |
# File 'lib/twilio-ruby/rest/memory/v1/bulk.rb', line 114 def to_s '#<Twilio.Memory.V1.BulkList>' end |
#update(update_profiles_bulk_request: nil) ⇒ BulkInstance
Update the BulkInstance
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/twilio-ruby/rest/memory/v1/bulk.rb', line 66 def update(update_profiles_bulk_request: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.update('PUT', @uri, headers: headers, data: update_profiles_bulk_request.to_json) BulkInstance.new( @version, payload, store_id: @solution[:store_id], ) end |
#update_with_metadata(update_profiles_bulk_request: nil) ⇒ BulkInstance
Update the BulkInstanceMetadata
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/twilio-ruby/rest/memory/v1/bulk.rb', line 87 def (update_profiles_bulk_request: nil ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' response = @version.('PUT', @uri, headers: headers, data: update_profiles_bulk_request.to_json) bulk_instance = BulkInstance.new( @version, response.body, store_id: @solution[:store_id], ) BulkInstanceMetadata.new( @version, bulk_instance, response.headers, response.status_code ) end |