peddler 2.1.0 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of peddler might be problematic. Click here for more details.

Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -41
  3. data/lib/mws.rb +2 -1
  4. data/lib/mws/easy_ship.rb +3 -0
  5. data/lib/mws/easy_ship/client.rb +93 -0
  6. data/lib/mws/fulfillment_inbound_shipment/client.rb +2 -2
  7. data/lib/mws/fulfillment_outbound_shipment/client.rb +1 -1
  8. data/lib/mws/orders/client.rb +7 -9
  9. data/lib/mws/reports/client.rb +9 -0
  10. data/lib/mws/shipment_invoicing.rb +3 -0
  11. data/lib/mws/shipment_invoicing/client.rb +74 -0
  12. data/lib/peddler/client.rb +18 -15
  13. data/lib/peddler/errors/builder.rb +7 -2
  14. data/lib/peddler/errors/class_generator.rb +7 -2
  15. data/lib/peddler/errors/error.rb +6 -2
  16. data/lib/peddler/errors/parser.rb +1 -1
  17. data/lib/peddler/flat_file_parser.rb +6 -4
  18. data/lib/peddler/headers.rb +53 -1
  19. data/lib/peddler/marketplace.rb +24 -22
  20. data/lib/peddler/operation.rb +17 -11
  21. data/lib/peddler/parser.rb +1 -1
  22. data/lib/peddler/structured_list.rb +1 -1
  23. data/lib/peddler/vcr_matcher.rb +7 -7
  24. data/lib/peddler/version.rb +1 -1
  25. data/lib/peddler/xml_parser.rb +1 -1
  26. data/lib/peddler/xml_response_parser.rb +3 -2
  27. metadata +15 -150
  28. data/lib/mws/off_amazon_payments/client.rb +0 -362
  29. data/lib/mws/reports/parser.rb +0 -35
  30. data/test/credentials.rb +0 -23
  31. data/test/helper.rb +0 -15
  32. data/test/integration/test_errors.rb +0 -25
  33. data/test/integration/test_feeds.rb +0 -37
  34. data/test/integration/test_fulfillment_inbound_shipment.rb +0 -35
  35. data/test/integration/test_fulfillment_inventory.rb +0 -20
  36. data/test/integration/test_fulfillment_outbound_shipment.rb +0 -13
  37. data/test/integration/test_merchant_fulfillment.rb +0 -69
  38. data/test/integration/test_multibyte_queries.rb +0 -17
  39. data/test/integration/test_mws_headers.rb +0 -16
  40. data/test/integration/test_off_amazon_payments.rb +0 -13
  41. data/test/integration/test_orders.rb +0 -30
  42. data/test/integration/test_products.rb +0 -97
  43. data/test/integration/test_recommendations.rb +0 -20
  44. data/test/integration/test_reports.rb +0 -51
  45. data/test/integration/test_sellers.rb +0 -13
  46. data/test/integration/test_subscriptions.rb +0 -27
  47. data/test/integration_helper.rb +0 -53
  48. data/test/mws.yml +0 -36
  49. data/test/mws.yml.example +0 -32
  50. data/test/null_client.rb +0 -25
  51. data/test/recorder.rb +0 -39
  52. data/test/unit/mws/test_feeds_client.rb +0 -103
  53. data/test/unit/mws/test_finances_client.rb +0 -74
  54. data/test/unit/mws/test_fulfillment_inbound_shipment_client.rb +0 -426
  55. data/test/unit/mws/test_fulfillment_inventory_client.rb +0 -48
  56. data/test/unit/mws/test_fulfillment_outbound_shipment_client.rb +0 -202
  57. data/test/unit/mws/test_merchant_fulfillment_client.rb +0 -109
  58. data/test/unit/mws/test_off_amazon_payments_client.rb +0 -286
  59. data/test/unit/mws/test_orders_client.rb +0 -111
  60. data/test/unit/mws/test_products_client.rb +0 -248
  61. data/test/unit/mws/test_recommendations_client.rb +0 -62
  62. data/test/unit/mws/test_reports_client.rb +0 -209
  63. data/test/unit/mws/test_sellers_client.rb +0 -47
  64. data/test/unit/mws/test_subscriptions_client.rb +0 -182
  65. data/test/unit/peddler/errors/test_builder.rb +0 -65
  66. data/test/unit/peddler/errors/test_class_generator.rb +0 -18
  67. data/test/unit/peddler/errors/test_error.rb +0 -33
  68. data/test/unit/peddler/errors/test_parser.rb +0 -44
  69. data/test/unit/peddler/test_client.rb +0 -203
  70. data/test/unit/peddler/test_flat_file_parser.rb +0 -102
  71. data/test/unit/peddler/test_headers.rb +0 -55
  72. data/test/unit/peddler/test_marketplace.rb +0 -47
  73. data/test/unit/peddler/test_operation.rb +0 -87
  74. data/test/unit/peddler/test_parser.rb +0 -36
  75. data/test/unit/peddler/test_structured_list.rb +0 -39
  76. data/test/unit/peddler/test_vcr_matcher.rb +0 -55
  77. data/test/unit/peddler/test_xml_parser.rb +0 -37
  78. data/test/unit/peddler/test_xml_response_parser.rb +0 -39
  79. data/test/unit/test_mws.rb +0 -11
  80. data/test/vcr_cassettes/CartInformation.yml +0 -433
  81. data/test/vcr_cassettes/CustomerInformation.yml +0 -433
  82. data/test/vcr_cassettes/Errors.yml +0 -885
  83. data/test/vcr_cassettes/Feeds.yml +0 -9957
  84. data/test/vcr_cassettes/FulfillmentInboundShipment.yml +0 -6166
  85. data/test/vcr_cassettes/FulfillmentInventory.yml +0 -850
  86. data/test/vcr_cassettes/FulfillmentOutboundShipment.yml +0 -433
  87. data/test/vcr_cassettes/MWSHeaders.yml +0 -2964
  88. data/test/vcr_cassettes/MerchantFulfillment.yml +0 -753
  89. data/test/vcr_cassettes/MultibyteQueries.yml +0 -437
  90. data/test/vcr_cassettes/OffAmazonPayments.yml +0 -433
  91. data/test/vcr_cassettes/Orders.yml +0 -4740
  92. data/test/vcr_cassettes/PeddlerVCRMatcher.yml +0 -41
  93. data/test/vcr_cassettes/Products.yml +0 -7139
  94. data/test/vcr_cassettes/Recommendations.yml +0 -3145
  95. data/test/vcr_cassettes/Reports.yml +0 -5549
  96. data/test/vcr_cassettes/Sellers.yml +0 -433
  97. data/test/vcr_cassettes/Subscriptions.yml +0 -1529
