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,194 @@
|
|
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:37:43 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: "[]"
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 24 Apr 2015 22:38:45 GMT
|
40
|
+
- request:
|
41
|
+
method: get
|
42
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Content-Type:
|
48
|
+
- application/json
|
49
|
+
User-Agent:
|
50
|
+
- OiApiRuby Gem 0.1.1
|
51
|
+
response:
|
52
|
+
status:
|
53
|
+
code: 200
|
54
|
+
message: OK
|
55
|
+
headers:
|
56
|
+
Date:
|
57
|
+
- Fri, 24 Apr 2015 22:37:43 GMT
|
58
|
+
Server:
|
59
|
+
- Apache/2.2.15 (CentOS)
|
60
|
+
Vary:
|
61
|
+
- Accept,Cookie
|
62
|
+
X-Frame-Options:
|
63
|
+
- SAMEORIGIN
|
64
|
+
Allow:
|
65
|
+
- GET, POST, HEAD, OPTIONS
|
66
|
+
Connection:
|
67
|
+
- close
|
68
|
+
Transfer-Encoding:
|
69
|
+
- chunked
|
70
|
+
Content-Type:
|
71
|
+
- application/json
|
72
|
+
body:
|
73
|
+
encoding: UTF-8
|
74
|
+
string: "[]"
|
75
|
+
http_version:
|
76
|
+
recorded_at: Fri, 24 Apr 2015 22:38:46 GMT
|
77
|
+
- request:
|
78
|
+
method: post
|
79
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
|
80
|
+
body:
|
81
|
+
encoding: UTF-8
|
82
|
+
string: '{"name":"new advertiser 66266b392f548fbbbc56ebf897bbb112","status_id":1,"category_id":1010}'
|
83
|
+
headers:
|
84
|
+
Content-Type:
|
85
|
+
- application/json
|
86
|
+
User-Agent:
|
87
|
+
- OiApiRuby Gem 0.1.1
|
88
|
+
response:
|
89
|
+
status:
|
90
|
+
code: 201
|
91
|
+
message: CREATED
|
92
|
+
headers:
|
93
|
+
Date:
|
94
|
+
- Fri, 24 Apr 2015 22:37:44 GMT
|
95
|
+
Server:
|
96
|
+
- Apache/2.2.15 (CentOS)
|
97
|
+
Vary:
|
98
|
+
- Accept,Cookie
|
99
|
+
X-Frame-Options:
|
100
|
+
- SAMEORIGIN
|
101
|
+
Allow:
|
102
|
+
- GET, POST, HEAD, OPTIONS
|
103
|
+
Connection:
|
104
|
+
- close
|
105
|
+
Transfer-Encoding:
|
106
|
+
- chunked
|
107
|
+
Content-Type:
|
108
|
+
- application/json
|
109
|
+
body:
|
110
|
+
encoding: UTF-8
|
111
|
+
string: '{"status": "Create Successful", "message": "Advertiser successfully
|
112
|
+
created", "id": 40402}'
|
113
|
+
http_version:
|
114
|
+
recorded_at: Fri, 24 Apr 2015 22:38:46 GMT
|
115
|
+
- request:
|
116
|
+
method: post
|
117
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
|
118
|
+
body:
|
119
|
+
encoding: UTF-8
|
120
|
+
string: '{"advertiser_id":40402,"name":"Special Product ec54df90740e2bdf5a709d7d4fc24ac3","category_id":1010,"status_id":9,"headline":"Buy
|
121
|
+
our product today 95fed0d1c7efceb24ee80288f44983d5","body":"Try for FREE for
|
122
|
+
a limited time only. This is your one-and-only chance! 820aeb0afef2c58794f0f3c81dd25b6a","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
|
123
|
+
there"}'
|
124
|
+
headers:
|
125
|
+
Content-Type:
|
126
|
+
- application/json
|
127
|
+
User-Agent:
|
128
|
+
- OiApiRuby Gem 0.1.1
|
129
|
+
response:
|
130
|
+
status:
|
131
|
+
code: 201
|
132
|
+
message: CREATED
|
133
|
+
headers:
|
134
|
+
Date:
|
135
|
+
- Fri, 24 Apr 2015 22:37:44 GMT
|
136
|
+
Server:
|
137
|
+
- Apache/2.2.15 (CentOS)
|
138
|
+
Vary:
|
139
|
+
- Accept,Cookie
|
140
|
+
X-Frame-Options:
|
141
|
+
- SAMEORIGIN
|
142
|
+
Allow:
|
143
|
+
- GET, POST, HEAD, OPTIONS
|
144
|
+
Connection:
|
145
|
+
- close
|
146
|
+
Transfer-Encoding:
|
147
|
+
- chunked
|
148
|
+
Content-Type:
|
149
|
+
- application/json
|
150
|
+
body:
|
151
|
+
encoding: UTF-8
|
152
|
+
string: '{"status": "Request Successful", "message": "Offer successfully created",
|
153
|
+
"id": 79816}'
|
154
|
+
http_version:
|
155
|
+
recorded_at: Fri, 24 Apr 2015 22:38:47 GMT
|
156
|
+
- request:
|
157
|
+
method: put
|
158
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79816/
|
159
|
+
body:
|
160
|
+
encoding: UTF-8
|
161
|
+
string: '{"name":null}'
|
162
|
+
headers:
|
163
|
+
Content-Type:
|
164
|
+
- application/json
|
165
|
+
User-Agent:
|
166
|
+
- OiApiRuby Gem 0.1.1
|
167
|
+
response:
|
168
|
+
status:
|
169
|
+
code: 400
|
170
|
+
message: BAD REQUEST
|
171
|
+
headers:
|
172
|
+
Date:
|
173
|
+
- Fri, 24 Apr 2015 22:37:45 GMT
|
174
|
+
Server:
|
175
|
+
- Apache/2.2.15 (CentOS)
|
176
|
+
Vary:
|
177
|
+
- Accept,Cookie
|
178
|
+
X-Frame-Options:
|
179
|
+
- SAMEORIGIN
|
180
|
+
Allow:
|
181
|
+
- GET, PUT, HEAD, OPTIONS
|
182
|
+
Connection:
|
183
|
+
- close
|
184
|
+
Transfer-Encoding:
|
185
|
+
- chunked
|
186
|
+
Content-Type:
|
187
|
+
- application/json
|
188
|
+
body:
|
189
|
+
encoding: UTF-8
|
190
|
+
string: '{"status": "Update Failed", "message": {"name": ["This field cannot
|
191
|
+
be blank."]}}'
|
192
|
+
http_version:
|
193
|
+
recorded_at: Fri, 24 Apr 2015 22:38:48 GMT
|
194
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,234 @@
|
|
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:37: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: '[{"id": 40402, "name": "new advertiser 66266b392f548fbbbc56ebf897bbb112",
|
38
|
+
"status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:38:46",
|
39
|
+
"modify_date": "2015-04-24T18:38:46"}]'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Fri, 24 Apr 2015 22:38:48 GMT
|
42
|
+
- request:
|
43
|
+
method: delete
|
44
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40402/
|
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
|
+
- Fri, 24 Apr 2015 22:37:46 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: Fri, 24 Apr 2015 22:38:48 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
|
+
- Fri, 24 Apr 2015 22:37:46 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: Fri, 24 Apr 2015 22:38:49 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 776a359bc821d808f85f92cec8bcba03","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
|
+
- Fri, 24 Apr 2015 22:37:47 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": 40403}'
|
153
|
+
http_version:
|
154
|
+
recorded_at: Fri, 24 Apr 2015 22:38:49 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":40403,"name":"Special Product ff03b9011121ae30daffad040c3da4de","category_id":1010,"status_id":9,"headline":"Buy
|
161
|
+
our product today 915714089ad309c98b0aad80502f1e18","body":"Try for FREE for
|
162
|
+
a limited time only. This is your one-and-only chance! bf5e0731b555af35209758532fab8e5c","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
|
+
- Fri, 24 Apr 2015 22:37:47 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": 79817}'
|
194
|
+
http_version:
|
195
|
+
recorded_at: Fri, 24 Apr 2015 22:38:51 GMT
|
196
|
+
- request:
|
197
|
+
method: put
|
198
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79817/
|
199
|
+
body:
|
200
|
+
encoding: UTF-8
|
201
|
+
string: '{"name":null}'
|
202
|
+
headers:
|
203
|
+
Content-Type:
|
204
|
+
- application/json
|
205
|
+
User-Agent:
|
206
|
+
- OiApiRuby Gem 0.1.1
|
207
|
+
response:
|
208
|
+
status:
|
209
|
+
code: 400
|
210
|
+
message: BAD REQUEST
|
211
|
+
headers:
|
212
|
+
Date:
|
213
|
+
- Fri, 24 Apr 2015 22:37:49 GMT
|
214
|
+
Server:
|
215
|
+
- Apache/2.2.15 (CentOS)
|
216
|
+
Vary:
|
217
|
+
- Accept,Cookie
|
218
|
+
X-Frame-Options:
|
219
|
+
- SAMEORIGIN
|
220
|
+
Allow:
|
221
|
+
- GET, PUT, HEAD, OPTIONS
|
222
|
+
Connection:
|
223
|
+
- close
|
224
|
+
Transfer-Encoding:
|
225
|
+
- chunked
|
226
|
+
Content-Type:
|
227
|
+
- application/json
|
228
|
+
body:
|
229
|
+
encoding: UTF-8
|
230
|
+
string: '{"status": "Update Failed", "message": {"name": ["This field cannot
|
231
|
+
be blank."]}}'
|
232
|
+
http_version:
|
233
|
+
recorded_at: Fri, 24 Apr 2015 22:38:51 GMT
|
234
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,234 @@
|
|
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:37:49 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": 40403, "name": "new advertiser 776a359bc821d808f85f92cec8bcba03",
|
38
|
+
"status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:38:49",
|
39
|
+
"modify_date": "2015-04-24T18:38:49"}]'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Fri, 24 Apr 2015 22:38:51 GMT
|
42
|
+
- request:
|
43
|
+
method: delete
|
44
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40403/
|
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
|
+
- Fri, 24 Apr 2015 22:37:49 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: Fri, 24 Apr 2015 22:38:52 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
|
+
- Fri, 24 Apr 2015 22:37:49 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: Fri, 24 Apr 2015 22:38:52 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 e792092b0d37c198b619a4eeff59f2c1","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
|
+
- Fri, 24 Apr 2015 22:37:50 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": 40404}'
|
153
|
+
http_version:
|
154
|
+
recorded_at: Fri, 24 Apr 2015 22:38:52 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":40404,"name":"Special Product ef9abe97f03756d9e7e5e8f64f15f3c3","category_id":1010,"status_id":9,"headline":"Buy
|
161
|
+
our product today b1b4403841f2b08d2e00262317263c83","body":"Try for FREE for
|
162
|
+
a limited time only. This is your one-and-only chance! cda138d6f8e58025d4ee21abdf47b5fd","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
|
+
- Fri, 24 Apr 2015 22:37:50 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": 79818}'
|
194
|
+
http_version:
|
195
|
+
recorded_at: Fri, 24 Apr 2015 22:38:54 GMT
|
196
|
+
- request:
|
197
|
+
method: put
|
198
|
+
uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79818/
|
199
|
+
body:
|
200
|
+
encoding: UTF-8
|
201
|
+
string: '{"name":null}'
|
202
|
+
headers:
|
203
|
+
Content-Type:
|
204
|
+
- application/json
|
205
|
+
User-Agent:
|
206
|
+
- OiApiRuby Gem 0.1.1
|
207
|
+
response:
|
208
|
+
status:
|
209
|
+
code: 400
|
210
|
+
message: BAD REQUEST
|
211
|
+
headers:
|
212
|
+
Date:
|
213
|
+
- Fri, 24 Apr 2015 22:37:52 GMT
|
214
|
+
Server:
|
215
|
+
- Apache/2.2.15 (CentOS)
|
216
|
+
Vary:
|
217
|
+
- Accept,Cookie
|
218
|
+
X-Frame-Options:
|
219
|
+
- SAMEORIGIN
|
220
|
+
Allow:
|
221
|
+
- GET, PUT, HEAD, OPTIONS
|
222
|
+
Connection:
|
223
|
+
- close
|
224
|
+
Transfer-Encoding:
|
225
|
+
- chunked
|
226
|
+
Content-Type:
|
227
|
+
- application/json
|
228
|
+
body:
|
229
|
+
encoding: UTF-8
|
230
|
+
string: '{"status": "Update Failed", "message": {"name": ["This field cannot
|
231
|
+
be blank."]}}'
|
232
|
+
http_version:
|
233
|
+
recorded_at: Fri, 24 Apr 2015 22:38:54 GMT
|
234
|
+
recorded_with: VCR 2.9.3
|