moysklad 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/rspec.yml +29 -0
  3. data/.gitignore +1 -0
  4. data/README.md +14 -3
  5. data/lib/moysklad/client/errors.rb +60 -30
  6. data/lib/moysklad/client.rb +39 -11
  7. data/lib/moysklad/entities/assortment.rb +4 -0
  8. data/lib/moysklad/entities/attribute.rb +111 -37
  9. data/lib/moysklad/entities/attribute_metadata.rb +7 -31
  10. data/lib/moysklad/entities/attribute_value.rb +18 -0
  11. data/lib/moysklad/entities/base.rb +23 -8
  12. data/lib/moysklad/entities/bundle.rb +39 -0
  13. data/lib/moysklad/entities/characteristic.rb +4 -0
  14. data/lib/moysklad/entities/characteristic_metadata.rb +4 -0
  15. data/lib/moysklad/entities/collection.rb +27 -7
  16. data/lib/moysklad/entities/collection_meta.rb +11 -0
  17. data/lib/moysklad/entities/company_settings_metadata.rb +26 -0
  18. data/lib/moysklad/entities/consignment.rb +16 -17
  19. data/lib/moysklad/entities/context.rb +7 -0
  20. data/lib/moysklad/entities/counterparty.rb +20 -0
  21. data/lib/moysklad/entities/country.rb +2 -8
  22. data/lib/moysklad/entities/currency.rb +27 -0
  23. data/lib/moysklad/entities/custom_entity.rb +17 -10
  24. data/lib/moysklad/entities/customer_order.rb +109 -23
  25. data/lib/moysklad/entities/customer_order_position.rb +6 -18
  26. data/lib/moysklad/entities/employee.rb +5 -0
  27. data/lib/moysklad/entities/entity.rb +39 -0
  28. data/lib/moysklad/entities/group.rb +10 -0
  29. data/lib/moysklad/entities/image.rb +16 -0
  30. data/lib/moysklad/entities/meta.rb +12 -0
  31. data/lib/moysklad/entities/organization.rb +17 -0
  32. data/lib/moysklad/entities/owner.rb +4 -0
  33. data/lib/moysklad/entities/price.rb +4 -8
  34. data/lib/moysklad/entities/price_type.rb +0 -8
  35. data/lib/moysklad/entities/product.rb +47 -0
  36. data/lib/moysklad/entities/productfolder.rb +11 -0
  37. data/lib/moysklad/entities/rate.rb +6 -0
  38. data/lib/moysklad/entities/resource_metadata.rb +8 -0
  39. data/lib/moysklad/entities/service.rb +23 -0
  40. data/lib/moysklad/entities/shortcut.rb +9 -0
  41. data/lib/moysklad/entities/store.rb +9 -0
  42. data/lib/moysklad/entities/time.rb +13 -0
  43. data/lib/moysklad/entities/uom.rb +5 -0
  44. data/lib/moysklad/entities/variant.rb +47 -0
  45. data/lib/moysklad/entities.rb +42 -39
  46. data/lib/moysklad/error.rb +1 -0
  47. data/lib/moysklad/resources/assortments.rb +13 -0
  48. data/lib/moysklad/resources/base.rb +35 -46
  49. data/lib/moysklad/resources/custom_entities.rb +29 -0
  50. data/lib/moysklad/resources/custom_entity_metadata.rb +12 -8
  51. data/lib/moysklad/resources/embedded_entity_metadata.rb +2 -3
  52. data/lib/moysklad/resources/indexed.rb +21 -37
  53. data/lib/moysklad/resources/indexed_cache.rb +36 -0
  54. data/lib/moysklad/resources/load_all.rb +21 -0
  55. data/lib/moysklad/resources/positions.rb +15 -0
  56. data/lib/moysklad/resources/products.rb +10 -0
  57. data/lib/moysklad/resources/stock.rb +1 -1
  58. data/lib/moysklad/resources/subresource.rb +0 -1
  59. data/lib/moysklad/resources/where_filter.rb +0 -1
  60. data/lib/moysklad/resources.rb +26 -11
  61. data/lib/moysklad/universe.rb +16 -2
  62. data/lib/moysklad/version.rb +1 -1
  63. data/lib/moysklad.rb +12 -7
  64. data/moysklad.gemspec +5 -3
  65. data/scripts/rest.sh +5 -2
  66. data/spec/lib/moysklad/entities/customer_order_position_spec.rb +4 -17
  67. data/spec/lib/moysklad/entities/customer_order_spec.rb +8 -33
  68. data/spec/lib/moysklad/resources/base_spec.rb +0 -54
  69. data/spec/lib/moysklad/resources_spec.rb +0 -2
  70. data/spec/lib/moysklad/universe_spec.rb +0 -23
  71. data/spec/lib/moysklad_spec.rb +0 -1
  72. data/spec/spec_helper.rb +2 -1
  73. data/spec/support/resource.rb +1 -66
  74. data/test.rb +177 -0
  75. metadata +89 -172
  76. data/.travis.yml +0 -4
  77. data/lib/moysklad/entities/barcode.rb +0 -13
  78. data/lib/moysklad/entities/common.rb +0 -15
  79. data/lib/moysklad/entities/common_object.rb +0 -29
  80. data/lib/moysklad/entities/company.rb +0 -20
  81. data/lib/moysklad/entities/company_concern.rb +0 -20
  82. data/lib/moysklad/entities/contact.rb +0 -15
  83. data/lib/moysklad/entities/custom_entity_metadata.rb +0 -36
  84. data/lib/moysklad/entities/embedded_entity_metadata.rb +0 -18
  85. data/lib/moysklad/entities/error.rb +0 -13
  86. data/lib/moysklad/entities/feature.rb +0 -20
  87. data/lib/moysklad/entities/good.rb +0 -34
  88. data/lib/moysklad/entities/good_folder.rb +0 -9
  89. data/lib/moysklad/entities/good_ref.rb +0 -12
  90. data/lib/moysklad/entities/my_company.rb +0 -12
  91. data/lib/moysklad/entities/sale_price.rb +0 -18
  92. data/lib/moysklad/entities/sale_prices.rb +0 -10
  93. data/lib/moysklad/entities/slot.rb +0 -10
  94. data/lib/moysklad/entities/stock_to.rb +0 -33
  95. data/lib/moysklad/entities/warehouse.rb +0 -15
  96. data/lib/moysklad/entities/xml_fix.rb +0 -15
  97. data/spec/fixtures/302.raw +0 -15
  98. data/spec/fixtures/400.raw +0 -8
  99. data/spec/fixtures/401.html +0 -1
  100. data/spec/fixtures/401_2.html +0 -1
  101. data/spec/fixtures/405.raw +0 -9
  102. data/spec/fixtures/500.raw +0 -8
  103. data/spec/fixtures/502.raw +0 -8
  104. data/spec/fixtures/Consignment_list_0.raw +0 -14
  105. data/spec/fixtures/Consignment_list_1000.raw +0 -14
  106. data/spec/fixtures/Country_list.raw +0 -14
  107. data/spec/fixtures/CustomEntityMetadata_list.raw +0 -14
  108. data/spec/fixtures/CustomEntity_list.raw +0 -14
  109. data/spec/fixtures/CustomEntity_list_bad_chars.raw +0 -17
  110. data/spec/fixtures/EmbeddedEntityMetadata_list.raw +0 -15
  111. data/spec/fixtures/Feature_list.raw +0 -14
  112. data/spec/fixtures/Feature_list_1000.raw +0 -14
  113. data/spec/fixtures/Good_e932ebe1-2e22-11e4-9406-002590a28eca.raw +0 -12
  114. data/spec/fixtures/Good_eb77ad57-2e22-11e4-4030-002590a28eca.raw +0 -12
  115. data/spec/fixtures/Goods_list.raw +0 -14
  116. data/spec/fixtures/Metadata_list.raw +0 -14
  117. data/spec/fixtures/PriceType_list.raw +0 -14
  118. data/spec/fixtures/Stock.raw +0 -11
  119. data/spec/fixtures/Stock_showConsignments.raw +0 -11
  120. data/spec/fixtures/Uom_list.raw +0 -14
  121. data/spec/fixtures/Warehouse_list.raw +0 -14
  122. data/spec/fixtures/attribute_boolean.xml +0 -6
  123. data/spec/fixtures/attribute_dictionary.xml +0 -5
  124. data/spec/fixtures/attribute_double.xml +0 -6
  125. data/spec/fixtures/attribute_file.xml +0 -12
  126. data/spec/fixtures/attribute_long.xml +0 -6
  127. data/spec/fixtures/attribute_text.xml +0 -5
  128. data/spec/fixtures/attribute_time.xml +0 -6
  129. data/spec/fixtures/attribute_url.xml +0 -6
  130. data/spec/fixtures/bad_chars.xml +0 -6
  131. data/spec/fixtures/customer_order.xml +0 -28
  132. data/spec/fixtures/good_with_attributes.raw +0 -12
  133. data/spec/fixtures/resource_forbidden.raw +0 -9
  134. data/spec/fixtures/wrong_password.raw +0 -9
  135. data/spec/fixtures/wrong_type.raw +0 -70
  136. data/spec/fixtures/wrong_user.raw +0 -9
  137. data/spec/lib/moysklad/client/errors_spec.rb +0 -102
  138. data/spec/lib/moysklad/entities/attribute_metadata_spec.rb +0 -30
  139. data/spec/lib/moysklad/entities/attribute_spec.rb +0 -36
  140. data/spec/lib/moysklad/entities/country_spec.rb +0 -25
  141. data/spec/lib/moysklad/entities/custom_entity_metadata_spec.rb +0 -34
  142. data/spec/lib/moysklad/entities/custom_entity_spec.rb +0 -34
  143. data/spec/lib/moysklad/entities/good_spec.rb +0 -46
  144. data/spec/lib/moysklad/resources/countries_spec.rb +0 -22
  145. data/spec/lib/moysklad/resources/custom_entity_metadata_spec.rb +0 -13
  146. data/spec/lib/moysklad/resources/embedded_entity_metadata_indexed_spec.rb +0 -20
  147. data/spec/lib/moysklad/resources/embedded_entity_metadata_spec.rb +0 -11
  148. data/spec/lib/moysklad/resources/good_folders_spec.rb +0 -17
  149. data/spec/lib/moysklad/resources/indexed_spec.rb +0 -61
  150. data/spec/lib/moysklad/resources/stock_spec.rb +0 -63
  151. data/spec/lib/moysklad/resources/warehouses_spec.rb +0 -20
