levelup 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +32 -305
  3. data/Gemfile.lock +1 -1
  4. data/README.md +131 -38
  5. data/levelup.gemspec +1 -1
  6. data/lib/levelup.rb +4 -0
  7. data/lib/levelup/api.rb +1 -2
  8. data/lib/levelup/configuration.rb +1 -1
  9. data/lib/levelup/endpoints/access_tokens.rb +7 -10
  10. data/lib/levelup/endpoints/app_locations.rb +4 -6
  11. data/lib/levelup/endpoints/app_users.rb +1 -7
  12. data/lib/levelup/endpoints/credit_cards.rb +3 -4
  13. data/lib/levelup/endpoints/location_credit.rb +6 -8
  14. data/lib/levelup/endpoints/location_merchant_funded_credit.rb +23 -0
  15. data/lib/levelup/endpoints/location_orders.rb +8 -14
  16. data/lib/levelup/endpoints/merchant_funded_credits.rb +4 -6
  17. data/lib/levelup/endpoints/merchant_locations.rb +8 -13
  18. data/lib/levelup/endpoints/merchant_orders.rb +6 -8
  19. data/lib/levelup/endpoints/orders.rb +3 -3
  20. data/lib/levelup/endpoints/permissions_requests.rb +1 -2
  21. data/lib/levelup/endpoints/qr_codes.rb +3 -4
  22. data/lib/levelup/endpoints/specific_app.rb +1 -2
  23. data/lib/levelup/endpoints/specific_location.rb +13 -8
  24. data/lib/levelup/endpoints/specific_merchant.rb +4 -5
  25. data/lib/levelup/endpoints/specific_order.rb +4 -8
  26. data/lib/levelup/endpoints/specific_permissions_request.rb +3 -5
  27. data/lib/levelup/endpoints/user_addresses.rb +6 -7
  28. data/lib/levelup/endpoints/user_orders.rb +2 -3
  29. data/lib/levelup/endpoints/users.rb +5 -0
  30. data/lib/levelup/requests/authenticate_merchant.rb +1 -2
  31. data/lib/levelup/requests/create_address.rb +3 -4
  32. data/lib/levelup/requests/create_card.rb +2 -3
  33. data/lib/levelup/requests/create_order.rb +1 -2
  34. data/lib/levelup/requests/create_user.rb +4 -13
  35. data/lib/levelup/requests/get_location_credit.rb +1 -2
  36. data/lib/levelup/requests/get_location_merchant_funded_credit.rb +16 -0
  37. data/lib/levelup/requests/get_order.rb +1 -2
  38. data/lib/levelup/requests/give_merchant_credit.rb +1 -2
  39. data/lib/levelup/requests/list_addresses.rb +3 -4
  40. data/lib/levelup/requests/list_app_locations.rb +1 -2
  41. data/lib/levelup/requests/list_locations.rb +2 -3
  42. data/lib/levelup/requests/list_orders.rb +2 -3
  43. data/lib/levelup/requests/list_user_orders.rb +3 -4
  44. data/lib/levelup/requests/show_permissions_request.rb +1 -2
  45. data/lib/levelup/responses/success_paginated.rb +1 -2
  46. data/lib/levelup/templates/app_authenticated.rb +1 -3
  47. data/lib/levelup/templates/merchant_and_user_authenticated.rb +4 -9
  48. data/lib/levelup/templates/merchant_authenticated.rb +2 -5
  49. data/lib/levelup/utils/payment_calculator.rb +83 -0
  50. data/spec/endpoints/access_tokens_spec.rb +2 -4
  51. data/spec/endpoints/app_users_spec.rb +6 -22
  52. data/spec/endpoints/location_credit_spec.rb +1 -2
  53. data/spec/endpoints/location_merchant_funded_credit_spec.rb +12 -0
  54. data/spec/endpoints/location_orders_spec.rb +3 -4
  55. data/spec/endpoints/merchant_funded_credits_spec.rb +1 -2
  56. data/spec/endpoints/merchant_locations_spec.rb +4 -4
  57. data/spec/endpoints/qr_codes_spec.rb +1 -2
  58. data/spec/endpoints/specific_order_spec.rb +3 -4
  59. data/spec/endpoints/specific_permissions_request_spec.rb +1 -2
  60. data/spec/endpoints/user_addresses_spec.rb +1 -2
  61. data/spec/endpoints/user_orders_spec.rb +1 -2
  62. data/spec/endpoints/users_spec.rb +22 -0
  63. data/spec/{data_objects/requests → requests}/authenticate_app_spec.rb +0 -0
  64. data/spec/{data_objects/requests → requests}/authenticate_merchant_spec.rb +0 -0
  65. data/spec/{data_objects/requests → requests}/create_order_spec.rb +0 -0
  66. data/spec/{data_objects/requests → requests}/get_order_spec.rb +0 -0
  67. data/spec/{data_objects/requests → requests}/list_locations_spec.rb +0 -0
  68. data/spec/{data_objects/requests → requests}/list_orders_spec.rb +0 -0
  69. data/spec/{data_objects/requests → requests}/refund_order_spec.rb +0 -0
  70. data/spec/{data_objects/requests → requests}/request_permissions_spec.rb +1 -2
  71. data/spec/{data_objects/responses → responses}/error_spec.rb +0 -0
  72. data/spec/{data_objects/responses → responses}/response_spec.rb +0 -0
  73. data/spec/{data_objects/responses → responses}/success_paginated_spec.rb +1 -2
  74. data/spec/utils/payment_calculator/payment_calculator_spec.rb +164 -0
  75. metadata +36 -26
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: levelup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - LevelUp POS Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-25 00:00:00.000000000 Z
11
+ date: 2015-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,6 +164,7 @@ files:
164
164
  - lib/levelup/endpoints/base.rb
165
165
  - lib/levelup/endpoints/credit_cards.rb
166
166
  - lib/levelup/endpoints/location_credit.rb
167
+ - lib/levelup/endpoints/location_merchant_funded_credit.rb
167
168
  - lib/levelup/endpoints/location_orders.rb
168
169
  - lib/levelup/endpoints/merchant_funded_credits.rb
169
170
  - lib/levelup/endpoints/merchant_locations.rb
@@ -189,6 +190,7 @@ files:
189
190
  - lib/levelup/requests/create_order.rb
190
191
  - lib/levelup/requests/create_user.rb
191
192
  - lib/levelup/requests/get_location_credit.rb
193
+ - lib/levelup/requests/get_location_merchant_funded_credit.rb
192
194
  - lib/levelup/requests/get_order.rb
193
195
  - lib/levelup/requests/get_qr_code.rb
194
196
  - lib/levelup/requests/get_user.rb
@@ -210,21 +212,12 @@ files:
210
212
  - lib/levelup/templates/merchant_authenticated.rb
211
213
  - lib/levelup/templates/user_address_data.rb
212
214
  - lib/levelup/templates/user_authenticated.rb
213
- - spec/data_objects/requests/authenticate_app_spec.rb
214
- - spec/data_objects/requests/authenticate_merchant_spec.rb
215
- - spec/data_objects/requests/create_order_spec.rb
216
- - spec/data_objects/requests/get_order_spec.rb
217
- - spec/data_objects/requests/list_locations_spec.rb
218
- - spec/data_objects/requests/list_orders_spec.rb
219
- - spec/data_objects/requests/refund_order_spec.rb
220
- - spec/data_objects/requests/request_permissions_spec.rb
221
- - spec/data_objects/responses/error_spec.rb
222
- - spec/data_objects/responses/response_spec.rb
223
- - spec/data_objects/responses/success_paginated_spec.rb
215
+ - lib/levelup/utils/payment_calculator.rb
224
216
  - spec/endpoints/access_tokens_spec.rb
225
217
  - spec/endpoints/app_locations_spec.rb
226
218
  - spec/endpoints/app_users_spec.rb
227
219
  - spec/endpoints/location_credit_spec.rb
220
+ - spec/endpoints/location_merchant_funded_credit_spec.rb
228
221
  - spec/endpoints/location_orders_spec.rb
229
222
  - spec/endpoints/merchant_funded_credits_spec.rb
230
223
  - spec/endpoints/merchant_locations_spec.rb
@@ -235,9 +228,22 @@ files:
235
228
  - spec/endpoints/specific_permissions_request_spec.rb
236
229
  - spec/endpoints/user_addresses_spec.rb
