reach-ruby 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +1 -0
  3. data/.gitignore +18 -0
  4. data/.rubocop.yml +58 -0
  5. data/.rubocop_todo.yml +193 -0
  6. data/AUTHORS.md +52 -0
  7. data/CHANGES.md +3 -0
  8. data/CODE_OF_CONDUCT.md +73 -0
  9. data/CONTRIBUTING.md +163 -0
  10. data/Dockerfile +9 -0
  11. data/Gemfile +3 -0
  12. data/ISSUE_TEMPLATE.md +30 -0
  13. data/LICENSE +21 -0
  14. data/Makefile +34 -0
  15. data/PULL_REQUEST_TEMPLATE.md +31 -0
  16. data/README.md +237 -0
  17. data/Rakefile +10 -0
  18. data/UPGRADE.md +5 -0
  19. data/VERSIONS.md +35 -0
  20. data/advanced-examples/custom-http-client.md +166 -0
  21. data/examples/examples.rb +23 -0
  22. data/githooks/pre-commit +1 -0
  23. data/lib/rack/reach_webhook_authentication.rb +72 -0
  24. data/lib/reach-ruby/framework/reach_response.rb +19 -0
  25. data/lib/reach-ruby/framework/request.rb +41 -0
  26. data/lib/reach-ruby/framework/response.rb +18 -0
  27. data/lib/reach-ruby/framework/rest/domain.rb +39 -0
  28. data/lib/reach-ruby/framework/rest/error.rb +51 -0
  29. data/lib/reach-ruby/framework/rest/helper.rb +11 -0
  30. data/lib/reach-ruby/framework/rest/page.rb +144 -0
  31. data/lib/reach-ruby/framework/rest/resource.rb +23 -0
  32. data/lib/reach-ruby/framework/rest/version.rb +240 -0
  33. data/lib/reach-ruby/framework/serialize.rb +81 -0
  34. data/lib/reach-ruby/framework/values.rb +9 -0
  35. data/lib/reach-ruby/http/http_client.rb +82 -0
  36. data/lib/reach-ruby/http.rb +5 -0
  37. data/lib/reach-ruby/rest/api/authentix/.openapi-generator/FILES +10 -0
  38. data/lib/reach-ruby/rest/api/authentix/.openapi-generator/VERSION +1 -0
  39. data/lib/reach-ruby/rest/api/authentix/.openapi-generator-ignore +23 -0
  40. data/lib/reach-ruby/rest/api/authentix/authentication_trial_item.rb +418 -0
  41. data/lib/reach-ruby/rest/api/authentix/authentication_trial_stat_item.rb +279 -0
  42. data/lib/reach-ruby/rest/api/authentix/configuration_item/authentication_control_item.rb +214 -0
  43. data/lib/reach-ruby/rest/api/authentix/configuration_item/authentication_item.rb +449 -0
  44. data/lib/reach-ruby/rest/api/authentix/configuration_item.rb +583 -0
  45. data/lib/reach-ruby/rest/api/authentix.rb +72 -0
  46. data/lib/reach-ruby/rest/api/messaging/.openapi-generator/FILES +2 -0
  47. data/lib/reach-ruby/rest/api/messaging/.openapi-generator/VERSION +1 -0
  48. data/lib/reach-ruby/rest/api/messaging/.openapi-generator-ignore +23 -0
  49. data/lib/reach-ruby/rest/api/messaging/messaging_item.rb +582 -0
  50. data/lib/reach-ruby/rest/api/messaging.rb +51 -0
  51. data/lib/reach-ruby/rest/api.rb +50 -0
  52. data/lib/reach-ruby/rest/client.rb +130 -0
  53. data/lib/reach-ruby/rest.rb +13 -0
  54. data/lib/reach-ruby/security/request_validator.rb +149 -0
  55. data/lib/reach-ruby/util/configuration.rb +25 -0
  56. data/lib/reach-ruby/version.rb +3 -0
  57. data/lib/reach-ruby.rb +44 -0
  58. data/reach-ruby.gemspec +38 -0
  59. data/sonar-project.properties +13 -0
  60. metadata +267 -0