metadata CHANGED
@@ -1,211 +1,225 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moysklad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danil Pismenny
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-12 00:00:00.000000000 Z
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: nokogiri-happymapper
28
+ name: virtus
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 3.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.6'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.6'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-collection_matchers
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: pry-nav
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: guard
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '>='
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: guard-rspec
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '>='
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: guard-ctags-bundler
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - '>='
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - '>='
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: yard
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '>='
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '>='
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: minitest
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '5.1'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '5.1'
209
223
  description: Правильный клиент для работы c REST XML API moyslad.ru, созданный по
210
224
  принципам SOLID
211
225
  email:
@@ -214,9 +228,9 @@ executables: []
214
228
  extensions: []
215
229
  extra_rdoc_files: []
216
230
  files:
217
- - .gitignore
218
- - .rspec
219
- - .travis.yml
231
+ - ".github/workflows/rspec.yml"
232
+ - ".gitignore"
233
+ - ".rspec"
220
234
  - CHANGELOG.md
221
235
  - Gemfile
222
236
  - Guardfile
@@ -227,46 +241,60 @@ files:
227
241
  - lib/moysklad/client.rb
228
242
  - lib/moysklad/client/errors.rb
229
243
  - lib/moysklad/entities.rb
244
+ - lib/moysklad/entities/assortment.rb
230
245
  - lib/moysklad/entities/attribute.rb
