update membership

This commit is contained in:
Aung Myo
2017-07-04 18:01:08 +06:30
parent 6b87a7bc22
commit b5b1c6f10a
6 changed files with 62 additions and 20 deletions

View File

@@ -27,7 +27,7 @@ class Customer < ApplicationRecord
'Content-Type' => 'application/json',
'Accept' => 'application/json'
},
:timeout => 100
:timeout => 10
)
rescue HTTParty::Error
response = {status: false, message: "Server Error"}
@@ -113,13 +113,11 @@ class Customer < ApplicationRecord
response = { status: false}
end
puts response.to_json
if response["status"] == true
if response["status"] == true
status = customer.update_attributes(membership_id: response["customer_datas"]["id"])
end
end
end
end
end
def self.search(search)