groupdocs 1.2.11 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. data/.travis.yml +2 -0
  2. data/Gemfile +1 -1
  3. data/README.md +0 -2
  4. data/Rakefile +1 -1
  5. data/examples/api-samples/Gemfile +1 -1
  6. data/examples/api-samples/samples/annotation-sample.rb +50 -0
  7. data/examples/api-samples/samples/sample18.rb +11 -2
  8. data/examples/api-samples/samples/sample19.rb +58 -0
  9. data/examples/api-samples/samples/sample20.rb +50 -0
  10. data/examples/api-samples/samples/sample21.rb +65 -0
  11. data/examples/api-samples/samples/sample22.rb +52 -0
  12. data/examples/api-samples/views/annotation_sample.haml +64 -0
  13. data/examples/api-samples/views/index.haml +8 -0
  14. data/examples/api-samples/views/sample1.haml +9 -1
  15. data/examples/api-samples/views/sample10.haml +9 -1
  16. data/examples/api-samples/views/sample11.haml +10 -0
  17. data/examples/api-samples/views/sample12.haml +8 -0
  18. data/examples/api-samples/views/sample13.haml +8 -0
  19. data/examples/api-samples/views/sample14.haml +8 -0
  20. data/examples/api-samples/views/sample15.haml +8 -0
  21. data/examples/api-samples/views/sample16.haml +8 -0
  22. data/examples/api-samples/views/sample17.haml +8 -0
  23. data/examples/api-samples/views/sample18.haml +11 -0
  24. data/examples/api-samples/views/sample19.haml +102 -0
  25. data/examples/api-samples/views/sample2.haml +9 -1
  26. data/examples/api-samples/views/sample20.haml +89 -0
  27. data/examples/api-samples/views/sample21.haml +106 -0
  28. data/examples/api-samples/views/sample22.haml +107 -0
  29. data/examples/api-samples/views/sample3.haml +10 -2
  30. data/examples/api-samples/views/sample4.haml +8 -0
  31. data/examples/api-samples/views/sample5.haml +8 -0
  32. data/examples/api-samples/views/sample6.haml +8 -0
  33. data/examples/api-samples/views/sample7.haml +9 -1
  34. data/examples/api-samples/views/sample8.haml +10 -2
  35. data/examples/api-samples/views/sample9.haml +10 -2
  36. data/groupdocs.gemspec +4 -3
  37. data/lib/groupdocs.rb +2 -4
  38. data/lib/groupdocs/api.rb +2 -0
  39. data/lib/groupdocs/api/entity.rb +4 -36
  40. data/lib/groupdocs/api/helpers/access_rights_helper.rb +4 -4
  41. data/lib/groupdocs/api/helpers/byte_flag_helper.rb +3 -3
  42. data/lib/groupdocs/api/helpers/rest_helper.rb +5 -5
  43. data/lib/groupdocs/api/helpers/status_helper.rb +2 -2
  44. data/lib/groupdocs/api/helpers/url_helper.rb +2 -2
  45. data/lib/groupdocs/document.rb +55 -24
  46. data/lib/groupdocs/document/annotation.rb +7 -7
  47. data/lib/groupdocs/document/annotation/reply.rb +2 -2
  48. data/lib/groupdocs/document/view.rb +1 -1
  49. data/lib/groupdocs/job.rb +20 -20
  50. data/lib/groupdocs/questionnaire.rb +2 -2
  51. data/lib/groupdocs/questionnaire/collector.rb +2 -2
  52. data/lib/groupdocs/questionnaire/execution.rb +1 -1
  53. data/lib/groupdocs/questionnaire/question.rb +2 -2
  54. data/lib/groupdocs/signature.rb +1 -1
  55. data/lib/groupdocs/signature/envelope.rb +19 -19
  56. data/lib/groupdocs/signature/field.rb +6 -6
  57. data/lib/groupdocs/signature/form.rb +7 -7
  58. data/lib/groupdocs/signature/list.rb +2 -2
  59. data/lib/groupdocs/signature/recipient.rb +6 -6
  60. data/lib/groupdocs/signature/shared/document_methods.rb +5 -5
  61. data/lib/groupdocs/signature/shared/entity_methods.rb +4 -4
  62. data/lib/groupdocs/signature/shared/field_methods.rb +8 -8
  63. data/lib/groupdocs/signature/shared/recipient_methods.rb +2 -2
  64. data/lib/groupdocs/signature/shared/resource_methods.rb +1 -1
  65. data/lib/groupdocs/signature/template.rb +4 -4
  66. data/lib/groupdocs/storage.rb +4 -4
  67. data/lib/groupdocs/storage/file.rb +4 -4
  68. data/lib/groupdocs/storage/folder.rb +4 -4
  69. data/lib/groupdocs/subscription.rb +15 -15
  70. data/lib/groupdocs/version.rb +1 -1
  71. data/spec/groupdocs/api/entity_spec.rb +10 -37
  72. data/spec/groupdocs/api/helpers/access_mode_helper_spec.rb +1 -1
  73. data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +3 -3
  74. data/spec/groupdocs/api/helpers/credentials_helpers_spec.rb +5 -5
  75. data/spec/groupdocs/api/helpers/rest_helper_spec.rb +15 -15
  76. data/spec/groupdocs/api/helpers/status_helper_spec.rb +1 -1
  77. data/spec/groupdocs/api/helpers/url_helper_spec.rb +11 -11
  78. data/spec/groupdocs/api/request_spec.rb +6 -6
  79. data/spec/groupdocs/datasource_spec.rb +9 -9
  80. data/spec/groupdocs/document/annotation/reply_spec.rb +15 -15
  81. data/spec/groupdocs/document/annotation/reviewer_spec.rb +3 -3
  82. data/spec/groupdocs/document/annotation_spec.rb +17 -17
  83. data/spec/groupdocs/document/change_spec.rb +1 -1
  84. data/spec/groupdocs/document/field_spec.rb +1 -1
  85. data/spec/groupdocs/document/metadata_spec.rb +3 -3
  86. data/spec/groupdocs/document/view_spec.rb +4 -4
  87. data/spec/groupdocs/document_spec.rb +92 -66
  88. data/spec/groupdocs/job_spec.rb +29 -29
  89. data/spec/groupdocs/questionnaire/collector_spec.rb +15 -19
  90. data/spec/groupdocs/questionnaire/execution_spec.rb +12 -12
  91. data/spec/groupdocs/questionnaire/page_spec.rb +4 -4
  92. data/spec/groupdocs/questionnaire/question_spec.rb +6 -6
  93. data/spec/groupdocs/questionnaire_spec.rb +18 -18
  94. data/spec/groupdocs/signature/contact_spec.rb +9 -9
  95. data/spec/groupdocs/signature/envelope_spec.rb +34 -34
  96. data/spec/groupdocs/signature/field_spec.rb +13 -13
  97. data/spec/groupdocs/signature/form_spec.rb +9 -9
  98. data/spec/groupdocs/signature/list_spec.rb +3 -3
  99. data/spec/groupdocs/signature/role_spec.rb +2 -2
  100. data/spec/groupdocs/signature/template_spec.rb +6 -6
  101. data/spec/groupdocs/signature_spec.rb +3 -3
  102. data/spec/groupdocs/storage/file_spec.rb +20 -20
  103. data/spec/groupdocs/storage/folder_spec.rb +21 -21
  104. data/spec/groupdocs/storage/package_spec.rb +2 -2
  105. data/spec/groupdocs/storage_spec.rb +1 -1
  106. data/spec/groupdocs/subscription_spec.rb +3 -3
  107. data/spec/groupdocs/user_spec.rb +5 -5
  108. data/spec/spec_helper.rb +9 -7
  109. data/spec/support/json/document_thumbnails.json +24 -0
  110. data/spec/support/shared_examples/api/entity.rb +8 -8
  111. data/spec/support/shared_examples/signature/shared/document_methods.rb +8 -8
  112. data/spec/support/shared_examples/signature/shared/entity_fields.rb +3 -3
  113. data/spec/support/shared_examples/signature/shared/entity_methods.rb +12 -12
  114. data/spec/support/shared_examples/signature/shared/field_methods.rb +29 -29
  115. data/spec/support/shared_examples/signature/shared/recipient_methods.rb +3 -3
  116. data/spec/support/shared_examples/signature/shared/resource_methods.rb +2 -2
  117. metadata +33 -5