231
246
  - lib/moysklad/entities/attribute_metadata.rb
232
- - lib/moysklad/entities/barcode.rb
247
+ - lib/moysklad/entities/attribute_value.rb
233
248
  - lib/moysklad/entities/base.rb
249
+ - lib/moysklad/entities/bundle.rb
250
+ - lib/moysklad/entities/characteristic.rb
251
+ - lib/moysklad/entities/characteristic_metadata.rb
234
252
  - lib/moysklad/entities/collection.rb
235
- - lib/moysklad/entities/common.rb
236
- - lib/moysklad/entities/common_object.rb
237
- - lib/moysklad/entities/company.rb
238
- - lib/moysklad/entities/company_concern.rb
253
+ - lib/moysklad/entities/collection_meta.rb
254
+ - lib/moysklad/entities/company_settings_metadata.rb
239
255
  - lib/moysklad/entities/consignment.rb
240
- - lib/moysklad/entities/contact.rb
256
+ - lib/moysklad/entities/context.rb
241
257
  - lib/moysklad/entities/contract.rb
258
+ - lib/moysklad/entities/counterparty.rb
242
259
  - lib/moysklad/entities/country.rb
260
+ - lib/moysklad/entities/currency.rb
243
261
  - lib/moysklad/entities/custom_entity.rb
