oi-api-ruby 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.sample +2 -0
- data/.gitignore +3 -0
- data/.rspec +4 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +9 -0
- data/api_issues.md +89 -0
- data/lib/oi_api.rb +12 -0
- data/lib/oi_api/client.rb +98 -0
- data/lib/oi_api/client/advertisers.rb +31 -0
- data/lib/oi_api/client/auto_responders.rb +35 -0
- data/lib/oi_api/client/balances.rb +15 -0
- data/lib/oi_api/client/cards.rb +33 -0
- data/lib/oi_api/client/charges.rb +15 -0
- data/lib/oi_api/client/data_transfers.rb +31 -0
- data/lib/oi_api/client/offers.rb +32 -0
- data/lib/oi_api/client/reports.rb +15 -0
- data/lib/oi_api/client/subscriptions.rb +23 -0
- data/lib/oi_api/configuration.rb +50 -0
- data/lib/oi_api/lookup_tables.rb +42 -0
- data/lib/oi_api/version.rb +3 -0
- data/oi-api-ruby.gemspec +31 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/returns_200_OK.yml +157 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +157 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/returns_the_resource.yml +157 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/when_advertiser_id_not_found/returns_404.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/when_advertiser_id_not_found/returns_not_found_error_message.yml +117 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertisers/it_should_behave_like_GET_resources/returns_200_OK.yml +157 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertisers/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +237 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_advertisers/it_should_behave_like_GET_resources/returns_all_resources.yml +237 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +117 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/returns_201_created.yml +118 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/returns_a_success_message.yml +78 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/returns_a_success_status.yml +118 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/deletes_a_data_transfer.yml +153 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/returns_200_OK.yml +116 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/returns_the_correct_message.yml +196 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/returns_the_correct_status.yml +116 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/when_advertiser_not_found/returns_404.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/when_advertiser_not_found/returns_not_found_error_message.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/when_advertiser_not_found/returns_not_found_error_status.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_reports/it_should_behave_like_GET_resources/returns_200_OK.yml +42 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_reports/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +42 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_reports/it_should_behave_like_GET_resources/returns_all_resources.yml +42 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +116 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +156 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +156 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/returns_200_OK.yml +155 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +155 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +195 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/when_advertiser_not_found/returns_404.yml +117 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/when_advertiser_not_found/returns_error_status.yml +77 -0
- data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/when_advertiser_not_found/returns_not_found_error_message.yml +77 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_all_auto_responders/it_should_behave_like_GET_resources/returns_200_OK.yml +593 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_all_auto_responders/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +593 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_all_auto_responders/it_should_behave_like_GET_resources/returns_all_resources.yml +593 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders/it_should_behave_like_GET_resources/returns_200_OK.yml +273 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +273 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders/it_should_behave_like_GET_resources/returns_all_resources.yml +273 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_no_offer_id/it_should_behave_like_GET_resources/returns_200_OK.yml +593 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_no_offer_id/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +673 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_no_offer_id/it_should_behave_like_GET_resources/returns_all_resources.yml +516 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_with_offer_id/it_should_behave_like_GET_resources/returns_200_OK.yml +273 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_with_offer_id/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +354 -0
- data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_with_offer_id/it_should_behave_like_GET_resources/returns_all_resources.yml +354 -0
- data/spec/cassettes/OiApi_Client_Balances/_balance/it_should_behave_like_GET_resources/returns_200_OK.yml +78 -0
- data/spec/cassettes/OiApi_Client_Balances/_balance/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +78 -0
- data/spec/cassettes/OiApi_Client_Balances/_balance/it_should_behave_like_GET_resources/returns_all_resources.yml +78 -0
- data/spec/cassettes/OiApi_Client_Balances/_balance/returns_a_balance.yml +78 -0
- data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/returns_200_OK.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/returns_the_resource.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/when_card_id_not_found/returns_404.yml +79 -0
- data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/when_card_id_not_found/returns_not_found_error_message.yml +79 -0
- data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +80 -0
- data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +80 -0
- data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +80 -0
- data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/returns_201_created.yml +80 -0
- data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/returns_a_success_message.yml +80 -0
- data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/returns_a_success_status.yml +80 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/returns_200_OK.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +117 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/when_card_not_found/returns_404.yml +79 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/when_card_not_found/returns_error_status.yml +79 -0
- data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/when_card_not_found/returns_not_found_error_message.yml +79 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +352 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +352 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +352 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/returns_201_created.yml +352 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/returns_a_success_message.yml +272 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/returns_a_success_status.yml +352 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/returns_200_OK.yml +393 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +393 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/returns_the_resource.yml +472 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/when_data_transfer_id_not_found/returns_404.yml +115 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/when_data_transfer_id_not_found/returns_not_found_error_message.yml +236 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfers/it_should_behave_like_GET_resources/returns_200_OK.yml +354 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfers/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +434 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfers/it_should_behave_like_GET_resources/returns_all_resources.yml +434 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/deletes_a_data_transfer.yml +428 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/returns_200_OK.yml +390 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/returns_the_correct_message.yml +310 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/returns_the_correct_status.yml +390 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/when_data_transfer_not_found/returns_404.yml +115 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/when_data_transfer_not_found/returns_not_found_error_message.yml +195 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/when_data_transfer_not_found/returns_not_found_error_status.yml +115 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +390 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +390 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +390 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/returns_200_OK.yml +389 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +389 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +349 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/when_data_transfer_not_found/returns_404.yml +274 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/when_data_transfer_not_found/returns_error_status.yml +234 -0
- data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/when_data_transfer_not_found/returns_not_found_error_message.yml +234 -0
- data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +195 -0
- data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +195 -0
- data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +195 -0
- data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/returns_201_created.yml +196 -0
- data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/returns_a_success_message.yml +156 -0
- data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/returns_a_success_status.yml +196 -0
- data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/returns_200_OK.yml +246 -0
- data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +246 -0
- data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/returns_the_resource.yml +284 -0
- data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/when_offer_id_not_found/returns_404.yml +115 -0
- data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/when_offer_id_not_found/returns_not_found_error_message.yml +195 -0
- data/spec/cassettes/OiApi_Client_Offers/_offers/it_should_behave_like_GET_resources/returns_200_OK.yml +416 -0
- data/spec/cassettes/OiApi_Client_Offers/_offers/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +457 -0
- data/spec/cassettes/OiApi_Client_Offers/_offers/it_should_behave_like_GET_resources/returns_all_resources.yml +457 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/bad_request/returns_400_bad_request_with_invalid_params.yml +194 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +234 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +234 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/returns_200_OK.yml +234 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +234 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +315 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/when_offer_not_found/returns_404.yml +154 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/when_offer_not_found/returns_error_status.yml +114 -0
- data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/when_offer_not_found/returns_not_found_error_message.yml +114 -0
- data/spec/cassettes/OiApi_Client_Reports/_reports/it_should_behave_like_GET_resources/returns_200_OK.yml +46 -0
- data/spec/cassettes/OiApi_Client_Reports/_reports/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +46 -0
- data/spec/cassettes/OiApi_Client_Reports/_reports/it_should_behave_like_GET_resources/returns_all_resources.yml +46 -0
- data/spec/cassettes/OiApi_Client_Reports/_reports/returns_a_report_summary.yml +46 -0
- data/spec/cassettes/OiApi_Client_Reports/_reports_with_query_params/retrieves_the_last_60_days_of_data.yml +42 -0
- data/spec/oi_api/client/advertisers_spec.rb +86 -0
- data/spec/oi_api/client/auto_responders_spec.rb +55 -0
- data/spec/oi_api/client/balances_spec.rb +22 -0
- data/spec/oi_api/client/cards_spec.rb +60 -0
- data/spec/oi_api/client/charges_spec.rb +9 -0
- data/spec/oi_api/client/data_transfers_spec.rb +95 -0
- data/spec/oi_api/client/offers_spec.rb +84 -0
- data/spec/oi_api/client/reports_spec.rb +31 -0
- data/spec/oi_api/client/subscriptions_spec.rb +11 -0
- data/spec/oi_api_spec.rb +49 -0
- data/spec/shared_examples_for_delete_resource.rb +37 -0
- data/spec/shared_examples_for_get_resource.rb +33 -0
- data/spec/shared_examples_for_get_resources.rb +15 -0
- data/spec/shared_examples_for_post_resource.rb +31 -0
- data/spec/shared_examples_for_put_resource.rb +46 -0
- data/spec/spec_helper.rb +60 -0
- data/spec/support/advertisers_factory.rb +22 -0
- data/spec/support/auto_responders_factory.rb +27 -0
- data/spec/support/balances_factory.rb +12 -0
- data/spec/support/cards_factory.rb +34 -0
- data/spec/support/charges_factory.rb +16 -0
- data/spec/support/data_transfers_factory.rb +34 -0
- data/spec/support/factory.rb +48 -0
- data/spec/support/offers_factory.rb +53 -0
- data/spec/support/reports_factory.rb +12 -0
- data/spec/support/subscriptions_factory.rb +16 -0
- data/spec_output.txt +341 -0
- metadata +487 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"new advertiser 97309636661f23a2f156c2fee20ea0e4","status_id":1,"category_id":1010}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: CREATED
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:00:48 GMT
|
21
|
+
Server:
|
22
|
+
- Apache/2.2.15 (CentOS)
|
23
|
+
Vary:
|
24
|
+
- Accept,Cookie
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
Allow:
|
28
|
+
- GET, POST, HEAD, OPTIONS
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
38
|
+
created", "id": 40587}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 28 Apr 2015 21:01:55 GMT
|
41
|
+
- request:
|
42
|
+
method: get
|
43
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40587/cards/99999999999999/
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: ''
|
47
|
+
headers:
|
48
|
+
Content-Type:
|
49
|
+
- application/json
|
50
|
+
User-Agent:
|
51
|
+
- OiApiRuby Gem 0.1.1
|
52
|
+
response:
|
53
|
+
status:
|
54
|
+
code: 404
|
55
|
+
message: NOT FOUND
|
56
|
+
headers:
|
57
|
+
Date:
|
58
|
+
- Tue, 28 Apr 2015 21:00:48 GMT
|
59
|
+
Server:
|
60
|
+
- Apache/2.2.15 (CentOS)
|
61
|
+
Vary:
|
62
|
+
- Accept,Cookie
|
63
|
+
X-Frame-Options:
|
64
|
+
- SAMEORIGIN
|
65
|
+
Allow:
|
66
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
67
|
+
Connection:
|
68
|
+
- close
|
69
|
+
Transfer-Encoding:
|
70
|
+
- chunked
|
71
|
+
Content-Type:
|
72
|
+
- application/json
|
73
|
+
body:
|
74
|
+
encoding: UTF-8
|
75
|
+
string: '{"status": "Request Failed", "message": "Card not found.", "error":
|
76
|
+
true}'
|
77
|
+
http_version:
|
78
|
+
recorded_at: Tue, 28 Apr 2015 21:01:56 GMT
|
79
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,79 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"new advertiser c16f8e91512b2c11ea1900c5b81ccf55","status_id":1,"category_id":1010}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: CREATED
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:00:46 GMT
|
21
|
+
Server:
|
22
|
+
- Apache/2.2.15 (CentOS)
|
23
|
+
Vary:
|
24
|
+
- Accept,Cookie
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
Allow:
|
28
|
+
- GET, POST, HEAD, OPTIONS
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
38
|
+
created", "id": 40586}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 28 Apr 2015 21:01:53 GMT
|
41
|
+
- request:
|
42
|
+
method: get
|
43
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40586/cards/99999999999999/
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: ''
|
47
|
+
headers:
|
48
|
+
Content-Type:
|
49
|
+
- application/json
|
50
|
+
User-Agent:
|
51
|
+
- OiApiRuby Gem 0.1.1
|
52
|
+
response:
|
53
|
+
status:
|
54
|
+
code: 404
|
55
|
+
message: NOT FOUND
|
56
|
+
headers:
|
57
|
+
Date:
|
58
|
+
- Tue, 28 Apr 2015 21:00:46 GMT
|
59
|
+
Server:
|
60
|
+
- Apache/2.2.15 (CentOS)
|
61
|
+
Vary:
|
62
|
+
- Accept,Cookie
|
63
|
+
X-Frame-Options:
|
64
|
+
- SAMEORIGIN
|
65
|
+
Allow:
|
66
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
67
|
+
Connection:
|
68
|
+
- close
|
69
|
+
Transfer-Encoding:
|
70
|
+
- chunked
|
71
|
+
Content-Type:
|
72
|
+
- application/json
|
73
|
+
body:
|
74
|
+
encoding: UTF-8
|
75
|
+
string: '{"status": "Request Failed", "message": "Card not found.", "error":
|
76
|
+
true}'
|
77
|
+
http_version:
|
78
|
+
recorded_at: Tue, 28 Apr 2015 21:01:55 GMT
|
79
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"new advertiser d9f550e1400e401b79cc7d6b3aafaed4","status_id":1,"category_id":1010}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: CREATED
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:00:55 GMT
|
21
|
+
Server:
|
22
|
+
- Apache/2.2.15 (CentOS)
|
23
|
+
Vary:
|
24
|
+
- Accept,Cookie
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
Allow:
|
28
|
+
- GET, POST, HEAD, OPTIONS
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
38
|
+
created", "id": 40591}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 28 Apr 2015 21:02:02 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40591/cards/
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"exp_month":12,"exp_year":16,"cvc":111,"name":"John Tester","address_line1":"123
|
47
|
+
Elm Street","address_line2":"Apt 2","address_city":"Rochester","address_zip":14605,"address_state":"NY","address_country":"US","default":"true"}'
|
48
|
+
headers:
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
User-Agent:
|
52
|
+
- OiApiRuby Gem 0.1.1
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 400
|
56
|
+
message: BAD REQUEST
|
57
|
+
headers:
|
58
|
+
Date:
|
59
|
+
- Tue, 28 Apr 2015 21:00:55 GMT
|
60
|
+
Server:
|
61
|
+
- Apache/2.2.15 (CentOS)
|
62
|
+
Vary:
|
63
|
+
- Accept,Cookie
|
64
|
+
X-Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
Allow:
|
67
|
+
- GET, POST, DELETE, HEAD, OPTIONS
|
68
|
+
Connection:
|
69
|
+
- close
|
70
|
+
Transfer-Encoding:
|
71
|
+
- chunked
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"status": "Create Failed", "message": {"number": ["This field is required."]},
|
77
|
+
"error": true}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 28 Apr 2015 21:02:03 GMT
|
80
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"new advertiser 4ba90db2f768734886f26e387b24e82b","status_id":1,"category_id":1010}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: CREATED
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:00:56 GMT
|
21
|
+
Server:
|
22
|
+
- Apache/2.2.15 (CentOS)
|
23
|
+
Vary:
|
24
|
+
- Accept,Cookie
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
Allow:
|
28
|
+
- GET, POST, HEAD, OPTIONS
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
38
|
+
created", "id": 40592}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 28 Apr 2015 21:02:03 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40592/cards/
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"exp_month":12,"exp_year":16,"cvc":111,"name":"John Tester","address_line1":"123
|
47
|
+
Elm Street","address_line2":"Apt 2","address_city":"Rochester","address_zip":14605,"address_state":"NY","address_country":"US","default":"true"}'
|
48
|
+
headers:
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
User-Agent:
|
52
|
+
- OiApiRuby Gem 0.1.1
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 400
|
56
|
+
message: BAD REQUEST
|
57
|
+
headers:
|
58
|
+
Date:
|
59
|
+
- Tue, 28 Apr 2015 21:00:56 GMT
|
60
|
+
Server:
|
61
|
+
- Apache/2.2.15 (CentOS)
|
62
|
+
Vary:
|
63
|
+
- Accept,Cookie
|
64
|
+
X-Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
Allow:
|
67
|
+
- GET, POST, DELETE, HEAD, OPTIONS
|
68
|
+
Connection:
|
69
|
+
- close
|
70
|
+
Transfer-Encoding:
|
71
|
+
- chunked
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"status": "Create Failed", "message": {"number": ["This field is required."]},
|
77
|
+
"error": true}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 28 Apr 2015 21:02:04 GMT
|
80
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"new advertiser be8b5ec86a0e81c20b8d2ffe42c95d66","status_id":1,"category_id":1010}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: CREATED
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:00:57 GMT
|
21
|
+
Server:
|
22
|
+
- Apache/2.2.15 (CentOS)
|
23
|
+
Vary:
|
24
|
+
- Accept,Cookie
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
Allow:
|
28
|
+
- GET, POST, HEAD, OPTIONS
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
38
|
+
created", "id": 40593}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 28 Apr 2015 21:02:04 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40593/cards/
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"exp_month":12,"exp_year":16,"cvc":111,"name":"John Tester","address_line1":"123
|
47
|
+
Elm Street","address_line2":"Apt 2","address_city":"Rochester","address_zip":14605,"address_state":"NY","address_country":"US","default":"true"}'
|
48
|
+
headers:
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
User-Agent:
|
52
|
+
- OiApiRuby Gem 0.1.1
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 400
|
56
|
+
message: BAD REQUEST
|
57
|
+
headers:
|
58
|
+
Date:
|
59
|
+
- Tue, 28 Apr 2015 21:00:57 GMT
|
60
|
+
Server:
|
61
|
+
- Apache/2.2.15 (CentOS)
|
62
|
+
Vary:
|
63
|
+
- Accept,Cookie
|
64
|
+
X-Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
Allow:
|
67
|
+
- GET, POST, DELETE, HEAD, OPTIONS
|
68
|
+
Connection:
|
69
|
+
- close
|
70
|
+
Transfer-Encoding:
|
71
|
+
- chunked
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"status": "Create Failed", "message": {"number": ["This field is required."]},
|
77
|
+
"error": true}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 28 Apr 2015 21:02:04 GMT
|
80
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"new advertiser df5d2621b43b63f249a9f1fd3bcdfdb1","status_id":1,"category_id":1010}'
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: CREATED
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:00:53 GMT
|
21
|
+
Server:
|
22
|
+
- Apache/2.2.15 (CentOS)
|
23
|
+
Vary:
|
24
|
+
- Accept,Cookie
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
Allow:
|
28
|
+
- GET, POST, HEAD, OPTIONS
|
29
|
+
Connection:
|
30
|
+
- close
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Content-Type:
|
34
|
+
- application/json
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
38
|
+
created", "id": 40590}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 28 Apr 2015 21:02:01 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40590/cards/
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: '{"number":9819465435,"exp_month":12,"exp_year":16,"cvc":111,"name":"John
|
47
|
+
Tester","address_line1":"123 Elm Street","address_line2":"Apt 2","address_city":"Rochester","address_zip":14605,"address_state":"NY","address_country":"US","default":"true"}'
|
48
|
+
headers:
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
User-Agent:
|
52
|
+
- OiApiRuby Gem 0.1.1
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 400
|
56
|
+
message: BAD REQUEST
|
57
|
+
headers:
|
58
|
+
Date:
|
59
|
+
- Tue, 28 Apr 2015 21:00:54 GMT
|
60
|
+
Server:
|
61
|
+
- Apache/2.2.15 (CentOS)
|
62
|
+
Vary:
|
63
|
+
- Accept,Cookie
|
64
|
+
X-Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
Allow:
|
67
|
+
- GET, POST, DELETE, HEAD, OPTIONS
|
68
|
+
Connection:
|
69
|
+
- close
|
70
|
+
Transfer-Encoding:
|
71
|
+
- chunked
|
72
|
+
Content-Type:
|
73
|
+
- application/json
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"status": "Request Failed", "message": "Your card number is incorrect.",
|
77
|
+
"error_code": "incorrect_number", "error": true}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 28 Apr 2015 21:02:02 GMT
|
80
|
+
recorded_with: VCR 2.9.3
|