clio_client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjJjZjQzMzQwMjdiMzNkNzUwZTlkZTlkZDdlMDk0NTk2NDgwOTc0Mw==
4
+ ZDZkMmJkYWUzNzA1NGU2ZmE4OTcwYzU3ODM1MDY4MzdkN2JhNGY2Yw==
5
5
  data.tar.gz: !binary |-
6
- YTE1YjQ2OTU0ODBlZGRkMjg4ZjU0ZGYwNGEyMjM4NzZlY2U1ZDE3ZA==
6
+ NjY5OTQzOTJlMTAyM2ViNWViYWQyZDY5ODEzMDkyYjNjNDc2MDc0Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDAxNGI0MzZmYzZjZjgyMDFmYjViODFkZDY4ZWJjYWY5NmU3OTRjNzk4N2I2
10
- MTc2NTI5MGVmYWE2MjM0Y2M1MTljNDhiZTM5NmM3ZjEyZjE0MjZhYTUwOGYz
11
- Y2MxMTZiNmI3ZTE4N2ExYTg2YzIzM2NiNmY0NjcwZjYwNGVjN2Y=
9
+ NjZmNWVmNjgyNWM3YmUyN2Q1Y2FiYTA2ZTE4MGE3M2YwZTgxNWViM2JkYWI4
10
+ YTg5MDY1YTQ5MTZkZjc0ODFjMWZlZTU4ZDVhOThkZTQ5OGI4NDUwYzExYjdh
11
+ ZTkwNmY4ODBjZDc4MDZjODNjZTNhY2ViODZiNTllZWIwYTJmYWM=
12
12
  data.tar.gz: !binary |-
13
- NmI0MjJjZDhiNDQ2MTM0Mjg2MGVkMjc4MmU4NmFlM2MwNTBiN2RjNDMwZTZk
14
- M2JiMjI4OWY4ZjYzODhkYWFjZjI2NDBlOWIxMmEwMzdmYjYxNWE2ZjZiOTk4
15
- MmE5N2ZhODhkYTRiODYyYjMyODJjMTc5NGM3NzM1ODAyOGNkZmM=
13
+ ZDRiM2ViZjlhYzc3OWY4ODRmNDVhY2M3MGRhNmI2YTc5NzdjYWFkODBiNThj
14
+ YWU0ZThlYTJmMWFmYjg0ZTk5Njk2MWM4MDVjNmQwNjhhYmVjY2YxZjE3N2Jk
15
+ Y2Q0ZWM3N2Y0NTIwNTRhMjBhZmI2NTVmZmRiMTQ5YmRlNzVlNTE=
@@ -23,9 +23,9 @@ module ClioClient
23
23
  end
24
24
  end
25
25
 
26
- def destroy(id)
26
+ def destroy(id, params = {})
27
27
  begin
28
- session.delete("#{end_point_url}/#{id}", false)
28
+ session.delete("#{end_point_url}/#{id}", params, false)
29
29
  rescue ClioClient::UnknownResponse
30
30
  false
31
31
  end
@@ -6,8 +6,8 @@ module ClioClient
6
6
 
7
7
  include ClioClient::Api::Crudable
8
8
 
9
- def download(id)
10
- session.get("#{end_point_url}/#{id}/download")
9
+ def download(id, params = {})
10
+ session.get("#{end_point_url}/#{id}/download", params)
11
11
  end
12
12
 
13
13
  private
@@ -2,9 +2,9 @@ module ClioClient
2
2
  module Api
3
3
  module Findable
4
4
 
5
- def find(id)
5
+ def find(id, params = {})
6
6
  begin
7
- response = session.get("#{end_point_url}/#{id}")
7
+ response = session.get("#{end_point_url}/#{id}", params)
8
8
  data_item(response[singular_resource])
9
9
  rescue ClioClient::ResourceNotFound, ClioClient::UnknownResponse
10
10
  nil
@@ -42,8 +42,8 @@ module ClioClient
42
42
  make_api_request(req, uri, parse)
43
43
  end
44
44
 
45
- def delete(path, parse=true)
46
- uri = base_uri("#{api_prefix}/#{path}")
45
+ def delete(path, params = {}, parse=true)
46
+ uri = base_uri("#{api_prefix}/#{path}", params)
47
47
  req = Net::HTTP::Delete.new(uri.request_uri)
48
48
  make_api_request(req, uri, parse)
49
49
  end
@@ -8,7 +8,8 @@ module ClioClient
8
8
  maildrop_address: {type: :string},
9
9
  name: {type: :string, readonly: true},
10
10
  date_format: {type: :string, readonly: true},
11
- time_format: {type: :string, readonly: true}
11
+ time_format: {type: :string, readonly: true},
12
+ document_preview_enabled: {type: :boolean, readonly: true}
12
13
  )
13
14
 
14
15
  has_association :owner, ClioClient::User
@@ -12,6 +12,8 @@ module ClioClient
12
12
  filename: {type: :string}
13
13
  )
14
14
 
15
+ has_many_association :document_version_notes, ClioClient::DocumentVersionNote
16
+
15
17
  def download
16
18
  api.download(id)
17
19
  end
@@ -0,0 +1,12 @@
1
+ module ClioClient
2
+ class DocumentVersionNote < Resource
3
+
4
+ set_attributes(user_id: {type: :int, readonly: true},
5
+ subject: {type: :string},
6
+ detail: {type: :string},
7
+ created_at: {type: :datetime, readonly: true},
8
+ updated_at: {type: :datetime, readonly: true},
9
+ )
10
+
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module ClioClient
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/clio_client.rb CHANGED
@@ -67,6 +67,7 @@ module ClioClient
67
67
  :CustomFieldTextAreaValue => 'custom_field_text_area_value',
68
68
  :CustomFieldTextLineValue => 'custom_field_text_line_value',
69
69
  :CustomFieldUrlValue => 'custom_field_url_value',
70
+ :DocumentVersionNote => 'document_version_note',
70
71
  :Rate => 'rate',
71
72
  :Reminder => 'reminder'
72
73
  }.each_pair do |klass, file|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clio_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle d'Oliveira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -168,6 +168,7 @@ files:
168
168
  - lib/clio_client/support/custom_field_time_value.rb
169
169
  - lib/clio_client/support/custom_field_url_value.rb
170
170
  - lib/clio_client/support/custom_field_value.rb
171
+ - lib/clio_client/support/document_version_note.rb
171
172
  - lib/clio_client/support/email_address.rb
172
173
  - lib/clio_client/support/instant_messenger.rb
173
174
  - lib/clio_client/support/phone_number.rb