244
- - lib/moysklad/entities/custom_entity_metadata.rb
245
262
  - lib/moysklad/entities/customer_order.rb
246
263
  - lib/moysklad/entities/customer_order_position.rb
247
- - lib/moysklad/entities/embedded_entity_metadata.rb
248
- - lib/moysklad/entities/error.rb
249
- - lib/moysklad/entities/feature.rb
250
- - lib/moysklad/entities/good.rb
251
- - lib/moysklad/entities/good_folder.rb
252
- - lib/moysklad/entities/good_ref.rb
253
- - lib/moysklad/entities/my_company.rb
264
+ - lib/moysklad/entities/employee.rb
265
+ - lib/moysklad/entities/entity.rb
266
+ - lib/moysklad/entities/group.rb
267
+ - lib/moysklad/entities/image.rb
268
+ - lib/moysklad/entities/meta.rb
269
+ - lib/moysklad/entities/organization.rb
270
+ - lib/moysklad/entities/owner.rb
254
271
  - lib/moysklad/entities/page.rb
255
272
  - lib/moysklad/entities/price.rb
256
273
  - lib/moysklad/entities/price_type.rb
257
- - lib/moysklad/entities/sale_price.rb
258
- - lib/moysklad/entities/sale_prices.rb
259
- - lib/moysklad/entities/slot.rb
260
- - lib/moysklad/entities/stock_to.rb
261
- - lib/moysklad/entities/warehouse.rb
262
- - lib/moysklad/entities/xml_fix.rb
274
+ - lib/moysklad/entities/product.rb
275
+ - lib/moysklad/entities/productfolder.rb
276
+ - lib/moysklad/entities/rate.rb
277
+ - lib/moysklad/entities/resource_metadata.rb
278
+ - lib/moysklad/entities/service.rb
279
+ - lib/moysklad/entities/shortcut.rb
280
+ - lib/moysklad/entities/store.rb
281
+ - lib/moysklad/entities/time.rb
282
+ - lib/moysklad/entities/uom.rb
283
+ - lib/moysklad/entities/variant.rb
284
+ - lib/moysklad/error.rb
263
285
  - lib/moysklad/errors.rb
264
286
  - lib/moysklad/resources.rb
287
+ - lib/moysklad/resources/assortments.rb
265
288
  - lib/moysklad/resources/base.rb
289
+ - lib/moysklad/resources/custom_entities.rb
266
290
  - lib/moysklad/resources/custom_entity_metadata.rb
267
291
  - lib/moysklad/resources/embedded_entity_metadata.rb
268
292
  - lib/moysklad/resources/embedded_entity_metadata_indexed.rb
269
293
  - lib/moysklad/resources/indexed.rb
294
+ - lib/moysklad/resources/indexed_cache.rb
295
+ - lib/moysklad/resources/load_all.rb
296
+ - lib/moysklad/resources/positions.rb
297
+ - lib/moysklad/resources/products.rb
270
298
  - lib/moysklad/resources/stock.rb
271
299
  - lib/moysklad/resources/subresource.rb
272
300
  - lib/moysklad/resources/where_filter.rb
@@ -274,71 +302,17 @@ files:
274
302
  - lib/moysklad/version.rb
275
303
  - moysklad.gemspec
276
304
  - scripts/rest.sh
277
- - spec/fixtures/302.raw
278
- - spec/fixtures/400.raw
279
- - spec/fixtures/401.html
280
- - spec/fixtures/401_2.html
281
- - spec/fixtures/405.raw
282
- - spec/fixtures/500.raw
283
- - spec/fixtures/502.raw
284
- - spec/fixtures/Consignment_list_0.raw
285
- - spec/fixtures/Consignment_list_1000.raw
286
- - spec/fixtures/Country_list.raw
287
- - spec/fixtures/CustomEntityMetadata_list.raw
288
- - spec/fixtures/CustomEntity_list.raw
289
- - spec/fixtures/CustomEntity_list_bad_chars.raw
290
- - spec/fixtures/EmbeddedEntityMetadata_list.raw
291
- - spec/fixtures/Feature_list.raw
292
- - spec/fixtures/Feature_list_1000.raw
293
- - spec/fixtures/Good_e932ebe1-2e22-11e4-9406-002590a28eca.raw
294
- - spec/fixtures/Good_eb77ad57-2e22-11e4-4030-002590a28eca.raw
295
- - spec/fixtures/Goods_list.raw
296
- - spec/fixtures/Metadata_list.raw
297
- - spec/fixtures/PriceType_list.raw
298
- - spec/fixtures/Stock.raw
299
- - spec/fixtures/Stock_showConsignments.raw
300
- - spec/fixtures/Uom_list.raw
301
- - spec/fixtures/Warehouse_list.raw
302
- - spec/fixtures/attribute_boolean.xml
303
- - spec/fixtures/attribute_dictionary.xml
304
- - spec/fixtures/attribute_double.xml
305
- - spec/fixtures/attribute_file.xml
306
- - spec/fixtures/attribute_long.xml
307
- - spec/fixtures/attribute_text.xml
308
- - spec/fixtures/attribute_time.xml
309
- - spec/fixtures/attribute_url.xml
310
- - spec/fixtures/bad_chars.xml
311
- - spec/fixtures/customer_order.xml
312
- - spec/fixtures/good_with_attributes.raw
313
- - spec/fixtures/resource_forbidden.raw
314
- - spec/fixtures/wrong_password.raw
315
- - spec/fixtures/wrong_type.raw
316
- - spec/fixtures/wrong_user.raw
317
- - spec/lib/moysklad/client/errors_spec.rb
318
- - spec/lib/moysklad/entities/attribute_metadata_spec.rb
319
- - spec/lib/moysklad/entities/attribute_spec.rb
320
- - spec/lib/moysklad/entities/country_spec.rb
321
- - spec/lib/moysklad/entities/custom_entity_metadata_spec.rb
322
- - spec/lib/moysklad/entities/custom_entity_spec.rb
323
305
  - spec/lib/moysklad/entities/customer_order_position_spec.rb
324
306
  - spec/lib/moysklad/entities/customer_order_spec.rb
325
- - spec/lib/moysklad/entities/good_spec.rb
326
307
  - spec/lib/moysklad/resources/base_spec.rb
327
- - spec/lib/moysklad/resources/countries_spec.rb
328
- - spec/lib/moysklad/resources/custom_entity_metadata_spec.rb
329
- - spec/lib/moysklad/resources/embedded_entity_metadata_indexed_spec.rb
330
- - spec/lib/moysklad/resources/embedded_entity_metadata_spec.rb
331
- - spec/lib/moysklad/resources/good_folders_spec.rb
332
- - spec/lib/moysklad/resources/indexed_spec.rb
333
- - spec/lib/moysklad/resources/stock_spec.rb
334
308
  - spec/lib/moysklad/resources/subresource_spec.rb
335
- - spec/lib/moysklad/resources/warehouses_spec.rb
336
309
  - spec/lib/moysklad/resources_spec.rb
337
310
  - spec/lib/moysklad/universe_spec.rb
338
311
  - spec/lib/moysklad_spec.rb
339
312
  - spec/spec_helper.rb
340
313
  - spec/support/resource.rb
341
- homepage: https://github.com/brandymint/moysklad
314
+ - test.rb
315
+ homepage: https://github.com/dapi/moysklad
342
316
  licenses:
343
317
  - MIT
344
318
  metadata: {}
@@ -348,83 +322,26 @@ require_paths:
348
322
  - lib
349
323
  required_ruby_version: !ruby/object:Gem::Requirement
350
324
  requirements:
351
- - - '>='
325
+ - - ">="
352
326
  - !ruby/object:Gem::Version
353
327
  version: 2.0.0
354
328
  required_rubygems_version: !ruby/object:Gem::Requirement
355
329
  requirements:
356
- - - '>='
330
+ - - ">="
357
331
  - !ruby/object:Gem::Version
358
332
  version: '0'
359
333
  requirements: []
360
- rubyforge_project:
361
- rubygems_version: 2.1.10
334
+ rubygems_version: 3.4.7
362
335
  signing_key:
363
336
  specification_version: 4
