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,516 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/json
|
12
|
+
User-Agent:
|
13
|
+
- OiApiRuby Gem 0.1.1
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Tue, 28 Apr 2015 21:36: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: '[{"id": 40656, "name": "new advertiser cfe638b2f14a4a173186c43a59ec26f9",
|
38
|
+
"status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-28T17:38:02",
|
39
|
+
"modify_date": "2015-04-28T17:38:02"}]'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Tue, 28 Apr 2015 21:38:05 GMT
|
42
|
+
- request:
|
43
|
+
method: delete
|
44
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40656/
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers:
|
49
|
+
Content-Type:
|
50
|
+
- application/json
|
51
|
+
User-Agent:
|
52
|
+
- OiApiRuby Gem 0.1.1
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message: OK
|
57
|
+
headers:
|
58
|
+
Date:
|
59
|
+
- Tue, 28 Apr 2015 21:36:58 GMT
|
60
|
+
Server:
|
61
|
+
- Apache/2.2.15 (CentOS)
|
62
|
+
Vary:
|
63
|
+
- Accept,Cookie
|
64
|
+
X-Frame-Options:
|
65
|
+
- SAMEORIGIN
|
66
|
+
Allow:
|
67
|
+
- GET, PUT, 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": "Delete Successful", "message": "Advertiser Succesfully
|
77
|
+
deleted"}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Tue, 28 Apr 2015 21:38:05 GMT
|
80
|
+
- request:
|
81
|
+
method: get
|
82
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
83
|
+
body:
|
84
|
+
encoding: US-ASCII
|
85
|
+
string: ''
|
86
|
+
headers:
|
87
|
+
Content-Type:
|
88
|
+
- application/json
|
89
|
+
User-Agent:
|
90
|
+
- OiApiRuby Gem 0.1.1
|
91
|
+
response:
|
92
|
+
status:
|
93
|
+
code: 200
|
94
|
+
message: OK
|
95
|
+
headers:
|
96
|
+
Date:
|
97
|
+
- Tue, 28 Apr 2015 21:36:58 GMT
|
98
|
+
Server:
|
99
|
+
- Apache/2.2.15 (CentOS)
|
100
|
+
Vary:
|
101
|
+
- Accept,Cookie
|
102
|
+
X-Frame-Options:
|
103
|
+
- SAMEORIGIN
|
104
|
+
Allow:
|
105
|
+
- GET, POST, HEAD, OPTIONS
|
106
|
+
Connection:
|
107
|
+
- close
|
108
|
+
Transfer-Encoding:
|
109
|
+
- chunked
|
110
|
+
Content-Type:
|
111
|
+
- application/json
|
112
|
+
body:
|
113
|
+
encoding: UTF-8
|
114
|
+
string: "[]"
|
115
|
+
http_version:
|
116
|
+
recorded_at: Tue, 28 Apr 2015 21:38:05 GMT
|
117
|
+
- request:
|
118
|
+
method: post
|
119
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
120
|
+
body:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"name":"new advertiser 24f52e509857968280d4919f6cc6d26d","status_id":1,"category_id":1010}'
|
123
|
+
headers:
|
124
|
+
Content-Type:
|
125
|
+
- application/json
|
126
|
+
User-Agent:
|
127
|
+
- OiApiRuby Gem 0.1.1
|
128
|
+
response:
|
129
|
+
status:
|
130
|
+
code: 201
|
131
|
+
message: CREATED
|
132
|
+
headers:
|
133
|
+
Date:
|
134
|
+
- Tue, 28 Apr 2015 21:36:58 GMT
|
135
|
+
Server:
|
136
|
+
- Apache/2.2.15 (CentOS)
|
137
|
+
Vary:
|
138
|
+
- Accept,Cookie
|
139
|
+
X-Frame-Options:
|
140
|
+
- SAMEORIGIN
|
141
|
+
Allow:
|
142
|
+
- GET, POST, HEAD, OPTIONS
|
143
|
+
Connection:
|
144
|
+
- close
|
145
|
+
Transfer-Encoding:
|
146
|
+
- chunked
|
147
|
+
Content-Type:
|
148
|
+
- application/json
|
149
|
+
body:
|
150
|
+
encoding: UTF-8
|
151
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
152
|
+
created", "id": 40658}'
|
153
|
+
http_version:
|
154
|
+
recorded_at: Tue, 28 Apr 2015 21:38:06 GMT
|
155
|
+
- request:
|
156
|
+
method: post
|
157
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
158
|
+
body:
|
159
|
+
encoding: UTF-8
|
160
|
+
string: '{"advertiser_id":40658,"name":"Special Product 2e9dfd2028f8e65afe4dfcad6cad99a8","category_id":1010,"status_id":9,"headline":"Buy
|
161
|
+
our product today b99d2c7dffda2fafec90e078ad5791be","body":"Try for FREE for
|
162
|
+
a limited time only. This is your one-and-only chance! 90ca879d735fea50efba9ae1c22e8775","cpl_price":1.0,"global_cap":1000,"monthly_cap":300,"daily_cap":10,"image1":"http://www.opt-intelligence.com/images/cats120.png","image2":"http://www.opt-intelligence.com/images/cats88.png","data_points":["EM","FN"],"targeting":{"min_age":18,"max_age":45,"zip":{"include":true,"zip_codes":["14226","10009","10023","11211"]},"gender":"m","country":{"include":true,"countries":["USA"]},"third_party":{}},"comment":"Hello
|
163
|
+
there"}'
|
164
|
+
headers:
|
165
|
+
Content-Type:
|
166
|
+
- application/json
|
167
|
+
User-Agent:
|
168
|
+
- OiApiRuby Gem 0.1.1
|
169
|
+
response:
|
170
|
+
status:
|
171
|
+
code: 201
|
172
|
+
message: CREATED
|
173
|
+
headers:
|
174
|
+
Date:
|
175
|
+
- Tue, 28 Apr 2015 21:36:59 GMT
|
176
|
+
Server:
|
177
|
+
- Apache/2.2.15 (CentOS)
|
178
|
+
Vary:
|
179
|
+
- Accept,Cookie
|
180
|
+
X-Frame-Options:
|
181
|
+
- SAMEORIGIN
|
182
|
+
Allow:
|
183
|
+
- GET, POST, HEAD, OPTIONS
|
184
|
+
Connection:
|
185
|
+
- close
|
186
|
+
Transfer-Encoding:
|
187
|
+
- chunked
|
188
|
+
Content-Type:
|
189
|
+
- application/json
|
190
|
+
body:
|
191
|
+
encoding: UTF-8
|
192
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
193
|
+
"id": 79975}'
|
194
|
+
http_version:
|
195
|
+
recorded_at: Tue, 28 Apr 2015 21:38:07 GMT
|
196
|
+
- request:
|
197
|
+
method: post
|
198
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79975/autoresponders/
|
199
|
+
body:
|
200
|
+
encoding: UTF-8
|
201
|
+
string: '{"status_id":1,"subject":"Here''s a good subject line","from_name":"Our
|
202
|
+
Company","body_html":"some html here","body_text":"some text here"}'
|
203
|
+
headers:
|
204
|
+
Content-Type:
|
205
|
+
- application/json
|
206
|
+
User-Agent:
|
207
|
+
- OiApiRuby Gem 0.1.1
|
208
|
+
response:
|
209
|
+
status:
|
210
|
+
code: 200
|
211
|
+
message: OK
|
212
|
+
headers:
|
213
|
+
Date:
|
214
|
+
- Tue, 28 Apr 2015 21:37:00 GMT
|
215
|
+
Server:
|
216
|
+
- Apache/2.2.15 (CentOS)
|
217
|
+
Vary:
|
218
|
+
- Accept,Cookie
|
219
|
+
X-Frame-Options:
|
220
|
+
- SAMEORIGIN
|
221
|
+
Allow:
|
222
|
+
- GET, POST, HEAD, OPTIONS
|
223
|
+
Connection:
|
224
|
+
- close
|
225
|
+
Transfer-Encoding:
|
226
|
+
- chunked
|
227
|
+
Content-Type:
|
228
|
+
- application/json
|
229
|
+
body:
|
230
|
+
encoding: UTF-8
|
231
|
+
string: '{"status": "Create Successful", "id": 53543}'
|
232
|
+
http_version:
|
233
|
+
recorded_at: Tue, 28 Apr 2015 21:38:08 GMT
|
234
|
+
- request:
|
235
|
+
method: post
|
236
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
237
|
+
body:
|
238
|
+
encoding: UTF-8
|
239
|
+
string: '{"name":"new advertiser e077377197ccd78c8da617387b536339","status_id":1,"category_id":1010}'
|
240
|
+
headers:
|
241
|
+
Content-Type:
|
242
|
+
- application/json
|
243
|
+
User-Agent:
|
244
|
+
- OiApiRuby Gem 0.1.1
|
245
|
+
response:
|
246
|
+
status:
|
247
|
+
code: 201
|
248
|
+
message: CREATED
|
249
|
+
headers:
|
250
|
+
Date:
|
251
|
+
- Tue, 28 Apr 2015 21:37:01 GMT
|
252
|
+
Server:
|
253
|
+
- Apache/2.2.15 (CentOS)
|
254
|
+
Vary:
|
255
|
+
- Accept,Cookie
|
256
|
+
X-Frame-Options:
|
257
|
+
- SAMEORIGIN
|
258
|
+
Allow:
|
259
|
+
- GET, POST, HEAD, OPTIONS
|
260
|
+
Connection:
|
261
|
+
- close
|
262
|
+
Transfer-Encoding:
|
263
|
+
- chunked
|
264
|
+
Content-Type:
|
265
|
+
- application/json
|
266
|
+
body:
|
267
|
+
encoding: UTF-8
|
268
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
269
|
+
created", "id": 40660}'
|
270
|
+
http_version:
|
271
|
+
recorded_at: Tue, 28 Apr 2015 21:38:08 GMT
|
272
|
+
- request:
|
273
|
+
method: post
|
274
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
275
|
+
body:
|
276
|
+
encoding: UTF-8
|
277
|
+
string: '{"advertiser_id":40660,"name":"Special Product 9f796605b00244982fcac3b5f82eb071","category_id":1010,"status_id":9,"headline":"Buy
|
278
|
+
our product today 2b3f25a52832796d03b7793c1e50d903","body":"Try for FREE for
|
279
|
+
a limited time only. This is your one-and-only chance! 15b7f24634804de04355e093b229280d","cpl_price":1.0,"global_cap":1000,"monthly_cap":300,"daily_cap":10,"image1":"http://www.opt-intelligence.com/images/cats120.png","image2":"http://www.opt-intelligence.com/images/cats88.png","data_points":["EM","FN"],"targeting":{"min_age":18,"max_age":45,"zip":{"include":true,"zip_codes":["14226","10009","10023","11211"]},"gender":"m","country":{"include":true,"countries":["USA"]},"third_party":{}},"comment":"Hello
|
280
|
+
there"}'
|
281
|
+
headers:
|
282
|
+
Content-Type:
|
283
|
+
- application/json
|
284
|
+
User-Agent:
|
285
|
+
- OiApiRuby Gem 0.1.1
|
286
|
+
response:
|
287
|
+
status:
|
288
|
+
code: 201
|
289
|
+
message: CREATED
|
290
|
+
headers:
|
291
|
+
Date:
|
292
|
+
- Tue, 28 Apr 2015 21:37:01 GMT
|
293
|
+
Server:
|
294
|
+
- Apache/2.2.15 (CentOS)
|
295
|
+
Vary:
|
296
|
+
- Accept,Cookie
|
297
|
+
X-Frame-Options:
|
298
|
+
- SAMEORIGIN
|
299
|
+
Allow:
|
300
|
+
- GET, POST, HEAD, OPTIONS
|
301
|
+
Connection:
|
302
|
+
- close
|
303
|
+
Transfer-Encoding:
|
304
|
+
- chunked
|
305
|
+
Content-Type:
|
306
|
+
- application/json
|
307
|
+
body:
|
308
|
+
encoding: UTF-8
|
309
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
310
|
+
"id": 79977}'
|
311
|
+
http_version:
|
312
|
+
recorded_at: Tue, 28 Apr 2015 21:38:10 GMT
|
313
|
+
- request:
|
314
|
+
method: post
|
315
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79977/autoresponders/
|
316
|
+
body:
|
317
|
+
encoding: UTF-8
|
318
|
+
string: '{"status_id":1,"subject":"Here''s a good subject line","from_name":"Our
|
319
|
+
Company","body_html":"some html here","body_text":"some text here"}'
|
320
|
+
headers:
|
321
|
+
Content-Type:
|
322
|
+
- application/json
|
323
|
+
User-Agent:
|
324
|
+
- OiApiRuby Gem 0.1.1
|
325
|
+
response:
|
326
|
+
status:
|
327
|
+
code: 200
|
328
|
+
message: OK
|
329
|
+
headers:
|
330
|
+
Date:
|
331
|
+
- Tue, 28 Apr 2015 21:37:03 GMT
|
332
|
+
Server:
|
333
|
+
- Apache/2.2.15 (CentOS)
|
334
|
+
Vary:
|
335
|
+
- Accept,Cookie
|
336
|
+
X-Frame-Options:
|
337
|
+
- SAMEORIGIN
|
338
|
+
Allow:
|
339
|
+
- GET, POST, HEAD, OPTIONS
|
340
|
+
Connection:
|
341
|
+
- close
|
342
|
+
Transfer-Encoding:
|
343
|
+
- chunked
|
344
|
+
Content-Type:
|
345
|
+
- application/json
|
346
|
+
body:
|
347
|
+
encoding: UTF-8
|
348
|
+
string: '{"status": "Create Successful", "id": 53545}'
|
349
|
+
http_version:
|
350
|
+
recorded_at: Tue, 28 Apr 2015 21:38:10 GMT
|
351
|
+
- request:
|
352
|
+
method: post
|
353
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
354
|
+
body:
|
355
|
+
encoding: UTF-8
|
356
|
+
string: '{"name":"new advertiser 5775efb738c4a84fb5bc3b66108f0c32","status_id":1,"category_id":1010}'
|
357
|
+
headers:
|
358
|
+
Content-Type:
|
359
|
+
- application/json
|
360
|
+
User-Agent:
|
361
|
+
- OiApiRuby Gem 0.1.1
|
362
|
+
response:
|
363
|
+
status:
|
364
|
+
code: 201
|
365
|
+
message: CREATED
|
366
|
+
headers:
|
367
|
+
Date:
|
368
|
+
- Tue, 28 Apr 2015 21:37:03 GMT
|
369
|
+
Server:
|
370
|
+
- Apache/2.2.15 (CentOS)
|
371
|
+
Vary:
|
372
|
+
- Accept,Cookie
|
373
|
+
X-Frame-Options:
|
374
|
+
- SAMEORIGIN
|
375
|
+
Allow:
|
376
|
+
- GET, POST, HEAD, OPTIONS
|
377
|
+
Connection:
|
378
|
+
- close
|
379
|
+
Transfer-Encoding:
|
380
|
+
- chunked
|
381
|
+
Content-Type:
|
382
|
+
- application/json
|
383
|
+
body:
|
384
|
+
encoding: UTF-8
|
385
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
386
|
+
created", "id": 40661}'
|
387
|
+
http_version:
|
388
|
+
recorded_at: Tue, 28 Apr 2015 21:38:10 GMT
|
389
|
+
- request:
|
390
|
+
method: post
|
391
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
392
|
+
body:
|
393
|
+
encoding: UTF-8
|
394
|
+
string: '{"advertiser_id":40661,"name":"Special Product 1c48996e009ad4e8923c750129660159","category_id":1010,"status_id":9,"headline":"Buy
|
395
|
+
our product today 040fb0019c34088ee17914750dc9365a","body":"Try for FREE for
|
396
|
+
a limited time only. This is your one-and-only chance! 8e33456513689a796779e027a5980be0","cpl_price":1.0,"global_cap":1000,"monthly_cap":300,"daily_cap":10,"image1":"http://www.opt-intelligence.com/images/cats120.png","image2":"http://www.opt-intelligence.com/images/cats88.png","data_points":["EM","FN"],"targeting":{"min_age":18,"max_age":45,"zip":{"include":true,"zip_codes":["14226","10009","10023","11211"]},"gender":"m","country":{"include":true,"countries":["USA"]},"third_party":{}},"comment":"Hello
|
397
|
+
there"}'
|
398
|
+
headers:
|
399
|
+
Content-Type:
|
400
|
+
- application/json
|
401
|
+
User-Agent:
|
402
|
+
- OiApiRuby Gem 0.1.1
|
403
|
+
response:
|
404
|
+
status:
|
405
|
+
code: 201
|
406
|
+
message: CREATED
|
407
|
+
headers:
|
408
|
+
Date:
|
409
|
+
- Tue, 28 Apr 2015 21:37:03 GMT
|
410
|
+
Server:
|
411
|
+
- Apache/2.2.15 (CentOS)
|
412
|
+
Vary:
|
413
|
+
- Accept,Cookie
|
414
|
+
X-Frame-Options:
|
415
|
+
- SAMEORIGIN
|
416
|
+
Allow:
|
417
|
+
- GET, POST, HEAD, OPTIONS
|
418
|
+
Connection:
|
419
|
+
- close
|
420
|
+
Transfer-Encoding:
|
421
|
+
- chunked
|
422
|
+
Content-Type:
|
423
|
+
- application/json
|
424
|
+
body:
|
425
|
+
encoding: UTF-8
|
426
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
427
|
+
"id": 79978}'
|
428
|
+
http_version:
|
429
|
+
recorded_at: Tue, 28 Apr 2015 21:38:12 GMT
|
430
|
+
- request:
|
431
|
+
method: post
|
432
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79978/autoresponders/
|
433
|
+
body:
|
434
|
+
encoding: UTF-8
|
435
|
+
string: '{"status_id":1,"subject":"Here''s a good subject line","from_name":"Our
|
436
|
+
Company","body_html":"some html here","body_text":"some text here"}'
|
437
|
+
headers:
|
438
|
+
Content-Type:
|
439
|
+
- application/json
|
440
|
+
User-Agent:
|
441
|
+
- OiApiRuby Gem 0.1.1
|
442
|
+
response:
|
443
|
+
status:
|
444
|
+
code: 200
|
445
|
+
message: OK
|
446
|
+
headers:
|
447
|
+
Date:
|
448
|
+
- Tue, 28 Apr 2015 21:37:05 GMT
|
449
|
+
Server:
|
450
|
+
- Apache/2.2.15 (CentOS)
|
451
|
+
Vary:
|
452
|
+
- Accept,Cookie
|
453
|
+
X-Frame-Options:
|
454
|
+
- SAMEORIGIN
|
455
|
+
Allow:
|
456
|
+
- GET, POST, HEAD, OPTIONS
|
457
|
+
Connection:
|
458
|
+
- close
|
459
|
+
Transfer-Encoding:
|
460
|
+
- chunked
|
461
|
+
Content-Type:
|
462
|
+
- application/json
|
463
|
+
body:
|
464
|
+
encoding: UTF-8
|
465
|
+
string: '{"status": "Create Successful", "id": 53546}'
|
466
|
+
http_version:
|
467
|
+
recorded_at: Tue, 28 Apr 2015 21:38:12 GMT
|
468
|
+
- request:
|
469
|
+
method: get
|
470
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/autoresponders/
|
471
|
+
body:
|
472
|
+
encoding: US-ASCII
|
473
|
+
string: ''
|
474
|
+
headers:
|
475
|
+
Content-Type:
|
476
|
+
- application/json
|
477
|
+
User-Agent:
|
478
|
+
- OiApiRuby Gem 0.1.1
|
479
|
+
response:
|
480
|
+
status:
|
481
|
+
code: 200
|
482
|
+
message: OK
|
483
|
+
headers:
|
484
|
+
Date:
|
485
|
+
- Tue, 28 Apr 2015 21:37:05 GMT
|
486
|
+
Server:
|
487
|
+
- Apache/2.2.15 (CentOS)
|
488
|
+
Vary:
|
489
|
+
- Accept,Cookie
|
490
|
+
X-Frame-Options:
|
491
|
+
- SAMEORIGIN
|
492
|
+
Allow:
|
493
|
+
- GET, POST, HEAD, OPTIONS
|
494
|
+
Connection:
|
495
|
+
- close
|
496
|
+
Transfer-Encoding:
|
497
|
+
- chunked
|
498
|
+
Content-Type:
|
499
|
+
- application/json
|
500
|
+
body:
|
501
|
+
encoding: UTF-8
|
502
|
+
string: '[{"id": 53542, "subject": "Here''s a good subject line", "offer_id":
|
503
|
+
79974, "from_name": "Our Company", "status_id": 1, "body_text": "some text
|
504
|
+
here", "body_html": "some html here"}, {"id": 53543, "subject": "Here''s a
|
505
|
+
good subject line", "offer_id": 79975, "from_name": "Our Company", "status_id":
|
506
|
+
1, "body_text": "some text here", "body_html": "some html here"}, {"id": 53544,
|
507
|
+
"subject": "Here''s a good subject line", "offer_id": 79976, "from_name":
|
508
|
+
"Our Company", "status_id": 1, "body_text": "some text here", "body_html":
|
509
|
+
"some html here"}, {"id": 53545, "subject": "Here''s a good subject line",
|
510
|
+
"offer_id": 79977, "from_name": "Our Company", "status_id": 1, "body_text":
|
511
|
+
"some text here", "body_html": "some html here"}, {"id": 53546, "subject":
|
512
|
+
"Here''s a good subject line", "offer_id": 79978, "from_name": "Our Company",
|
513
|
+
"status_id": 1, "body_text": "some text here", "body_html": "some html here"}]'
|
514
|
+
http_version:
|
515
|
+
recorded_at: Tue, 28 Apr 2015 21:38:13 GMT
|
516
|
+
recorded_with: VCR 2.9.3
|