oi-api-ruby 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +7 -0
  2. data/.env.sample +2 -0
  3. data/.gitignore +3 -0
  4. data/.rspec +4 -0
  5. data/.ruby-version +1 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +35 -0
  9. data/Rakefile +9 -0
  10. data/api_issues.md +89 -0
  11. data/lib/oi_api.rb +12 -0
  12. data/lib/oi_api/client.rb +98 -0
  13. data/lib/oi_api/client/advertisers.rb +31 -0
  14. data/lib/oi_api/client/auto_responders.rb +35 -0
  15. data/lib/oi_api/client/balances.rb +15 -0
  16. data/lib/oi_api/client/cards.rb +33 -0
  17. data/lib/oi_api/client/charges.rb +15 -0
  18. data/lib/oi_api/client/data_transfers.rb +31 -0
  19. data/lib/oi_api/client/offers.rb +32 -0
  20. data/lib/oi_api/client/reports.rb +15 -0
  21. data/lib/oi_api/client/subscriptions.rb +23 -0
  22. data/lib/oi_api/configuration.rb +50 -0
  23. data/lib/oi_api/lookup_tables.rb +42 -0
  24. data/lib/oi_api/version.rb +3 -0
  25. data/oi-api-ruby.gemspec +31 -0
  26. data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/returns_200_OK.yml +157 -0
  27. data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +157 -0
  28. data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/returns_the_resource.yml +157 -0
  29. data/spec/cassettes/OiApi_Client_Advertisers/_advertiser/it_should_behave_like_GET_resource/when_advertiser_id_not_found/returns_404.yml +77 -0
  30. 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
  31. data/spec/cassettes/OiApi_Client_Advertisers/_advertisers/it_should_behave_like_GET_resources/returns_200_OK.yml +157 -0
  32. data/spec/cassettes/OiApi_Client_Advertisers/_advertisers/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +237 -0
  33. data/spec/cassettes/OiApi_Client_Advertisers/_advertisers/it_should_behave_like_GET_resources/returns_all_resources.yml +237 -0
  34. 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
  35. data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +77 -0
  36. data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +77 -0
  37. data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/returns_201_created.yml +118 -0
  38. data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/returns_a_success_message.yml +78 -0
  39. data/spec/cassettes/OiApi_Client_Advertisers/_create_advertiser/it_should_behave_like_POST_resource/returns_a_success_status.yml +118 -0
  40. data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/deletes_a_data_transfer.yml +153 -0
  41. data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/returns_200_OK.yml +116 -0
  42. data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/returns_the_correct_message.yml +196 -0
  43. data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/returns_the_correct_status.yml +116 -0
  44. data/spec/cassettes/OiApi_Client_Advertisers/_delete_advertiser/it_should_behave_like_DELETE_resource/when_advertiser_not_found/returns_404.yml +77 -0
  45. 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
  46. 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
  47. data/spec/cassettes/OiApi_Client_Advertisers/_reports/it_should_behave_like_GET_resources/returns_200_OK.yml +42 -0
  48. data/spec/cassettes/OiApi_Client_Advertisers/_reports/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +42 -0
  49. data/spec/cassettes/OiApi_Client_Advertisers/_reports/it_should_behave_like_GET_resources/returns_all_resources.yml +42 -0
  50. 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
  51. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +156 -0
  52. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +156 -0
  53. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/returns_200_OK.yml +155 -0
  54. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +155 -0
  55. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +195 -0
  56. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/when_advertiser_not_found/returns_404.yml +117 -0
  57. data/spec/cassettes/OiApi_Client_Advertisers/_update_advertiser/it_should_behave_like_PUT_resource/when_advertiser_not_found/returns_error_status.yml +77 -0
  58. 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
  59. data/spec/cassettes/OiApi_Client_AutoResponders/_all_auto_responders/it_should_behave_like_GET_resources/returns_200_OK.yml +593 -0
  60. data/spec/cassettes/OiApi_Client_AutoResponders/_all_auto_responders/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +593 -0
  61. data/spec/cassettes/OiApi_Client_AutoResponders/_all_auto_responders/it_should_behave_like_GET_resources/returns_all_resources.yml +593 -0
  62. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders/it_should_behave_like_GET_resources/returns_200_OK.yml +273 -0
  63. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +273 -0
  64. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders/it_should_behave_like_GET_resources/returns_all_resources.yml +273 -0
  65. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_no_offer_id/it_should_behave_like_GET_resources/returns_200_OK.yml +593 -0
  66. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_no_offer_id/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +673 -0
  67. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_no_offer_id/it_should_behave_like_GET_resources/returns_all_resources.yml +516 -0
  68. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_with_offer_id/it_should_behave_like_GET_resources/returns_200_OK.yml +273 -0
  69. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_with_offer_id/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +354 -0
  70. data/spec/cassettes/OiApi_Client_AutoResponders/_auto_responders_with_offer_id/it_should_behave_like_GET_resources/returns_all_resources.yml +354 -0
  71. data/spec/cassettes/OiApi_Client_Balances/_balance/it_should_behave_like_GET_resources/returns_200_OK.yml +78 -0
  72. data/spec/cassettes/OiApi_Client_Balances/_balance/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +78 -0
  73. data/spec/cassettes/OiApi_Client_Balances/_balance/it_should_behave_like_GET_resources/returns_all_resources.yml +78 -0
  74. data/spec/cassettes/OiApi_Client_Balances/_balance/returns_a_balance.yml +78 -0
  75. data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/returns_200_OK.yml +117 -0
  76. data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +117 -0
  77. data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/returns_the_resource.yml +117 -0
  78. data/spec/cassettes/OiApi_Client_Cards/_card/it_should_behave_like_GET_resource/when_card_id_not_found/returns_404.yml +79 -0
  79. 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
  80. 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
  81. data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +80 -0
  82. data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +80 -0
  83. data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/returns_201_created.yml +80 -0
  84. data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/returns_a_success_message.yml +80 -0
  85. data/spec/cassettes/OiApi_Client_Cards/_create_card/it_should_behave_like_POST_resource/returns_a_success_status.yml +80 -0
  86. 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
  87. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +117 -0
  88. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +117 -0
  89. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/returns_200_OK.yml +117 -0
  90. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +117 -0
  91. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +117 -0
  92. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/when_card_not_found/returns_404.yml +79 -0
  93. data/spec/cassettes/OiApi_Client_Cards/_update_card/it_should_behave_like_PUT_resource/when_card_not_found/returns_error_status.yml +79 -0
  94. 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
  95. 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
  96. data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +352 -0
  97. data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +352 -0
  98. data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/returns_201_created.yml +352 -0
  99. data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/returns_a_success_message.yml +272 -0
  100. data/spec/cassettes/OiApi_Client_DataTransfers/_create_data_transfer/it_should_behave_like_POST_resource/returns_a_success_status.yml +352 -0
  101. data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/returns_200_OK.yml +393 -0
  102. data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +393 -0
  103. data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfer/it_should_behave_like_GET_resource/returns_the_resource.yml +472 -0
  104. 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
  105. 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
  106. data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfers/it_should_behave_like_GET_resources/returns_200_OK.yml +354 -0
  107. data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfers/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +434 -0
  108. data/spec/cassettes/OiApi_Client_DataTransfers/_data_transfers/it_should_behave_like_GET_resources/returns_all_resources.yml +434 -0
  109. data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/deletes_a_data_transfer.yml +428 -0
  110. data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/returns_200_OK.yml +390 -0
  111. data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/returns_the_correct_message.yml +310 -0
  112. data/spec/cassettes/OiApi_Client_DataTransfers/_delete_data_transfer/it_should_behave_like_DELETE_resource/returns_the_correct_status.yml +390 -0
  113. 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
  114. 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
  115. 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
  116. 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
  117. data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +390 -0
  118. data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +390 -0
  119. data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/returns_200_OK.yml +389 -0
  120. data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +389 -0
  121. data/spec/cassettes/OiApi_Client_DataTransfers/_update_data_transfer/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +349 -0
  122. 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
  123. 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
  124. 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
  125. 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
  126. data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/bad_request/returns_an_error_message.yml +195 -0
  127. data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/bad_request/returns_an_error_status.yml +195 -0
  128. data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/returns_201_created.yml +196 -0
  129. data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/returns_a_success_message.yml +156 -0
  130. data/spec/cassettes/OiApi_Client_Offers/_create_offer/it_should_behave_like_POST_resource/returns_a_success_status.yml +196 -0
  131. data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/returns_200_OK.yml +246 -0
  132. data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/returns_HTTParty_Response.yml +246 -0
  133. data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/returns_the_resource.yml +284 -0
  134. data/spec/cassettes/OiApi_Client_Offers/_offer/it_should_behave_like_GET_resource/when_offer_id_not_found/returns_404.yml +115 -0
  135. 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
  136. data/spec/cassettes/OiApi_Client_Offers/_offers/it_should_behave_like_GET_resources/returns_200_OK.yml +416 -0
  137. data/spec/cassettes/OiApi_Client_Offers/_offers/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +457 -0
  138. data/spec/cassettes/OiApi_Client_Offers/_offers/it_should_behave_like_GET_resources/returns_all_resources.yml +457 -0
  139. 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
  140. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_message.yml +234 -0
  141. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/bad_request/returns_an_error_status.yml +234 -0
  142. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/returns_200_OK.yml +234 -0
  143. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/returns_the_correct_message.yml +234 -0
  144. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/returns_the_correct_status.yml +315 -0
  145. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/when_offer_not_found/returns_404.yml +154 -0
  146. data/spec/cassettes/OiApi_Client_Offers/_update_offer/it_should_behave_like_PUT_resource/when_offer_not_found/returns_error_status.yml +114 -0
  147. 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
  148. data/spec/cassettes/OiApi_Client_Reports/_reports/it_should_behave_like_GET_resources/returns_200_OK.yml +46 -0
  149. data/spec/cassettes/OiApi_Client_Reports/_reports/it_should_behave_like_GET_resources/returns_HTTParty_Response.yml +46 -0
  150. data/spec/cassettes/OiApi_Client_Reports/_reports/it_should_behave_like_GET_resources/returns_all_resources.yml +46 -0
  151. data/spec/cassettes/OiApi_Client_Reports/_reports/returns_a_report_summary.yml +46 -0
  152. data/spec/cassettes/OiApi_Client_Reports/_reports_with_query_params/retrieves_the_last_60_days_of_data.yml +42 -0
  153. data/spec/oi_api/client/advertisers_spec.rb +86 -0
  154. data/spec/oi_api/client/auto_responders_spec.rb +55 -0
  155. data/spec/oi_api/client/balances_spec.rb +22 -0
  156. data/spec/oi_api/client/cards_spec.rb +60 -0
  157. data/spec/oi_api/client/charges_spec.rb +9 -0
  158. data/spec/oi_api/client/data_transfers_spec.rb +95 -0
  159. data/spec/oi_api/client/offers_spec.rb +84 -0
  160. data/spec/oi_api/client/reports_spec.rb +31 -0
  161. data/spec/oi_api/client/subscriptions_spec.rb +11 -0
  162. data/spec/oi_api_spec.rb +49 -0
  163. data/spec/shared_examples_for_delete_resource.rb +37 -0
  164. data/spec/shared_examples_for_get_resource.rb +33 -0
  165. data/spec/shared_examples_for_get_resources.rb +15 -0
  166. data/spec/shared_examples_for_post_resource.rb +31 -0
  167. data/spec/shared_examples_for_put_resource.rb +46 -0
  168. data/spec/spec_helper.rb +60 -0
  169. data/spec/support/advertisers_factory.rb +22 -0
  170. data/spec/support/auto_responders_factory.rb +27 -0
  171. data/spec/support/balances_factory.rb +12 -0
  172. data/spec/support/cards_factory.rb +34 -0
  173. data/spec/support/charges_factory.rb +16 -0
  174. data/spec/support/data_transfers_factory.rb +34 -0
  175. data/spec/support/factory.rb +48 -0
  176. data/spec/support/offers_factory.rb +53 -0
  177. data/spec/support/reports_factory.rb +12 -0
  178. data/spec/support/subscriptions_factory.rb +16 -0
  179. data/spec_output.txt +341 -0
  180. metadata +487 -0