364
337
  summary: Клиент для работы с API moysklad.ru
365
338
  test_files:
366
- - spec/fixtures/302.raw
367
- - spec/fixtures/400.raw
368
- - spec/fixtures/401.html
369
- - spec/fixtures/401_2.html
370
- - spec/fixtures/405.raw
371
- - spec/fixtures/500.raw
372
- - spec/fixtures/502.raw
373
- - spec/fixtures/Consignment_list_0.raw
374
- - spec/fixtures/Consignment_list_1000.raw
375
- - spec/fixtures/Country_list.raw
376
- - spec/fixtures/CustomEntityMetadata_list.raw
377
- - spec/fixtures/CustomEntity_list.raw
378
- - spec/fixtures/CustomEntity_list_bad_chars.raw
379
- - spec/fixtures/EmbeddedEntityMetadata_list.raw
380
- - spec/fixtures/Feature_list.raw
381
- - spec/fixtures/Feature_list_1000.raw
382
- - spec/fixtures/Good_e932ebe1-2e22-11e4-9406-002590a28eca.raw
383
- - spec/fixtures/Good_eb77ad57-2e22-11e4-4030-002590a28eca.raw
384
- - spec/fixtures/Goods_list.raw
385
- - spec/fixtures/Metadata_list.raw
386
- - spec/fixtures/PriceType_list.raw
387
- - spec/fixtures/Stock.raw
388
- - spec/fixtures/Stock_showConsignments.raw
389
- - spec/fixtures/Uom_list.raw
390
- - spec/fixtures/Warehouse_list.raw
391
- - spec/fixtures/attribute_boolean.xml
392
- - spec/fixtures/attribute_dictionary.xml
393
- - spec/fixtures/attribute_double.xml
394
- - spec/fixtures/attribute_file.xml
395
- - spec/fixtures/attribute_long.xml
396
- - spec/fixtures/attribute_text.xml
397
- - spec/fixtures/attribute_time.xml
398
- - spec/fixtures/attribute_url.xml
399
- - spec/fixtures/bad_chars.xml
400
- - spec/fixtures/customer_order.xml
401
- - spec/fixtures/good_with_attributes.raw
402
- - spec/fixtures/resource_forbidden.raw
403
- - spec/fixtures/wrong_password.raw
404
- - spec/fixtures/wrong_type.raw
405
- - spec/fixtures/wrong_user.raw
406
- - spec/lib/moysklad/client/errors_spec.rb
407
- - spec/lib/moysklad/entities/attribute_metadata_spec.rb
408
- - spec/lib/moysklad/entities/attribute_spec.rb
409
- - spec/lib/moysklad/entities/country_spec.rb
410
- - spec/lib/moysklad/entities/custom_entity_metadata_spec.rb
411
- - spec/lib/moysklad/entities/custom_entity_spec.rb
412
339
  - spec/lib/moysklad/entities/customer_order_position_spec.rb
413
340
  - spec/lib/moysklad/entities/customer_order_spec.rb
414
- - spec/lib/moysklad/entities/good_spec.rb
415
341
  - spec/lib/moysklad/resources/base_spec.rb
416
- - spec/lib/moysklad/resources/countries_spec.rb
417
- - spec/lib/moysklad/resources/custom_entity_metadata_spec.rb
418
- - spec/lib/moysklad/resources/embedded_entity_metadata_indexed_spec.rb
419
- - spec/lib/moysklad/resources/embedded_entity_metadata_spec.rb
420
- - spec/lib/moysklad/resources/good_folders_spec.rb
421
- - spec/lib/moysklad/resources/indexed_spec.rb
422
- - spec/lib/moysklad/resources/stock_spec.rb
423
342
  - spec/lib/moysklad/resources/subresource_spec.rb
424
- - spec/lib/moysklad/resources/warehouses_spec.rb
425
343
  - spec/lib/moysklad/resources_spec.rb
426
344
  - spec/lib/moysklad/universe_spec.rb
427
345
  - spec/lib/moysklad_spec.rb
428
346
  - spec/spec_helper.rb
429
347
  - spec/support/resource.rb
430
- has_rdoc:
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0
4
- - 2.1.0
@@ -1,13 +0,0 @@
1
- module Moysklad::Entities
2
- class Barcode < Base
3
- include Common
4
-
5
- tag 'barcode'
6
-
7
- attribute :barcode, String
8
- # EAN13
9
- attribute :barcodeType, String
10
-
11
- end
12
- end
13
-
@@ -1,15 +0,0 @@
1
- module Moysklad::Entities::Common
2
- extend ::ActiveSupport::Concern
3
-
4
- included do
5
- include HappyMapper
6
-
7
- attribute :readMode, String
8
- attribute :changeMode, String
9
-
10
- element :accountUuid, String
11
- element :accountId, String
12
- element :uuid, String
13
- end
14
-
15
- end
@@ -1,29 +0,0 @@
1
- module Moysklad::Entities::CommonObject
2
- extend ActiveSupport::Concern
3
-
4
- # Используется в Good
5
- # https://online.moysklad.ru/exchange/rest/ms/xml/Good/list
6
- #
7
- # В Metadata
8
- # https://online.moysklad.ru/exchange/rest/ms/xml/Metadata/list
9
- #
10
- # Во Feature
11
- # https://online.moysklad.ru/exchange/rest/ms/xml/Feature/list
12
- #
13
- # CustomerOrder
14
- # https://online.moysklad.ru/exchange/rest/ms/xml/CustomerOrder/list
15
- #
16
- included do
17
- include Moysklad::Entities::Common
18
-
19
- attribute :updated, Time
20
- attribute :updatedBy, String
21
-
22
- attribute :name, String
23
-
24
- element :externalcode, String
25
- element :description, String
26
- end
27
-
28
- end
29
-
@@ -1,20 +0,0 @@
1
- module Moysklad::Entities
2
- class Company < Base
3
- include CompanyConcern
4
-
5
- tag 'company'
6
-
7
- attribute :payerVat, Boolean
8
-
9
- attribute :priceTypeUuid, String
10
-
11
- attribute :discount, Float
12
- attribute :autoDiscount, Float
13
- attribute :discountCardNumber, String
14
- attribute :discountCorrection, Float
15
-
16
- element :code, String
17
- end
18
- end
19
-
20
-
@@ -1,20 +0,0 @@
1
- module Moysklad::Entities::CompanyConcern
2
- extend ActiveSupport::Concern
3
- included do
4
- include HappyMapper
5
- include Moysklad::Entities::CommonObject
6
-
7
- attribute :created, Time
8
- attribute :archived, HappyMapper::Boolean
9
-
10
- attribute :companyType, String
11
-
12
- attribute :discount, Float
13
- attribute :autoDiscount, Float
14
- attribute :discountCardNumber, String
15
- attribute :discountCorrection, Float
16
-
17
- element :code, String
18
-
19
- end
20
- end
@@ -1,15 +0,0 @@
1
- module Moysklad::Entities
2
- # https://online.moysklad.ru/exchange/rest/ms/xml/Warehouse/list
3
- class Contact < Base
4
- include HappyMapper
5
- include Moysklad::Entities::XmlFix
6
-
7
- tag 'warehouse'
8
-
9
- attribute :address, String
10
- attribute :faxes, String
11
- attribute :mobiles, String
12
- attribute :email, String
13
-
14
- end
15
- end
@@ -1,36 +0,0 @@
1
- # https://online.moysklad.ru/exchange/rest/ms/xml/CustomEntityMetadata/list
2
- #
3
- # Пользовательский справочник
4
- #
5
- module Moysklad::Entities
6
- class CustomEntityMetadata < Base
7
- include CommonObject
8
- include XmlFix
9
-
10
- tag 'customEntityMetadata'
11
-
12
- attribute :uniqueCode, Boolean
13
- attribute :codeValueType, Integer
14
- attribute :independentNameGenerator, Boolean
15
-
16
- attribute :partialReserve, Boolean
17
-
18
- attribute :editOnlyByAuthor, Boolean
19
-
20
- attribute :noEditFromOtherPlaceSource, Boolean
21
-
22
- attribute :noApplicableFromOtherPlaceSource, Boolean
23
-
24
- attribute :noEditFromOtherPlaceTarget, Boolean
25
-
26
- attribute :noApplicableFromOtherPlaceTarget, Boolean
27
-
28
- # Список перечисляемых значений данного справочника
29
- #
30
- # @return [Array[CustomEntity]]
31
- def entities universe
32
- universe.custom_entities.where entityMetadataUuid: uuid
33
- end
34
-
35
- end
36
- end