@@ -101,7 +101,7 @@ module GroupDocs
101
101
  request[:path] = '/signature/{{client_id}}/signature'
102
102
  request[:request_body] = to_hash
103
103
  end
104
- api.add_params(name: title)
104
+ api.add_params(:name => title)
105
105
  json = api.execute!
106
106
 
107
107
  self.id = json[:signature][:id]
@@ -4,14 +4,14 @@ module GroupDocs
4
4
  require 'groupdocs/signature/envelope/log'
5
5
 
6
6
  STATUSES = {
7
- draft: -1,
8
- annotation: 0,
9
- in_progress: 1,
10
- expired: 2,
11
- canceled: 3,
12
- failed: 4,
13
- completed: 5,
14
- archived: 6,
7
+ :draft => -1,
8
+ :annotation => 0,
9
+ :in_progress => 1,
10
+ :expired => 2,
11
+ :canceled => 3,
12
+ :failed => 4,
13
+ :completed => 5,
14
+ :archived => 6,
15
15
  }
16
16
 
17
17
  include Signature::DocumentMethods
@@ -132,11 +132,11 @@ module GroupDocs
132
132
  request[:method] = :POST
133
133
  request[:path] = "/signature/{{client_id}}/envelopes/#{id}/recipient"
134
134
  end
