usman 0.2.9 → 0.2.10

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
  SHA1:
3
- metadata.gz: db8c94de6d3d7e02af97eb66a7e11902fc58bf2d
4
- data.tar.gz: 1a562ac492940ea7304b368d727db5ad6f68c0d7
3
+ metadata.gz: 1683294850671aa038a812e0ec0db53d311fe9a3
4
+ data.tar.gz: 78c95f8cab989f6984eb5caddce13e78e4cfe343
5
5
  SHA512:
6
- metadata.gz: 5f79802ab77b502759a48d329c4e0fc600922774a9bc3a7293b960b668b4ec1af2b70913b3ad63dd236657104b50ff91184e4869a758b6a200a4a2748793cc90
7
- data.tar.gz: c4aab66854a689cfeadf4b96c132c4221b012b45842db1a49c7a1a7aa3449ff2bfd1e3abd2a368d9c1deb0c093e10315725a532639458c2ff3f2ce09ec30a790
6
+ metadata.gz: 6b261d5cbeec010e92f640ecf7832031b9f154954a096e2318fdecd71dcb200ee29c80522c2993f1d2330009db2b828c1860231ef80c9f6dd824dbfd7bcdc532
7
+ data.tar.gz: afb07b42ad4ad871631f4d9e9bb8f521de71172d9cb4bf8bf8ac6bca9e353a4a0048e28a23e4153bb5c77d2cbc4a04f9ed5aca611f48513cd9bd410801d5fdb0
@@ -102,10 +102,29 @@ module Usman
102
102
  message: I18n.translate("api.verify_otp.verification_success.message")
103
103
  }
104
104
  if @device.verified? && @device.tac_accepted?
105
- @data = { api_token: @device.api_token }
105
+ @data = { api_token: @device.api_token }
106
106
  else
107
107
  @data = { api_token: "" }
108
108
  end
109
+ @data[:registration] = @registration
110
+ user = @registration.user
111
+ if user
112
+ @data[:profile] = {
113
+ id: user.id,
114
+ name: user.name,
115
+ gender: user.gender,
116
+ email: user.email,
117
+ date_of_birth: user.date_of_birth
118
+ }
119
+ else
120
+ @data[:profile] = {
121
+ id: "",
122
+ name: "",
123
+ gender: "",
124
+ email: "",
125
+ date_of_birth: ""
126
+ }
127
+ end
109
128
  else
110
129
  @success = false
111
130
  @errors = {
@@ -18,7 +18,25 @@ api_output = <<-eos
18
18
  "heading": "OTP was verified succesfully",
19
19
  "message": "You may need to accept the terms and conditions to get the API token if you have not yet finised the registration"
20
20
  },
21
- "data": {}
21
+ "data": {
22
+ "api_token": "",
23
+ "registration": {
24
+ "id": 4,
25
+ "user_id": "",
26
+ "country_id": 1,
27
+ "city_id": "",
28
+ "dialing_prefix": "+91",
29
+ "mobile_number": "192837465",
30
+ "status": "verified"
31
+ },
32
+ "profile": {
33
+ "id": "",
34
+ "name": "",
35
+ "gender": "",
36
+ "email": "",
37
+ "date_of_birth": ""
38
+ }
39
+ }
22
40
  }
23
41
  eos
24
42
 
@@ -19,8 +19,24 @@ api_output = <<-eos
19
19
  "message": "You may need to accept the terms and conditions to get the API token if you have not yet finised the registration"
20
20
  },
21
21
  "data": {
22
- "api_token": "cfc0eb18c8f3b5922e702f1e10437fa1"
23
- }
22
+ "api_token": "22431f28189e2c88ba58ee221f373931",
23
+ "registration": {
24
+ "id": 4,
25
+ "user_id": "12",
26
+ "country_id": 1,
27
+ "city_id": "",
28
+ "dialing_prefix": "+91",
29
+ "mobile_number": "192837465",
30
+ "status": "verified"
31
+ },
32
+ "profile": {
33
+ "id": 12,
34
+ "name": "Some Name",
35
+ "gender": "Male",
36
+ "email": "asd@asd.com",
37
+ "date_of_birth": "10/10/1980"
38
+ }
39
+ }
24
40
  }
25
41
  eos
26
42
 
data/lib/usman/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Usman
2
- VERSION = '0.2.9'
2
+ VERSION = '0.2.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma