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,593 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ User-Agent:
13
+ - OiApiRuby Gem 0.1.1
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Date:
20
+ - Tue, 28 Apr 2015 21:43:21 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": 40690, "name": "new advertiser d6630de89a18f2c64ef82350663352b4",
38
+ "status_id": 1, "category_id": 1010, "key": "", "create_date": "2015-04-28T17:44:21",
39
+ "modify_date": "2015-04-28T17:44:21"}, {"id": 40691, "name": "new advertiser
40
+ 1d30bb958fe9fb4f29116c771ad57384", "status_id": 1, "category_id": 1010, "key":
41
+ "", "create_date": "2015-04-28T17:44:23", "modify_date": "2015-04-28T17:44:23"},
42
+ {"id": 40692, "name": "new advertiser f38b6a5d93818d63f7d86a3d20793ed8", "status_id":
43
+ 1, "category_id": 1010, "key": "", "create_date": "2015-04-28T17:44:25", "modify_date":
44
+ "2015-04-28T17:44:25"}]'
45
+ http_version:
46
+ recorded_at: Tue, 28 Apr 2015 21:44:28 GMT
47
+ - request:
48
+ method: delete
49
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40690/
50
+ body:
51
+ encoding: US-ASCII
52
+ string: ''
53
+ headers:
54
+ Content-Type:
55
+ - application/json
56
+ User-Agent:
57
+ - OiApiRuby Gem 0.1.1
58
+ response:
59
+ status:
60
+ code: 200
61
+ message: OK
62
+ headers:
63
+ Date:
64
+ - Tue, 28 Apr 2015 21:43:21 GMT
65
+ Server:
66
+ - Apache/2.2.15 (CentOS)
67
+ Vary:
68
+ - Accept,Cookie
69
+ X-Frame-Options:
70
+ - SAMEORIGIN
71
+ Allow:
72
+ - GET, PUT, DELETE, HEAD, OPTIONS
73
+ Connection:
74
+ - close
75
+ Transfer-Encoding:
76
+ - chunked
77
+ Content-Type:
78
+ - application/json
79
+ body:
80
+ encoding: UTF-8
81
+ string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
82
+ deleted"}'
83
+ http_version:
84
+ recorded_at: Tue, 28 Apr 2015 21:44:28 GMT
85
+ - request:
86
+ method: delete
87
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40691/
88
+ body:
89
+ encoding: US-ASCII
90
+ string: ''
91
+ headers:
92
+ Content-Type:
93
+ - application/json
94
+ User-Agent:
95
+ - OiApiRuby Gem 0.1.1
96
+ response:
97
+ status:
98
+ code: 200
99
+ message: OK
100
+ headers:
101
+ Date:
102
+ - Tue, 28 Apr 2015 21:43:21 GMT
103
+ Server:
104
+ - Apache/2.2.15 (CentOS)
105
+ Vary:
106
+ - Accept,Cookie
107
+ X-Frame-Options:
108
+ - SAMEORIGIN
109
+ Allow:
110
+ - GET, PUT, DELETE, HEAD, OPTIONS
111
+ Connection:
112
+ - close
113
+ Transfer-Encoding:
114
+ - chunked
115
+ Content-Type:
116
+ - application/json
117
+ body:
118
+ encoding: UTF-8
119
+ string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
120
+ deleted"}'
121
+ http_version:
122
+ recorded_at: Tue, 28 Apr 2015 21:44:29 GMT
123
+ - request:
124
+ method: delete
125
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/40692/
126
+ body:
127
+ encoding: US-ASCII
128
+ string: ''
129
+ headers:
130
+ Content-Type:
131
+ - application/json
132
+ User-Agent:
133
+ - OiApiRuby Gem 0.1.1
134
+ response:
135
+ status:
136
+ code: 200
137
+ message: OK
138
+ headers:
139
+ Date:
140
+ - Tue, 28 Apr 2015 21:43:22 GMT
141
+ Server:
142
+ - Apache/2.2.15 (CentOS)
143
+ Vary:
144
+ - Accept,Cookie
145
+ X-Frame-Options:
146
+ - SAMEORIGIN
147
+ Allow:
148
+ - GET, PUT, DELETE, HEAD, OPTIONS
149
+ Connection:
150
+ - close
151
+ Transfer-Encoding:
152
+ - chunked
153
+ Content-Type:
154
+ - application/json
155
+ body:
156
+ encoding: UTF-8
157
+ string: '{"status": "Delete Successful", "message": "Advertiser Succesfully
158
+ deleted"}'
159
+ http_version:
160
+ recorded_at: Tue, 28 Apr 2015 21:44:29 GMT
161
+ - request:
162
+ method: get
163
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
164
+ body:
165
+ encoding: US-ASCII
166
+ string: ''
167
+ headers:
168
+ Content-Type:
169
+ - application/json
170
+ User-Agent:
171
+ - OiApiRuby Gem 0.1.1
172
+ response:
173
+ status:
174
+ code: 200
175
+ message: OK
176
+ headers:
177
+ Date:
178
+ - Tue, 28 Apr 2015 21:43:22 GMT
179
+ Server:
180
+ - Apache/2.2.15 (CentOS)
181
+ Vary:
182
+ - Accept,Cookie
183
+ X-Frame-Options:
184
+ - SAMEORIGIN
185
+ Allow:
186
+ - GET, POST, HEAD, OPTIONS
187
+ Connection:
188
+ - close
189
+ Transfer-Encoding:
190
+ - chunked
191
+ Content-Type:
192
+ - application/json
193
+ body:
194
+ encoding: UTF-8
195
+ string: "[]"
196
+ http_version:
197
+ recorded_at: Tue, 28 Apr 2015 21:44:29 GMT
198
+ - request:
199
+ method: post
200
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
201
+ body:
202
+ encoding: UTF-8
203
+ string: '{"name":"new advertiser 9c7304d7613d0ed7668f05d5987b9762","status_id":1,"category_id":1010}'
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
+ - Tue, 28 Apr 2015 21:43:22 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": "Create Successful", "message": "Advertiser successfully
233
+ created", "id": 40693}'
234
+ http_version:
235
+ recorded_at: Tue, 28 Apr 2015 21:44:30 GMT
236
+ - request:
237
+ method: post
238
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
239
+ body:
240
+ encoding: UTF-8
241
+ string: '{"advertiser_id":40693,"name":"Special Product cb77267d6065c36ec9329af31087d733","category_id":1010,"status_id":9,"headline":"Buy
242
+ our product today 6e6c5f465015ce65e8e15b7a7ca44934","body":"Try for FREE for
243
+ a limited time only. This is your one-and-only chance! 3b8eba3f021692ef22b2e1ab590bc9f5","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
244
+ there"}'
245
+ headers:
246
+ Content-Type:
247
+ - application/json
248
+ User-Agent:
249
+ - OiApiRuby Gem 0.1.1
250
+ response:
251
+ status:
252
+ code: 201
253
+ message: CREATED
254
+ headers:
255
+ Date:
256
+ - Tue, 28 Apr 2015 21:43:23 GMT
257
+ Server:
258
+ - Apache/2.2.15 (CentOS)
259
+ Vary:
260
+ - Accept,Cookie
261
+ X-Frame-Options:
262
+ - SAMEORIGIN
263
+ Allow:
264
+ - GET, POST, HEAD, OPTIONS
265
+ Connection:
266
+ - close
267
+ Transfer-Encoding:
268
+ - chunked
269
+ Content-Type:
270
+ - application/json
271
+ body:
272
+ encoding: UTF-8
273
+ string: '{"status": "Request Successful", "message": "Offer successfully created",
274
+ "id": 80009}'
275
+ http_version:
276
+ recorded_at: Tue, 28 Apr 2015 21:44:31 GMT
277
+ - request:
278
+ method: post
279
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/80009/autoresponders/
280
+ body:
281
+ encoding: UTF-8
282
+ string: '{"status_id":1,"subject":"Here''s a good subject line","from_name":"Our
283
+ Company","body_html":"some html here","body_text":"some text here"}'
284
+ headers:
285
+ Content-Type:
286
+ - application/json
287
+ User-Agent:
288
+ - OiApiRuby Gem 0.1.1
289
+ response:
290
+ status:
291
+ code: 200
292
+ message: OK
293
+ headers:
294
+ Date:
295
+ - Tue, 28 Apr 2015 21:43:24 GMT
296
+ Server:
297
+ - Apache/2.2.15 (CentOS)
298
+ Vary:
299
+ - Accept,Cookie
300
+ X-Frame-Options:
301
+ - SAMEORIGIN
302
+ Allow:
303
+ - GET, POST, HEAD, OPTIONS
304
+ Connection:
305
+ - close
306
+ Transfer-Encoding:
307
+ - chunked
308
+ Content-Type:
309
+ - application/json
310
+ body:
311
+ encoding: UTF-8
312
+ string: '{"status": "Create Successful", "id": 53577}'
313
+ http_version:
314
+ recorded_at: Tue, 28 Apr 2015 21:44:32 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 f88a42c579be03a9754317d2f78d38f7","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
+ - Tue, 28 Apr 2015 21:43:24 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": 40694}'
351
+ http_version:
352
+ recorded_at: Tue, 28 Apr 2015 21:44:32 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":40694,"name":"Special Product c297cc92f7006b09be33565a243fc5eb","category_id":1010,"status_id":9,"headline":"Buy
359
+ our product today 1894941043f7d26208139f8003676b31","body":"Try for FREE for
360
+ a limited time only. This is your one-and-only chance! daaced1281d78eb8af0a219243dd88f9","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
+ - Tue, 28 Apr 2015 21:43:25 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": 80010}'
392
+ http_version:
393
+ recorded_at: Tue, 28 Apr 2015 21:44:33 GMT
394
+ - request:
395
+ method: post
396
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/80010/autoresponders/
397
+ body:
398
+ encoding: UTF-8
399
+ string: '{"status_id":1,"subject":"Here''s a good subject line","from_name":"Our
400
+ Company","body_html":"some html here","body_text":"some text here"}'
401
+ headers:
402
+ Content-Type:
403
+ - application/json
404
+ User-Agent:
405
+ - OiApiRuby Gem 0.1.1
406
+ response:
407
+ status:
408
+ code: 200
409
+ message: OK
410
+ headers:
411
+ Date:
412
+ - Tue, 28 Apr 2015 21:43:26 GMT
413
+ Server:
414
+ - Apache/2.2.15 (CentOS)
415
+ Vary:
416
+ - Accept,Cookie
417
+ X-Frame-Options:
418
+ - SAMEORIGIN
419
+ Allow:
420
+ - GET, POST, HEAD, OPTIONS
421
+ Connection:
422
+ - close
423
+ Transfer-Encoding:
424
+ - chunked
425
+ Content-Type:
426
+ - application/json
427
+ body:
428
+ encoding: UTF-8
429
+ string: '{"status": "Create Successful", "id": 53578}'
430
+ http_version:
431
+ recorded_at: Tue, 28 Apr 2015 21:44:34 GMT
432
+ - request:
433
+ method: post
434
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/advertisers/
435
+ body:
436
+ encoding: UTF-8
437
+ string: '{"name":"new advertiser 3ec2699b15198782cdd13d2d17de77c3","status_id":1,"category_id":1010}'
438
+ headers:
439
+ Content-Type:
440
+ - application/json
441
+ User-Agent:
442
+ - OiApiRuby Gem 0.1.1
443
+ response:
444
+ status:
445
+ code: 201
446
+ message: CREATED
447
+ headers:
448
+ Date:
449
+ - Tue, 28 Apr 2015 21:43:27 GMT
450
+ Server:
451
+ - Apache/2.2.15 (CentOS)
452
+ Vary:
453
+ - Accept,Cookie
454
+ X-Frame-Options:
455
+ - SAMEORIGIN
456
+ Allow:
457
+ - GET, POST, HEAD, OPTIONS
458
+ Connection:
459
+ - close
460
+ Transfer-Encoding:
461
+ - chunked
462
+ Content-Type:
463
+ - application/json
464
+ body:
465
+ encoding: UTF-8
466
+ string: '{"status": "Create Successful", "message": "Advertiser successfully
467
+ created", "id": 40695}'
468
+ http_version:
469
+ recorded_at: Tue, 28 Apr 2015 21:44:34 GMT
470
+ - request:
471
+ method: post
472
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/
473
+ body:
474
+ encoding: UTF-8
475
+ string: '{"advertiser_id":40695,"name":"Special Product 78292752861adc8418ff25fbca0a26cc","category_id":1010,"status_id":9,"headline":"Buy
476
+ our product today 276ccdf8c39639371b56c46e4450202f","body":"Try for FREE for
477
+ a limited time only. This is your one-and-only chance! 08f5f3acb71ea69c08b7bd061f5152ba","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
478
+ there"}'
479
+ headers:
480
+ Content-Type:
481
+ - application/json
482
+ User-Agent:
483
+ - OiApiRuby Gem 0.1.1
484
+ response:
485
+ status:
486
+ code: 201
487
+ message: CREATED
488
+ headers:
489
+ Date:
490
+ - Tue, 28 Apr 2015 21:43:27 GMT
491
+ Server:
492
+ - Apache/2.2.15 (CentOS)
493
+ Vary:
494
+ - Accept,Cookie
495
+ X-Frame-Options:
496
+ - SAMEORIGIN
497
+ Allow:
498
+ - GET, POST, HEAD, OPTIONS
499
+ Connection:
500
+ - close
501
+ Transfer-Encoding:
502
+ - chunked
503
+ Content-Type:
504
+ - application/json
505
+ body:
506
+ encoding: UTF-8
507
+ string: '{"status": "Request Successful", "message": "Offer successfully created",
508
+ "id": 80011}'
509
+ http_version:
510
+ recorded_at: Tue, 28 Apr 2015 21:44:35 GMT
511
+ - request:
512
+ method: post
513
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/offers/80011/autoresponders/
514
+ body:
515
+ encoding: UTF-8
516
+ string: '{"status_id":1,"subject":"Here''s a good subject line","from_name":"Our
517
+ Company","body_html":"some html here","body_text":"some text here"}'
518
+ headers:
519
+ Content-Type:
520
+ - application/json
521
+ User-Agent:
522
+ - OiApiRuby Gem 0.1.1
523
+ response:
524
+ status:
525
+ code: 200
526
+ message: OK
527
+ headers:
528
+ Date:
529
+ - Tue, 28 Apr 2015 21:43:28 GMT
530
+ Server:
531
+ - Apache/2.2.15 (CentOS)
532
+ Vary:
533
+ - Accept,Cookie
534
+ X-Frame-Options:
535
+ - SAMEORIGIN
536
+ Allow:
537
+ - GET, POST, HEAD, OPTIONS
538
+ Connection:
539
+ - close
540
+ Transfer-Encoding:
541
+ - chunked
542
+ Content-Type:
543
+ - application/json
544
+ body:
545
+ encoding: UTF-8
546
+ string: '{"status": "Create Successful", "id": 53579}'
547
+ http_version:
548
+ recorded_at: Tue, 28 Apr 2015 21:44:36 GMT
549
+ - request:
550
+ method: get
551
+ uri: https://<USERNAME>:<PASSWORD>@oiapi.com/v1/autoresponders/
552
+ body:
553
+ encoding: US-ASCII
554
+ string: ''
555
+ headers:
556
+ Content-Type:
557
+ - application/json
558
+ User-Agent:
559
+ - OiApiRuby Gem 0.1.1
560
+ response:
561
+ status:
562
+ code: 200
563
+ message: OK
564
+ headers:
565
+ Date:
566
+ - Tue, 28 Apr 2015 21:43:29 GMT
567
+ Server:
568
+ - Apache/2.2.15 (CentOS)
569
+ Vary:
570
+ - Accept,Cookie
571
+ X-Frame-Options:
572
+ - SAMEORIGIN
573
+ Allow:
574
+ - GET, POST, HEAD, OPTIONS
575
+ Connection:
576
+ - close
577
+ Transfer-Encoding:
578
+ - chunked
579
+ Content-Type:
580
+ - application/json
581
+ body:
582
+ encoding: UTF-8
583
+ string: '[{"id": 53577, "subject": "Here''s a good subject line", "offer_id":
584
+ 80009, "from_name": "Our Company", "status_id": 1, "body_text": "some text
585
+ here", "body_html": "some html here"}, {"id": 53578, "subject": "Here''s a
586
+ good subject line", "offer_id": 80010, "from_name": "Our Company", "status_id":
587
+ 1, "body_text": "some text here", "body_html": "some html here"}, {"id": 53579,
588
+ "subject": "Here''s a good subject line", "offer_id": 80011, "from_name":
589
+ "Our Company", "status_id": 1, "body_text": "some text here", "body_html":
590
+ "some html here"}]'
591
+ http_version:
592
+ recorded_at: Tue, 28 Apr 2015 21:44:36 GMT
593
+ recorded_with: VCR 2.9.3