135
- api.add_params(email: recipient.email,
136
- firstname: recipient.first_name,
137
- lastname: recipient.last_name,
138
- role: recipient.role_id,
139
- order: recipient.order)
135
+ api.add_params(:email => recipient.email,
136
+ :firstname => recipient.first_name,
137
+ :lastname => recipient.last_name,
138
+ :role => recipient.role_id,
139
+ :order => recipient.order)
140
140
  api.execute!
141
141
  end
142
142
 
@@ -164,11 +164,11 @@ module GroupDocs
164
164
  request[:method] = :PUT
165
165
  request[:path] = "/signature/{{client_id}}/envelopes/#{id}/recipient/#{recipient.id}"
166
166
  end
167
- api.add_params(email: recipient.email,
168
- firstname: recipient.first_name,
169
- lastname: recipient.last_name,
170
- role: recipient.role_id,
171
- order: recipient.order)
167
+ api.add_params(:email => recipient.email,
168
+ :firstname => recipient.first_name,
169
+ :lastname => recipient.last_name,
170
+ :role => recipient.role_id,
171
+ :order => recipient.order)
172
172
  api.execute!
173
173
  end
174
174
 
@@ -227,7 +227,7 @@ module GroupDocs
227
227
 
228
228
  type = field.field_type
229
229
  if type == :signature && value.is_a?(GroupDocs::Signature)
230
- api.add_params(signatureId: value.id)
230
+ api.add_params(:signatureId => value.id)
231
231
  else
232
232
  if type == :checkbox
233
233
  value = (value ? 'on' : 'off')
@@ -4,12 +4,12 @@ module GroupDocs
4
4
  require 'groupdocs/signature/field/location'
5
5
 
6
6
  FIELD_TYPES = {
7
- signature: 1,
8
- single_line: 2,
9
- multiline: 3,
10
- date: 4,
11
- dropdown: 5,
12
- checkbox: 6,
7
+ :signature => 1,
8
+ :single_line => 2,
9
+ :multiline => 3,
10
+ :date => 4,
11
+ :dropdown => 5,
12
+ :checkbox => 6,
13
13
  }
