dotloop 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b1e7e084caa1e8f18b46dbc62a1015b48b5d8ca
4
- data.tar.gz: 3d4ace3f1e2a64ce791ba677e43ee374161e362b
3
+ metadata.gz: d5405265975c768b88021bf52c92102e3c1b0534
4
+ data.tar.gz: ed1b6902f65bf6fab9b4fdbe638aa746af1cb06b
5
5
  SHA512:
6
- metadata.gz: 58389e753693271ff12968baf219771f0d702ba2b15fee7bc4745f03b8aed601a19399866ebb3b0ddbb5cbce44021af0eaa77c21e3cafc52fc38b9f375d9e876
7
- data.tar.gz: f2652b4fcddeb990c0bef88a3b643bd8a9f01c9a73101196a7e9e2a735cd7ff12e3622490251a0e9828b46c0cfbde148f7084c43ce2d623bbe01ef95edfe0603
6
+ metadata.gz: a209049f409af12fe4a804a00b896ca5b97c6f0ad999502f2719237d47bec39d2312e0d0f14b72a8a4ea1f13acbd585735a3b2ac01273bee98359fc5a3d12ba1
7
+ data.tar.gz: 0137bc0580037802c8a9d12c9cfe0bb2a7f9bcf3edb0e77b57275d504b3dfd84a36a16ce79411886f25606d2ab3fd470df1ca44c9409d2549854cbc51af0c93d
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1 @@
1
- wP:OR��rA��2ru��*����R27��t�:3z<s�g�TIk�;�,F��=����� ��hR,O5��
2
- ۝ڧO���u�J���BBny8 ��{&���)��I'
3
- ����޿���ݒ���W��%�mL�Im �V�ߐ�� ��0�f���h�~��fV>��*-j���&~y�W1nRk����� 8�V��1L�q�P��.���? �k�e/�9��R1��i����
1
+ 6f7���!�G�Ń� q&aC��I�@A1zP޷�cG؞�f&$�|���g)�� .ea7*q4�dɐ8�؆�=sW�������Mq�� �ގ�� �p��+t����"�q�=Q�I�2h��� I9�>\��<��~YP_mL�����v�#�|����+�no��L�k�Z\�����Wg��Y�#J�^i�Tgp�����iÉe��rIũ>�0��L�Щ���=���b���9=-�6x&
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -29,7 +29,7 @@ Optional parameters are prefixed with a __'*'__'
29
29
  ```ruby
30
30
  client = Dotloop::Client.new(api_key: 'c4c26918-b2df-49a6-9bc2-9009274b23a7')
31
31
 
32
- client.Profile.all #=> get list of profiles
32
+ myprofile = client.Profile.all #=> get list of profiles
33
33
 
34
34
  client.Loop.all(
35
35
  profile_id: '1234',
@@ -43,23 +43,33 @@ Optional parameters are prefixed with a __'*'__'
43
43
  *tagNames: 'tag'
44
44
  *createdByMe: '1234567'
45
45
  ) #=> get list of loops
46
+ myprofile.loops #=> get list of loops
46
47
 
47
- client.Loop.all(profile_id: '1234', loop_view_id: '76046') #=> get basic loop information
48
+ client.Loop.all(profile_id: '1234', loop_view_id: '76046') #=> get basic loop information (multiple loops)
49
+
50
+ myloop = client.Loop.find(profile_id: '1234', loop_view_id: '76046') #=> get basic loop information (single loop)
51
+ client.Loop.detail(profile_id: '1234', loop_view_id: '76046') #=> get loop detail
52
+ myloop.detail #=> get loop detail
48
53
 
49
- client.Loop.find(profile_id: '1234', loop_view_id: '76046') #=> get loop details
50
54
  client.LoopActivity.all(
51
55
  profile_id: '1234',
52
56
  loop_view_id: '76046',
53
57
  *batch_number: 1,
54
58
  *batch_size: 50
55
59
  ) #=> get loop activity
56
- client.Document.all(profile_id: '1234', loop_view_id: '76046') #=> get loop document list
60
+ myloop.activities #=> get loop activity
61
+
62
+ mydoc = client.Document.all(profile_id: '1234', loop_view_id: '76046') #=> get loop document list
63
+ mydoc = myloop.documents #=> get loop document list
57
64
 
58
65
  client.Participant.all(profile_id: '1234', loop_view_id: '76046') #=> get a list of loop participants
66
+ myloop.participants #=> get a list of loop participants
59
67
 
60
68
  client.Task.all(profile_id: '1234', loop_view_id: '76046') #=> get a list of loop tasks
69
+ myloop.tasks #=> get a list of loop tasks
61
70
 
62
71
  client.Folder.all(profile_id: '1234', loop_view_id: '76046') #=> get a list of folders in a loop
72
+ myloop.folders #=> get a list of folders in a loop
63
73
 
64
74
  client.Employee.all(
65
75
  profile_id: '1234',
@@ -69,24 +79,21 @@ Optional parameters are prefixed with a __'*'__'
69
79
  *show_in_active: true,
70
80
  *include_child: true
71
81
  ) #=> get a list of users in a profile
82
+ myprofile.employees #=> get a list of users in a profile
83
+
72
84
  client.DocumentActivity.all(
73
85
  profile_id: '1234',
74
86
  document_id: '561622',
75
87
  *batch_number: 1,
76
88
  *batch_size: 50
77
89
  ) #=> get activity details for a document
90
+ mydoc.activities #=> get activity details for a document
91
+
78
92
  client.Person.all(
79
- profile_id: '1234',
80
93
  *batch_number: 1,
81
94
  *batch_size: 50
82
95
  ) #=> get list of contacts
83
- client.Person.find(profile_id: '1234', contact_id: '3603862') #=> get details for a contact
84
-
85
- client.Admin.all(
86
- profile_id: '1234',
87
- *batch_number: 1,
88
- *batch_size: 50
89
- ) #=> get list of admins for a profile
96
+ client.Person.find(person_id: '3603862') #=> get details for a contact
90
97
 
91
98
  client.Document.get(
92
99
  profile_id: '1234',
@@ -94,6 +101,7 @@ Optional parameters are prefixed with a __'*'__'
94
101
  document_id: '561622',
95
102
  document_name: 'My Offer'
96
103
  ) #=> get a PDF document
104
+ mydoc.get #=> get a PDF document
97
105
  ```
