contacts_client 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/app/models/padma_contact.rb +16 -0
  2. metadata +1 -1
@@ -239,4 +239,20 @@ class PadmaContact < LogicalModel
239
239
  end
240
240
  end
241
241
 
242
+ def self.find_by_kshema_id(kshema_id)
243
+ params = { kshema_id: kshema_id}
244
+ params = self.merge_key(params)
245
+
246
+ response = Typhoeus::Request.get(self.resource_uri+'/by_kshema_id', params: params)
247
+ if response.success?
248
+ unless response.body == 'null'
249
+ self.new.from_json(response.body)
250
+ else
251
+ return nil
252
+ end
253
+ else
254
+ return nil
255
+ end
256
+ end
257
+
242
258
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contacts_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: