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,349 @@
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:50:07 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": 40416, "name": "new advertiser 5c1d9129e9060e0539d8042b58e6d201",
38
+ "status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:45:45",
39
+ "modify_date": "2015-04-24T18:45:45"}]'
40
+ http_version:
41
+ recorded_at: Fri, 24 Apr 2015 22:51:10 GMT
42
+ - request:
43
+ method: delete
44
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40416/
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:50:08 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:51:10 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:50:08 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:51:10 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 962e5c1947772860aa906d9a7bc3841a","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:50:08 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": 40417}'
153
+ http_version:
154
+ recorded_at: Fri, 24 Apr 2015 22:51:11 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":40417,"name":"Special Product 57e2c7a527167f0327641926bf64114c","category_id":1010,"status_id":9,"headline":"Buy
161
+ our product today dd3fd5234c2a2e5188e75e037467d896","body":"Try for FREE for
162
+ a limited time only. This is your one-and-only chance! 5f49f68d3aa09c892c1f0aeed064b508","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:50:09 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": 79828}'
194
+ http_version:
195
+ recorded_at: Fri, 24 Apr 2015 22:51:12 GMT
196
+ - request:
197
+ method: post
198
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
199
+ body:
200
+ encoding: UTF-8
201
+ string: '{"name":"new advertiser 62afa30c70c40c3745c622ff5900dc61","status_id":1,"category_id":1010}'
202
+ headers:
203
+ Content-Type:
204
+ - application/json
205
+ User-Agent:
206
+ - OiApiRuby Gem 0.1.1
207
+ response:
208
+ status:
209
+ code: 201
210
+ message: CREATED
211
+ headers:
212
+ Date:
213
+ - Fri, 24 Apr 2015 22:50:10 GMT
214
+ Server:
215
+ - Apache/2.2.15 (CentOS)
216
+ Vary:
217
+ - Accept,Cookie
218
+ X-Frame-Options:
219
+ - SAMEORIGIN
220
+ Allow:
221
+ - GET, POST, 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": "Create Successful", "message": "Advertiser successfully
231
+ created", "id": 40418}'
232
+ http_version:
233
+ recorded_at: Fri, 24 Apr 2015 22:51:13 GMT
234
+ - request:
235
+ method: post
236
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
237
+ body:
238
+ encoding: UTF-8
239
+ string: '{"advertiser_id":40418,"name":"Special Product daee9025e551687f423274f8b8c2a3c7","category_id":1010,"status_id":9,"headline":"Buy
240
+ our product today 45e1e8912c455f28b0a307d97d40148b","body":"Try for FREE for
241
+ a limited time only. This is your one-and-only chance! b204b9eaa26b1b8dea39919cbb07063d","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
242
+ there"}'
243
+ headers:
244
+ Content-Type:
245
+ - application/json
246
+ User-Agent:
247
+ - OiApiRuby Gem 0.1.1
248
+ response:
249
+ status:
250
+ code: 201
251
+ message: CREATED
252
+ headers:
253
+ Date:
254
+ - Fri, 24 Apr 2015 22:50:11 GMT
255
+ Server:
256
+ - Apache/2.2.15 (CentOS)
257
+ Vary:
258
+ - Accept,Cookie
259
+ X-Frame-Options:
260
+ - SAMEORIGIN
261
+ Allow:
262
+ - GET, POST, HEAD, OPTIONS
263
+ Connection:
264
+ - close
265
+ Transfer-Encoding:
266
+ - chunked
267
+ Content-Type:
268
+ - application/json
269
+ body:
270
+ encoding: UTF-8
271
+ string: '{"status": "Request Successful", "message": "Offer successfully created",
272
+ "id": 79829}'
273
+ http_version:
274
+ recorded_at: Fri, 24 Apr 2015 22:51:14 GMT
275
+ - request:
276
+ method: post
277
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79828/datatransfers/
278
+ body:
279
+ encoding: UTF-8
280
+ string: '{"name":"DT for Special Product 1 c460efa553513eb6ab1e314c27ed91fa","status_id":1,"type":"http","offer_id":79828,"dt_info":{"base_url":"http://www.someclientbaseurl.com","method":"POST"},"data_fields":[{"email":"#{EM}"},{"first_name":"#{FN}"},{"last_name":"#{LN}"},{"zip":"#{PO}"},{"gender":"#{G}"}]}'
281
+ headers:
282
+ Content-Type:
283
+ - application/json
284
+ User-Agent:
285
+ - OiApiRuby Gem 0.1.1
286
+ response:
287
+ status:
288
+ code: 200
289
+ message: OK
290
+ headers:
291
+ Date:
292
+ - Fri, 24 Apr 2015 22:50:12 GMT
293
+ Server:
294
+ - Apache/2.2.15 (CentOS)
295
+ Vary:
296
+ - Accept,Cookie
297
+ X-Frame-Options:
298
+ - SAMEORIGIN
299
+ Allow:
300
+ - GET, POST, HEAD, OPTIONS
301
+ Connection:
302
+ - close
303
+ Transfer-Encoding:
304
+ - chunked
305
+ Content-Type:
306
+ - application/json
307
+ body:
308
+ encoding: UTF-8
309
+ string: '{"status": "Create Successful", "id": 90081}'
310
+ http_version:
311
+ recorded_at: Fri, 24 Apr 2015 22:51:14 GMT
312
+ - request:
313
+ method: put
314
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79828/datatransfers/90081/
315
+ body:
316
+ encoding: UTF-8
317
+ string: '{"status_id":2}'
318
+ headers:
319
+ Content-Type:
320
+ - application/json
321
+ User-Agent:
322
+ - OiApiRuby Gem 0.1.1
323
+ response:
324
+ status:
325
+ code: 200
326
+ message: OK
327
+ headers:
328
+ Date:
329
+ - Fri, 24 Apr 2015 22:50:12 GMT
330
+ Server:
331
+ - Apache/2.2.15 (CentOS)
332
+ Vary:
333
+ - Accept,Cookie
334
+ X-Frame-Options:
335
+ - SAMEORIGIN
336
+ Allow:
337
+ - GET, PUT, DELETE, HEAD, OPTIONS
338
+ Connection:
339
+ - close
340
+ Transfer-Encoding:
341
+ - chunked
342
+ Content-Type:
343
+ - application/json
344
+ body:
345
+ encoding: UTF-8
346
+ string: '{"status": "Update Successful"}'
347
+ http_version:
348
+ recorded_at: Fri, 24 Apr 2015 22:51:15 GMT
349
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,274 @@
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:50:40 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": 40427, "name": "new advertiser e820eef8e06a8e81765409a4c9b7cb55",
38
+ "status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-24T18:51:38",
39
+ "modify_date": "2015-04-24T18:51:38"}, {"id": 40428, "name": "new advertiser
40
+ 91ebca08356a8c97dcd4b08061b350c3", "status_id": 1, "category_id": 1010, "key":
41
+ "", "create_date": "2015-04-24T18:51:40", "modify_date": "2015-04-24T18:51:40"}]'
42
+ http_version:
43
+ recorded_at: Fri, 24 Apr 2015 22:51:42 GMT
44
+ - request:
45
+ method: delete
46
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40427/
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:50:40 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:51:42 GMT
82
+ - request:
83
+ method: delete
84
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40428/
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:50:40 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:51:43 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:50:41 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:51:43 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 e0211b80b0aba02c45d43f5159ce8a79","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:50:41 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": 40429}'
193
+ http_version:
194
+ recorded_at: Fri, 24 Apr 2015 22:51:43 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":40429,"name":"Special Product 36dc1ce0a8cba998f0fb7eb3c2529062","category_id":1010,"status_id":9,"headline":"Buy
201
+ our product today e6d1eb457ab748b65c3aaf4e6a601f16","body":"Try for FREE for
202
+ a limited time only. This is your one-and-only chance! b6fb3eb648cd235b00c5ec6b85ffa164","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:50:41 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": 79840}'
234
+ http_version:
235
+ recorded_at: Fri, 24 Apr 2015 22:51:45 GMT
236
+ - request:
237
+ method: put
238
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/79840/datatransfers/99999999999999/
239
+ body:
240
+ encoding: UTF-8
241
+ string: '{"status_id":2}'
242
+ headers:
243
+ Content-Type:
244
+ - application/json
245
+ User-Agent:
246
+ - OiApiRuby Gem 0.1.1
247
+ response:
248
+ status:
249
+ code: 400
250
+ message: BAD REQUEST
251
+ headers:
252
+ Date:
253
+ - Fri, 24 Apr 2015 22:50:43 GMT
254
+ Server:
255
+ - Apache/2.2.15 (CentOS)
256
+ Vary:
257
+ - Accept,Cookie
258
+ X-Frame-Options:
259
+ - SAMEORIGIN
260
+ Allow:
261
+ - GET, PUT, DELETE, 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": "Update Failed", "message": "Data Transfer not found under
271
+ this offer."}'
272
+ http_version:
273
+ recorded_at: Fri, 24 Apr 2015 22:51:45 GMT
274
+ recorded_with: VCR 2.9.3