237
230
  - spec/endpoints/user_orders_spec.rb
231
+ - spec/endpoints/users_spec.rb
238
232
  - spec/fixtures/keys.yml.example
233
+ - spec/requests/authenticate_app_spec.rb
234
+ - spec/requests/authenticate_merchant_spec.rb
235
+ - spec/requests/create_order_spec.rb
236
+ - spec/requests/get_order_spec.rb
237
+ - spec/requests/list_locations_spec.rb
238
+ - spec/requests/list_orders_spec.rb
239
+ - spec/requests/refund_order_spec.rb
240
+ - spec/requests/request_permissions_spec.rb
241
+ - spec/responses/error_spec.rb
242
+ - spec/responses/response_spec.rb
243
+ - spec/responses/success_paginated_spec.rb
239
244
  - spec/spec_helper.rb
240
245
  - spec/support/vcr_filter_sensitive_data.rb
246
+ - spec/utils/payment_calculator/payment_calculator_spec.rb
241
247
  homepage: http://developer.thelevelup.com
242
248
  licenses:
243
249
  - MIT
@@ -250,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
256
  requirements:
251
257
  - - ">="
252
258
  - !ruby/object:Gem::Version
253
- version: 1.9.3
259
+ version: 2.0.0
254
260
  required_rubygems_version: !ruby/object:Gem::Requirement
255
261
  requirements:
256
262
  - - ">="
@@ -258,26 +264,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
258
264
  version: '0'
259
265
  requirements: []
260
266
  rubyforge_project:
261
- rubygems_version: 2.3.0
267
+ rubygems_version: 2.2.2
262
268
  signing_key:
263
269
  specification_version: 4
264
270
  summary: A Ruby client for communicating with the LevelUp API
265
271
  test_files:
266
- - spec/data_objects/requests/authenticate_app_spec.rb
267
- - spec/data_objects/requests/authenticate_merchant_spec.rb
268
- - spec/data_objects/requests/create_order_spec.rb
269
- - spec/data_objects/requests/get_order_spec.rb
270
- - spec/data_objects/requests/list_locations_spec.rb
271
- - spec/data_objects/requests/list_orders_spec.rb
272
- - spec/data_objects/requests/refund_order_spec.rb
273
- - spec/data_objects/requests/request_permissions_spec.rb
274
- - spec/data_objects/responses/error_spec.rb
275
- - spec/data_objects/responses/response_spec.rb
276
- - spec/data_objects/responses/success_paginated_spec.rb
277
272
  - spec/endpoints/access_tokens_spec.rb
278
273
  - spec/endpoints/app_locations_spec.rb
279
274
  - spec/endpoints/app_users_spec.rb
280
275
  - spec/endpoints/location_credit_spec.rb
276
+ - spec/endpoints/location_merchant_funded_credit_spec.rb
281
277
  - spec/endpoints/location_orders_spec.rb
282
278
  - spec/endpoints/merchant_funded_credits_spec.rb
283
279
  - spec/endpoints/merchant_locations_spec.rb
@@ -288,6 +284,20 @@ test_files:
288
284
  - spec/endpoints/specific_permissions_request_spec.rb
289
285
  - spec/endpoints/user_addresses_spec.rb
290
286
  - spec/endpoints/user_orders_spec.rb
287
+ - spec/endpoints/users_spec.rb
291
288
  - spec/fixtures/keys.yml.example
289
+ - spec/requests/authenticate_app_spec.rb
290
+ - spec/requests/authenticate_merchant_spec.rb
291
+ - spec/requests/create_order_spec.rb
292
+ - spec/requests/get_order_spec.rb
293
+ - spec/requests/list_locations_spec.rb
294
+ - spec/requests/list_orders_spec.rb
295
+ - spec/requests/refund_order_spec.rb
296
+ - spec/requests/request_permissions_spec.rb
297
+ - spec/responses/error_spec.rb
298
+ - spec/responses/response_spec.rb
299
+ - spec/responses/success_paginated_spec.rb
292
300
  - spec/spec_helper.rb
293
301
  - spec/support/vcr_filter_sensitive_data.rb
302
+ - spec/utils/payment_calculator/payment_calculator_spec.rb
303
+ has_rdoc: