twilio-ruby 7.3.1 → 7.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a53ce791923b82cf98d5e73e79ad205845ccb0e
4
- data.tar.gz: b0939883d6aecdb2bab7b837305c01f8b7701ac4
3
+ metadata.gz: 4c8d6a744bfa76292d29df1b6dde7ec1065d1268
4
+ data.tar.gz: f473081e2021ca76a824ac14255cb6673e7c5fda
5
5
  SHA512:
6
- metadata.gz: 748ddf00fa7eab5318808b35f3ad873c2fddbb71e5b8b0c466cf67761d896a1f32b0f75ddf8cfaabbdd0eb8d61ae98d1ce2ca9eceb6c4965c3a4c2d7ad8a5a49
7
- data.tar.gz: 21168d4b82b52ee9d2a6c9312727a0f3cfa014b90dc25212dc7d54e670f14354c220b4e85a6e1cb37e1e3536512497c5589739182336b01588e17e0c6fc69f5c
6
+ metadata.gz: b409ef8039eb7350bc35848b1ecee4b593746f24b507a6bc61d4714aa6a3635a7fe3abaf5aebc32f70e1cc84bb6c556bba7a6aea7b722a2b691f2f7371cb9174
7
+ data.tar.gz: 380ce56ad37656fa87df523fe8b41eb50efcaeb5f794024fd41cc9c236d3e0f4725545e46a0f1f49db3198daec8a83756a7effa23a7507f89aaefbcf07a64fb4
data/CHANGES.md CHANGED
@@ -1,6 +1,17 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2024-09-25] Version 7.3.2
5
+ --------------------------
6
+ **Accounts**
7
+ - Update docs and mounts.
8
+ - Change library visibility to public
9
+ - Enable consent and contact bulk upsert APIs in prod.
10
+
11
+ **Serverless**
12
+ - Add is_plugin parameter in deployments api to check if it is plugins deployment
13
+
14
+
4
15
  [2024-09-18] Version 7.3.1
5
16
  --------------------------
6
17
  **Intelligence**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 7.3.1'