98
106
 
99
107
  ## Development
data/lib/dotloop.rb CHANGED
@@ -8,7 +8,6 @@ require 'dotloop/query_param_helpers'
8
8
  require 'dotloop/profile'
9
9
  require 'dotloop/section'
10
10
  require 'dotloop/loop'
11
- require 'dotloop/admin'
12
11
  require 'dotloop/document'
13
12
  require 'dotloop/document_activity'
14
13
  require 'dotloop/employee'
@@ -18,7 +17,6 @@ require 'dotloop/participant'
18
17
  require 'dotloop/person'
19
18
  require 'dotloop/task'
20
19
 
21
- require 'dotloop/models/admin'
22
20
  require 'dotloop/models/document'
23
21
  require 'dotloop/models/document_activity'
24
22
  require 'dotloop/models/employee'
@@ -64,10 +64,6 @@ module Dotloop
64
64
  @person ||= Dotloop::Person.new(client: self)
65
65
  end
66
66
 
67
- def Admin
68
- @admin ||= Dotloop::Admin.new(client: self)
69
- end
70
-
71
67
  def self.snakify(hash)
72
68
  if hash.is_a? Array
73
69
  hash.map(&:to_snake_keys)
@@ -10,6 +10,8 @@ module Dotloop
10
10
  @client.get("/profile/#{profile_id.to_i}/loop/#{loop_view_id.to_i}/document").map do |document_attrs|
11
11
  doc = Dotloop::Models::Document.new(document_attrs)
12
12
  doc.client = client
13
+ doc.profile_id = profile_id.to_i
14
+ doc.loop_view_id = loop_view_id.to_i
13
15
  doc
14
16
  end
15
17
  end
data/lib/dotloop/loop.rb CHANGED
@@ -21,13 +21,19 @@ module Dotloop
21
21
 
22
22
  def batch(options = {})
