zernio-sdk 0.0.1028 → 0.0.1029

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5b003b9053716e57f40f92c03649224463f02a43ad121111467fc629451b782
4
- data.tar.gz: 6a1086dd29a8946154f84ccecb706f400f287d14a5dc85859d57ce381cd0d3aa
3
+ metadata.gz: bfb028755a88d1ed5d8f838db5b74bdc8f418bc589d89caedc5f792430fb1171
4
+ data.tar.gz: 12e19f7b682ed0447e82fd4906267b682ab5dd99ad8292d0e18cf02150a96283
5
5
  SHA512:
6
- metadata.gz: 17a33d7a13a9236ad85a9e87698a9adc84b731f6743d9d4e2774d29d41d4b39c9967d14f68e26600540f76fc20cb2294b44512f6d52baece95ce6e21aa6393ae
7
- data.tar.gz: d0ba35dde078151a6a2370d36442c8a4355d90e6d85379042d5c43ed15a915d1c143bec6337406d538b4c60c3a5bdc41f1ee3af92bef9386cb9eb75144016997
6
+ metadata.gz: 832be415cf59d8c281b3fea748638fcee5250dd83d445a6db4a7cd16830fcce577a46031217759d0f383608965829a0cc8e41831cd18fb44330e3d7a4bd95638
7
+ data.tar.gz: 9b6f26666e591921ad22022d555b91995ca7eea6b86bae9873d65c508f0e1f9f998a4bcd3ca4d93940fa9e3efee99edb7be4ce4eebb39654db938d52c8475e5b
@@ -7,6 +7,7 @@
7
7
  | **profile_id** | **String** | | |
8
8
  | **country** | **String** | ISO 3166-1 alpha-2 country code (must be a regulated/KYC country). | |
9
9
  | **area_code** | **String** | Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions). | [optional] |
10
+ | **language** | **String** | Language of the hosted page: its copy, the carrier requirement texts (translated once per country and cached), the pre-submit review notes and the status emails to the end customer. Omitted: the browser language of the end customer, falling back to English. The end customer can also switch with `?lang=` on the page. | [optional] |
10
11
  | **branding** | [**CreatePhoneNumberKycLinkRequestBranding**](CreatePhoneNumberKycLinkRequestBranding.md) | | [optional] |
11
12
  | **redirect_url** | **String** | Where to send the end customer's browser after a successful submit. On completion Zernio appends `kyc=submitted` and `country=<ISO-2>` as query params. When omitted, the hosted page shows a built-in confirmation screen instead. | [optional] |
12
13
 
@@ -19,6 +20,7 @@ instance = Zernio::CreatePhoneNumberKycLinkRequest.new(
19
20
  profile_id: null,
20
21
  country: null,
21
22
  area_code: null,
23
+ language: null,
22
24
  branding: null,
23
25
  redirect_url: null
24
26
  )
@@ -1251,7 +1251,7 @@ module Zernio
1251
1251
  fail ArgumentError, "invalid value for 'opts[:\"primary_color\"]' when calling ConnectApi.get_connect_url, must conform to the pattern #{pattern}."
1252
1252
  end
1253
1253
 
1254
- allowable_values = ["en", "es"]
1254
+ allowable_values = ["en", "es", "pt-BR"]
1255
1255
  if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
1256
1256
  fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
1257
1257
  end
@@ -23,17 +23,43 @@ module Zernio
23
23
  # Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions).
24
24
  attr_accessor :area_code
25
25
 
26
+ # Language of the hosted page: its copy, the carrier requirement texts (translated once per country and cached), the pre-submit review notes and the status emails to the end customer. Omitted: the browser language of the end customer, falling back to English. The end customer can also switch with `?lang=` on the page.
27
+ attr_accessor :language
28
+
26
29
  attr_accessor :branding
27
30
 
28
31
  # Where to send the end customer's browser after a successful submit. On completion Zernio appends `kyc=submitted` and `country=<ISO-2>` as query params. When omitted, the hosted page shows a built-in confirmation screen instead.
29
32
  attr_accessor :redirect_url
