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,428 @@
|
|
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
|
+
- Fri, 24 Apr 2015 22:34:54 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": 40341, "name": "new advertiser 5301926057bc34552824163d4d3aba28",
|
38
|
+
"status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:35:52",
|
39
|
+
"modify_date": "2015-04-24T18:35:52"}, {"id": 40342, "name": "new advertiser
|
40
|
+
9dbd931340d4e9e33a85ab7b61388d57", "status_id": 1, "category_id": 1010, "key":
|
41
|
+
"", "create_date": "2015-04-24T18:35:54", "modify_date": "2015-04-24T18:35:54"}]'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 24 Apr 2015 22:35:57 GMT
|
44
|
+
- request:
|
45
|
+
method: delete
|
46
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40341/
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Content-Type:
|
52
|
+
- application/json
|
53
|
+
User-Agent:
|
54
|
+
- OiApiRuby Gem 0.1.1
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
Date:
|
61
|
+
- Fri, 24 Apr 2015 22:34:55 GMT
|
62
|
+
Server:
|
63
|
+
- Apache/2.2.15 (CentOS)
|
64
|
+
Vary:
|
65
|
+
- Accept,Cookie
|
66
|
+
X-Frame-Options:
|
67
|
+
- SAMEORIGIN
|
68
|
+
Allow:
|
69
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
70
|
+
Connection:
|
71
|
+
- close
|
72
|
+
Transfer-Encoding:
|
73
|
+
- chunked
|
74
|
+
Content-Type:
|
75
|
+
- application/json
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
|
79
|
+
deleted"}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Fri, 24 Apr 2015 22:35:57 GMT
|
82
|
+
- request:
|
83
|
+
method: delete
|
84
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40342/
|
85
|
+
body:
|
86
|
+
encoding: US-ASCII
|
87
|
+
string: ''
|
88
|
+
headers:
|
89
|
+
Content-Type:
|
90
|
+
- application/json
|
91
|
+
User-Agent:
|
92
|
+
- OiApiRuby Gem 0.1.1
|
93
|
+
response:
|
94
|
+
status:
|
95
|
+
code: 200
|
96
|
+
message: OK
|
97
|
+
headers:
|
98
|
+
Date:
|
99
|
+
- Fri, 24 Apr 2015 22:34:55 GMT
|
100
|
+
Server:
|
101
|
+
- Apache/2.2.15 (CentOS)
|
102
|
+
Vary:
|
103
|
+
- Accept,Cookie
|
104
|
+
X-Frame-Options:
|
105
|
+
- SAMEORIGIN
|
106
|
+
Allow:
|
107
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
108
|
+
Connection:
|
109
|
+
- close
|
110
|
+
Transfer-Encoding:
|
111
|
+
- chunked
|
112
|
+
Content-Type:
|
113
|
+
- application/json
|
114
|
+
body:
|
115
|
+
encoding: UTF-8
|
116
|
+
string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
|
117
|
+
deleted"}'
|
118
|
+
http_version:
|
119
|
+
recorded_at: Fri, 24 Apr 2015 22:35:58 GMT
|
120
|
+
- request:
|
121
|
+
method: get
|
122
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
string: ''
|
126
|
+
headers:
|
127
|
+
Content-Type:
|
128
|
+
- application/json
|
129
|
+
User-Agent:
|
130
|
+
- OiApiRuby Gem 0.1.1
|
131
|
+
response:
|
132
|
+
status:
|
133
|
+
code: 200
|
134
|
+
message: OK
|
135
|
+
headers:
|
136
|
+
Date:
|
137
|
+
- Fri, 24 Apr 2015 22:34:56 GMT
|
138
|
+
Server:
|
139
|
+
- Apache/2.2.15 (CentOS)
|
140
|
+
Vary:
|
141
|
+
- Accept,Cookie
|
142
|
+
X-Frame-Options:
|
143
|
+
- SAMEORIGIN
|
144
|
+
Allow:
|
145
|
+
- GET, POST, HEAD, OPTIONS
|
146
|
+
Connection:
|
147
|
+
- close
|
148
|
+
Transfer-Encoding:
|
149
|
+
- chunked
|
150
|
+
Content-Type:
|
151
|
+
- application/json
|
152
|
+
body:
|
153
|
+
encoding: UTF-8
|
154
|
+
string: "[]"
|
155
|
+
http_version:
|
156
|
+
recorded_at: Fri, 24 Apr 2015 22:35:58 GMT
|
157
|
+
- request:
|
158
|
+
method: post
|
159
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
160
|
+
body:
|
161
|
+
encoding: UTF-8
|
162
|
+
string: '{"name":"new advertiser 5badb49d460bba8e9877b38bf0fc1f32","status_id":1,"category_id":1010}'
|
163
|
+
headers:
|
164
|
+
Content-Type:
|
165
|
+
- application/json
|
166
|
+
User-Agent:
|
167
|
+
- OiApiRuby Gem 0.1.1
|
168
|
+
response:
|
169
|
+
status:
|
170
|
+
code: 201
|
171
|
+
message: CREATED
|
172
|
+
headers:
|
173
|
+
Date:
|
174
|
+
- Fri, 24 Apr 2015 22:34:56 GMT
|
175
|
+
Server:
|
176
|
+
- Apache/2.2.15 (CentOS)
|
177
|
+
Vary:
|
178
|
+
- Accept,Cookie
|
179
|
+
X-Frame-Options:
|
180
|
+
- SAMEORIGIN
|
181
|
+
Allow:
|
182
|
+
- GET, POST, HEAD, OPTIONS
|
183
|
+
Connection:
|
184
|
+
- close
|
185
|
+
Transfer-Encoding:
|
186
|
+
- chunked
|
187
|
+
Content-Type:
|
188
|
+
- application/json
|
189
|
+
body:
|
190
|
+
encoding: UTF-8
|
191
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
192
|
+
created", "id": 40343}'
|
193
|
+
http_version:
|
194
|
+
recorded_at: Fri, 24 Apr 2015 22:35:58 GMT
|
195
|
+
- request:
|
196
|
+
method: post
|
197
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
198
|
+
body:
|
199
|
+
encoding: UTF-8
|
200
|
+
string: '{"advertiser_id":40343,"name":"Special Product e5ed9a121046994715daf230f95c1363","category_id":1010,"status_id":9,"headline":"Buy
|
201
|
+
our product today 5abae12d25db72d22acf2981d00d72e9","body":"Try for FREE for
|
202
|
+
a limited time only. This is your one-and-only chance! 7e0130aff07b1b749d74b0817bde7e4e","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
|
203
|
+
there"}'
|
204
|
+
headers:
|
205
|
+
Content-Type:
|
206
|
+
- application/json
|
207
|
+
User-Agent:
|
208
|
+
- OiApiRuby Gem 0.1.1
|
209
|
+
response:
|
210
|
+
status:
|
211
|
+
code: 201
|
212
|
+
message: CREATED
|
213
|
+
headers:
|
214
|
+
Date:
|
215
|
+
- Fri, 24 Apr 2015 22:34:56 GMT
|
216
|
+
Server:
|
217
|
+
- Apache/2.2.15 (CentOS)
|
218
|
+
Vary:
|
219
|
+
- Accept,Cookie
|
220
|
+
X-Frame-Options:
|
221
|
+
- SAMEORIGIN
|
222
|
+
Allow:
|
223
|
+
- GET, POST, HEAD, OPTIONS
|
224
|
+
Connection:
|
225
|
+
- close
|
226
|
+
Transfer-Encoding:
|
227
|
+
- chunked
|
228
|
+
Content-Type:
|
229
|
+
- application/json
|
230
|
+
body:
|
231
|
+
encoding: UTF-8
|
232
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
233
|
+
"id": 79761}'
|
234
|
+
http_version:
|
235
|
+
recorded_at: Fri, 24 Apr 2015 22:36:00 GMT
|
236
|
+
- request:
|
237
|
+
method: post
|
238
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
239
|
+
body:
|
240
|
+
encoding: UTF-8
|
241
|
+
string: '{"name":"new advertiser 674452214ccb7091d770024ef39761e1","status_id":1,"category_id":1010}'
|
242
|
+
headers:
|
243
|
+
Content-Type:
|
244
|
+
- application/json
|
245
|
+
User-Agent:
|
246
|
+
- OiApiRuby Gem 0.1.1
|
247
|
+
response:
|
248
|
+
status:
|
249
|
+
code: 201
|
250
|
+
message: CREATED
|
251
|
+
headers:
|
252
|
+
Date:
|
253
|
+
- Fri, 24 Apr 2015 22:34:58 GMT
|
254
|
+
Server:
|
255
|
+
- Apache/2.2.15 (CentOS)
|
256
|
+
Vary:
|
257
|
+
- Accept,Cookie
|
258
|
+
X-Frame-Options:
|
259
|
+
- SAMEORIGIN
|
260
|
+
Allow:
|
261
|
+
- GET, POST, HEAD, OPTIONS
|
262
|
+
Connection:
|
263
|
+
- close
|
264
|
+
Transfer-Encoding:
|
265
|
+
- chunked
|
266
|
+
Content-Type:
|
267
|
+
- application/json
|
268
|
+
body:
|
269
|
+
encoding: UTF-8
|
270
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
271
|
+
created", "id": 40345}'
|
272
|
+
http_version:
|
273
|
+
recorded_at: Fri, 24 Apr 2015 22:36:00 GMT
|
274
|
+
- request:
|
275
|
+
method: post
|
276
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
277
|
+
body:
|
278
|
+
encoding: UTF-8
|
279
|
+
string: '{"advertiser_id":40345,"name":"Special Product 9235491d92fac9977879ce5fa74e6e3f","category_id":1010,"status_id":9,"headline":"Buy
|
280
|
+
our product today f0ef8ca99d564d0c757c04820dd33990","body":"Try for FREE for
|
281
|
+
a limited time only. This is your one-and-only chance! 998a1f54f17fb14c8f7790849c0255d6","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
|
282
|
+
there"}'
|
283
|
+
headers:
|
284
|
+
Content-Type:
|
285
|
+
- application/json
|
286
|
+
User-Agent:
|
287
|
+
- OiApiRuby Gem 0.1.1
|
288
|
+
response:
|
289
|
+
status:
|
290
|
+
code: 201
|
291
|
+
message: CREATED
|
292
|
+
headers:
|
293
|
+
Date:
|
294
|
+
- Fri, 24 Apr 2015 22:34:58 GMT
|
295
|
+
Server:
|
296
|
+
- Apache/2.2.15 (CentOS)
|
297
|
+
Vary:
|
298
|
+
- Accept,Cookie
|
299
|
+
X-Frame-Options:
|
300
|
+
- SAMEORIGIN
|
301
|
+
Allow:
|
302
|
+
- GET, POST, HEAD, OPTIONS
|
303
|
+
Connection:
|
304
|
+
- close
|
305
|
+
Transfer-Encoding:
|
306
|
+
- chunked
|
307
|
+
Content-Type:
|
308
|
+
- application/json
|
309
|
+
body:
|
310
|
+
encoding: UTF-8
|
311
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
312
|
+
"id": 79762}'
|
313
|
+
http_version:
|
314
|
+
recorded_at: Fri, 24 Apr 2015 22:36:02 GMT
|
315
|
+
- request:
|
316
|
+
method: post
|
317
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79761/datatransfers/
|
318
|
+
body:
|
319
|
+
encoding: UTF-8
|
320
|
+
string: '{"name":"DT for Special Product 1 ad67f26a29feaa31f84514356ed24b06","status_id":1,"type":"http","offer_id":79761,"dt_info":{"base_url":"http://www.someclientbaseurl.com","method":"POST"},"data_fields":[{"email":"#{EM}"},{"first_name":"#{FN}"},{"last_name":"#{LN}"},{"zip":"#{PO}"},{"gender":"#{G}"}]}'
|
321
|
+
headers:
|
322
|
+
Content-Type:
|
323
|
+
- application/json
|
324
|
+
User-Agent:
|
325
|
+
- OiApiRuby Gem 0.1.1
|
326
|
+
response:
|
327
|
+
status:
|
328
|
+
code: 200
|
329
|
+
message: OK
|
330
|
+
headers:
|
331
|
+
Date:
|
332
|
+
- Fri, 24 Apr 2015 22:35:00 GMT
|
333
|
+
Server:
|
334
|
+
- Apache/2.2.15 (CentOS)
|
335
|
+
Vary:
|
336
|
+
- Accept,Cookie
|
337
|
+
X-Frame-Options:
|
338
|
+
- SAMEORIGIN
|
339
|
+
Allow:
|
340
|
+
- GET, POST, HEAD, OPTIONS
|
341
|
+
Connection:
|
342
|
+
- close
|
343
|
+
Transfer-Encoding:
|
344
|
+
- chunked
|
345
|
+
Content-Type:
|
346
|
+
- application/json
|
347
|
+
body:
|
348
|
+
encoding: UTF-8
|
349
|
+
string: '{"status": "Create Successful", "id": 90060}'
|
350
|
+
http_version:
|
351
|
+
recorded_at: Fri, 24 Apr 2015 22:36:02 GMT
|
352
|
+
- request:
|
353
|
+
method: delete
|
354
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/datatransfers/90060/
|
355
|
+
body:
|
356
|
+
encoding: US-ASCII
|
357
|
+
string: ''
|
358
|
+
headers:
|
359
|
+
Content-Type:
|
360
|
+
- application/json
|
361
|
+
User-Agent:
|
362
|
+
- OiApiRuby Gem 0.1.1
|
363
|
+
response:
|
364
|
+
status:
|
365
|
+
code: 200
|
366
|
+
message: OK
|
367
|
+
headers:
|
368
|
+
Date:
|
369
|
+
- Fri, 24 Apr 2015 22:35:00 GMT
|
370
|
+
Server:
|
371
|
+
- Apache/2.2.15 (CentOS)
|
372
|
+
Vary:
|
373
|
+
- Accept,Cookie
|
374
|
+
X-Frame-Options:
|
375
|
+
- SAMEORIGIN
|
376
|
+
Allow:
|
377
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
378
|
+
Connection:
|
379
|
+
- close
|
380
|
+
Transfer-Encoding:
|
381
|
+
- chunked
|
382
|
+
Content-Type:
|
383
|
+
- application/json
|
384
|
+
body:
|
385
|
+
encoding: UTF-8
|
386
|
+
string: '{"status": "Request Successful", "message": "DataTransfer Succesfully
|
387
|
+
Deleted"}'
|
388
|
+
http_version:
|
389
|
+
recorded_at: Fri, 24 Apr 2015 22:36:02 GMT
|
390
|
+
- request:
|
391
|
+
method: get
|
392
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/datatransfers/90060/
|
393
|
+
body:
|
394
|
+
encoding: US-ASCII
|
395
|
+
string: ''
|
396
|
+
headers:
|
397
|
+
Content-Type:
|
398
|
+
- application/json
|
399
|
+
User-Agent:
|
400
|
+
- OiApiRuby Gem 0.1.1
|
401
|
+
response:
|
402
|
+
status:
|
403
|
+
code: 400
|
404
|
+
message: BAD REQUEST
|
405
|
+
headers:
|
406
|
+
Date:
|
407
|
+
- Fri, 24 Apr 2015 22:35:00 GMT
|
408
|
+
Server:
|
409
|
+
- Apache/2.2.15 (CentOS)
|
410
|
+
Vary:
|
411
|
+
- Accept,Cookie
|
412
|
+
X-Frame-Options:
|
413
|
+
- SAMEORIGIN
|
414
|
+
Allow:
|
415
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
416
|
+
Connection:
|
417
|
+
- close
|
418
|
+
Transfer-Encoding:
|
419
|
+
- chunked
|
420
|
+
Content-Type:
|
421
|
+
- application/json
|
422
|
+
body:
|
423
|
+
encoding: UTF-8
|
424
|
+
string: '{"status": "Retrieve Failed", "message": "No permission to view data
|
425
|
+
transfer for offer."}'
|
426
|
+
http_version:
|
427
|
+
recorded_at: Fri, 24 Apr 2015 22:36:03 GMT
|
428
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,390 @@
|
|
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
|
+
- Fri, 24 Apr 2015 22:35:06 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": 40346, "name": "new advertiser ce623fa24c42af99839eaa8032edf609",
|
38
|
+
"status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:36:04",
|
39
|
+
"modify_date": "2015-04-24T18:36:04"}, {"id": 40347, "name": "new advertiser
|
40
|
+
9bd562a4023e0269fd3fb3353c8c2a4f", "status_id": 1, "category_id": 1010, "key":
|
41
|
+
"", "create_date": "2015-04-24T18:36:06", "modify_date": "2015-04-24T18:36:06"}]'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 24 Apr 2015 22:36:08 GMT
|
44
|
+
- request:
|
45
|
+
method: delete
|
46
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40346/
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Content-Type:
|
52
|
+
- application/json
|
53
|
+
User-Agent:
|
54
|
+
- OiApiRuby Gem 0.1.1
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
Date:
|
61
|
+
- Fri, 24 Apr 2015 22:35:06 GMT
|
62
|
+
Server:
|
63
|
+
- Apache/2.2.15 (CentOS)
|
64
|
+
Vary:
|
65
|
+
- Accept,Cookie
|
66
|
+
X-Frame-Options:
|
67
|
+
- SAMEORIGIN
|
68
|
+
Allow:
|
69
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
70
|
+
Connection:
|
71
|
+
- close
|
72
|
+
Transfer-Encoding:
|
73
|
+
- chunked
|
74
|
+
Content-Type:
|
75
|
+
- application/json
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
|
79
|
+
deleted"}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Fri, 24 Apr 2015 22:36:09 GMT
|
82
|
+
- request:
|
83
|
+
method: delete
|
84
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40347/
|
85
|
+
body:
|
86
|
+
encoding: US-ASCII
|
87
|
+
string: ''
|
88
|
+
headers:
|
89
|
+
Content-Type:
|
90
|
+
- application/json
|
91
|
+
User-Agent:
|
92
|
+
- OiApiRuby Gem 0.1.1
|
93
|
+
response:
|
94
|
+
status:
|
95
|
+
code: 200
|
96
|
+
message: OK
|
97
|
+
headers:
|
98
|
+
Date:
|
99
|
+
- Fri, 24 Apr 2015 22:35:07 GMT
|
100
|
+
Server:
|
101
|
+
- Apache/2.2.15 (CentOS)
|
102
|
+
Vary:
|
103
|
+
- Accept,Cookie
|
104
|
+
X-Frame-Options:
|
105
|
+
- SAMEORIGIN
|
106
|
+
Allow:
|
107
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
108
|
+
Connection:
|
109
|
+
- close
|
110
|
+
Transfer-Encoding:
|
111
|
+
- chunked
|
112
|
+
Content-Type:
|
113
|
+
- application/json
|
114
|
+
body:
|
115
|
+
encoding: UTF-8
|
116
|
+
string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
|
117
|
+
deleted"}'
|
118
|
+
http_version:
|
119
|
+
recorded_at: Fri, 24 Apr 2015 22:36:09 GMT
|
120
|
+
- request:
|
121
|
+
method: get
|
122
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
123
|
+
body:
|
124
|
+
encoding: US-ASCII
|
125
|
+
string: ''
|
126
|
+
headers:
|
127
|
+
Content-Type:
|
128
|
+
- application/json
|
129
|
+
User-Agent:
|
130
|
+
- OiApiRuby Gem 0.1.1
|
131
|
+
response:
|
132
|
+
status:
|
133
|
+
code: 200
|
134
|
+
message: OK
|
135
|
+
headers:
|
136
|
+
Date:
|
137
|
+
- Fri, 24 Apr 2015 22:35:07 GMT
|
138
|
+
Server:
|
139
|
+
- Apache/2.2.15 (CentOS)
|
140
|
+
Vary:
|
141
|
+
- Accept,Cookie
|
142
|
+
X-Frame-Options:
|
143
|
+
- SAMEORIGIN
|
144
|
+
Allow:
|
145
|
+
- GET, POST, HEAD, OPTIONS
|
146
|
+
Connection:
|
147
|
+
- close
|
148
|
+
Transfer-Encoding:
|
149
|
+
- chunked
|
150
|
+
Content-Type:
|
151
|
+
- application/json
|
152
|
+
body:
|
153
|
+
encoding: UTF-8
|
154
|
+
string: "[]"
|
155
|
+
http_version:
|
156
|
+
recorded_at: Fri, 24 Apr 2015 22:36:09 GMT
|
157
|
+
- request:
|
158
|
+
method: post
|
159
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
160
|
+
body:
|
161
|
+
encoding: UTF-8
|
162
|
+
string: '{"name":"new advertiser 30d3c3d6b1b4048c0a819652918b4b6e","status_id":1,"category_id":1010}'
|
163
|
+
headers:
|
164
|
+
Content-Type:
|
165
|
+
- application/json
|
166
|
+
User-Agent:
|
167
|
+
- OiApiRuby Gem 0.1.1
|
168
|
+
response:
|
169
|
+
status:
|
170
|
+
code: 201
|
171
|
+
message: CREATED
|
172
|
+
headers:
|
173
|
+
Date:
|
174
|
+
- Fri, 24 Apr 2015 22:35:07 GMT
|
175
|
+
Server:
|
176
|
+
- Apache/2.2.15 (CentOS)
|
177
|
+
Vary:
|
178
|
+
- Accept,Cookie
|
179
|
+
X-Frame-Options:
|
180
|
+
- SAMEORIGIN
|
181
|
+
Allow:
|
182
|
+
- GET, POST, HEAD, OPTIONS
|
183
|
+
Connection:
|
184
|
+
- close
|
185
|
+
Transfer-Encoding:
|
186
|
+
- chunked
|
187
|
+
Content-Type:
|
188
|
+
- application/json
|
189
|
+
body:
|
190
|
+
encoding: UTF-8
|
191
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
192
|
+
created", "id": 40348}'
|
193
|
+
http_version:
|
194
|
+
recorded_at: Fri, 24 Apr 2015 22:36:10 GMT
|
195
|
+
- request:
|
196
|
+
method: post
|
197
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
198
|
+
body:
|
199
|
+
encoding: UTF-8
|
200
|
+
string: '{"advertiser_id":40348,"name":"Special Product 9c067b1dec0f3edbc3cbb879e89edb56","category_id":1010,"status_id":9,"headline":"Buy
|
201
|
+
our product today 6dbdfc0c5b8194dbe4eac020d2b79b1c","body":"Try for FREE for
|
202
|
+
a limited time only. This is your one-and-only chance! b9a25fe13a9ced3090cd64060e42ed34","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
|
203
|
+
there"}'
|
204
|
+
headers:
|
205
|
+
Content-Type:
|
206
|
+
- application/json
|
207
|
+
User-Agent:
|
208
|
+
- OiApiRuby Gem 0.1.1
|
209
|
+
response:
|
210
|
+
status:
|
211
|
+
code: 201
|
212
|
+
message: CREATED
|
213
|
+
headers:
|
214
|
+
Date:
|
215
|
+
- Fri, 24 Apr 2015 22:35:08 GMT
|
216
|
+
Server:
|
217
|
+
- Apache/2.2.15 (CentOS)
|
218
|
+
Vary:
|
219
|
+
- Accept,Cookie
|
220
|
+
X-Frame-Options:
|
221
|
+
- SAMEORIGIN
|
222
|
+
Allow:
|
223
|
+
- GET, POST, HEAD, OPTIONS
|
224
|
+
Connection:
|
225
|
+
- close
|
226
|
+
Transfer-Encoding:
|
227
|
+
- chunked
|
228
|
+
Content-Type:
|
229
|
+
- application/json
|
230
|
+
body:
|
231
|
+
encoding: UTF-8
|
232
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
233
|
+
"id": 79765}'
|
234
|
+
http_version:
|
235
|
+
recorded_at: Fri, 24 Apr 2015 22:36:11 GMT
|
236
|
+
- request:
|
237
|
+
method: post
|
238
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
239
|
+
body:
|
240
|
+
encoding: UTF-8
|
241
|
+
string: '{"name":"new advertiser 305ee2f3c994009f283934b1ac62921e","status_id":1,"category_id":1010}'
|
242
|
+
headers:
|
243
|
+
Content-Type:
|
244
|
+
- application/json
|
245
|
+
User-Agent:
|
246
|
+
- OiApiRuby Gem 0.1.1
|
247
|
+
response:
|
248
|
+
status:
|
249
|
+
code: 201
|
250
|
+
message: CREATED
|
251
|
+
headers:
|
252
|
+
Date:
|
253
|
+
- Fri, 24 Apr 2015 22:35:09 GMT
|
254
|
+
Server:
|
255
|
+
- Apache/2.2.15 (CentOS)
|
256
|
+
Vary:
|
257
|
+
- Accept,Cookie
|
258
|
+
X-Frame-Options:
|
259
|
+
- SAMEORIGIN
|
260
|
+
Allow:
|
261
|
+
- GET, POST, HEAD, OPTIONS
|
262
|
+
Connection:
|
263
|
+
- close
|
264
|
+
Transfer-Encoding:
|
265
|
+
- chunked
|
266
|
+
Content-Type:
|
267
|
+
- application/json
|
268
|
+
body:
|
269
|
+
encoding: UTF-8
|
270
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
271
|
+
created", "id": 40349}'
|
272
|
+
http_version:
|
273
|
+
recorded_at: Fri, 24 Apr 2015 22:36:11 GMT
|
274
|
+
- request:
|
275
|
+
method: post
|
276
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
277
|
+
body:
|
278
|
+
encoding: UTF-8
|
279
|
+
string: '{"advertiser_id":40349,"name":"Special Product 4899590ea8c8b78a5726644450c05b58","category_id":1010,"status_id":9,"headline":"Buy
|
280
|
+
our product today b9b2b108656157f8eb2fd4d566084b8f","body":"Try for FREE for
|
281
|
+
a limited time only. This is your one-and-only chance! cbe205dbdf0bfcddaa962408dddf1001","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
|
282
|
+
there"}'
|
283
|
+
headers:
|
284
|
+
Content-Type:
|
285
|
+
- application/json
|
286
|
+
User-Agent:
|
287
|
+
- OiApiRuby Gem 0.1.1
|
288
|
+
response:
|
289
|
+
status:
|
290
|
+
code: 201
|
291
|
+
message: CREATED
|
292
|
+
headers:
|
293
|
+
Date:
|
294
|
+
- Fri, 24 Apr 2015 22:35:09 GMT
|
295
|
+
Server:
|
296
|
+
- Apache/2.2.15 (CentOS)
|
297
|
+
Vary:
|
298
|
+
- Accept,Cookie
|
299
|
+
X-Frame-Options:
|
300
|
+
- SAMEORIGIN
|
301
|
+
Allow:
|
302
|
+
- GET, POST, HEAD, OPTIONS
|
303
|
+
Connection:
|
304
|
+
- close
|
305
|
+
Transfer-Encoding:
|
306
|
+
- chunked
|
307
|
+
Content-Type:
|
308
|
+
- application/json
|
309
|
+
body:
|
310
|
+
encoding: UTF-8
|
311
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
312
|
+
"id": 79766}'
|
313
|
+
http_version:
|
314
|
+
recorded_at: Fri, 24 Apr 2015 22:36:13 GMT
|
315
|
+
- request:
|
316
|
+
method: post
|
317
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79765/datatransfers/
|
318
|
+
body:
|
319
|
+
encoding: UTF-8
|
320
|
+
string: '{"name":"DT for Special Product 1 8deb1d63763af14bbdef082df2287d9e","status_id":1,"type":"http","offer_id":79765,"dt_info":{"base_url":"http://www.someclientbaseurl.com","method":"POST"},"data_fields":[{"email":"#{EM}"},{"first_name":"#{FN}"},{"last_name":"#{LN}"},{"zip":"#{PO}"},{"gender":"#{G}"}]}'
|
321
|
+
headers:
|
322
|
+
Content-Type:
|
323
|
+
- application/json
|
324
|
+
User-Agent:
|
325
|
+
- OiApiRuby Gem 0.1.1
|
326
|
+
response:
|
327
|
+
status:
|
328
|
+
code: 200
|
329
|
+
message: OK
|
330
|
+
headers:
|
331
|
+
Date:
|
332
|
+
- Fri, 24 Apr 2015 22:35:11 GMT
|
333
|
+
Server:
|
334
|
+
- Apache/2.2.15 (CentOS)
|
335
|
+
Vary:
|
336
|
+
- Accept,Cookie
|
337
|
+
X-Frame-Options:
|
338
|
+
- SAMEORIGIN
|
339
|
+
Allow:
|
340
|
+
- GET, POST, HEAD, OPTIONS
|
341
|
+
Connection:
|
342
|
+
- close
|
343
|
+
Transfer-Encoding:
|
344
|
+
- chunked
|
345
|
+
Content-Type:
|
346
|
+
- application/json
|
347
|
+
body:
|
348
|
+
encoding: UTF-8
|
349
|
+
string: '{"status": "Create Successful", "id": 90062}'
|
350
|
+
http_version:
|
351
|
+
recorded_at: Fri, 24 Apr 2015 22:36:13 GMT
|
352
|
+
- request:
|
353
|
+
method: delete
|
354
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/datatransfers/90062/
|
355
|
+
body:
|
356
|
+
encoding: US-ASCII
|
357
|
+
string: ''
|
358
|
+
headers:
|
359
|
+
Content-Type:
|
360
|
+
- application/json
|
361
|
+
User-Agent:
|
362
|
+
- OiApiRuby Gem 0.1.1
|
363
|
+
response:
|
364
|
+
status:
|
365
|
+
code: 200
|
366
|
+
message: OK
|
367
|
+
headers:
|
368
|
+
Date:
|
369
|
+
- Fri, 24 Apr 2015 22:35:11 GMT
|
370
|
+
Server:
|
371
|
+
- Apache/2.2.15 (CentOS)
|
372
|
+
Vary:
|
373
|
+
- Accept,Cookie
|
374
|
+
X-Frame-Options:
|
375
|
+
- SAMEORIGIN
|
376
|
+
Allow:
|
377
|
+
- GET, PUT, DELETE, HEAD, OPTIONS
|
378
|
+
Connection:
|
379
|
+
- close
|
380
|
+
Transfer-Encoding:
|
381
|
+
- chunked
|
382
|
+
Content-Type:
|
383
|
+
- application/json
|
384
|
+
body:
|
385
|
+
encoding: UTF-8
|
386
|
+
string: '{"status": "Request Successful", "message": "DataTransfer Succesfully
|
387
|
+
Deleted"}'
|
388
|
+
http_version:
|
389
|
+
recorded_at: Fri, 24 Apr 2015 22:36:14 GMT
|
390
|
+
recorded_with: VCR 2.9.3
|