14
14
 
15
15
  #
@@ -5,10 +5,10 @@ module GroupDocs
5
5
  extend Signature::ResourceMethods
6
6
 
7
7
  STATUSES = {
8
- draft: -1,
9
- in_progress: 1,
10
- completed: 2,
11
- archived: 3,
8
+ :draft => -1,
9
+ :in_progress => 1,
10
+ :completed => 2,
11
+ :archived => 3,
12
12
  }
13
13
 
14
14
  #
@@ -117,7 +117,7 @@ module GroupDocs
117
117
  request[:path] = '/signature/{{client_id}}/form'
118
118
  request[:request_body] = to_hash
119
119
  end
120
- api.add_params(options.merge(name: name, templateId: template.id))
120
+ api.add_params(options.merge(:name => name, :templateId => template.id))
121
121
  json = api.execute!
122
122
 
123
123
  self.id = json[:form][:id]
@@ -139,8 +139,8 @@ module GroupDocs
139
139
  end.execute!
140
140
 
141
141
  json[:documents].map do |document|
142
- file = Storage::File.new(guid: document[:documentId], name: document[:name])
143
- Document.new(document.merge(file: file))
142
+ file = Storage::File.new(:guid => document[:documentId], :name => document[:name])
143
+ Document.new(document.merge(:file => file))
144
144
  end
145
145
  end
146
146
 
@@ -38,7 +38,7 @@ module GroupDocs
38
38
  # @param [Array<String>, String] values
39
39
  #
40
40
  def values=(values)
41
- @values = values.is_a?(Array) ? values.join(?;) : values
41
+ @values = values.is_a?(Array) ? values.join(';') : values
42
42
  end
43
43
 
44
44
  #
@@ -46,7 +46,7 @@ module GroupDocs
46
46
  # @return [Array<String>]
47
47
  #
48
48
  def values
49
- @values.split(?;)
49
+ @values.split(';')
50
50
  end
51
51
 
52
52
  #
@@ -2,12 +2,12 @@ module GroupDocs
2
2
  class Signature::Recipient < Api::Entity
3
3
 
4
4
  STATUSES = {
5
- none: -1,
6
- waiting: 0,
7
- notified: 1,
8
- delegated: 2,
9
- rejected: 3,
10
- signed: 4,
5
+ :none => -1,
6
+ :waiting => 0,
7
+ :notified => 1,
8
+ :delegated => 2,
9
+ :rejected => 3,
10
+ :signed => 4,
11
11
  }
12
12
 
13
13
  # @attr [String] id
@@ -20,12 +20,12 @@ module GroupDocs
20
20
  json = Api::Request.new do |request|
21
21
  request[:access] = access
22
22
  request[:method] = :GET
23
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/documents"
23
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents"
24
24
  end.execute!
25
25
 
26
26
  json[:documents].map do |document|
27
- file = Storage::File.new(guid: document[:documentId], name: document[:name])
28
- Document.new(document.merge(file: file))
27
+ file = Storage::File.new(:guid => document[:documentId], :name => document[:name])
28
+ Document.new(document.merge(:file => file))
29
29
  end
30
30
  end
31
31
 
@@ -57,7 +57,7 @@ module GroupDocs
57
57
  api = Api::Request.new do |request|
58
58
  request[:access] = access
59
59
  request[:method] = :POST
60
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/document/#{document.file.guid}"
60
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/document/#{document.file.guid}"
61
61
  end
62
62
  api.add_params(options)
63
63
  api.execute!
@@ -89,7 +89,7 @@ module GroupDocs
89
89
  Api::Request.new do |request|
90
90
  request[:access] = access
91
91
  request[:method] = :DELETE
92
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/documents/#{document.file.guid}"
92
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents/#{document.file.guid}"
93
93
  end.execute!
94
94
  end
95
95
 