@@ -1,111 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'helper'
4
- require 'mws/orders/client'
5
-
6
- class TestMWSOrdersClient < MiniTest::Test
7
- def setup
8
- @client = MWS::Orders::Client.new
9
- end
10
-
11
- def test_listing_orders
12
- operation = {
13
- 'Action' => 'ListOrders',
14
- 'CreatedAfter' => '2016-01-01',
15
- 'OrderStatus.Status.1' => '1',
16
- 'MarketplaceId.Id.1' => '123',
17
- 'PaymentMethod.1' => '1',
18
- 'TFMShipmentStatus.Status.1' => '1',
19
- 'FulfillmentChannel.Channel.1' => 'MFN'
20
- }
21
-
22
- @client.stub(:run, nil) do
23
- @client.list_orders(
24
- '123',
25
- created_after: '2016-01-01',
26
- order_status: '1',
27
- tfm_shipment_status: '1',
28
- payment_method: '1',
29
- fulfillment_channel: 'MFN'
30
- )
31
- end
32
-
33
- assert_equal operation, @client.operation
34
- end
35
-
36
- def test_that_listing_orders_requires_start_time_keyword
37
- @client.stub(:run, nil) do
38
- error = assert_raises ArgumentError do
39
- @client.list_orders('123')
40
- end
41
- assert_equal 'specify created_after or last_updated_after', error.message
42
- @client.list_orders('123', created_after: '2016-01-01')
43
- @client.list_orders('123', last_updated_after: '2016-01-01')
44
- end
45
- end
46
-
47
- def test_listing_orders_by_next_token
48
- operation = {
49
- 'Action' => 'ListOrdersByNextToken',
50
- 'NextToken' => '1'
51
- }
52
-
53
- @client.stub(:run, nil) do
54
- @client.list_orders_by_next_token('1')
55
- end
56
-
57
- assert_equal operation, @client.operation
58
- end
59
-
60
- def test_getting_order
61
- operation = {
62
- 'Action' => 'GetOrder',
63
- 'AmazonOrderId.Id.1' => '1',
64
- 'AmazonOrderId.Id.2' => '2'
65
- }
66
-
67
- @client.stub(:run, nil) do
68
- @client.get_order('1', '2')
69
- end
70
-
71
- assert_equal operation, @client.operation
72
- end
73
-
74
- def test_listing_order_items
75
- operation = {
76
- 'Action' => 'ListOrderItems',
77
- 'AmazonOrderId' => '1'
78
- }
79
-
80
- @client.stub(:run, nil) do
81
- @client.list_order_items('1')
82
- end
83
-
84
- assert_equal operation, @client.operation
85
- end
86
-
87
- def test_listing_order_items_by_next_token
88
- operation = {
89
- 'Action' => 'ListOrderItemsByNextToken',
90
- 'NextToken' => '1'
91
- }
92
-
93
- @client.stub(:run, nil) do
94
- @client.list_order_items_by_next_token('1')
95
- end
96
-
97
- assert_equal operation, @client.operation
98
- end
99
-
100
- def test_getting_service_status
101
- operation = {
102
- 'Action' => 'GetServiceStatus'
103
- }
104
-
105
- @client.stub(:run, nil) do
106
- @client.get_service_status
107
- end
108
-
109
- assert_equal operation, @client.operation
110
- end
111
- end
@@ -1,248 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'helper'
4
- require 'mws/products/client'
5
-
6
- class TestMWSProductsClient < MiniTest::Test
7
- def setup
8
- @client = MWS::Products::Client.new
9
- end
10
-
11
- def test_listing_matching_products
12
- operation = {
13
- 'Action' => 'ListMatchingProducts',
14
- 'MarketplaceId' => '123',
15
- 'Query' => 'foo'
16
- }
17
-
18
- @client.stub(:run, nil) do
19
- @client.list_matching_products('123', 'foo')
20
- end
21
-
22
- assert_equal operation, @client.operation
23
- end
24
-
25
- def test_getting_matching_product_for_id
26
- operation = {
27
- 'Action' => 'GetMatchingProductForId',
28
- 'MarketplaceId' => '123',
29
- 'IdType' => 'foo',
30
- 'IdList.Id.1' => '1'
31
- }
32
-
33
- @client.stub(:run, nil) do
34
- @client.get_matching_product_for_id('123', 'foo', '1')
35
- end
36
-
37
- assert_equal operation, @client.operation
38
- end
39
-
40
- def test_getting_matching_product
41
- operation = {
42
- 'Action' => 'GetMatchingProduct',
43
- 'MarketplaceId' => '123',
44
- 'ASINList.ASIN.1' => '1'
45
- }
46
-
47
- @client.stub(:run, nil) do
48
- @client.get_matching_product('123', '1')
49
- end
50
-
51
- assert_equal operation, @client.operation
52
- end
53
-
54
- def test_getting_competitive_pricing_for_sku
55
- operation = {
56
- 'Action' => 'GetCompetitivePricingForSKU',
57
- 'MarketplaceId' => '123',
58
- 'SellerSKUList.SellerSKU.1' => '1'
59
- }
60
-
61
- @client.stub(:run, nil) do
62
- @client.get_competitive_pricing_for_sku('123', '1')
63
- end
64
-
65
- assert_equal operation, @client.operation
66
- end
67
-
68
- def test_getting_competitive_pricing_for_asin
69
- operation = {
70
- 'Action' => 'GetCompetitivePricingForASIN',
71
- 'MarketplaceId' => '123',
72
- 'ASINList.ASIN.1' => '1'
73
- }
74
-
75
- @client.stub(:run, nil) do
76
- @client.get_competitive_pricing_for_asin('123', '1')
77
- end
78
-
79
- assert_equal operation, @client.operation
80
- end
81
-
82
- def test_getting_lowest_offer_listings_for_sku
83
- operation = {
84
- 'Action' => 'GetLowestOfferListingsForSKU',
85
- 'MarketplaceId' => '123',
86
- 'SellerSKUList.SellerSKU.1' => '1'
87
- }
88
-
89
- @client.stub(:run, nil) do
90
- @client.get_lowest_offer_listings_for_sku('123', '1')
91
- end
92
-
93
- assert_equal operation, @client.operation
94
- end
95
-
96
- def test_getting_lowest_priced_offers_for_sku
97
- operation = {
98
- 'Action' => 'GetLowestPricedOffersForSKU',
99
- 'MarketplaceId' => '123',
100
- 'SellerSKU' => '1',
101
- 'ItemCondition' => 'New'
102
- }
103
-
104
- @client.stub(:run, nil) do
105
- @client.get_lowest_priced_offers_for_sku('123', '1', 'New')
106
- end
107
-
108
- assert_equal operation, @client.operation
109
- end
110
-
111
- def test_getting_lowest_priced_offers_for_asin
112
- operation = {
113
- 'Action' => 'GetLowestPricedOffersForASIN',
114
- 'MarketplaceId' => '123',
115
- 'ASIN' => '1',
116
- 'ItemCondition' => 'New'
117
- }
118
-
119
- @client.stub(:run, nil) do
120
- @client.get_lowest_priced_offers_for_asin('123', '1', 'New')
121
- end
122
-
123
- assert_equal operation, @client.operation
124
- end
125
-
126
- def test_getting_lowest_offer_listings_for_asin
127
- operation = {
128
- 'Action' => 'GetLowestOfferListingsForASIN',
129
- 'MarketplaceId' => '123',
130
- 'ASINList.ASIN.1' => '1'
131
- }
132
-
133
- @client.stub(:run, nil) do
134
- @client.get_lowest_offer_listings_for_asin('123', '1')
135
- end
136
-
137
- assert_equal operation, @client.operation
138
- end
139
-
140
- def test_getting_my_fees_estimate
141
- operation = {
142
- 'Action' => 'GetMyFeesEstimate',
143
- 'FeesEstimateRequestList.FeesEstimateRequest.1.MarketplaceId' => '123',
144
- 'FeesEstimateRequestList.FeesEstimateRequest.1.IdType' => 'ASIN',
145
- 'FeesEstimateRequestList.FeesEstimateRequest.1.IdValue' => '1234567890',
146
- 'FeesEstimateRequestList.FeesEstimateRequest.1.Identifier' => 'foo',
147
- 'FeesEstimateRequestList.FeesEstimateRequest.1.IsAmazonFulfilled' => true,
148
- 'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.CurrencyCode' => 'USD',
149
- 'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.ListingPrice.Amount' => 30.00,
150
- 'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.CurrencyCode' => 'USD',
151
- 'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Shipping.Amount' => 3.99,
152
- 'FeesEstimateRequestList.FeesEstimateRequest.1.PriceToEstimateFees.Points.PointsNumber' => 0
153
- }
154
-
155
- @client.stub(:run, nil) do
156
- @client.get_my_fees_estimate(
157
- marketplace_id: '123',
158
- id_type: 'ASIN',
159
- id_value: '1234567890',
160
- identifier: 'foo',
161
- is_amazon_fulfilled: true,
162
- price_to_estimate_fees: {
163
- listing_price: {
164
- currency_code: 'USD',
165
- amount: 30.00
166
- },
167
- shipping: {
168
- currency_code: 'USD',
169
- amount: 3.99
170
- },
171
- points: {
172
- points_number: 0
173
- }
174
- }
175
- )
176
- end
177
-
178
- assert_equal operation, @client.operation
179
- end
180
-
181
- def test_getting_my_price_for_sku
182
- operation = {
183
- 'Action' => 'GetMyPriceForSKU',
184
- 'MarketplaceId' => '123',
185
- 'SellerSKUList.SellerSKU.1' => '1'
186
- }
187
-
188
- @client.stub(:run, nil) do
189
- @client.get_my_price_for_sku('123', '1')
190
- end
191
-
192
- assert_equal operation, @client.operation
193
- end
194
-
195
- def test_getting_my_price_for_asin
196
- operation = {
197
- 'Action' => 'GetMyPriceForASIN',
198
- 'MarketplaceId' => '123',
199
- 'ASINList.ASIN.1' => '1'
200
- }
201
-
202
- @client.stub(:run, nil) do
203
- @client.get_my_price_for_asin('123', '1')
204
- end
205
-
206
- assert_equal operation, @client.operation
207
- end
208
-
209
- def test_getting_product_categories_for_sku
210
- operation = {
211
- 'Action' => 'GetProductCategoriesForSKU',
212
- 'MarketplaceId' => '123',
213
- 'SellerSKU' => '1'
214
- }
215
-
216
- @client.stub(:run, nil) do
217
- @client.get_product_categories_for_sku('123', '1')
218
- end
219
-
220
- assert_equal operation, @client.operation
221
- end
222
-
223
- def test_getting_product_categories_for_asin
224
- operation = {
225
- 'Action' => 'GetProductCategoriesForASIN',
226
- 'MarketplaceId' => '123',
227
- 'ASIN' => '1'
228
- }
229
-
230
- @client.stub(:run, nil) do
231
- @client.get_product_categories_for_asin('123', '1')
232
- end
233
-
234
- assert_equal operation, @client.operation
235
- end
236
-
237
- def test_getting_service_status
238
- operation = {
239
- 'Action' => 'GetServiceStatus'
240
- }
241
-
242
- @client.stub(:run, nil) do
243
- @client.get_service_status
244
- end
245
-
246
- assert_equal operation, @client.operation
247
- end
248
- end
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'helper'
4
- require 'mws/recommendations/client'
5
-
6
- class TestMWSRecommendationsClient < MiniTest::Test
7
- def setup
8
- @client = MWS::Recommendations::Client.new
9
- end
10
-
11
- def test_getting_last_updated_time_for_recommendations
12
- operation = {
13
- 'Action' => 'GetLastUpdatedTimeForRecommendations',
14
- 'MarketplaceId' => '1'
15
- }
16
-
17
- @client.stub(:run, nil) do
18
- @client.get_last_updated_time_for_recommendations('1')
19
- end
20
-
21
- assert_equal operation, @client.operation
22
- end
23
-
24
- def test_listing_recommendations
25
- operation = {
26
- 'Action' => 'ListRecommendations',
27
- 'CategoryQueryList.CategoryQuery.1.FilterOptions.FilterOption.1.Foo' => '1',
28
- 'MarketplaceId' => '123'
29
- }
30
-
31
- @client.stub(:run, nil) do
32
- @client.list_recommendations('123', category_query_list: [{ 'Foo' => '1' }])
33
- end
34
-
35
- assert_equal operation, @client.operation
36
- end
37
-
38
- def test_listing_recommendations_by_next_token
39
- operation = {
40
- 'Action' => 'ListRecommendationsByNextToken',
41
- 'NextToken' => '1'
42
- }
43
-
44
- @client.stub(:run, nil) do
45
- @client.list_recommendations_by_next_token('1')
46
- end
47
-
48
- assert_equal operation, @client.operation
49
- end
50
-
51
- def test_getting_service_status
52
- operation = {
53
- 'Action' => 'GetServiceStatus'
54
- }
55
-
56
- @client.stub(:run, nil) do
57
- @client.get_service_status
58
- end
59
-
60
- assert_equal operation, @client.operation
61
- end
62
- end
@@ -1,209 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'helper'
4
- require 'mws/reports/client'
5
-
6
- class TestMWSReportsClient < MiniTest::Test
7
- def setup
8
- @client = MWS::Reports::Client.new
9
- end
10
-
11
- def test_requesting_report
12
- operation = {
13
- 'Action' => 'RequestReport',
14
- 'ReportType' => 'foo',
15
- 'MarketplaceIdList.Id.1' => '1'
16
- }
17
-
18
- @client.stub(:run, nil) do
19
- @client.request_report('foo', marketplace_id_list: ['1'])
20
- end
21
-
22
- assert_equal operation, @client.operation
23
- end
24
-
25
- def test_getting_report_request_list
26
- operation = {
27
- 'Action' => 'GetReportRequestList',
28
- 'ReportRequestIdList.Id.1' => '1',
29
- 'ReportTypeList.Type.1' => '2',
30
- 'ReportProcessingStatusList.Status.1' => '3'
31
- }
32
-
33
- @client.stub(:run, nil) do
34
- @client.get_report_request_list(
35
- report_request_id_list: '1',
36
- report_type_list: '2',
37
- report_processing_status_list: '3'
38
- )
39
- end
40
-
41
- assert_equal operation, @client.operation
42
- end
43
-
44
- def test_getting_report_request_list_by_next_token
45
- operation = {
46
- 'Action' => 'GetReportRequestListByNextToken',
47
- 'NextToken' => '1'
48
- }
49
-
50
- @client.stub(:run, nil) do
51
- @client.get_report_request_list_by_next_token('1')
52
- end
53
-
54
- assert_equal operation, @client.operation
55
- end
56
-
57
- def test_getting_report_request_count
58
- operation = {
59
- 'Action' => 'GetReportRequestCount',
60
- 'ReportTypeList.Type.1' => '1',
61
- 'ReportProcessingStatusList.Status.1' => '2'
62
- }
63
-
64
- @client.stub(:run, nil) do
65
- @client.get_report_request_count(
66
- report_type_list: '1',
67
- report_processing_status_list: '2'
68
- )
69
- end
70
-
71
- assert_equal operation, @client.operation
72
- end
73
-
74
- def test_canceling_report_requests
75
- operation = {
76
- 'Action' => 'CancelReportRequests',
77
- 'ReportTypeList.Type.1' => '1',
78
- 'ReportProcessingStatusList.Status.1' => '2'
79
- }
80
-
81
- @client.stub(:run, nil) do
82
- @client.cancel_report_requests(
83
- report_type_list: '1',
84
- report_processing_status_list: '2'
85
- )
86
- end
87
-
88
- assert_equal operation, @client.operation
89
- end
90
-
91
- def test_getting_report_list
92
- operation = {
93
- 'Action' => 'GetReportList',
94
- 'ReportTypeList.Type.1' => '1',
95
- 'ReportRequestIdList.Id.1' => '2'
96
- }
97
-
98
- @client.stub(:run, nil) do
99
- @client.get_report_list(
100
- report_type_list: '1',
101
- report_request_id_list: '2'
102
- )
103
- end
104
-
105
- assert_equal operation, @client.operation
106
- end
107
-
108
- def test_getting_report_list_by_next_token
109
- operation = {
110
- 'Action' => 'GetReportListByNextToken',
111
- 'NextToken' => '1'
112
- }
113
-
114
- @client.stub(:run, nil) do
115
- @client.get_report_list_by_next_token('1')
116
- end
117
-
118
- assert_equal operation, @client.operation
119
- end
120
-
121
- def test_getting_report_count
122
- operation = {
123
- 'Action' => 'GetReportCount',
124
- 'ReportTypeList.Type.1' => '1'
125
- }
126
-
127
- @client.stub(:run, nil) do
128
- @client.get_report_count(
129
- report_type_list: '1'
130
- )
131
- end
132
-
133
- assert_equal operation, @client.operation
134
- end
135
-
136
- def test_getting_report
137
- operation = {
138
- 'Action' => 'GetReport',
139
- 'ReportId' => '1'
140
- }
141
-
142
- @client.stub(:run, nil) do
143
- @client.get_report('1')
144
- end
145
-
146
- assert_equal operation, @client.operation
147
- end
148
-
149
- def test_managing_report_schedule
150
- operation = {
151
- 'Action' => 'ManageReportSchedule',
152
- 'ReportType' => '1',
153
- 'Schedule' => '2'
154
- }
155
-
156
- @client.stub(:run, nil) do
157
- @client.manage_report_schedule('1', '2')
158
- end
159
-
160
- assert_equal operation, @client.operation
161
- end
162
-
163
- def test_getting_report_schedule_list
164
- operation = {
165
- 'Action' => 'GetReportScheduleList',
166
- 'ReportTypeList.Type.1' => '1',
167
- 'ReportTypeList.Type.2' => '2'
168
- }
169
-
170
- @client.stub(:run, nil) do
171
- @client.get_report_schedule_list('1', '2')
172
- end
173
-
174
- assert_equal operation, @client.operation
175
- end
176
-
177
- def test_getting_report_schedule_list_by_next_token
178
- assert_raises NotImplementedError do
179
- @client.get_report_schedule_list_by_next_token
180
- end
181
- end
182
-
183
- def test_getting_report_schedule_count
184
- operation = {
185
- 'Action' => 'GetReportScheduleCount',
186
- 'ReportTypeList.Type.1' => '1'
187
- }
188
-
189
- @client.stub(:run, nil) do
190
- @client.get_report_schedule_count('1')
191
- end
192
-
193
- assert_equal operation, @client.operation
194
- end
195
-
196
- def test_updating_report_acknowledgements
197
- operation = {
198
- 'Action' => 'UpdateReportAcknowledgements',
199
- 'Acknowledged' => true,
200
- 'ReportIdList.Id.1' => '1'
201
- }
202
-
203
- @client.stub(:run, nil) do
204
- @client.update_report_acknowledgements(true, '1')
205
- end
206
-
207
- assert_equal operation, @client.operation
208
- end
209
- end