cb-api 13.0.1 → 14.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cb/models/implementations/user.rb +2 -3
- data/lib/cb/responses/user/retrieve.rb +15 -0
- data/lib/cb/version.rb +1 -1
- metadata +2 -2
@@ -2,7 +2,7 @@ module Cb
|
|
2
2
|
module Models
|
3
3
|
class User
|
4
4
|
attr_accessor :external_id, :user_status, :password, :email, :address_1, :address_2, :city, :state,
|
5
|
-
:province, :postal_code, :
|
5
|
+
:province, :postal_code, :country_code, :first_name,
|
6
6
|
:last_name, :phone, :fax, :last_login, :created, :allow_partner_emails,
|
7
7
|
:allow_newsletter_emails, :allow_email_from_headhunter, :domain, :registration_path,
|
8
8
|
:user_type, :gender, :birth_date, :cobrand_code, :resume_stats, :custom_values, :work_status
|
@@ -19,8 +19,7 @@ module Cb
|
|
19
19
|
@city = args['City'] || ''
|
20
20
|
@state = args['State'] || ''
|
21
21
|
@province = args['Province'] || ''
|
22
|
-
@postal_code = args['PostalCode'] || ''
|
23
|
-
@zip = args['Zip'] || ''
|
22
|
+
@postal_code = args['PostalCode'] || args['Zip'] || ''
|
24
23
|
@country_code = args['CountryCode'] || ''
|
25
24
|
@first_name = args['FirstName'] || ''
|
26
25
|
@last_name = args['LastName'] || ''
|
@@ -4,6 +4,13 @@ module Cb
|
|
4
4
|
|
5
5
|
class Retrieve < ApiResponse
|
6
6
|
|
7
|
+
attr_reader :status
|
8
|
+
|
9
|
+
def initialize(args)
|
10
|
+
super(args)
|
11
|
+
@status = extract_status
|
12
|
+
end
|
13
|
+
|
7
14
|
protected
|
8
15
|
|
9
16
|
def validate_api_hash
|
@@ -15,6 +22,10 @@ module Cb
|
|
15
22
|
Models::User.new response[root_node][user_info_node]
|
16
23
|
end
|
17
24
|
|
25
|
+
def extract_status
|
26
|
+
response[root_node][response_status]
|
27
|
+
end
|
28
|
+
|
18
29
|
def hash_containing_metadata
|
19
30
|
response
|
20
31
|
end
|
@@ -32,6 +43,10 @@ module Cb
|
|
32
43
|
def user_info_node
|
33
44
|
'UserInfo'
|
34
45
|
end
|
46
|
+
|
47
|
+
def response_status
|
48
|
+
'Status'
|
49
|
+
end
|
35
50
|
end
|
36
51
|
|
37
52
|
end
|
data/lib/cb/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cb-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 14.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-10-
|
12
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|