@@ -0,0 +1,279 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ ___ _ ___ _ _ _____ _ _ _ ___ ___ _ ___ ___ ___ _ ___ ___ ___ _ _ ___ ___ _ _____ ___ ___
4
+ # | _ \ __| /_\ / __| || |__|_ _/_\ | | | |/ | \ / / | /_\ | _ ) __|___ / _ \ /_\ |_ _|__ / __| __| \| | __| _ \ /_\_ _/ _ \| _ \
5
+ # | / _| / _ \ (__| __ |___|| |/ _ \| |__| ' < \ V /| |__ / _ \| _ \__ \___| (_) / _ \ | |___| (_ | _|| .` | _|| / / _ \| || (_) | /
6
+ # |_|_\___/_/ \_\___|_||_| |_/_/ \_\____|_|\_\ |_| |____/_/ \_\___/___/ \___/_/ \_\___| \___|___|_|\_|___|_|_\/_/ \_\_| \___/|_|_\
7
+ #
8
+ # Reach Authentix API
9
+ # Reach Authentix API helps you easily integrate user authentification in your application. The authentification allows to verify that a user is indeed at the origin of a request from your application. At the moment, the Reach Authentix API supports the following channels: * SMS * Email We are continuously working to add additionnal channels. ## Base URL All endpoints described in this documentation are relative to the following base URL: ``` https://api.reach.talkylabs.com/rest/authentix/v1/ ``` The API is provided over HTTPS protocol to ensure data privacy. ## API Authentication Requests made to the API must be authenticated. You need to provide the `ApiUser` and `ApiKey` associated with your applet. This information could be found in the settings of the applet. ```curl curl -X GET [BASE_URL]/configurations -H \"ApiUser:[Your_Api_User]\" -H \"ApiKey:[Your_Api_Key]\" ``` ## Reach Authentix API Workflow Three steps are needed in order to authenticate a given user using the Reach Authentix API. ### Step 1: Create an Authentix configuration A configuration is a set of settings used to define and send an authentication code to a user. This includes, for example: ``` - the length of the authentication code, - the message template, - and so on... ``` A configuaration could be created via the web application or directly using the Reach Authentix API. This step does not need to be performed every time one wants to use the Reach Authentix API. Indeed, once created, a configuartion could be used to authenticate several users in the future. ### Step 2: Send an authentication code A configuration is used to send an authentication code via a selected channel to a user. For now, the supported channels are `sms`, and `email`. We are working hard to support additional channels. Newly created authentications will have a status of `awaiting`. ### Step 3: Verify the authentication code This step allows to verify that the code submitted by the user matched the one sent previously. If, there is a match, then the status of the authentication changes from `awaiting` to `passed`. Otherwise, the status remains `awaiting` until either it is verified or it expires. In the latter case, the status becomes `expired`.
10
+ #
11
+ # NOTE: This class is auto generated by OpenAPI Generator.
12
+ # https://openapi-generator.tech
13
+ # Do not edit the class manually.
14
+ #
15
+
16
+
17
+ module Reach
18
+ module REST
19
+ class Api
20
+ class Authentix < Version
21
+ class AuthenticationTrialStatItemList < ListResource
22
+ ##
23
+ # Initialize the AuthenticationTrialStatItemList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [AuthenticationTrialStatItemList] AuthenticationTrialStatItemList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+
31
+
32
+ end
33
+
34
+
35
+
36
+ # Provide a user friendly representation
37
+ def to_s
38
+ '#<Reach.Api.Authentix.AuthenticationTrialStatItemList>'
39
+ end
40
+ end
41
+
42
+
43
+ class AuthenticationTrialStatItemContext < InstanceContext
44
+ ##
45
+ # Initialize the AuthenticationTrialStatItemContext
46
+ # @param [Version] version Version that contains the resource
47
+ # @return [AuthenticationTrialStatItemContext] AuthenticationTrialStatItemContext
48
+ def initialize(version)
49
+ super(version)
50
+
51
+ # Path Solution
52
+ @solution = { }
53
+ @uri = "/authentix/v1/authenticationTrialStats"
54
+
55
+
56
+ end
57
+ ##
58
+ # Fetch the AuthenticationTrialStatItemInstance
59
+ # @param [String] dest Filter authentication trials sent only to this phone number or email. The phone number must be in the E.164 format.
60
+ # @param [String] trial_status Filter authentication trials with the specified status.
61
+ # @param [String] channel Filter authentication trials sent via the specified channel.
62
+ # @param [String] configuration_id Filter authentication trials from the configuration whose ID matches the specified one.
63
+ # @param [String] authentication_id Filter authentication trials from the authentication whose ID matches the specified one.
64
+ # @param [String] country Filter authentication trials sent to the specified destination country (in ISO 3166-1 alpha-2). Only possible when `dest` is a phone number.
65
+ # @param [Time] sent_at Filter authentication trials created at the specified date. Must be in ISO 8601 format.
66
+ # @param [Time] sent_after Filter authentication trials created after the specified datetime. Must be in ISO 8601 format.
67
+ # @param [Time] sent_before Filter authentication trials created before the specified datetime. Must be in ISO 8601 format.
68
+ # @return [AuthenticationTrialStatItemInstance] Fetched AuthenticationTrialStatItemInstance
69
+ def fetch(
70
+ dest: :unset,
71
+ trial_status: :unset,
72
+ channel: :unset,
73
+ configuration_id: :unset,
74
+ authentication_id: :unset,
75
+ country: :unset,
76
+ sent_at: :unset,
77
+ sent_after: :unset,
78
+ sent_before: :unset
79
+ )
80
+
81
+ baseParams = {
82
+ }
83
+ params = Reach::Values.of(baseParams.merge({
84
+
85
+ 'dest' => dest,
86
+ 'trialStatus' => trial_status,
87
+ 'channel' => channel,
88
+ 'configurationId' => configuration_id,
89
+ 'authenticationId' => authentication_id,
90
+ 'country' => country,
91
+ 'sentAt' => Reach.serialize_iso8601_datetime(sent_at),
92
+ 'sentAfter' => Reach.serialize_iso8601_datetime(sent_after),
93
+ 'sentBefore' => Reach.serialize_iso8601_datetime(sent_before),
94
+ }))
95
+
96
+
97
+ payload = @version.fetch('GET', @uri, params: params)
98
+ AuthenticationTrialStatItemInstance.new(
99
+ @version,
100
+ payload,
101
+ )
102
+ end
103
+
104
+
105
+ ##
106
+ # Provide a user friendly representation
107
+ def to_s
108
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
109
+ "#<Reach.Api.Authentix.AuthenticationTrialStatItemContext #{context}>"
110
+ end
111
+
112
+ ##
113
+ # Provide a detailed, user friendly representation
114
+ def inspect
115
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
116
+ "#<Reach.Api.Authentix.AuthenticationTrialStatItemContext #{context}>"
117
+ end
118
+ end
119
+
120
+ class AuthenticationTrialStatItemPage < Page
121
+ ##
122
+ # Initialize the AuthenticationTrialStatItemPage
123
+ # @param [String] baseUrl url without pagination info
124
+ # @param [Version] version Version that contains the resource
125
+ # @param [Response] response Response from the API
126
+ # @param [Hash] solution Path solution for the resource
127
+ # @return [AuthenticationTrialStatItemPage] AuthenticationTrialStatItemPage
128
+ def initialize(baseUrl, version, response, solution)
129
+ super(baseUrl, version, response)
130
+
131
+ # Path Solution
132
+ @solution = solution
133
+ end
134
+
135
+ ##
136
+ # Build an instance of AuthenticationTrialStatItemInstance
137
+ # @param [Hash] payload Payload response from the API
138
+ # @return [AuthenticationTrialStatItemInstance] AuthenticationTrialStatItemInstance
139
+ def get_instance(payload)
140
+ AuthenticationTrialStatItemInstance.new(@version, payload)
141
+ end
142
+
143
+ ##
144
+ # Provide a user friendly representation
145
+ def to_s
146
+ '<Reach.Api.Authentix.AuthenticationTrialStatItemPage>'
147
+ end
148
+ end
149
+ class AuthenticationTrialStatItemInstance < InstanceResource
150
+ ##
151
+ # Initialize the AuthenticationTrialStatItemInstance
152
+ # @param [Version] version Version that contains the resource
153
+ # @param [Hash] payload payload that contains response from Reach(TalkyLabs)
154
+ # @param [String] account_sid The SID of the
155
+ # Account that created this AuthenticationTrialStatItem
156
+ # resource.
157
+ # @param [String] sid The SID of the Call resource to fetch.
158
+ # @return [AuthenticationTrialStatItemInstance] AuthenticationTrialStatItemInstance
159
+ def initialize(version, payload )
160
+ super(version)
161
+
162
+ # Marshaled Properties
163
+ @properties = {
164
+ 'appletId' => payload['appletId'],
165
+ 'apiVersion' => payload['apiVersion'],
166
+ 'totalTrials' => payload['totalTrials'] == nil ? payload['totalTrials'] : payload['totalTrials'].to_i,
167
+ 'numSuccessfulTrials' => payload['numSuccessfulTrials'] == nil ? payload['numSuccessfulTrials'] : payload['numSuccessfulTrials'].to_i,
168
+ 'numUnsuccessfulTrials' => payload['numUnsuccessfulTrials'] == nil ? payload['numUnsuccessfulTrials'] : payload['numUnsuccessfulTrials'].to_i,
169
+ 'successRate' => payload['successRate'],
170
+ }
171
+
172
+ # Context
173
+ @instance_context = nil
174
+ @params = { }
175
+ end
176
+
177
+ ##
178
+ # Generate an instance context for the instance, the context is capable of
179
+ # performing various actions. All instance actions are proxied to the context
180
+ # @return [AuthenticationTrialStatItemContext] CallContext for this CallInstance
181
+ def context
182
+ unless @instance_context
183
+ @instance_context = AuthenticationTrialStatItemContext.new(@version )
184
+ end
185
+ @instance_context
186
+ end
187
+
188
+ ##
189
+ # @return [String] The identifier of the applet.
190
+ def appletId
191
+ @properties['appletId']
192
+ end
193
+
194
+ ##
195
+ # @return [String] The API version.
196
+ def apiVersion
197
+ @properties['apiVersion']
198
+ end
199
+
200
+ ##
201
+ # @return [String] The total number of trials matching the specified criteria.
202
+ def totalTrials
203
+ @properties['totalTrials']
204
+ end
205
+
206
+ ##
207
+ # @return [String] The total number of successfull trials among the ones matching the specified criteria.
208
+ def numSuccessfulTrials
209
+ @properties['numSuccessfulTrials']
210
+ end
211
+
212
+ ##
213
+ # @return [String] The total number of unsuccessfull trials among the ones matching the specified criteria.
214
+ def numUnsuccessfulTrials
215
+ @properties['numUnsuccessfulTrials']
216
+ end
217
+
218
+ ##
219
+ # @return [Float] The success rate of the trials matching the specified criteria.
220
+ def successRate
221
+ @properties['successRate']
222
+ end
223
+
224
+ ##
225
+ # Fetch the AuthenticationTrialStatItemInstance
226
+ # @param [String] dest Filter authentication trials sent only to this phone number or email. The phone number must be in the E.164 format.
227
+ # @param [String] trial_status Filter authentication trials with the specified status.
228
+ # @param [String] channel Filter authentication trials sent via the specified channel.
229
+ # @param [String] configuration_id Filter authentication trials from the configuration whose ID matches the specified one.
230
+ # @param [String] authentication_id Filter authentication trials from the authentication whose ID matches the specified one.
231
+ # @param [String] country Filter authentication trials sent to the specified destination country (in ISO 3166-1 alpha-2). Only possible when `dest` is a phone number.
232
+ # @param [Time] sent_at Filter authentication trials created at the specified date. Must be in ISO 8601 format.
233
+ # @param [Time] sent_after Filter authentication trials created after the specified datetime. Must be in ISO 8601 format.
234
+ # @param [Time] sent_before Filter authentication trials created before the specified datetime. Must be in ISO 8601 format.
235
+ # @return [AuthenticationTrialStatItemInstance] Fetched AuthenticationTrialStatItemInstance
236
+ def fetch(
237
+ dest: :unset,
238
+ trial_status: :unset,
239
+ channel: :unset,
240
+ configuration_id: :unset,
241
+ authentication_id: :unset,
242
+ country: :unset,
243
+ sent_at: :unset,
244
+ sent_after: :unset,
245
+ sent_before: :unset
246
+ )
247
+
248
+ context.fetch(
249
+ dest: dest,
250
+ trial_status: trial_status,
251
+ channel: channel,
252
+ configuration_id: configuration_id,
253
+ authentication_id: authentication_id,
254
+ country: country,
255
+ sent_at: sent_at,
256
+ sent_after: sent_after,
257
+ sent_before: sent_before,
258
+ )
259
+ end
260
+
261
+ ##
262
+ # Provide a user friendly representation
263
+ def to_s
264
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
265
+ "<Reach.Api.Authentix.AuthenticationTrialStatItemInstance #{values}>"
266
+ end
267
+
268
+ ##
269
+ # Provide a detailed, user friendly representation
270
+ def inspect
271
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
272
+ "<Reach.Api.Authentix.AuthenticationTrialStatItemInstance #{values}>"
273
+ end
274
+ end
275
+
276
+ end
277
+ end
278
+ end
279
+ end
@@ -0,0 +1,214 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ ___ _ ___ _ _ _____ _ _ _ ___ ___ _ ___ ___ ___ _ ___ ___ ___ _ _ ___ ___ _ _____ ___ ___
4
+ # | _ \ __| /_\ / __| || |__|_ _/_\ | | | |/ | \ / / | /_\ | _ ) __|___ / _ \ /_\ |_ _|__ / __| __| \| | __| _ \ /_\_ _/ _ \| _ \
5
+ # | / _| / _ \ (__| __ |___|| |/ _ \| |__| ' < \ V /| |__ / _ \| _ \__ \___| (_) / _ \ | |___| (_ | _|| .` | _|| / / _ \| || (_) | /
6
+ # |_|_\___/_/ \_\___|_||_| |_/_/ \_\____|_|\_\ |_| |____/_/ \_\___/___/ \___/_/ \_\___| \___|___|_|\_|___|_|_\/_/ \_\_| \___/|_|_\
7
+ #
8
+ # Reach Authentix API
9
+ # Reach Authentix API helps you easily integrate user authentification in your application. The authentification allows to verify that a user is indeed at the origin of a request from your application. At the moment, the Reach Authentix API supports the following channels: * SMS * Email We are continuously working to add additionnal channels. ## Base URL All endpoints described in this documentation are relative to the following base URL: ``` https://api.reach.talkylabs.com/rest/authentix/v1/ ``` The API is provided over HTTPS protocol to ensure data privacy. ## API Authentication Requests made to the API must be authenticated. You need to provide the `ApiUser` and `ApiKey` associated with your applet. This information could be found in the settings of the applet. ```curl curl -X GET [BASE_URL]/configurations -H \"ApiUser:[Your_Api_User]\" -H \"ApiKey:[Your_Api_Key]\" ``` ## Reach Authentix API Workflow Three steps are needed in order to authenticate a given user using the Reach Authentix API. ### Step 1: Create an Authentix configuration A configuration is a set of settings used to define and send an authentication code to a user. This includes, for example: ``` - the length of the authentication code, - the message template, - and so on... ``` A configuaration could be created via the web application or directly using the Reach Authentix API. This step does not need to be performed every time one wants to use the Reach Authentix API. Indeed, once created, a configuartion could be used to authenticate several users in the future. ### Step 2: Send an authentication code A configuration is used to send an authentication code via a selected channel to a user. For now, the supported channels are `sms`, and `email`. We are working hard to support additional channels. Newly created authentications will have a status of `awaiting`. ### Step 3: Verify the authentication code This step allows to verify that the code submitted by the user matched the one sent previously. If, there is a match, then the status of the authentication changes from `awaiting` to `passed`. Otherwise, the status remains `awaiting` until either it is verified or it expires. In the latter case, the status becomes `expired`.
10
+ #
11
+ # NOTE: This class is auto generated by OpenAPI Generator.
12
+ # https://openapi-generator.tech
13
+ # Do not edit the class manually.
14
+ #
15
+
16
+
17
+ module Reach
18
+ module REST
19
+ class Api
20
+ class Authentix < Version
21
+ class ConfigurationItemContext < InstanceContext
22
+
23
+ class AuthenticationControlItemList < ListResource
24
+ ##
25
+ # Initialize the AuthenticationControlItemList
26
+ # @param [Version] version Version that contains the resource
27
+ # @return [AuthenticationControlItemList] AuthenticationControlItemList
28
+ def initialize(version, configuration_id: nil)
29
+ super(version)
30
+ # Path Solution
31
+ @solution = { configuration_id: configuration_id }
32
+ @uri = "/authentix/v1/configurations/#{@solution[:configuration_id]}/authentication-controls"
33
+
34
+ end
35
+ ##
36
+ # Check the AuthenticationControlItemInstance
37
+ # @param [String] dest The phone number or email being authenticated. Phone numbers must be in E.164 format. Either this parameter or the `authenticationId` must be specified.
38
+ # @param [String] code The 4-10 character string being verified. This is required for `sms` and `email` channels.
39
+ # @param [String] authentication_id The ID of the authentication being checked. Either this parameter or the to `dest` must be specified.
40
+ # @param [String] payment_info Information related to the digital payment to authenticate. It is required when `usedForDigitalPayment` is true. It is ignored otherwise. It is a stringfied JSON map where keys are `payee`, `amount`, and `currency` and the associated values are respectively the payee, the amount, and the currency of a financial transaction.
41
+ # @return [AuthenticationControlItemInstance] Checkd AuthenticationControlItemInstance
42
+ def check(
43
+ dest: :unset,
44
+ code: :unset,
45
+ authentication_id: :unset,
46
+ payment_info: :unset
47
+ )
48
+
49
+ baseParams = {
50
+ }
51
+ data = Reach::Values.of(baseParams.merge({
52
+ 'dest' => dest,
53
+ 'code' => code,
54
+ 'authenticationId' => authentication_id,
55
+ 'paymentInfo' => payment_info,
56
+ }))
57
+
58
+
59
+
60
+ payload = @version.check('POST', @uri, data: data)
61
+ AuthenticationControlItemInstance.new(
62
+ @version,
63
+ payload,
64
+ configuration_id: @solution[:configuration_id],
65
+ )
66
+ end
67
+
68
+
69
+
70
+
71
+ # Provide a user friendly representation
72
+ def to_s
73
+ '#<Reach.Api.Authentix.AuthenticationControlItemList>'
74
+ end
75
+ end
76
+
77
+ class AuthenticationControlItemPage < Page
78
+ ##
79
+ # Initialize the AuthenticationControlItemPage
80
+ # @param [String] baseUrl url without pagination info
81
+ # @param [Version] version Version that contains the resource
82
+ # @param [Response] response Response from the API
83
+ # @param [Hash] solution Path solution for the resource
84
+ # @return [AuthenticationControlItemPage] AuthenticationControlItemPage
85
+ def initialize(baseUrl, version, response, solution)
86
+ super(baseUrl, version, response)
87
+
88
+ # Path Solution
89
+ @solution = solution
90
+ end
91
+
92
+ ##
93
+ # Build an instance of AuthenticationControlItemInstance
94
+ # @param [Hash] payload Payload response from the API
95
+ # @return [AuthenticationControlItemInstance] AuthenticationControlItemInstance
96
+ def get_instance(payload)
97
+ AuthenticationControlItemInstance.new(@version, payload, configuration_id: @solution[:configuration_id])
98
+ end
99
+
100
+ ##
101
+ # Provide a user friendly representation
102
+ def to_s
103
+ '<Reach.Api.Authentix.AuthenticationControlItemPage>'
104
+ end
105
+ end
106
+ class AuthenticationControlItemInstance < InstanceResource
107
+ ##
108
+ # Initialize the AuthenticationControlItemInstance
109
+ # @param [Version] version Version that contains the resource
110
+ # @param [Hash] payload payload that contains response from Reach(TalkyLabs)
111
+ # @param [String] account_sid The SID of the
112
+ # Account that created this AuthenticationControlItem
113
+ # resource.
114
+ # @param [String] sid The SID of the Call resource to fetch.
115
+ # @return [AuthenticationControlItemInstance] AuthenticationControlItemInstance
116
+ def initialize(version, payload , configuration_id: nil)
117
+ super(version)
118
+
119
+ # Marshaled Properties
120
+ @properties = {
121
+ 'appletId' => payload['appletId'],
122
+ 'apiVersion' => payload['apiVersion'],
123
+ 'configurationId' => payload['configurationId'],
124
+ 'authenticationId' => payload['authenticationId'],
125
+ 'status' => payload['status'],
126
+ 'dest' => payload['dest'],
127
+ 'channel' => payload['channel'],
128
+ 'paymentInfo' => payload['paymentInfo'],
129
+ 'dateCreated' => Reach.deserialize_iso8601_datetime(payload['dateCreated']),
130
+ 'dateUpdated' => Reach.deserialize_iso8601_datetime(payload['dateUpdated']),
131
+ }
132
+ end
133
+
134
+
135
+ ##
136
+ # @return [String] The identifier of the applet.
137
+ def appletId
138
+ @properties['appletId']
139
+ end
140
+
141
+ ##
142
+ # @return [String] The API version.
143
+ def apiVersion
144
+ @properties['apiVersion']
145
+ end
146
+
147
+ ##
148
+ # @return [String] The identifier of the configuration.
149
+ def configurationId
150
+ @properties['configurationId']
151
+ end
152
+
153
+ ##
154
+ # @return [String] The identifier of the authentication.
155
+ def authenticationId
156
+ @properties['authenticationId']
157
+ end
158
+
159
+ ##
160
+ # @return [String] The outcome of the authentication control.
161
+ def status
162
+ @properties['status']
163
+ end
164
+
165
+ ##
166
+ # @return [String] The phone number or email being verified. Phone numbers must be in E.164 format.
167
+ def dest
168
+ @properties['dest']
169
+ end
170
+
171
+ ##
172
+ # @return [String] The channel used.
173
+ def channel
174
+ @properties['channel']
175
+ end
176
+
177
+ ##
178
+ # @return [PaymentInfo]
179
+ def paymentInfo
180
+ @properties['paymentInfo']
181
+ end
182
+
183
+ ##
184
+ # @return [Time] The date and time in GMT that the authentication was created.
185
+ def dateCreated
186
+ @properties['dateCreated']
187
+ end
188
+
189
+ ##
190
+ # @return [Time] The date and time in GMT that the authentication was last updated.
191
+ def dateUpdated
192
+ @properties['dateUpdated']
193
+ end
194
+
195
+ ##
196
+ # Provide a user friendly representation
197
+ def to_s
198
+ "<Reach.Api.Authentix.AuthenticationControlItemInstance>"
199
+ end
200
+
201
+ ##
202
+ # Provide a detailed, user friendly representation
203
+ def inspect
204
+ "<Reach.Api.Authentix.AuthenticationControlItemInstance>"
205
+ end
206
+ end
207
+
208
+ end
209
+ end
210
+ end
211
+ end
212
+ end
213
+
214
+