42
+ gem 'twilio-ruby', '~> 7.3.2'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 7.3.1
48
+ gem install twilio-ruby -v 7.3.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -0,0 +1,133 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Accounts
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Accounts < AccountsBase
19
+ class V1 < Version
20
+ class BulkConsentsList < ListResource
21
+
22
+ ##
23
+ # Initialize the BulkConsentsList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [BulkConsentsList] BulkConsentsList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Consents/Bulk"
31
+
32
+ end
33
+ ##
34
+ # Create the BulkConsentsInstance
35
+ # @param [Array[Hash]] items This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`].
36
+ # @return [BulkConsentsInstance] Created BulkConsentsInstance
37
+ def create(
38
+ items: nil
39
+ )
40
+
41
+ data = Twilio::Values.of({
42
+ 'Items' => Twilio.serialize_list(items) { |e| Twilio.serialize_object(e) },
43
+ })
44
+
45
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
46
+
47
+ payload = @version.create('POST', @uri, data: data, headers: headers)
48
+ BulkConsentsInstance.new(
49
+ @version,
50
+ payload,
51
+ )
52
+ end
53
+
54
+
55
+
56
+
57
+ # Provide a user friendly representation
58
+ def to_s
59
+ '#<Twilio.Accounts.V1.BulkConsentsList>'
60
+ end
61
+ end
62
+
63
+ class BulkConsentsPage < Page
64
+ ##
65
+ # Initialize the BulkConsentsPage
66
+ # @param [Version] version Version that contains the resource
67
+ # @param [Response] response Response from the API
68
+ # @param [Hash] solution Path solution for the resource
69
+ # @return [BulkConsentsPage] BulkConsentsPage
70
+ def initialize(version, response, solution)
71
+ super(version, response)
72
+
73
+ # Path Solution
74
+ @solution = solution
75
+ end
76
+
77
+ ##
78
+ # Build an instance of BulkConsentsInstance
79
+ # @param [Hash] payload Payload response from the API
80
+ # @return [BulkConsentsInstance] BulkConsentsInstance
81
+ def get_instance(payload)
82
+ BulkConsentsInstance.new(@version, payload)
83
+ end
84
+
85
+ ##
86
+ # Provide a user friendly representation
87
+ def to_s
88
+ '<Twilio.Accounts.V1.BulkConsentsPage>'
89
+ end
90
+ end
91
+ class BulkConsentsInstance < InstanceResource
92
+ ##
93
+ # Initialize the BulkConsentsInstance
94
+ # @param [Version] version Version that contains the resource
95
+ # @param [Hash] payload payload that contains response from Twilio
96
+ # @param [String] account_sid The SID of the
97
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this BulkConsents
98
+ # resource.
99
+ # @param [String] sid The SID of the Call resource to fetch.
100
+ # @return [BulkConsentsInstance] BulkConsentsInstance
101
+ def initialize(version, payload )
102
+ super(version)
103
+
104
+ # Marshaled Properties
105
+ @properties = {
106
+ 'items' => payload['items'],
107
+ }
108
+ end
109
+
110
+
111
+ ##
112
+ # @return [Hash] A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
113
+ def items
114
+ @properties['items']
115
+ end
116
+
117
+ ##
118
+ # Provide a user friendly representation
119
+ def to_s
120
+ "<Twilio.Accounts.V1.BulkConsentsInstance>"
121
+ end
122
+
123
+ ##
124
+ # Provide a detailed, user friendly representation
125
+ def inspect
126
+ "<Twilio.Accounts.V1.BulkConsentsInstance>"
127
+ end
128
+ end
129
+
130
+ end
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,133 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Accounts
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Accounts < AccountsBase
19
+ class V1 < Version
20
+ class BulkContactsList < ListResource
21
+
22
+ ##
23
+ # Initialize the BulkContactsList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [BulkContactsList] BulkContactsList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+ @uri = "/Contacts/Bulk"
31
+
32
+ end
33
+ ##
34
+ # Create the BulkContactsInstance
35
+ # @param [Array[Hash]] items A list of objects where each object represents a contact's details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code.
36
+ # @return [BulkContactsInstance] Created BulkContactsInstance
37
+ def create(
38
+ items: nil
39
+ )
40
+
41
+ data = Twilio::Values.of({
42
+ 'Items' => Twilio.serialize_list(items) { |e| Twilio.serialize_object(e) },
43
+ })
44
+
45
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
46
+
47
+ payload = @version.create('POST', @uri, data: data, headers: headers)
48
+ BulkContactsInstance.new(
49
+ @version,
50
+ payload,
51
+ )
52
+ end
53
+
54
+
55
+
56
+
57
+ # Provide a user friendly representation
58
+ def to_s
59
+ '#<Twilio.Accounts.V1.BulkContactsList>'
60
+ end
61
+ end
62
+
63
+ class BulkContactsPage < Page
64
+ ##
65
+ # Initialize the BulkContactsPage
66
+ # @param [Version] version Version that contains the resource
67
+ # @param [Response] response Response from the API
68
+ # @param [Hash] solution Path solution for the resource
69
+ # @return [BulkContactsPage] BulkContactsPage
70
+ def initialize(version, response, solution)
71
+ super(version, response)
72
+
73
+ # Path Solution
74
+ @solution = solution
75
+ end
76
+
77
+ ##
78
+ # Build an instance of BulkContactsInstance
79
+ # @param [Hash] payload Payload response from the API
80
+ # @return [BulkContactsInstance] BulkContactsInstance
81
+ def get_instance(payload)
82
+ BulkContactsInstance.new(@version, payload)
83
+ end
84
+
85
+ ##
86
+ # Provide a user friendly representation
87
+ def to_s
88
+ '<Twilio.Accounts.V1.BulkContactsPage>'
89
+ end
90
+ end
91
+ class BulkContactsInstance < InstanceResource
92
+ ##
93
+ # Initialize the BulkContactsInstance
94
+ # @param [Version] version Version that contains the resource
95
+ # @param [Hash] payload payload that contains response from Twilio
96
+ # @param [String] account_sid The SID of the
97
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this BulkContacts
98
+ # resource.
99
+ # @param [String] sid The SID of the Call resource to fetch.
100
+ # @return [BulkContactsInstance] BulkContactsInstance
101
+ def initialize(version, payload )
102
+ super(version)
103
+
104
+ # Marshaled Properties
105
+ @properties = {
106
+ 'items' => payload['items'],
107
+ }
108
+ end
109
+
110
+
111
+ ##
112
+ # @return [Hash] A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
113
+ def items
114
+ @properties['items']
115
+ end
116
+
117
+ ##
118
+ # Provide a user friendly representation
119
+ def to_s
120
+ "<Twilio.Accounts.V1.BulkContactsInstance>"
121
+ end
122
+
123
+ ##
124
+ # Provide a detailed, user friendly representation
125
+ def inspect
126
+ "<Twilio.Accounts.V1.BulkContactsInstance>"
127
+ end
128
+ end
129
+
130
+ end
131
+ end
132
+ end
133
+ end
@@ -22,6 +22,8 @@ module Twilio
22
22
  super
23
23
  @version = 'v1'
24
24
  @auth_token_promotion = nil
25
+ @bulk_consents = nil
26
+ @bulk_contacts = nil
25
27
  @credentials = nil
26
28
  @safelist = nil
27
29
  @secondary_auth_token = nil
@@ -33,6 +35,16 @@ module Twilio
33
35
  @auth_token_promotion ||= AuthTokenPromotionContext.new self
34
36
  end
35
37
  ##
38
+ # @return [Twilio::REST::Accounts::V1::BulkConsentsList]
39
+ def bulk_consents
40
+ @bulk_consents ||= BulkConsentsList.new self
41
+ end
42
+ ##
43
+ # @return [Twilio::REST::Accounts::V1::BulkContactsList]
44
+ def bulk_contacts
45
+ @bulk_contacts ||= BulkContactsList.new self
46
+ end
47
+ ##
36
48
  # @return [Twilio::REST::Accounts::V1::CredentialList]
37
49
  def credentials
38
50
  @credentials ||= CredentialList.new self