@@ -0,0 +1,472 @@
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:36:27 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": 40373, "name": "new advertiser c82c99ac2402fc091bdaf69fb38111b1",
38
+ "status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:37:24",
39
+ "modify_date": "2015-04-24T18:37:24"}, {"id": 40374, "name": "new advertiser
40
+ b1a7396721a395c28ec8f2b6dbae5e6b", "status_id": 1, "category_id": 1010, "key":
41
+ "", "create_date": "2015-04-24T18:37:26", "modify_date": "2015-04-24T18:37:26"}]'
42
+ http_version:
43
+ recorded_at: Fri, 24 Apr 2015 22:37:29 GMT
44
+ - request:
45
+ method: delete
46
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40373/
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:36:27 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:37:29 GMT
82
+ - request:
83
+ method: delete
84
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40374/
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:36:27 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:37:29 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:36:27 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:37:30 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 e4eb80e0baf42bae4fd746a70fec130d","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:36:28 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": 40375}'
193
+ http_version:
194
+ recorded_at: Fri, 24 Apr 2015 22:37:30 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":40375,"name":"Special Product 7cda060a9de5ad02142b3b754d2c7a35","category_id":1010,"status_id":9,"headline":"Buy
201
+ our product today c6be415a0bf13a2166a33008b8431f0c","body":"Try for FREE for
202
+ a limited time only. This is your one-and-only chance! a498037e34bbea3aa8fe6c10c4c90520","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:36:28 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": 79792}'
234
+ http_version:
235
+ recorded_at: Fri, 24 Apr 2015 22:37:32 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 f96c9c40068bcd9d7019d001ca20fed0","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:36:30 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": 40376}'
272
+ http_version:
273
+ recorded_at: Fri, 24 Apr 2015 22:37:32 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":40376,"name":"Special Product 43ee7787712379f5194ec12f3dc923e1","category_id":1010,"status_id":9,"headline":"Buy
280
+ our product today a0e301e849258a25f28abb67aca19fd0","body":"Try for FREE for
281
+ a limited time only. This is your one-and-only chance! ed83fbbb9f13e96b5891bd325823e74e","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:36:30 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": 79793}'
313
+ http_version:
314
+ recorded_at: Fri, 24 Apr 2015 22:37:34 GMT
315
+ - request:
316
+ method: post
317
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
318
+ body:
319
+ encoding: UTF-8
320
+ string: '{"name":"new advertiser 7301ecd70d82e0638310c0506f153a9b","status_id":1,"category_id":1010}'
321
+ headers:
322
+ Content-Type:
323
+ - application/json
324
+ User-Agent:
325
+ - OiApiRuby Gem 0.1.1
326
+ response:
327
+ status:
328
+ code: 201
329
+ message: CREATED
330
+ headers:
331
+ Date:
332
+ - Fri, 24 Apr 2015 22:36:32 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", "message": "Advertiser successfully
350
+ created", "id": 40377}'
351
+ http_version:
352
+ recorded_at: Fri, 24 Apr 2015 22:37:34 GMT
353
+ - request:
354
+ method: post
355
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
356
+ body:
357
+ encoding: UTF-8
358
+ string: '{"advertiser_id":40377,"name":"Special Product 4a4b2db5c89eab815be15526d0134b7f","category_id":1010,"status_id":9,"headline":"Buy
359
+ our product today 6d12581fca1a1dca947d00a13f5b8365","body":"Try for FREE for
360
+ a limited time only. This is your one-and-only chance! ecc9cdb83293471e8d86cdc36d3faa5b","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
361
+ there"}'
362
+ headers:
363
+ Content-Type:
364
+ - application/json
365
+ User-Agent:
366
+ - OiApiRuby Gem 0.1.1
367
+ response:
368
+ status:
369
+ code: 201
370
+ message: CREATED
371
+ headers:
372
+ Date:
373
+ - Fri, 24 Apr 2015 22:36:32 GMT
374
+ Server:
375
+ - Apache/2.2.15 (CentOS)
376
+ Vary:
377
+ - Accept,Cookie
378
+ X-Frame-Options:
379
+ - SAMEORIGIN
380
+ Allow:
381
+ - GET, POST, HEAD, OPTIONS
382
+ Connection:
383
+ - close
384
+ Transfer-Encoding:
385
+ - chunked
386
+ Content-Type:
387
+ - application/json
388
+ body:
389
+ encoding: UTF-8
390
+ string: '{"status": "Request Successful", "message": "Offer successfully created",
391
+ "id": 79794}'
392
+ http_version:
393
+ recorded_at: Fri, 24 Apr 2015 22:37:36 GMT
394
+ - request:
395
+ method: post
396
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79793/datatransfers/
397
+ body:
398
+ encoding: UTF-8
399
+ string: '{"name":"DT for Special Product 1 595c4178d00471467ae7a69fe2b7a570","status_id":1,"type":"http","offer_id":79793,"dt_info":{"base_url":"http://www.someclientbaseurl.com","method":"POST"},"data_fields":[{"email":"#{EM}"},{"first_name":"#{FN}"},{"last_name":"#{LN}"},{"zip":"#{PO}"},{"gender":"#{G}"}]}'
400
+ headers:
401
+ Content-Type:
402
+ - application/json
403
+ User-Agent:
404
+ - OiApiRuby Gem 0.1.1
405
+ response:
406
+ status:
407
+ code: 200
408
+ message: OK
409
+ headers:
410
+ Date:
411
+ - Fri, 24 Apr 2015 22:36:33 GMT
412
+ Server:
413
+ - Apache/2.2.15 (CentOS)
414
+ Vary:
415
+ - Accept,Cookie
416
+ X-Frame-Options:
417
+ - SAMEORIGIN
418
+ Allow:
419
+ - GET, POST, HEAD, OPTIONS
420
+ Connection:
421
+ - close
422
+ Transfer-Encoding:
423
+ - chunked
424
+ Content-Type:
425
+ - application/json
426
+ body:
427
+ encoding: UTF-8
428
+ string: '{"status": "Create Successful", "id": 90077}'
429
+ http_version:
430
+ recorded_at: Fri, 24 Apr 2015 22:37:36 GMT
431
+ - request:
432
+ method: get
433
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/datatransfers/90077/
434
+ body:
435
+ encoding: US-ASCII
436
+ string: ''
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
+ - Fri, 24 Apr 2015 22:36:34 GMT
449
+ Server:
450
+ - Apache/2.2.15 (CentOS)
451
+ Vary:
452
+ - Accept,Cookie
453
+ X-Frame-Options:
454
+ - SAMEORIGIN
455
+ Allow:
456
+ - GET, PUT, DELETE, 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: '{"id": 90077, "name": "DT for Special Product 1 595c4178d00471467ae7a69fe2b7a570",
466
+ "status_id": 1, "type": "http", "offer_id": 79793, "dt_info": {"base_url":
467
+ "http://www.someclientbaseurl.com", "method": "POST"}, "data_fields": [{"email":
468
+ "#{EM}"}, {"first_name": "#{FN}"}, {"last_name": "#{LN}"}, {"zip": "#{PO}"},
469
+ {"gender": "#{G}"}]}'
470
+ http_version:
471
+ recorded_at: Fri, 24 Apr 2015 22:37:36 GMT
472
+ recorded_with: VCR 2.9.3