@@ -70,7 +70,7 @@ module GroupDocs
70
70
  request[:path] = "/signature/{{client_id}}/#{class_name}"
71
71
  request[:request_body] = to_hash
72
72
  end
73
- api.add_params(options.merge(name: name))
73
+ api.add_params(options.merge(:name => name))
74
74
  json = api.execute!
75
75
 
76
76
  self.id = json[class_name.to_sym][:id]
@@ -99,7 +99,7 @@ module GroupDocs
99
99
  Api::Request.new do |request|
100
100
  request[:access] = access
101
101
  request[:method] = :POST
102
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}"
102
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}"
103
103
  request[:request_body] = to_hash
104
104
  end.execute!
105
105
  end
@@ -116,7 +116,7 @@ module GroupDocs
116
116
  api = Api::Request.new do |request|
117
117
  request[:access] = access
118
118
  request[:method] = :PUT
119
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}"
119
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}"
120
120
  end
121
121
  key = (class_name == 'form' ? :new_name : :name )
122
122
  api.add_params(key => name)
@@ -136,7 +136,7 @@ module GroupDocs
136
136
  Api::Request.new do |request|
137
137
  request[:access] = access
138
138
  request[:method] = :DELETE
139
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}"
139
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}"
140
140
  end.execute!
141
141
  end
142
142
 
@@ -40,9 +40,9 @@ module GroupDocs
40
40
  api = Api::Request.new do |request|
41
41
  request[:access] = access
42
42
  request[:method] = :GET
43
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/fields"
43
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/fields"
44
44
  end
45
- api.add_params(document: document.file.guid, recipient: recipient.id)
45
+ api.add_params(:document => document.file.guid, :recipient => recipient.id)
46
46
  json = api.execute!
47
47
 
48
48
  json[:fields].map do |field|
@@ -95,12 +95,12 @@ module GroupDocs
95
95
  opts[:force_new_field] = true if opts[:force_new_field].nil?
96
96
  payload = field.to_hash # field itself
97
97
  payload.merge!(field.location.to_hash) # location should added in plain view (i.e. not "location": {...})
98
- payload.merge!(forceNewField: opts[:force_new_field]) # create new field flag
98
+ payload.merge!(:forceNewField => opts[:force_new_field]) # create new field flag
99
99
 
100
100
  Api::Request.new do |request|
101
101
  request[:access] = access
102
102
  request[:method] = :POST
103
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/documents/#{document.file.guid}/recipient/#{recipient.id}/field/#{field.id}"
103
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents/#{document.file.guid}/recipient/#{recipient.id}/field/#{field.id}"
104
104
  request[:request_body] = payload
105
105
  end.execute!
106
106
  end
@@ -146,7 +146,7 @@ module GroupDocs
146
146
  Api::Request.new do |request|
147
147
  request[:access] = access
148
148
  request[:method] = :PUT
149
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/documents/#{document.file.guid}/field/#{field.id}"
149
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents/#{document.file.guid}/field/#{field.id}"
150
150
  request[:request_body] = payload
151
151
  end.execute!
152
152
  end
@@ -181,7 +181,7 @@ module GroupDocs
181
181
  Api::Request.new do |request|
182
182
  request[:access] = access
183
183
  request[:method] = :DELETE
184
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/fields/#{field.id}"
184
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/fields/#{field.id}"
185
185
  end.execute!
186
186
  end
187
187
 
@@ -235,7 +235,7 @@ module GroupDocs
235
235
  Api::Request.new do |request|
236
236
  request[:access] = access
237
237
  request[:method] = :PUT
238
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/documents/#{document.file.guid}/recipient/#{recipient.id}/fields/#{field.id}/locations/#{location.id}"
238
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/documents/#{document.file.guid}/recipient/#{recipient.id}/fields/#{field.id}/locations/#{location.id}"
239
239
  request[:request_body] = location.to_hash
240
240
  end.execute!
241
241
  end