23
23
  @client.get("/profile/#{profile_id(options)}/loop", query_params(options)).map do |attrs|
24
- Dotloop::Models::Loop.new(attrs)
24
+ lp = Dotloop::Models::Loop.new(attrs)
25
+ lp.client = client
26
+ lp.profile_id = profile_id(options)
27
+ lp
25
28
  end
26
29
  end
27
30
 
28
31
  def find(profile_id:, loop_view_id:)
29
32
  loop_data = @client.get("/profile/#{profile_id.to_i}/loop/#{loop_view_id.to_i}")
30
- Dotloop::Models::Loop.new(loop_data)
33
+ lp = Dotloop::Models::Loop.new(loop_data)
34
+ lp.client = client
35
+ lp.profile_id = profile_id.to_i
36
+ lp
31
37
  end
32
38
 
33
39
  def detail(profile_id:, loop_view_id:)
@@ -11,7 +11,23 @@ module Dotloop
11
11
  attribute :loop_id, Integer
12
12
  attribute :shared_with, Array[Integer]
13
13
  attribute :signature_verfication_link
14
+ attribute :tags, Array
14
15
  attr_accessor :client
16
+ attr_accessor :profile_id
17
+ attr_accessor :loop_view_id
18
+
19
+ def activities
20
+ client.DocumentActivity.all(profile_id: profile_id, document_id: document_id)
21
+ end
22
+
23
+ def get
24
+ client.Document.get(
25
+ profile_id: profile_id,
26
+ loop_view_id: loop_view_id,
27
+ document_id: document_id,
28
+ document_name: document_name
29
+ )
30
+ end
15
31
  end
16
32
  end
17
33
  end
@@ -6,10 +6,8 @@ module Dotloop
6
6
  attribute :first_name
7
7
  attribute :is_admin, Boolean
8
8
  attribute :last_name
9
- attribute :loops_created, Integer
10
- attribute :member_id, Integer
11
9
  attribute :status
12
- attribute :total_loops, Integer
10
+ attribute :user_id, Integer
13
11
  end
14
12
  end
15
13
  end
@@ -2,13 +2,8 @@ module Dotloop
2
2
  module Models
3
3
  class Folder
4
4
  include Virtus.model
5
- attribute :archived, Boolean
6
- attribute :folder_email_name
7
- attribute :folder_id, Integer
8
- attribute :last_updated_date_iso, DateTime
9
- attribute :minimized, Boolean
10
- attribute :name
11
- attribute :view_id, Integer
5
+ attribute :folder_name
6
+ attribute :folder_email
12
7
  end
13
8
  end
14
9
  end
@@ -10,6 +10,33 @@ module Dotloop
10
10
  attribute :loop_tags, Array
11
11
  attribute :loop_view_id, Integer
12
12
  attribute :transaction_type
13
+
14
+ attr_accessor :client
15
+ attr_accessor :profile_id
16
+
17
+ def detail
18
+ client.Loop.detail(profile_id: profile_id, loop_view_id: loop_view_id)
19
+ end
20
+
21
+ def activities
22
+ client.LoopActivity.all(profile_id: profile_id, loop_view_id: loop_view_id)
23
+ end
24
+
25
+ def tasks
26
+ client.Task.all(profile_id: profile_id, loop_view_id: loop_view_id)
27
+ end
28
+
29
+ def folders
30
+ client.Folder.all(profile_id: profile_id, loop_view_id: loop_view_id)
31
+ end
32
+
33
+ def documents
34
+ client.Document.all(profile_id: profile_id, loop_view_id: loop_view_id)
35
+ end
36
+
37
+ def participants
38
+ client.Participant.all(profile_id: profile_id, loop_view_id: loop_view_id)
39
+ end
13
40
  end
14
41
  end
15
42
  end
@@ -2,17 +2,11 @@ module Dotloop
2
2
  module Models
3
3
  class Person
4
4
  include Virtus.model
5
- attribute :city
6
5
  attribute :email
7
- attribute :fax
8
6
  attribute :first_name
9
- attribute :homephone
7
+ attribute :middle_name
10
8
  attribute :last_name
11
- attribute :officephone
12
9
  attribute :person_id, Integer
