usman 0.3.26 → 0.3.27
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/app/controllers/usman/api/v1/docs_controller.rb +85 -6
- data/app/controllers/usman/api/v1/profile_controller.rb +5 -10
- data/app/controllers/usman/api/v1/registrations_controller.rb +136 -38
- data/app/models/device.rb +36 -2
- data/app/models/registration.rb +24 -2
- data/app/models/user.rb +24 -2
- data/app/views/usman/api/v1/docs/change_number/_neg_case_1.html.erb +30 -0
- data/app/views/usman/api/v1/docs/change_number/_neg_case_2.html.erb +30 -0
- data/app/views/usman/api/v1/docs/change_number/_neg_case_3.html.erb +40 -0
- data/app/views/usman/api/v1/docs/change_number/_neg_case_4.html.erb +42 -0
- data/app/views/usman/api/v1/docs/change_number/_neg_case_5.html.erb +40 -0
- data/app/views/usman/api/v1/docs/change_number/_neg_case_6.html.erb +40 -0
- data/app/views/usman/api/v1/docs/change_number/_neg_case_7.html.erb +38 -0
- data/app/views/usman/api/v1/docs/change_number/_pos_case_1.html.erb +37 -0
- data/app/views/usman/api/v1/docs/delete_account/_neg_case_1.html.erb +30 -0
- data/app/views/usman/api/v1/docs/delete_account/_neg_case_2.html.erb +30 -0
- data/app/views/usman/api/v1/docs/delete_account/_pos_case_1.html.erb +29 -0
- data/app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_1.html.erb +30 -0
- data/app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_2.html.erb +30 -0
- data/app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_3.html.erb +35 -0
- data/app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_4.html.erb +33 -0
- data/app/views/usman/api/v1/docs/send_otp_to_change_number/_pos_case_1.html.erb +32 -0
- data/app/views/usman/api/v1/docs/{single_contacts → single_contact}/_neg_case_1.html.erb +0 -0
- data/app/views/usman/api/v1/docs/{single_contacts → single_contact}/_pos_case_1.html.erb +0 -0
- data/config/locales/usman/api.ar.yml +58 -29
- data/config/locales/usman/api.en.yml +34 -28
- data/config/routes.rb +10 -1
- data/lib/usman/version.rb +1 -1
- data/spec/dummy/spec/factories/user.rb +4 -0
- metadata +22 -6
@@ -1,13 +1,22 @@
|
|
1
1
|
en:
|
2
2
|
api:
|
3
3
|
general:
|
4
|
+
unexpected_error:
|
5
|
+
heading: "Unexpected Error"
|
6
|
+
message: "Please try after sometime. If the problem persist, please contact our technical support."
|
4
7
|
permission_denied:
|
5
8
|
heading: "Invalid API Token"
|
6
9
|
message: "Use the API Token you have received after accepting the terms and agreement"
|
7
|
-
register:
|
8
10
|
device_blocked:
|
9
11
|
heading: "This device is blocked"
|
10
12
|
message: "You must have done some mal-practices"
|
13
|
+
mobile_number_not_registered:
|
14
|
+
heading: "The mobile number is not registered"
|
15
|
+
message: "Check if the mobile number entered is valid"
|
16
|
+
device_not_registered:
|
17
|
+
heading: "The device is not registered"
|
18
|
+
message: "Check if the UUID entered is valid"
|
19
|
+
register:
|
11
20
|
otp_sent:
|
12
21
|
heading: "An OTP has been sent to you"
|
13
22
|
message: "Check your mobile for new message from us"
|
@@ -18,9 +27,6 @@ en:
|
|
18
27
|
heading: "Registring new mobile number FAILED"
|
19
28
|
message: "Check if all mandatory details are passed. Refer the error details for technical information"
|
20
29
|
resend_otp:
|
21
|
-
device_blocked:
|
22
|
-
heading: "This device is blocked"
|
23
|
-
message: "You must have done some mal-practices"
|
24
30
|
new_otp_sent:
|
25
31
|
heading: "An new OTP has been sent to you"
|
26
32
|
message: "Check your mobile for new message from us"
|
@@ -30,28 +36,13 @@ en:
|
|
30
36
|
otp_not_matching:
|
31
37
|
heading: "OTP verification was failed"
|
32
38
|
message: "Make sure that you enter the OTP correctly"
|
33
|
-
mobile_number_not_registered:
|
34
|
-
heading: "The mobile number is not registered"
|
35
|
-
message: "Resending OTP Failed. Check if the mobile number entered is valid"
|
36
|
-
device_not_registered:
|
37
|
-
heading: "The device is not registered"
|
38
|
-
message: "Resending OTP Failed. Check if the UUID entered is valid"
|
39
39
|
verify_otp:
|
40
|
-
device_blocked:
|
41
|
-
heading: "This device is blocked"
|
42
|
-
message: "You must have done some mal-practices"
|
43
40
|
device_verified:
|
44
41
|
heading: "OTP sent failed"
|
45
42
|
message: "This device may be already verified"
|
46
43
|
otp_not_matching:
|
47
44
|
heading: "OTP verification was failed"
|
48
45
|
message: "Make sure that you enter the OTP correctly"
|
49
|
-
mobile_number_not_registered:
|
50
|
-
heading: "The mobile number is not registered"
|
51
|
-
message: "Verifying OTP Failed. Check if the mobile number entered is valid"
|
52
|
-
device_not_registered:
|
53
|
-
heading: "The device is not registered"
|
54
|
-
message: "Verifying OTP Failed. Check if the UUID entered is valid"
|
55
46
|
verification_failed:
|
56
47
|
heading: "OTP verification was failed"
|
57
48
|
message: "Check if you have properly given the OTP along with dialing prefix, mobile number & UUID"
|
@@ -65,19 +56,34 @@ en:
|
|
65
56
|
tac_not_accepted:
|
66
57
|
heading: "You have not accepted the Terms & Conditions. Registration is complete only if you accept the T&C"
|
67
58
|
message: "Accept the T&C to finish the Registration. Pass true"
|
68
|
-
device_blocked:
|
69
|
-
heading: "This device is blocked"
|
70
|
-
message: "You must have done some mal-practices"
|
71
59
|
device_pending:
|
72
60
|
heading: "This device is not verified"
|
73
61
|
message: "You need to verify this device before you can accept the terms and conditions"
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
62
|
+
send_otp_to_change_number:
|
63
|
+
otp_send:
|
64
|
+
heading: "An OTP has been sent to you"
|
65
|
+
message: "Check your mobile for new message from us"
|
66
|
+
otp_send_failed:
|
67
|
+
heading: "OTP sent failed"
|
68
|
+
message: "Check if all the inputs are valid"
|
69
|
+
change_number:
|
70
|
+
number_changed:
|
71
|
+
heading: "Your mobile number has been changed successfully"
|
72
|
+
message: "Use the new number to login next time"
|
73
|
+
number_change_failed:
|
74
|
+
heading: "Mobile number change failed"
|
75
|
+
message: "Check if all the inputs are valid"
|
76
|
+
delete_account:
|
77
|
+
account_deleted:
|
78
|
+
heading: "Your account has been deleted successfully"
|
79
|
+
message: "You will be logged out from all sessions"
|
80
|
+
account_deletion_failed:
|
81
|
+
heading: "Mobile number change failed"
|
82
|
+
message: "Check if all the inputs are valid"
|
80
83
|
profile:
|
84
|
+
registration_details_missing:
|
85
|
+
heading: "A profile already exists for the mobile number you have provided"
|
86
|
+
message: "You are trying to create a profile once again when you already have a profile. Use Profile API with your API Token, to get your profile details and use them instead of creating a new one."
|
81
87
|
user_already_exists:
|
82
88
|
heading: "A profile already exists for the mobile number you have provided"
|
83
89
|
message: "You are trying to create a profile once again when you already have a profile. Use Profile API with your API Token, to get your profile details and use them instead of creating a new one."
|
data/config/routes.rb
CHANGED
@@ -55,6 +55,10 @@ Usman::Engine.routes.draw do
|
|
55
55
|
post :verify_otp, :controller => "registrations", as: :verify_otp
|
56
56
|
post :accept_tac, :controller => "registrations", as: :accept_tac
|
57
57
|
|
58
|
+
post :send_otp_to_change_number, :controller => "registrations", as: :send_otp_to_change_number
|
59
|
+
post :change_number, :controller => "registrations", as: :change_number
|
60
|
+
delete :delete_account, :controller => "registrations", as: :delete_account
|
61
|
+
|
58
62
|
# Profile
|
59
63
|
post :create_profile, :controller => "profile", as: :create_profile
|
60
64
|
put :update_profile, :controller => "profile", as: :update_profile
|
@@ -79,6 +83,11 @@ Usman::Engine.routes.draw do
|
|
79
83
|
get 'resend_otp', :controller => "docs"
|
80
84
|
get 'verify_otp', :controller => "docs"
|
81
85
|
get 'accept_tac', :controller => "docs"
|
86
|
+
|
87
|
+
get 'send_otp_to_change_number', :controller => "docs"
|
88
|
+
get 'change_number', :controller => "docs"
|
89
|
+
get 'delete_account', :controller => "docs"
|
90
|
+
|
82
91
|
get 'create_profile', :controller => "docs"
|
83
92
|
get 'update_profile', :controller => "docs"
|
84
93
|
get 'update_profile', :controller => "docs"
|
@@ -86,7 +95,7 @@ Usman::Engine.routes.draw do
|
|
86
95
|
|
87
96
|
get 'contacts_sync', :controller => "docs"
|
88
97
|
get 'all_contacts', :controller => "docs"
|
89
|
-
get '
|
98
|
+
get 'single_contact', :controller => "docs"
|
90
99
|
|
91
100
|
get 'upload_profile_picture_base64', :controller => "docs"
|
92
101
|
get 'upload_profile_picture', :controller => "docs"
|
data/lib/usman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
version: '0.1'
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
110
|
+
version: 0.1.29
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '0.1'
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.1.
|
120
|
+
version: 0.1.29
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: pattana
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -475,6 +475,14 @@ files:
|
|
475
475
|
- app/views/usman/api/v1/docs/accept_tac/_pos_case_1.html.erb
|
476
476
|
- app/views/usman/api/v1/docs/all_contacts/_neg_case_1.html.erb
|
477
477
|
- app/views/usman/api/v1/docs/all_contacts/_pos_case_1.html.erb
|
478
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_1.html.erb
|
479
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_2.html.erb
|
480
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_3.html.erb
|
481
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_4.html.erb
|
482
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_5.html.erb
|
483
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_6.html.erb
|
484
|
+
- app/views/usman/api/v1/docs/change_number/_neg_case_7.html.erb
|
485
|
+
- app/views/usman/api/v1/docs/change_number/_pos_case_1.html.erb
|
478
486
|
- app/views/usman/api/v1/docs/contacts_sync/_neg_case_1.html.erb
|
479
487
|
- app/views/usman/api/v1/docs/contacts_sync/_pos_case_1.html.erb
|
480
488
|
- app/views/usman/api/v1/docs/create_profile/_neg_case_1.html.erb
|
@@ -483,6 +491,9 @@ files:
|
|
483
491
|
- app/views/usman/api/v1/docs/create_profile/_pos_case_1.html.erb
|
484
492
|
- app/views/usman/api/v1/docs/create_profile/_pos_case_2.html.erb
|
485
493
|
- app/views/usman/api/v1/docs/create_profile/_pos_case_3.html.erb
|
494
|
+
- app/views/usman/api/v1/docs/delete_account/_neg_case_1.html.erb
|
495
|
+
- app/views/usman/api/v1/docs/delete_account/_neg_case_2.html.erb
|
496
|
+
- app/views/usman/api/v1/docs/delete_account/_pos_case_1.html.erb
|
486
497
|
- app/views/usman/api/v1/docs/delete_profile_picture/_neg_case_1.html.erb
|
487
498
|
- app/views/usman/api/v1/docs/delete_profile_picture/_neg_case_2.html.erb
|
488
499
|
- app/views/usman/api/v1/docs/delete_profile_picture/_pos_case_1.html.erb
|
@@ -501,8 +512,13 @@ files:
|
|
501
512
|
- app/views/usman/api/v1/docs/resend_otp/_neg_case_3.html.erb
|
502
513
|
- app/views/usman/api/v1/docs/resend_otp/_neg_case_4.html.erb
|
503
514
|
- app/views/usman/api/v1/docs/resend_otp/_pos_case_1.html.erb
|
504
|
-
- app/views/usman/api/v1/docs/
|
505
|
-
- app/views/usman/api/v1/docs/
|
515
|
+
- app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_1.html.erb
|
516
|
+
- app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_2.html.erb
|
517
|
+
- app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_3.html.erb
|
518
|
+
- app/views/usman/api/v1/docs/send_otp_to_change_number/_neg_case_4.html.erb
|
519
|
+
- app/views/usman/api/v1/docs/send_otp_to_change_number/_pos_case_1.html.erb
|
520
|
+
- app/views/usman/api/v1/docs/single_contact/_neg_case_1.html.erb
|
521
|
+
- app/views/usman/api/v1/docs/single_contact/_pos_case_1.html.erb
|
506
522
|
- app/views/usman/api/v1/docs/update_profile/_neg_case_1.html.erb
|
507
523
|
- app/views/usman/api/v1/docs/update_profile/_neg_case_2.html.erb
|
508
524
|
- app/views/usman/api/v1/docs/update_profile/_neg_case_3.html.erb
|