@@ -276,7 +276,7 @@ module GroupDocs
276
276
  Api::Request.new do |request|
277
277
  request[:access] = access
278
278
  request[:method] = :DELETE
279
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/fields/#{field.id}/locations/#{location.id}"
279
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/fields/#{field.id}/locations/#{location.id}"
280
280
  end.execute!
281
281
  end
282
282
 
@@ -20,7 +20,7 @@ module GroupDocs
20
20
  json = Api::Request.new do |request|
21
21
  request[:access] = access
22
22
  request[:method] = :GET
23
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/recipients"
23
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/recipients"
24
24
  end.execute!
25
25
 
26
26
  json[:recipients].map do |recipient|
@@ -54,7 +54,7 @@ module GroupDocs
54
54
  Api::Request.new do |request|
55
55
  request[:access] = access
56
56
  request[:method] = :DELETE
57
- request[:path] = "/signature/{{client_id}}/#{pluralized_class_name}/#{id}/recipients/#{recipient.id}"
57
+ request[:path] = "/signature/{{client_id}}/#{class_name.pluralize}/#{id}/recipients/#{recipient.id}"
58
58
  end.execute!
59
59
  end
60
60
 
@@ -49,7 +49,7 @@ module GroupDocs
49
49
  json.each do |key, value|
50
50
  resources[key] = case key
51
51
  when :documents
52
- value.map { |doc| Document.new(file: Storage::File.new(doc)) }
52
+ value.map { |doc| Document.new(:file => Storage::File.new(doc)) }
53
53
  when :recipients
54
54
  value.map { |recipient| Signature::Recipient.new(recipient) }
55
55
  else
@@ -65,9 +65,9 @@ module GroupDocs
65
65
  request[:method] = :POST
66
66
  request[:path] = "/signature/{{client_id}}/templates/#{id}/recipient"
67
67
  end
68
- api.add_params(nickname: recipient.nickname,
69
- role: recipient.role_id,
70
- order: recipient.order)
68
+ api.add_params(:nickname => recipient.nickname,
69
+ :role => recipient.role_id,
70
+ :order => recipient.order)
71
71
  api.execute!
72
72
  end
73
73
 
@@ -95,7 +95,7 @@ module GroupDocs
95
95
  request[:method] = :PUT
96
96
  request[:path] = "/signature/{{client_id}}/templates/#{id}/recipient/#{recipient.id}"
97
97
  end
98
- api.add_params(nickname: recipient.nickname, role: recipient.role_id, order: recipient.order)
98
+ api.add_params(:nickname => recipient.nickname, :role => recipient.role_id, :order => recipient.order)
99
99
  api.execute!
100
100
  end
101
101
 
@@ -26,10 +26,10 @@ module GroupDocs
26
26
  end.execute!
27
27
 
28
28
  {
29
- total_space: "#{json[:total_space] / 1048576} MB",
30
- available_space: "#{json[:avail_space] / 1048576} MB",
31
- document_credits: json[:doc_credits],
32
- available_credits: json[:avail_credits]
29
+ :total_space => "#{json[:total_space] / 1048576} MB",
30
+ :available_space => "#{json[:avail_space] / 1048576} MB",
31
+ :document_credits => json[:doc_credits],
32
+ :available_credits => json[:avail_credits]
33
33
  }
34
34
  end
35
35
 
@@ -43,7 +43,7 @@ module GroupDocs
43
43
  request[:path] = "/storage/{{client_id}}/folders/#{path}"
44
44
  request[:request_body] = Object::File.new(filepath, 'rb')
45
45
  end
46
- api.add_params(description: options[:description]) if options[:description]
46
+ api.add_params(:description => options[:description]) if options[:description]
47
47
  json = api.execute!
48
48
 
49
49
  Storage::File.new(json)
@@ -64,7 +64,7 @@ module GroupDocs
64
64
  request[:method] = :POST
65
65
  request[:path] = '/storage/{{client_id}}/urls'
66
66
  end
