contacts_client 0.0.37 → 0.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/app/models/padma_contact.rb +18 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjI5MjQ2MDQ3Nzk5MWRlMWVjYWFkNjcwNjdkZDE4YWQzNTQyODBkNQ==
4
+ NWMzMWRiYzQzYjNlYzFkOGIwMDQ2NTkzNjc2YTM1OGQwNDYxNTQ3YQ==
5
5
  data.tar.gz: !binary |-
6
- NDQ1ZGMwYjVhNmY0OGQ0MjBmNjkxMzQwMmE4NWIwNzNjZGY0MGU0Mw==
6
+ YWFlZmIyMmFlNWM4NmVlYjE5MDM4NjBiOGJkZGVmZjJjNDExOGQ2Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODg4MDBmNTRkNDY1YWMyMDRlYjVjZGRkZTVkYTQyNGM3MzQxZTZiNGNmZDhj
10
- MzQ1MjIwMTkzMzIzNmFlYWQzOWFmNTAyZGM0MjM4OWNkZWRlNTgyNzE5NmU1
11
- NzNjZjk5ZjY2NmJhYzI0ZjEwYzQ1MjcyYTZjNTJmMDBiYzExMDU=
9
+ Njg3YzgwMzE5OWJkNzVlYjU1ZGI4Y2QxMTU1ZGYzMTYxOTdlMGE2MGQ1NjY5
10
+ MmFiZTBkZWNhOTBhMmY0MjBjNmM0Y2ZkYWM5ZWZjMWU0Y2E2MzE3NzY4ZTY0
11
+ MWFkY2JhNTI5OTRiYzFlODRiM2UyOGU3MTZjMDQ1NDNhMjVjNmE=
12
12
  data.tar.gz: !binary |-
13
- NWQ5MDhkNTc0NDk2Nzc3YTQyNzIxNGI0NjcyZjc5Y2NkMzlhYTc3MjdiNjYz
14
- ZTlhY2UxMmM1NGVmNWM3YTI4NTFmNDU2MWUyNDVhOTEzMDk1MTlhNjI1YmU3
15
- ZmJmMWY3ZGYyMmNmMTEwN2I3ZGI2ZmNiYjMxOTkyY2FhZjg3ZGM=
13
+ MDhhYjM5ZWNlY2VlYzcyZTFlNzYxMjg4NWI3Y2YzNmE2ZTFkMzlkYzVlNTZj
14
+ MTAzYjcwYjRmMDI3YWU4MTMwNDVmNmE4ZDA2Yzg3ZmNlZWMzNzUzNDcyYmJk
15
+ ZWVhYTZmNDA4ODFmYzExMDkwNmI3ZjhhMjJmMDliNzVlMDM3N2I=
@@ -382,4 +382,22 @@ class PadmaContact < LogicalModel
382
382
  end
383
383
  end
384
384
 
385
+ ##
386
+ # Returns contacts similar to the one specifid by id
387
+ def self.get_similar_to(contact_id,options={})
388
+ options[:page] = 1
389
+ options[:per_page] = 9999
390
+ similar = nil
391
+ do_with_resource_path("#{@resource_path}/#{contact_id}/similar") do
392
+ similar = paginate(options)
393
+ end
394
+ similar
395
+ end
396
+
397
+ ##
398
+ # Returns contacts similar to current on
399
+ def get_similar(options={})
400
+ self.class.get_similar_to(id,options)
401
+ end
402
+
385
403
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contacts_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dwayne Macgowan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-05 00:00:00.000000000 Z
11
+ date: 2015-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties