borrow_direct 0.9.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 (76) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +14 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +183 -0
  6. data/Rakefile +11 -0
  7. data/bd_metrics/finditem_measure.rb +61 -0
  8. data/bd_metrics/isbn.txt +1088 -0
  9. data/bd_metrics/lccn.txt +1668 -0
  10. data/bd_metrics/oclc.txt +167 -0
  11. data/borrow_direct.gemspec +30 -0
  12. data/lib/borrow_direct/authentication.rb +55 -0
  13. data/lib/borrow_direct/defaults.rb +38 -0
  14. data/lib/borrow_direct/error.rb +17 -0
  15. data/lib/borrow_direct/find_item.rb +149 -0
  16. data/lib/borrow_direct/generate_query.rb +78 -0
  17. data/lib/borrow_direct/request.rb +185 -0
  18. data/lib/borrow_direct/request_item.rb +119 -0
  19. data/lib/borrow_direct/request_query.rb +124 -0
  20. data/lib/borrow_direct/util.rb +18 -0
  21. data/lib/borrow_direct/version.rb +3 -0
  22. data/lib/borrow_direct.rb +19 -0
  23. data/test/authentication_test.rb +79 -0
  24. data/test/find_item_test.rb +159 -0
  25. data/test/generate_query_test.rb +91 -0
  26. data/test/request_item_test.rb +109 -0
  27. data/test/request_query_test.rb +113 -0
  28. data/test/request_test.rb +141 -0
  29. data/test/support/assertions.rb +23 -0
  30. data/test/support/vcr_filter.rb +45 -0
  31. data/test/test_helper.rb +39 -0
  32. data/test/util_test.rb +32 -0
  33. data/test/vcr_cassettes/Authentication/Makes_a_request_succesfully.yml +52 -0
  34. data/test/vcr_cassettes/Authentication/Raises_for_bad_library_symbol.yml +52 -0
  35. data/test/vcr_cassettes/Authentication/Raises_for_bad_patron_barcode.yml +53 -0
  36. data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_library_symbol.yml +52 -0
  37. data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_patron_barcode.yml +53 -0
  38. data/test/vcr_cassettes/Authentication/get_auth_id/returns_an_auth_id_for_a_good_request.yml +52 -0
  39. data/test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/.yml +52 -0
  40. data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_locally_available_item.yml +49 -0
  41. data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_requestable_item.yml +49 -0
  42. data/test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml +50 -0
  43. data/test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml +40 -0
  44. data/test/vcr_cassettes/FindItem/_find_item_request/works_with_multiple_values.yml +49 -0
  45. data/test/vcr_cassettes/FindItem/find_with_Response/has_an_auth_id.yml +49 -0
  46. data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_auth_id_when_BD_doesn_t_want_to_give_us_one.yml +40 -0
  47. data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_pickup_locations_when_BD_doesn_t_want_to_give_us_them.yml +40 -0
  48. data/test/vcr_cassettes/FindItem/find_with_Response/has_pickup_locations.yml +49 -0
  49. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_BD_returns_PUBFI002.yml +40 -0
  50. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_does_not_exist_in_BD.yml +50 -0
  51. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_no_libraries_will_lend.yml +50 -0
  52. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_locally_available_item.yml +49 -0
  53. data/test/vcr_cassettes/FindItem/find_with_Response/requestable_for_requestable_item.yml +49 -0
  54. data/test/vcr_cassettes/FindItem/find_with_Response/requestable_with_multiple_items_if_at_least_one_is_requestable.yml +49 -0
  55. data/test/vcr_cassettes/Request/authentication_id/automatically_fetches_one_when_needed.yml +52 -0
  56. data/test/vcr_cassettes/Request/authentication_id/can_refetch_when_instructed.yml +52 -0
  57. data/test/vcr_cassettes/Request/can_make_a_succesful_request.yml +49 -0
  58. data/test/vcr_cassettes/Request/gets_BD_error_info.yml +41 -0
  59. data/test/vcr_cassettes/Request/raises_on_bad_path.yml +53 -0
  60. data/test/vcr_cassettes/Request/raises_on_bad_request_hash.yml +63 -0
  61. data/test/vcr_cassettes/Request/with_expected_errors/still_returns_result.yml +41 -0
  62. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_locally_available_item.yml +90 -0
  63. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_requestable_item.yml +89 -0
  64. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_an_unrequestable_item.yml +91 -0
  65. data/test/vcr_cassettes/RequestItem/make_request/raises_for_unrequestable.yml +91 -0
  66. data/test/vcr_cassettes/RequestItem/make_request/returns_number_for_succesful_request.yml +89 -0
  67. data/test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI004.yml +89 -0
  68. data/test/vcr_cassettes/RequestItem/raw_requests_an_unrequestable_item.yml +91 -0
  69. data/test/vcr_cassettes/RequestItem/uses_manually_set_auth_id.yml +89 -0
  70. data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/still_works.yml +90 -0
  71. data/test/vcr_cassettes/RequestQuery/raw_request_query_request/returns_results.yml +381 -0
  72. data/test/vcr_cassettes/RequestQuery/raw_request_to_verify_the_BD_HTTP_API.yml +381 -0
  73. data/test/vcr_cassettes/RequestQuery/requests/fetches_default_records.yml +384 -0
  74. data/test/vcr_cassettes/RequestQuery/requests/fetches_full_records.yml +481 -0
  75. data/test/vcr_cassettes/top_level_describe/an_inner_describe/.yml +76 -0
  76. metadata +262 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:39 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:05:40 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"9F_-6PA7WHD6mT0obUgcOVRTXGo","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:40 GMT
52
+ - request:
53
+ method: post
54
+ uri: https://bdtest.relais-host.com/dws/item/add
55
+ body:
56
+ encoding: UTF-8
57
+ string: ! '{"PartnershipId":"BD","AuthorizationId":"9F_-6PA7WHD6mT0obUgcOVRTXGo","PickupLocation":null,"ExactSearch":[{"Type":"ISBN","Value":"9797994864"}]}'
58
+ headers:
59
+ User-Agent:
60
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
61
+ Accept:
62
+ - ! '*/*'
63
+ Date:
64
+ - Tue, 21 Oct 2014 17:05:40 GMT
65
+ Content-Type:
66
+ - application/json
67
+ Accept-Language:
68
+ - en
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Server:
75
+ - nginx/1.4.1
76
+ Date:
77
+ - Tue, 21 Oct 2014 17:05:42 GMT
78
+ Content-Type:
79
+ - application/json;charset=UTF-8
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Connection:
83
+ - keep-alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: ! '{"Request":{"RequestNumber":"JHU-99000780"}}'
87
+ http_version:
88
+ recorded_at: Tue, 21 Oct 2014 17:05:42 GMT
89
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:13 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:05:15 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"7tqolo4J0DtmlTbXm_-y6mnWihk","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:15 GMT
52
+ - request:
53
+ method: post
54
+ uri: https://bdtest.relais-host.com/dws/item/add
55
+ body:
56
+ encoding: UTF-8
57
+ string: ! '{"PartnershipId":"BD","AuthorizationId":"7tqolo4J0DtmlTbXm_-y6mnWihk","PickupLocation":null,"ExactSearch":[{"Type":"ISBN","Value":"0109836413"}]}'
58
+ headers:
59
+ User-Agent:
60
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
61
+ Accept:
62
+ - ! '*/*'
63
+ Date:
64
+ - Tue, 21 Oct 2014 17:05:15 GMT
65
+ Content-Type:
66
+ - application/json
67
+ Accept-Language:
68
+ - en
69
+ response:
70
+ status:
71
+ code: 404
72
+ message: Not Found
73
+ headers:
74
+ Server:
75
+ - nginx/1.4.1
76
+ Date:
77
+ - Tue, 21 Oct 2014 17:05:18 GMT
78
+ Content-Type:
79
+ - application/json;charset=UTF-8
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Connection:
83
+ - keep-alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: ! '{"Error":{"ErrorNumber":"PUBRI004","ErrorMessage":"No result"}}'
87
+ http_version:
88
+ recorded_at: Tue, 21 Oct 2014 17:05:18 GMT
89
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,91 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:52 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:05:53 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"VXWixR-mGrtTrGzyPLuvfSLNJXU","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:53 GMT
52
+ - request:
53
+ method: post
54
+ uri: https://bdtest.relais-host.com/dws/item/add
55
+ body:
56
+ encoding: UTF-8
57
+ string: ! '{"PartnershipId":"BD","AuthorizationId":"VXWixR-mGrtTrGzyPLuvfSLNJXU","PickupLocation":null,"ExactSearch":[{"Type":"ISBN","Value":"1441190090"}]}'
58
+ headers:
59
+ User-Agent:
60
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
61
+ Accept:
62
+ - ! '*/*'
63
+ Date:
64
+ - Tue, 21 Oct 2014 17:05:53 GMT
65
+ Content-Type:
66
+ - application/json
67
+ Accept-Language:
68
+ - en
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Server:
75
+ - nginx/1.4.1
76
+ Date:
77
+ - Tue, 21 Oct 2014 17:05:54 GMT
78
+ Content-Type:
79
+ - application/json;charset=UTF-8
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Connection:
83
+ - keep-alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: ! '{"Request":{"RequestLink":{"ButtonLabel":"Request","ButtonLink":"http://findit.library.jhu.edu/resolve?genre=book","RequestMessage":"Borrow
87
+ Direct cannot fill this request at this time. Please request through Interlibrary
88
+ Loan."}}}'
89
+ http_version:
90
+ recorded_at: Tue, 21 Oct 2014 17:05:54 GMT
91
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:54 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:05:55 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"Lx7zTm96k026u1MjLQnzd5nKa_k","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:55 GMT
52
+ - request:
53
+ method: post
54
+ uri: https://bdtest.relais-host.com/dws/item/add
55
+ body:
56
+ encoding: UTF-8
57
+ string: ! '{"PartnershipId":"BD","AuthorizationId":"Lx7zTm96k026u1MjLQnzd5nKa_k","PickupLocation":null,"ExactSearch":[{"Type":"ISBN","Value":"9797994864"}]}'
58
+ headers:
59
+ User-Agent:
60
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
61
+ Accept:
62
+ - ! '*/*'
63
+ Date:
64
+ - Tue, 21 Oct 2014 17:05:55 GMT
65
+ Content-Type:
66
+ - application/json
67
+ Accept-Language:
68
+ - en
69
+ response:
70
+ status:
71
+ code: 200
72
+ message: OK
73
+ headers:
74
+ Server:
75
+ - nginx/1.4.1
76
+ Date:
77
+ - Tue, 21 Oct 2014 17:05:58 GMT
78
+ Content-Type:
79
+ - application/json;charset=UTF-8
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Connection:
83
+ - keep-alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: ! '{"Request":{"RequestNumber":"JHU-99000781"}}'
87
+ http_version:
88
+ recorded_at: Tue, 21 Oct 2014 17:05:58 GMT
89
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,90 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
+ headers:
10
+ User-Agent:
11
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
+ Accept:
13
+ - ! '*/*'
14
+ Date:
15
+ - Tue, 21 Oct 2014 17:05:31 GMT
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Language:
19
+ - en
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - nginx/1.4.1
27
+ Date:
28
+ - Tue, 21 Oct 2014 17:05:33 GMT
29
+ Content-Type:
30
+ - application/json;charset=UTF-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Connection:
34
+ - keep-alive
35
+ Set-Cookie:
36
+ - visited=yes
37
+ Expires:
38
+ - Thu, 01 Jan 1970 00:00:00 GMT
39
+ - Thu, 01 Jan 1970 00:00:00 GMT
40
+ Content-Language:
41
+ - en
42
+ Pragma:
43
+ - no-cache
44
+ Cache-Control:
45
+ - no-cache, no-store, max-age=0
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"jE6-fPtd-67zVGBOgCGUDXLdWGs","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
+ Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
+ http_version:
51
+ recorded_at: Tue, 21 Oct 2014 17:05:33 GMT
52
+ - request:
53
+ method: post
54
+ uri: https://bdtest.relais-host.com/dws/item/add
55
+ body:
56
+ encoding: UTF-8
57
+ string: ! '{"PartnershipId":"BD","AuthorizationId":"jE6-fPtd-67zVGBOgCGUDXLdWGs","PickupLocation":"Some
58
+ location","ExactSearch":[{"Type":"ISBN","Value":"9797994864"}]}'
59
+ headers:
60
+ User-Agent:
61
+ - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
62
+ Accept:
63
+ - ! '*/*'
64
+ Date:
65
+ - Tue, 21 Oct 2014 17:05:33 GMT
66
+ Content-Type:
67
+ - application/json
68
+ Accept-Language:
69
+ - en
70
+ response:
71
+ status:
72
+ code: 200
73
+ message: OK
74
+ headers:
75
+ Server:
76
+ - nginx/1.4.1
77
+ Date:
78
+ - Tue, 21 Oct 2014 17:05:34 GMT
79
+ Content-Type:
80
+ - application/json;charset=UTF-8
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ body:
86
+ encoding: US-ASCII
87
+ string: ! '{"Request":{"RequestNumber":"JHU-99000779"}}'
88
+ http_version:
89
+ recorded_at: Tue, 21 Oct 2014 17:05:35 GMT
90
+ recorded_with: VCR 2.9.3