67
- api.add_params(url: url)
67
+ api.add_params(:url => url)
68
68
  json = api.execute!
69
69
 
70
70
  Storage::File.new(json)
@@ -223,7 +223,7 @@ module GroupDocs
223
223
  # @return [GroupDocs::Storage::File] Renamed file
224
224
  #
225
225
  def rename!(name, access = {})
226
- move!(path, { name: name }, access)
226
+ move!(path, { :name => name }, access)
227
227
  end
228
228
 
229
229
  #
@@ -307,7 +307,7 @@ module GroupDocs
307
307
  # @return [GroupDocs::Document]
308
308
  #
309
309
  def to_document
310
- Document.new(file: self)
310
+ Document.new(:file => self)
311
311
  end
312
312
 
313
313
  end # File
@@ -42,7 +42,7 @@ module GroupDocs
42
42
  #
43
43
  def self.list!(path = '', options = {}, access = {})
44
44
  path = prepare_path(path)
45
- new(path: path).list!(options, access)
45
+ new(:path => path).list!(options, access)
46
46
  end
47
47
 
48
48
  # @attr [Integer] id
@@ -115,7 +115,7 @@ module GroupDocs
115
115
  #
116
116
  def list!(options = {}, access = {})
117
117
  if options[:order_by]
118
- options[:order_by] = accessor_to_variable(options[:order_by].capitalize).to_s.delete(?@)
118
+ options[:order_by] = options[:order_by].camelize
119
119
  end
120
120
 
121
121
  full_path = prepare_path("#{path}/#{name}")
@@ -129,11 +129,11 @@ module GroupDocs
129
129
  json = api.execute!
130
130
 
131
131
  folders = json[:folders].map do |folder|
132
- folder.merge!(path: full_path)
132
+ folder.merge!(:path => full_path)
133
133
  Storage::Folder.new(folder)
134
134
  end
135
135
  files = json[:files].map do |file|
136
- file.merge!(path: full_path)
136
+ file.merge!(:path => full_path)
137
137
  Storage::File.new(file)
138
138
  end
139
139
 
@@ -4,21 +4,21 @@ module GroupDocs
4
4
  require 'groupdocs/subscription/limit'
5
5
 
6
6
  LIMITS = {
7
- annotations_limit: 'AnnotationsLimit',
8
- apicalls: 'APICalls',
9
- apiemails: 'APIEmails',
10
- assembly_limit: 'AssemblyLimit',
11
- branded: 'Branded',
12
- comparison_limit: 'ComparisonLimit',
13
- conversion_limit: 'ConversionLimit',
14
- documents_limit: 'DocumentsLimit',
15
- document_history_limit: 'DocumentHistoryLimit',
16
- document_size_limit: 'DocumentSizeLimit',
17
- document_tokens_limit: 'DocumentTokensLimit',
18
- sharing_limit: 'SharingLimit',
19
- signature_limit: 'SignatureLimit',
20
- storage_space_limit: 'StorageSpaceLimit',
21
- users_limit: 'UsersLimit',
7
+ :annotations_limit => 'AnnotationsLimit',
8
+ :apicalls => 'APICalls',
9
+ :apiemails => 'APIEmails',
10
+ :assembly_limit => 'AssemblyLimit',
11
+ :branded => 'Branded',
12
+ :comparison_limit => 'ComparisonLimit',
13
+ :conversion_limit => 'ConversionLimit',
14
+ :documents_limit => 'DocumentsLimit',
15
+ :document_history_limit => 'DocumentHistoryLimit',
16
+ :document_size_limit => 'DocumentSizeLimit',
17
+ :document_tokens_limit => 'DocumentTokensLimit',
18
+ :sharing_limit => 'SharingLimit',
19
+ :signature_limit => 'SignatureLimit',
20
+ :storage_space_limit => 'StorageSpaceLimit',
21
+ :users_limit => 'UsersLimit',
22
22
  }
23
23
 
24
24
  #