13
- attribute :state_or_prov
14
- attribute :street_address01
15
- attribute :zip_or_postal_code
16
10
  attr_accessor :client
17
11
  end
18
12
  end
@@ -23,6 +23,10 @@ module Dotloop
23
23
  def loops
24
24
  client.Loop.all(profile_id: profile_id)
25
25
  end
26
+
27
+ def employees
28
+ client.Employee.all(profile_id: profile_id)
29
+ end
26
30
  end
27
31
  end
28
32
  end
@@ -8,6 +8,7 @@ module Dotloop
8
8
  attribute :due_date, DateTime
9
9
  attribute :due_date_type, DateTime
10
10
  attribute :list_id, Integer
11
+ attribute :assigned_to_person, Integer
11
12
  attribute :list_name
12
13
  attribute :locked_status
13
14
  attribute :name
@@ -9,7 +9,7 @@ module Dotloop
9
9
 
10
10
  def all(options = {})
11
11
  persons = []
12
- url = "/profile/#{profile_id(options)}/person"
12
+ url = '/person'
13
13
  (1..MAX_LOOPS).each do |i|
14
14
  options[:batch_number] = i
15
15
  current_person = @client.get(url, query_params(options)).map do |person_attrs|
@@ -21,8 +21,8 @@ module Dotloop
21
21
  persons
22
22
  end
23
23
 
24
- def find(profile_id:, person_id:)
25
- person = @client.get("/profile/#{profile_id.to_i}/person/#{person_id.to_i}").first
24
+ def find(person_id:)
25
+ person = @client.get("/person/#{person_id.to_i}").first
26
26
  Dotloop::Models::Person.new(person)
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module Dotloop
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotloop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loft47
@@ -30,7 +30,7 @@ cert_chain:
30
30
  L+ceZspJWVt3gj8EHk5CVnWGEh6Pk69eo8EuR38vWHXOExU+b14Umj8wjYGjDgmQ
31
31
  ULEgdaQHqkQV4C3edSFOUWTGehI=
32
32
  -----END CERTIFICATE-----
33
- date: 2016-12-08 00:00:00.000000000 Z
33
+ date: 2016-12-09 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: simplecov
@@ -234,7 +234,6 @@ files:
234
234
  - certs/shanedavies.pem
235
235
  - dotloop.gemspec
236
236
  - lib/dotloop.rb
237
- - lib/dotloop/admin.rb
238
237
  - lib/dotloop/client.rb
239
238
  - lib/dotloop/document.rb
240
239
  - lib/dotloop/document_activity.rb
@@ -242,7 +241,6 @@ files:
242
241
  - lib/dotloop/folder.rb
243
242
  - lib/dotloop/loop.rb
244
243
  - lib/dotloop/loop_activity.rb
245
- - lib/dotloop/models/admin.rb
246
244
  - lib/dotloop/models/document.rb
247
245
  - lib/dotloop/models/document_activity.rb
248
246
  - lib/dotloop/models/employee.rb
metadata.gz.sig CHANGED
Binary file
data/lib/dotloop/admin.rb DELETED
@@ -1,24 +0,0 @@
1
- module Dotloop
2
- class Admin
3
- include Dotloop::QueryParamHelpers
4
- attr_accessor :client
5
-
6
- def initialize(client:)
7
- @client = client
8
- end
9
-
10
- def all(options = {})
11
- admins = []
12
- url = "/profile/#{profile_id(options)}/admin"
13
- (1..MAX_LOOPS).each do |i|
14
- options[:batch_number] = i
15
- current_admin = @client.get(url, query_params(options)).map do |admin_attrs|
16
- Dotloop::Models::Admin.new(admin_attrs)
17
- end
18
- admins += current_admin
19
- break if current_admin.size < BATCH_SIZE
20
- end
21
- admins
22
- end
23
- end
24
- end
@@ -1,13 +0,0 @@
1
- module Dotloop
2
- module Models
3
- class Admin
4
- include Virtus.model
5
- attribute :email_address
6
- attribute :first_name
7
- attribute :is_admin, Boolean
8
- attribute :last_name
9
- attribute :member_id, Integer
10
- attribute :status
11
- end
12
- end
13
- end