30
33
 
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
31
56
  # Attribute mapping from ruby-style variable name to JSON key.
32
57
  def self.attribute_map
33
58
  {
34
59
  :'profile_id' => :'profileId',
35
60
  :'country' => :'country',
36
61
  :'area_code' => :'areaCode',
62
+ :'language' => :'language',
37
63
  :'branding' => :'branding',
38
64
  :'redirect_url' => :'redirect_url'
39
65
  }
@@ -55,6 +81,7 @@ module Zernio
55
81
  :'profile_id' => :'String',
56
82
  :'country' => :'String',
57
83
  :'area_code' => :'String',
84
+ :'language' => :'String',
58
85
  :'branding' => :'CreatePhoneNumberKycLinkRequestBranding',
59
86
  :'redirect_url' => :'String'
60
87
  }
@@ -98,6 +125,10 @@ module Zernio
98
125
  self.area_code = attributes[:'area_code']
99
126
  end
100
127
 
128
+ if attributes.key?(:'language')
129
+ self.language = attributes[:'language']
130
+ end
131
+
101
132
  if attributes.key?(:'branding')
102
133
  self.branding = attributes[:'branding']
103
134
  end
@@ -145,6 +176,8 @@ module Zernio
145
176
  return false if @country.to_s.length > 2
146
177
  return false if @country.to_s.length < 2
147
178
  return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
179
+ language_validator = EnumAttributeValidator.new('String', ["en", "es", "pt-BR"])
180
+ return false unless language_validator.valid?(@language)
148
181
  true
149
182
  end
150
183
 
@@ -191,6 +224,16 @@ module Zernio
191
224
  @area_code = area_code
192
225
  end
193
226
 
227
+ # Custom attribute writer method checking allowed values (enum).
228
+ # @param [Object] language Object to be assigned
229
+ def language=(language)
230
+ validator = EnumAttributeValidator.new('String', ["en", "es", "pt-BR"])
231
+ unless validator.valid?(language)
232
+ fail ArgumentError, "invalid value for \"language\", must be one of #{validator.allowable_values}."
233
+ end
234
+ @language = language
235
+ end
236
+
194
237
  # Checks equality by comparing each attribute.
195
238
  # @param [Object] Object to be compared
196
239
  def ==(o)
@@ -199,6 +242,7 @@ module Zernio
199
242
  profile_id == o.profile_id &&
200
243
  country == o.country &&
201
244
  area_code == o.area_code &&
245
+ language == o.language &&
202
246
  branding == o.branding &&
203
247
  redirect_url == o.redirect_url
204
248
  end
@@ -212,7 +256,7 @@ module Zernio
212
256
  # Calculates hash code according to all attributes.
213
257
  # @return [Integer] Hash code
214
258
  def hash
215
- [profile_id, country, area_code, branding, redirect_url].hash
259
+ [profile_id, country, area_code, language, branding, redirect_url].hash
216
260
  end
217
261
 
218
262
  # Builds the object from hash
@@ -123,7 +123,7 @@ module Zernio
123
123
  # @return true if the model is valid
124
124
  def valid?
125
125
  warn '[DEPRECATED] the `valid?` method is obsolete'
126
- language_validator = EnumAttributeValidator.new('String', ["en", "es"])
126
+ language_validator = EnumAttributeValidator.new('String', ["en", "es", "pt-BR"])
127
127
  return false unless language_validator.valid?(@language)
128
128
  true
129
129
  end
@@ -131,7 +131,7 @@ module Zernio
131
131
  # Custom attribute writer method checking allowed values (enum).
132
132
  # @param [Object] language Object to be assigned
133
133
  def language=(language)
134
- validator = EnumAttributeValidator.new('String', ["en", "es"])
134
+ validator = EnumAttributeValidator.new('String', ["en", "es", "pt-BR"])
135
135
  unless validator.valid?(language)
136
136
  fail ArgumentError, "invalid value for \"language\", must be one of #{validator.allowable_values}."
137
137
  end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.1028'
14
+ VERSION = '0.0.1029'
15
15
  end