twilio-ruby 7.2.4 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +20 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +303 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +626 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +229 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +593 -0
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +328 -0
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +549 -0
- data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
- data/lib/twilio-ruby/rest/assistants.rb +6 -0
- data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
- data/lib/twilio-ruby/rest/client.rb +10 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -11
- data/lib/twilio-ruby/rest/content/v1/content.rb +103 -6
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
- data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +177 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
- data/lib/twilio-ruby/rest/iam.rb +6 -0
- data/lib/twilio-ruby/rest/iam_base.rb +38 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +11 -24
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +28 -15
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -4
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +19 -2
@@ -0,0 +1,223 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Iam
|
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 Iam < IamBase
|
19
|
+
class V1 < Version
|
20
|
+
class GetApiKeysList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the GetApiKeysList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [GetApiKeysList] GetApiKeysList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Keys"
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Lists GetApiKeysInstance records from the API as a list.
|
36
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
37
|
+
# memory before returning.
|
38
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
39
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
40
|
+
# guarantees to never return more than limit. Default is no limit
|
41
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
42
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
43
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
44
|
+
# efficient page size, i.e. min(limit, 1000)
|
45
|
+
# @return [Array] Array of up to limit results
|
46
|
+
def list(account_sid: nil, limit: nil, page_size: nil)
|
47
|
+
self.stream(
|
48
|
+
account_sid: account_sid,
|
49
|
+
limit: limit,
|
50
|
+
page_size: page_size
|
51
|
+
).entries
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Streams Instance records from the API as an Enumerable.
|
56
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
57
|
+
# is reached.
|
58
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
59
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
60
|
+
# guarantees to never return more than limit. Default is no limit
|
61
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
62
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
63
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
64
|
+
# efficient page size, i.e. min(limit, 1000)
|
65
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
66
|
+
def stream(account_sid: nil, limit: nil, page_size: nil)
|
67
|
+
limits = @version.read_limits(limit, page_size)
|
68
|
+
|
69
|
+
page = self.page(
|
70
|
+
account_sid: account_sid,
|
71
|
+
page_size: limits[:page_size], )
|
72
|
+
|
73
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# When passed a block, yields GetApiKeysInstance records from the API.
|
78
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
79
|
+
# is reached.
|
80
|
+
def each
|
81
|
+
limits = @version.read_limits
|
82
|
+
|
83
|
+
page = self.page(page_size: limits[:page_size], )
|
84
|
+
|
85
|
+
@version.stream(page,
|
86
|
+
limit: limits[:limit],
|
87
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Retrieve a single page of GetApiKeysInstance records from the API.
|
92
|
+
# Request is executed immediately.
|
93
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
94
|
+
# @param [String] page_token PageToken provided by the API
|
95
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
96
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
97
|
+
# @return [Page] Page of GetApiKeysInstance
|
98
|
+
def page(account_sid: nil, page_token: :unset, page_number: :unset, page_size: :unset)
|
99
|
+
params = Twilio::Values.of({
|
100
|
+
'AccountSid' => account_sid,
|
101
|
+
'PageToken' => page_token,
|
102
|
+
'Page' => page_number,
|
103
|
+
'PageSize' => page_size,
|
104
|
+
})
|
105
|
+
|
106
|
+
response = @version.page('GET', @uri, params: params)
|
107
|
+
|
108
|
+
GetApiKeysPage.new(@version, response, @solution)
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Retrieve a single page of GetApiKeysInstance records from the API.
|
113
|
+
# Request is executed immediately.
|
114
|
+
# @param [String] target_url API-generated URL for the requested results page
|
115
|
+
# @return [Page] Page of GetApiKeysInstance
|
116
|
+
def get_page(target_url)
|
117
|
+
response = @version.domain.request(
|
118
|
+
'GET',
|
119
|
+
target_url
|
120
|
+
)
|
121
|
+
GetApiKeysPage.new(@version, response, @solution)
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
# Provide a user friendly representation
|
127
|
+
def to_s
|
128
|
+
'#<Twilio.Iam.V1.GetApiKeysList>'
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
class GetApiKeysPage < Page
|
133
|
+
##
|
134
|
+
# Initialize the GetApiKeysPage
|
135
|
+
# @param [Version] version Version that contains the resource
|
136
|
+
# @param [Response] response Response from the API
|
137
|
+
# @param [Hash] solution Path solution for the resource
|
138
|
+
# @return [GetApiKeysPage] GetApiKeysPage
|
139
|
+
def initialize(version, response, solution)
|
140
|
+
super(version, response)
|
141
|
+
|
142
|
+
# Path Solution
|
143
|
+
@solution = solution
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Build an instance of GetApiKeysInstance
|
148
|
+
# @param [Hash] payload Payload response from the API
|
149
|
+
# @return [GetApiKeysInstance] GetApiKeysInstance
|
150
|
+
def get_instance(payload)
|
151
|
+
GetApiKeysInstance.new(@version, payload)
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Provide a user friendly representation
|
156
|
+
def to_s
|
157
|
+
'<Twilio.Iam.V1.GetApiKeysPage>'
|
158
|
+
end
|
159
|
+
end
|
160
|
+
class GetApiKeysInstance < InstanceResource
|
161
|
+
##
|
162
|
+
# Initialize the GetApiKeysInstance
|
163
|
+
# @param [Version] version Version that contains the resource
|
164
|
+
# @param [Hash] payload payload that contains response from Twilio
|
165
|
+
# @param [String] account_sid The SID of the
|
166
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this GetApiKeys
|
167
|
+
# resource.
|
168
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
169
|
+
# @return [GetApiKeysInstance] GetApiKeysInstance
|
170
|
+
def initialize(version, payload )
|
171
|
+
super(version)
|
172
|
+
|
173
|
+
# Marshaled Properties
|
174
|
+
@properties = {
|
175
|
+
'sid' => payload['sid'],
|
176
|
+
'friendly_name' => payload['friendly_name'],
|
177
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
178
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
179
|
+
}
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
##
|
184
|
+
# @return [String] The unique string that we created to identify the Key resource.
|
185
|
+
def sid
|
186
|
+
@properties['sid']
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# @return [String] The string that you assigned to describe the resource.
|
191
|
+
def friendly_name
|
192
|
+
@properties['friendly_name']
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
197
|
+
def date_created
|
198
|
+
@properties['date_created']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
203
|
+
def date_updated
|
204
|
+
@properties['date_updated']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Provide a user friendly representation
|
209
|
+
def to_s
|
210
|
+
"<Twilio.Iam.V1.GetApiKeysInstance>"
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# Provide a detailed, user friendly representation
|
215
|
+
def inspect
|
216
|
+
"<Twilio.Iam.V1.GetApiKeysInstance>"
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,177 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Iam
|
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 Iam < IamBase
|
19
|
+
class V1 < Version
|
20
|
+
class NewApiKeyList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the NewApiKeyList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [NewApiKeyList] NewApiKeyList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Keys"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Create the NewApiKeyInstance
|
35
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
36
|
+
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
37
|
+
# @param [Keytype] key_type
|
38
|
+
# @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
|
39
|
+
# @return [NewApiKeyInstance] Created NewApiKeyInstance
|
40
|
+
def create(
|
41
|
+
account_sid: nil,
|
42
|
+
friendly_name: :unset,
|
43
|
+
key_type: :unset,
|
44
|
+
policy: :unset
|
45
|
+
)
|
46
|
+
|
47
|
+
data = Twilio::Values.of({
|
48
|
+
'AccountSid' => account_sid,
|
49
|
+
'FriendlyName' => friendly_name,
|
50
|
+
'KeyType' => key_type,
|
51
|
+
'Policy' => Twilio.serialize_object(policy),
|
52
|
+
})
|
53
|
+
|
54
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
55
|
+
|
56
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
57
|
+
NewApiKeyInstance.new(
|
58
|
+
@version,
|
59
|
+
payload,
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# Provide a user friendly representation
|
67
|
+
def to_s
|
68
|
+
'#<Twilio.Iam.V1.NewApiKeyList>'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class NewApiKeyPage < Page
|
73
|
+
##
|
74
|
+
# Initialize the NewApiKeyPage
|
75
|
+
# @param [Version] version Version that contains the resource
|
76
|
+
# @param [Response] response Response from the API
|
77
|
+
# @param [Hash] solution Path solution for the resource
|
78
|
+
# @return [NewApiKeyPage] NewApiKeyPage
|
79
|
+
def initialize(version, response, solution)
|
80
|
+
super(version, response)
|
81
|
+
|
82
|
+
# Path Solution
|
83
|
+
@solution = solution
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Build an instance of NewApiKeyInstance
|
88
|
+
# @param [Hash] payload Payload response from the API
|
89
|
+
# @return [NewApiKeyInstance] NewApiKeyInstance
|
90
|
+
def get_instance(payload)
|
91
|
+
NewApiKeyInstance.new(@version, payload)
|
92
|
+
end
|
93
|
+
|
94
|
+
##
|
95
|
+
# Provide a user friendly representation
|
96
|
+
def to_s
|
97
|
+
'<Twilio.Iam.V1.NewApiKeyPage>'
|
98
|
+
end
|
99
|
+
end
|
100
|
+
class NewApiKeyInstance < InstanceResource
|
101
|
+
##
|
102
|
+
# Initialize the NewApiKeyInstance
|
103
|
+
# @param [Version] version Version that contains the resource
|
104
|
+
# @param [Hash] payload payload that contains response from Twilio
|
105
|
+
# @param [String] account_sid The SID of the
|
106
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this NewApiKey
|
107
|
+
# resource.
|
108
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
109
|
+
# @return [NewApiKeyInstance] NewApiKeyInstance
|
110
|
+
def initialize(version, payload )
|
111
|
+
super(version)
|
112
|
+
|
113
|
+
# Marshaled Properties
|
114
|
+
@properties = {
|
115
|
+
'sid' => payload['sid'],
|
116
|
+
'friendly_name' => payload['friendly_name'],
|
117
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
118
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
119
|
+
'secret' => payload['secret'],
|
120
|
+
'policy' => payload['policy'],
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
##
|
126
|
+
# @return [String] The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
|
127
|
+
def sid
|
128
|
+
@properties['sid']
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# @return [String] The string that you assigned to describe the resource.
|
133
|
+
def friendly_name
|
134
|
+
@properties['friendly_name']
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# @return [Time] The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
139
|
+
def date_created
|
140
|
+
@properties['date_created']
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# @return [Time] The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
145
|
+
def date_updated
|
146
|
+
@properties['date_updated']
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# @return [String] The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
|
151
|
+
def secret
|
152
|
+
@properties['secret']
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# @return [Hash] Collection of allow assertions.
|
157
|
+
def policy
|
158
|
+
@properties['policy']
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# Provide a user friendly representation
|
163
|
+
def to_s
|
164
|
+
"<Twilio.Iam.V1.NewApiKeyInstance>"
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Provide a detailed, user friendly representation
|
169
|
+
def inspect
|
170
|
+
"<Twilio.Iam.V1.NewApiKeyInstance>"
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Iam
|
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
|
+
module Twilio
|
16
|
+
module REST
|
17
|
+
class Iam
|
18
|
+
class V1 < Version
|
19
|
+
##
|
20
|
+
# Initialize the V1 version of Iam
|
21
|
+
def initialize(domain)
|
22
|
+
super
|
23
|
+
@version = 'v1'
|
24
|
+
@api_key = nil
|
25
|
+
@get_api_keys = nil
|
26
|
+
@new_api_key = nil
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Key resource to fetch.
|
31
|
+
# @return [Twilio::REST::Iam::V1::ApiKeyContext] if sid was passed.
|
32
|
+
# @return [Twilio::REST::Iam::V1::ApiKeyList]
|
33
|
+
def api_key(sid=:unset)
|
34
|
+
if sid.nil?
|
35
|
+
raise ArgumentError, 'sid cannot be nil'
|
36
|
+
end
|
37
|
+
if sid == :unset
|
38
|
+
@api_key ||= ApiKeyList.new self
|
39
|
+
else
|
40
|
+
ApiKeyContext.new(self, sid)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
##
|
44
|
+
# @return [Twilio::REST::Iam::V1::GetApiKeysList]
|
45
|
+
def get_api_keys
|
46
|
+
@get_api_keys ||= GetApiKeysList.new self
|
47
|
+
end
|
48
|
+
##
|
49
|
+
# @return [Twilio::REST::Iam::V1::NewApiKeyList]
|
50
|
+
def new_api_key
|
51
|
+
@new_api_key ||= NewApiKeyList.new self
|
52
|
+
end
|
53
|
+
##
|
54
|
+
# Provide a user friendly representation
|
55
|
+
def to_s
|
56
|
+
'<Twilio::REST::Iam::V1>';
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
8
|
+
# https://openapi-generator.tech
|
9
|
+
# Do not edit the class manually.
|
10
|
+
# frozen_string_literal: true
|
11
|
+
module Twilio
|
12
|
+
module REST
|
13
|
+
class IamBase < Domain
|
14
|
+
##
|
15
|
+
# Initialize iam domain
|
16
|
+
#
|
17
|
+
# @param twilio - The twilio client
|
18
|
+
#
|
19
|
+
def initialize(twilio)
|
20
|
+
super(twilio)
|
21
|
+
@base_url = "https://iam.twilio.com"
|
22
|
+
@host = "iam.twilio.com"
|
23
|
+
@port = 443
|
24
|
+
@v1 = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def v1
|
28
|
+
@v1 ||= Iam::V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Provide a user friendly representation
|
33
|
+
def to_s
|
34
|
+
'<Twilio::REST::Iam::V1>';
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -22,34 +22,21 @@ module Twilio
|
|
22
22
|
class InstalledAddOnUsageList < ListResource
|
23
23
|
|
24
24
|
class MarketplaceV1InstalledAddOnInstalledAddOnUsage
|
25
|
+
# @param [total_submitted]: [Float] Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted.
|
25
26
|
# @param [billable_items]: [Array<InstalledAddOnUsageList.MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>]
|
26
|
-
attr_accessor :billable_items
|
27
|
+
attr_accessor :total_submitted, :billable_items
|
27
28
|
def initialize(payload)
|
29
|
+
@total_submitted = payload["total_submitted"]
|
28
30
|
@billable_items = payload["billable_items"]
|
29
31
|
end
|
30
32
|
def to_json(options = {})
|
31
33
|
{
|
34
|
+
total_submitted: @total_submitted,
|
32
35
|
billable_items: @billable_items,
|
33
36
|
}.to_json(options)
|
34
37
|
end
|
35
38
|
end
|
36
39
|
|
37
|
-
class MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems
|
38
|
-
# @param [quantity]: [Float] Any floating number greater than 0.
|
39
|
-
# @param [sid]: [String] BillingSid to use for billing.
|
40
|
-
attr_accessor :quantity, :sid
|
41
|
-
def initialize(payload)
|
42
|
-
@quantity = payload["quantity"]
|
43
|
-
@sid = payload["sid"]
|
44
|
-
end
|
45
|
-
def to_json(options = {})
|
46
|
-
{
|
47
|
-
quantity: @quantity,
|
48
|
-
sid: @sid,
|
49
|
-
}.to_json(options)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
40
|
##
|
54
41
|
# Initialize the InstalledAddOnUsageList
|
55
42
|
# @param [Version] version Version that contains the resource
|
@@ -130,22 +117,22 @@ module Twilio
|
|
130
117
|
|
131
118
|
# Marshaled Properties
|
132
119
|
@properties = {
|
133
|
-
'billable_items' => payload['billable_items'],
|
134
120
|
'total_submitted' => payload['total_submitted'],
|
121
|
+
'billable_items' => payload['billable_items'],
|
135
122
|
}
|
136
123
|
end
|
137
124
|
|
138
125
|
|
139
126
|
##
|
140
|
-
# @return [
|
141
|
-
def
|
142
|
-
@properties['
|
127
|
+
# @return [Float] Total amount in local currency that was billed in this request. Aggregates all billable_items that were successfully submitted.
|
128
|
+
def total_submitted
|
129
|
+
@properties['total_submitted']
|
143
130
|
end
|
144
131
|
|
145
132
|
##
|
146
|
-
# @return [
|
147
|
-
def
|
148
|
-
@properties['
|
133
|
+
# @return [Array<InstalledAddOnUsageList.MarketplaceV1InstalledAddOnInstalledAddOnUsageBillableItems>]
|
134
|
+
def billable_items
|
135
|
+
@properties['billable_items']
|
149
136
|
end
|
150
137
|
|
151
138
|
##
|