rev-api 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +22 -22
  3. data/.ruby-gemset +1 -1
  4. data/.ruby-version +1 -1
  5. data/.travis.yml +8 -8
  6. data/Gemfile +3 -3
  7. data/LICENSE +191 -191
  8. data/README.md +131 -131
  9. data/Rakefile +13 -13
  10. data/examples/cli.rb +270 -270
  11. data/lib/rev-api.rb +26 -26
  12. data/lib/rev-api/api.rb +326 -326
  13. data/lib/rev-api/api_serializable.rb +30 -30
  14. data/lib/rev-api/exceptions.rb +97 -97
  15. data/lib/rev-api/http_client.rb +97 -97
  16. data/lib/rev-api/models/order.rb +129 -129
  17. data/lib/rev-api/models/order_request.rb +292 -273
  18. data/lib/rev-api/version.rb +3 -3
  19. data/rev-api.gemspec +33 -33
  20. data/spec/fixtures/api_cassettes/cancel_order.yml +38 -38
  21. data/spec/fixtures/api_cassettes/cancel_order_not_allowed.yml +40 -40
  22. data/spec/fixtures/api_cassettes/get_attachment_content.yml +399 -399
  23. data/spec/fixtures/api_cassettes/get_attachment_content_as_pdf.yml +399 -399
  24. data/spec/fixtures/api_cassettes/get_attachment_content_as_text.yml +65 -65
  25. data/spec/fixtures/api_cassettes/get_attachment_content_as_youtube_transcript.yml +66 -66
  26. data/spec/fixtures/api_cassettes/get_attachment_content_unacceptable_representation.yml +42 -42
  27. data/spec/fixtures/api_cassettes/get_attachment_content_with_invalid_id.yml +42 -42
  28. data/spec/fixtures/api_cassettes/get_attachment_metadata.yml +42 -42
  29. data/spec/fixtures/api_cassettes/get_attachment_with_invalid_id.yml +40 -40
  30. data/spec/fixtures/api_cassettes/get_orders.yml +122 -122
  31. data/spec/fixtures/api_cassettes/get_orders_with_clientRef.yml +41 -41
  32. data/spec/fixtures/api_cassettes/get_tc_order.yml +44 -44
  33. data/spec/fixtures/api_cassettes/get_third_page_of_orders.yml +52 -52
  34. data/spec/fixtures/api_cassettes/link_input.yml +44 -44
  35. data/spec/fixtures/api_cassettes/link_input_with_all_attributes.yml +44 -44
  36. data/spec/fixtures/api_cassettes/link_input_with_spaces_in_filename.yml +45 -45
  37. data/spec/fixtures/api_cassettes/not_found_order.yml +42 -42
  38. data/spec/fixtures/api_cassettes/submit_cp_order.yml +44 -44
  39. data/spec/fixtures/api_cassettes/submit_su_order.yml +44 -44
  40. data/spec/fixtures/api_cassettes/submit_tc_order_with_account_balance.yml +44 -44
  41. data/spec/fixtures/api_cassettes/submit_tc_order_with_invalid_request.yml +45 -45
  42. data/spec/fixtures/api_cassettes/submit_tc_order_without_specifying_payment.yml +44 -44
  43. data/spec/fixtures/api_cassettes/unauthorized.yml +42 -42
  44. data/spec/fixtures/api_cassettes/upload_input.yml +90 -90
  45. data/spec/fixtures/api_cassettes/upload_input_with_invalid_content_type.yml +91 -91
  46. data/spec/lib/rev/api_spec.rb +30 -30
  47. data/spec/lib/rev/cancel_order_spec.rb +24 -24
  48. data/spec/lib/rev/exceptions_spec.rb +8 -8
  49. data/spec/lib/rev/get_attachment_content_spec.rb +79 -79
  50. data/spec/lib/rev/get_attachment_metadata_spec.rb +33 -33
  51. data/spec/lib/rev/get_order_spec.rb +52 -52
  52. data/spec/lib/rev/get_orders_spec.rb +62 -62
  53. data/spec/lib/rev/http_client_spec.rb +32 -32
  54. data/spec/lib/rev/models/order_request_spec.rb +41 -6
  55. data/spec/lib/rev/models/order_spec.rb +58 -58
  56. data/spec/lib/rev/post_inputs_spec.rb +94 -94
  57. data/spec/lib/rev/post_order_spec.rb +163 -163
  58. data/spec/spec_helper.rb +47 -47
  59. data/spec/test_helpers.rb +5 -5
  60. metadata +19 -19
@@ -1,47 +1,47 @@
1
- require_relative '../lib/rev-api'
2
- require_relative 'test_helpers.rb'
3
-
4
- #dependencies
5
- require 'minitest/autorun'
6
- require 'webmock/minitest'
7
- require 'vcr'
8
- require 'turn'
9
-
10
- module MiniTest
11
- class Spec
12
- class << self
13
- def xit(desc='anonymous')
14
- it(name) { skip 'DISABLED' }
15
- end
16
- end
17
- end
18
- end
19
-
20
- Turn.config do |c|
21
- c.format = :outline
22
- c.trace = false
23
- c.natural = true
24
- end
25
-
26
-
27
- VCR.configure do |c|
28
- c.cassette_library_dir = 'spec/fixtures/api_cassettes'
29
- c.default_cassette_options = { :record => :once, :allow_unused_http_interactions => false,
30
- :match_requests_on => [:method, :uri, :rev_headers] }
31
- c.hook_into :webmock
32
- c.ignore_hosts 'www.example.com' # used to stub requests manually, see http_client_spec
33
-
34
- # http://ruby-doc.org/stdlib-2.0.0/libdoc/net/http/rdoc/Net/HTTP.html#label-Compression - we ignore 'Accept-Encoding'
35
- c.register_request_matcher :rev_headers do |actual_request, expected_request|
36
- actual_request.headers.delete 'Accept-Encoding'
37
-
38
- # ignore specific version of a client recorded
39
- actual_user_agent = actual_request.headers['User-Agent'].to_s.split('/').first
40
- expected_user_agent = actual_request.headers['User-Agent'].to_s.split('/').first
41
-
42
- actual_request.headers.delete 'User-Agent'
43
- expected_request.headers.delete 'User-Agent'
44
-
45
- actual_request.headers == expected_request.headers# && actual_user_agent == expected_user_agent
46
- end
47
- end
1
+ require_relative '../lib/rev-api'
2
+ require_relative 'test_helpers.rb'
3
+
4
+ #dependencies
5
+ require 'minitest/autorun'
6
+ require 'webmock/minitest'
7
+ require 'vcr'
8
+ require 'turn'
9
+
10
+ module MiniTest
11
+ class Spec
12
+ class << self
13
+ def xit(desc='anonymous')
14
+ it(name) { skip 'DISABLED' }
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+ Turn.config do |c|
21
+ c.format = :outline
22
+ c.trace = false
23
+ c.natural = true
24
+ end
25
+
26
+
27
+ VCR.configure do |c|
28
+ c.cassette_library_dir = 'spec/fixtures/api_cassettes'
29
+ c.default_cassette_options = { :record => :once, :allow_unused_http_interactions => false,
30
+ :match_requests_on => [:method, :uri, :rev_headers] }
31
+ c.hook_into :webmock
32
+ c.ignore_hosts 'www.example.com' # used to stub requests manually, see http_client_spec
33
+
34
+ # http://ruby-doc.org/stdlib-2.0.0/libdoc/net/http/rdoc/Net/HTTP.html#label-Compression - we ignore 'Accept-Encoding'
35
+ c.register_request_matcher :rev_headers do |actual_request, expected_request|
36
+ actual_request.headers.delete 'Accept-Encoding'
37
+
38
+ # ignore specific version of a client recorded
39
+ actual_user_agent = actual_request.headers['User-Agent'].to_s.split('/').first
40
+ expected_user_agent = actual_request.headers['User-Agent'].to_s.split('/').first
41
+
42
+ actual_request.headers.delete 'User-Agent'
43
+ expected_request.headers.delete 'User-Agent'
44
+
45
+ actual_request.headers == expected_request.headers# && actual_user_agent == expected_user_agent
46
+ end
47
+ end
@@ -1,5 +1,5 @@
1
- require_relative '../lib/rev-api'
2
-
3
- def create_input(options = {})
4
- [Rev::Input.new(options)]
5
- end
1
+ require_relative '../lib/rev-api'
2
+
3
+ def create_input(options = {})
4
+ [Rev::Input.new(options)]
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rev-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rev.com, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -16,60 +16,60 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.11'
19
+ version: 0.11.0
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.11.0
22
+ version: '0.11'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '0.11'
29
+ version: 0.11.0
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 0.11.0
32
+ version: '0.11'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: webmock
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.11'
39
+ version: 1.11.0
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: 1.11.0
42
+ version: '1.11'
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '1.11'
49
+ version: 1.11.0
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: 1.11.0
52
+ version: '1.11'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: vcr
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '2.6'
59
+ version: 2.6.0
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: 2.6.0
62
+ version: '2.6'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '2.6'
69
+ version: 2.6.0
70
70
  - - "~>"
71
71
  - !ruby/object:Gem::Version
72
- version: 2.6.0
72
+ version: '2.6'
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: turn
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -96,20 +96,20 @@ dependencies:
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: '10.1'
99
+ version: 10.1.0
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 10.1.0
102
+ version: '10.1'
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '10.1'
109
+ version: 10.1.0
110
110
  - - "~>"
111
111
  - !ruby/object:Gem::Version
112
- version: 10.1.0
112
+ version: '10.1'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: yard
115
115
  requirement: !ruby/object:Gem::Requirement
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.1.4
242
+ rubygems_version: 3.0.3
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Ruby wrapper for Rev.com API