lib/access/api.rb in access-2.0.36 vs lib/access/api.rb in access-2.0.37
- old
+ new
@@ -130,23 +130,37 @@
request.get("/spots/#{spot_key}", "campaign", options) do |response|
SpotResponse.new(response)
end
end
- # Member
- def member_registration(options = {})
+ # User
+ def user_registration(options = {})
request.post("/register", "mms", options) do |response|
- MemberResponse.new(response)
+ UserResponse.new(response)
end
end
- def member_authentication(options = {})
+ def user_update(options = {})
+ request.put("/users", "mms", options) do |response|
+ UserResponse.new(response)
+ end
+ end
+
+ def user_authentication(options = {})
request.post("/auth", "mms", options) do |response|
- MemberResponse.new(response)
+ UserResponse.new(response)
end
end
+ def user_authentication_by_cvt(options = {})
+ request.get("/auth", "mms", options) do |response|
+ UserResponse.new(response)
+ end
+ end
+
+ # Member
+
def member_show(member_key, options = {})
request.get("/members/#{member_key}", 'mms', options) do |response|
MemberResponse.new(response)
end
end
@@ -155,14 +169,9 @@
request.put("/members/#{member_key}?program_id=#{options.delete(:program_id)}", 'mms', options) do |response|
MemberResponse.new(response)
end
end
- def member_authentication_by_cvt(options = {})
- request.get("/auth", "mms", options) do |response|
- MemberResponse.new(response)
- end
- end
# Program
def find_program_provisioning_method(pcid)
request.get("/programs/#{pcid}", "mms") do |response|
ProgramResponse.new(response)
end