peddler 2.4.5 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +406 -134
  3. data/lib/peddler/access_token.rb +76 -0
  4. data/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +80 -0
  5. data/lib/peddler/api/aplus_content_2020_11_01.rb +208 -0
  6. data/lib/peddler/api/application_management_2023_11_30.rb +25 -0
  7. data/lib/peddler/api/catalog_items_2020_12_01.rb +70 -0
  8. data/lib/peddler/api/catalog_items_2022_04_01.rb +83 -0
  9. data/lib/peddler/api/catalog_items_v0.rb +90 -0
  10. data/lib/peddler/api/data_kiosk_2023_11_15.rb +92 -0
  11. data/lib/peddler/api/easy_ship_2022_03_23.rb +108 -0
  12. data/lib/peddler/api/fba_inbound_eligibility_v1.rb +36 -0
  13. data/lib/peddler/api/fba_inventory_v1.rb +106 -0
  14. data/lib/peddler/api/feeds_2021_06_30.rb +104 -0
  15. data/lib/peddler/api/finances_v0.rb +121 -0
  16. data/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +660 -0
  17. data/lib/peddler/api/fulfillment_inbound_v0.rb +314 -0
  18. data/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +222 -0
  19. data/lib/peddler/api/listings_items_2020_09_01.rb +84 -0
  20. data/lib/peddler/api/listings_items_2021_08_01.rb +154 -0
  21. data/lib/peddler/api/listings_restrictions_2021_08_01.rb +37 -0
  22. data/lib/peddler/api/merchant_fulfillment_v0.rb +64 -0
  23. data/lib/peddler/api/messaging_v1.rb +241 -0
  24. data/lib/peddler/api/notifications_v1.rb +114 -0
  25. data/lib/peddler/api/orders_v0.rb +264 -0
  26. data/lib/peddler/api/product_fees_v0.rb +69 -0
  27. data/lib/peddler/api/product_pricing_2022_05_01.rb +43 -0
  28. data/lib/peddler/api/product_pricing_v0.rb +144 -0
  29. data/lib/peddler/api/product_type_definitions_2020_09_01.rb +75 -0
  30. data/lib/peddler/api/replenishment_2022_11_07.rb +45 -0
  31. data/lib/peddler/api/reports_2021_06_30.rb +139 -0
  32. data/lib/peddler/api/sales_v1.rb +69 -0
  33. data/lib/peddler/api/sellers_v1.rb +33 -0
  34. data/lib/peddler/api/services_v1.rb +308 -0
  35. data/lib/peddler/api/shipment_invoicing_v0.rb +46 -0
  36. data/lib/peddler/api/shipping_v1.rb +107 -0
  37. data/lib/peddler/api/shipping_v2.rb +267 -0
  38. data/lib/peddler/api/solicitations_v1.rb +53 -0
  39. data/lib/peddler/api/supply_sources_2020_07_01.rb +82 -0
  40. data/lib/peddler/api/tokens_2021_03_01.rb +30 -0
  41. data/lib/peddler/api/uploads_2020_11_01.rb +40 -0
  42. data/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +24 -0
  43. data/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +72 -0
  44. data/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +72 -0
  45. data/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +23 -0
  46. data/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +35 -0
  47. data/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +177 -0
  48. data/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +165 -0
  49. data/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +24 -0
  50. data/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +24 -0
  51. data/lib/peddler/api/vendor_invoices_v1.rb +22 -0
  52. data/lib/peddler/api/vendor_orders_v1.rb +148 -0
  53. data/lib/peddler/api/vendor_shipments_v1.rb +120 -0
  54. data/lib/peddler/api/vendor_transaction_status_v1.rb +24 -0
  55. data/lib/peddler/api.rb +115 -0
  56. data/lib/peddler/error.rb +30 -0
  57. data/lib/peddler/region.rb +30 -0
  58. data/lib/peddler/version.rb +1 -1
  59. data/lib/peddler.rb +52 -1
  60. metadata +70 -80
  61. data/lib/mws/easy_ship/client.rb +0 -93
  62. data/lib/mws/easy_ship.rb +0 -3
  63. data/lib/mws/feeds/client.rb +0 -122
  64. data/lib/mws/feeds.rb +0 -3
  65. data/lib/mws/finances/client.rb +0 -82
  66. data/lib/mws/finances.rb +0 -3
  67. data/lib/mws/fulfillment_inbound_shipment/client.rb +0 -388
  68. data/lib/mws/fulfillment_inbound_shipment.rb +0 -3
  69. data/lib/mws/fulfillment_inventory/client.rb +0 -57
  70. data/lib/mws/fulfillment_inventory.rb +0 -3
  71. data/lib/mws/fulfillment_outbound_shipment/client.rb +0 -211
  72. data/lib/mws/fulfillment_outbound_shipment.rb +0 -3
  73. data/lib/mws/merchant_fulfillment/client.rb +0 -87
  74. data/lib/mws/merchant_fulfillment.rb +0 -3
  75. data/lib/mws/off_amazon_payments.rb +0 -3
  76. data/lib/mws/orders/client.rb +0 -120
  77. data/lib/mws/orders.rb +0 -3
  78. data/lib/mws/products/client.rb +0 -268
  79. data/lib/mws/products.rb +0 -3
  80. data/lib/mws/recommendations/client.rb +0 -72
  81. data/lib/mws/recommendations.rb +0 -3
  82. data/lib/mws/reports/client.rb +0 -236
  83. data/lib/mws/reports.rb +0 -3
  84. data/lib/mws/sellers/client.rb +0 -44
  85. data/lib/mws/sellers.rb +0 -3
  86. data/lib/mws/shipment_invoicing/client.rb +0 -74
  87. data/lib/mws/shipment_invoicing.rb +0 -3
  88. data/lib/mws/subscriptions/client.rb +0 -179
  89. data/lib/mws/subscriptions.rb +0 -3
  90. data/lib/mws.rb +0 -29
  91. data/lib/peddler/client.rb +0 -159
  92. data/lib/peddler/errors/builder.rb +0 -64
  93. data/lib/peddler/errors/class_generator.rb +0 -40
  94. data/lib/peddler/errors/error.rb +0 -45
  95. data/lib/peddler/errors/parser.rb +0 -28
  96. data/lib/peddler/flat_file_parser.rb +0 -56
  97. data/lib/peddler/headers.rb +0 -102
  98. data/lib/peddler/marketplace.rb +0 -79
  99. data/lib/peddler/operation.rb +0 -78
  100. data/lib/peddler/parser.rb +0 -33
  101. data/lib/peddler/structured_list.rb +0 -23
  102. data/lib/peddler/vcr_matcher.rb +0 -97
  103. data/lib/peddler/xml_parser.rb +0 -38
  104. data/lib/peddler/xml_response_parser.rb +0 -25
metadata CHANGED
@@ -1,116 +1,106 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 3.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2024-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: excon
14
+ name: http
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.50.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: 0.50.0
27
- - !ruby/object:Gem::Dependency
28
- name: jeff
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
19
+ version: '5.0'
20
+ - - "<"
32
21
  - !ruby/object:Gem::Version
33
- version: '2.0'
22
+ version: '7.0'
34
23
  type: :runtime
35
24
  prerelease: false
36
25
  version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: multi_xml
43
- requirement: !ruby/object:Gem::Requirement
44
26
  requirements:
45
27
  - - ">="
46
28
  - !ruby/object:Gem::Version
47
- version: 0.5.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
29
+ version: '5.0'
30
+ - - "<"
53
31
  - !ruby/object:Gem::Version
54
- version: 0.5.0
32
+ version: '7.0'
55
33
  description:
56
34
  email:
57
- - me@hakanensari.com
35
+ - hakanensari@gmail.com
58
36
  executables: []
59
37
  extensions: []
60
38
  extra_rdoc_files: []
61
39
  files:
62
40
  - LICENSE
63
41
  - README.md
64
- - lib/mws.rb
65
- - lib/mws/easy_ship.rb
66
- - lib/mws/easy_ship/client.rb
67
- - lib/mws/feeds.rb
68
- - lib/mws/feeds/client.rb
69
- - lib/mws/finances.rb
70
- - lib/mws/finances/client.rb
71
- - lib/mws/fulfillment_inbound_shipment.rb
72
- - lib/mws/fulfillment_inbound_shipment/client.rb
73
- - lib/mws/fulfillment_inventory.rb
74
- - lib/mws/fulfillment_inventory/client.rb
75
- - lib/mws/fulfillment_outbound_shipment.rb
76
- - lib/mws/fulfillment_outbound_shipment/client.rb
77
- - lib/mws/merchant_fulfillment.rb
78
- - lib/mws/merchant_fulfillment/client.rb
79
- - lib/mws/off_amazon_payments.rb
80
- - lib/mws/orders.rb
81
- - lib/mws/orders/client.rb
82
- - lib/mws/products.rb
83
- - lib/mws/products/client.rb
84
- - lib/mws/recommendations.rb
85
- - lib/mws/recommendations/client.rb
86
- - lib/mws/reports.rb
87
- - lib/mws/reports/client.rb
88
- - lib/mws/sellers.rb
89
- - lib/mws/sellers/client.rb
90
- - lib/mws/shipment_invoicing.rb
91
- - lib/mws/shipment_invoicing/client.rb
92
- - lib/mws/subscriptions.rb
93
- - lib/mws/subscriptions/client.rb
94
42
  - lib/peddler.rb
95
- - lib/peddler/client.rb
96
- - lib/peddler/errors/builder.rb
97
- - lib/peddler/errors/class_generator.rb
98
- - lib/peddler/errors/error.rb
99
- - lib/peddler/errors/parser.rb
100
- - lib/peddler/flat_file_parser.rb
101
- - lib/peddler/headers.rb
102
- - lib/peddler/marketplace.rb
103
- - lib/peddler/operation.rb
104
- - lib/peddler/parser.rb
105
- - lib/peddler/structured_list.rb
106
- - lib/peddler/vcr_matcher.rb
43
+ - lib/peddler/access_token.rb
44
+ - lib/peddler/api.rb
45
+ - lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb
46
+ - lib/peddler/api/aplus_content_2020_11_01.rb
47
+ - lib/peddler/api/application_management_2023_11_30.rb
48
+ - lib/peddler/api/catalog_items_2020_12_01.rb
49
+ - lib/peddler/api/catalog_items_2022_04_01.rb
50
+ - lib/peddler/api/catalog_items_v0.rb
51
+ - lib/peddler/api/data_kiosk_2023_11_15.rb
52
+ - lib/peddler/api/easy_ship_2022_03_23.rb
53
+ - lib/peddler/api/fba_inbound_eligibility_v1.rb
54
+ - lib/peddler/api/fba_inventory_v1.rb
55
+ - lib/peddler/api/feeds_2021_06_30.rb
56
+ - lib/peddler/api/finances_v0.rb
57
+ - lib/peddler/api/fulfillment_inbound_2024_03_20.rb
58
+ - lib/peddler/api/fulfillment_inbound_v0.rb
59
+ - lib/peddler/api/fulfillment_outbound_2020_07_01.rb
60
+ - lib/peddler/api/listings_items_2020_09_01.rb
61
+ - lib/peddler/api/listings_items_2021_08_01.rb
62
+ - lib/peddler/api/listings_restrictions_2021_08_01.rb
63
+ - lib/peddler/api/merchant_fulfillment_v0.rb
64
+ - lib/peddler/api/messaging_v1.rb
65
+ - lib/peddler/api/notifications_v1.rb
66
+ - lib/peddler/api/orders_v0.rb
67
+ - lib/peddler/api/product_fees_v0.rb
68
+ - lib/peddler/api/product_pricing_2022_05_01.rb
69
+ - lib/peddler/api/product_pricing_v0.rb
70
+ - lib/peddler/api/product_type_definitions_2020_09_01.rb
71
+ - lib/peddler/api/replenishment_2022_11_07.rb
72
+ - lib/peddler/api/reports_2021_06_30.rb
73
+ - lib/peddler/api/sales_v1.rb
74
+ - lib/peddler/api/sellers_v1.rb
75
+ - lib/peddler/api/services_v1.rb
76
+ - lib/peddler/api/shipment_invoicing_v0.rb
77
+ - lib/peddler/api/shipping_v1.rb
78
+ - lib/peddler/api/shipping_v2.rb
79
+ - lib/peddler/api/solicitations_v1.rb
80
+ - lib/peddler/api/supply_sources_2020_07_01.rb
81
+ - lib/peddler/api/tokens_2021_03_01.rb
82
+ - lib/peddler/api/uploads_2020_11_01.rb
83
+ - lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb
84
+ - lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb
85
+ - lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb
86
+ - lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb
87
+ - lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb
88
+ - lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb
89
+ - lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb
90
+ - lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb
91
+ - lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb
92
+ - lib/peddler/api/vendor_invoices_v1.rb
93
+ - lib/peddler/api/vendor_orders_v1.rb
94
+ - lib/peddler/api/vendor_shipments_v1.rb
95
+ - lib/peddler/api/vendor_transaction_status_v1.rb
96
+ - lib/peddler/error.rb
97
+ - lib/peddler/region.rb
107
98
  - lib/peddler/version.rb
108
- - lib/peddler/xml_parser.rb
109
- - lib/peddler/xml_response_parser.rb
110
99
  homepage: https://github.com/hakanensari/peddler
111
100
  licenses:
112
101
  - MIT
113
- metadata: {}
102
+ metadata:
103
+ rubygems_mfa_required: 'true'
114
104
  post_install_message:
115
105
  rdoc_options: []
116
106
  require_paths:
@@ -119,15 +109,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
109
  requirements:
120
110
  - - ">="
121
111
  - !ruby/object:Gem::Version
122
- version: '2.5'
112
+ version: '3.2'
123
113
  required_rubygems_version: !ruby/object:Gem::Requirement
124
114
  requirements:
125
115
  - - ">="
126
116
  - !ruby/object:Gem::Version
127
117
  version: '0'
128
118
  requirements: []
129
- rubygems_version: 3.2.3
119
+ rubygems_version: 3.5.16
130
120
  signing_key:
131
121
  specification_version: 4
132
- summary: A Ruby wrapper to the Amazon MWS API
122
+ summary: The Amazon Selling Partner API (SP-API) in Ruby
133
123
  test_files: []
@@ -1,93 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'peddler/client'
4
-
5
- module MWS
6
- module EasyShip
7
- # With the Easy Ship API section, you can build applications that help
8
- # sellers in India manage and ship their Amazon Easy Ship orders.
9
- #
10
- # @note This functionality is available only in the India marketplace.
11
- class Client < ::Peddler::Client
12
- self.version = '2018-09-01'
13
- self.path = "/EasyShip/#{version}"
14
-
15
- # Returns time slots for Amazon Easy Ship package pickup
16
- #
17
- # @see https://docs.developer.amazonservices.com/en_US/easy_ship/EasyShip_ListPickupSlots.html
18
- # @param [String] marketplace_id
19
- # @param [String] amazon_order_id
20
- # @param [Struct, Hash] package_dimensions
21
- # @param [Struct, Hash] package_weight
22
- # @return [Peddler::XMLParser]
23
- def list_pickup_slots(marketplace_id, amazon_order_id, package_dimensions,
24
- package_weight)
25
- operation('ListPickupSlots')
26
- .add('MarketplaceId' => marketplace_id,
27
- 'AmazonOrderId' => amazon_order_id,
28
- 'PackageDimensions' => package_dimensions,
29
- 'PackageWeight' => package_weight)
30
-
31
- run
32
- end
33
-
34
- # Schedules an Amazon Easy Ship pickup slot
35
- #
36
- # @see https://docs.developer.amazonservices.com/en_US/easy_ship/EasyShip_CreateScheduledPackage.html
37
- # @param [String] marketplace_id
38
- # @param [String] amazon_order_id
39
- # @param [Struct, Hash] package_request_details
40
- # @return [Peddler::XMLParser]
41
- def create_scheduled_package(marketplace_id, amazon_order_id,
42
- package_request_details)
43
- operation('CreateScheduledPackage')
44
- .add('MarketplaceId' => marketplace_id,
45
- 'AmazonOrderId' => amazon_order_id,
46
- 'PackageRequestDetails' => package_request_details)
47
-
48
- run
49
- end
50
-
51
- # Updates an Amazon Easy Ship pickup slot
52
- #
53
- # @see https://docs.developer.amazonservices.com/en_US/easy_ship/EasyShip_UpdateScheduledPackages.html
54
- # @param [String] marketplace_id
55
- # @param [Array<Struct, Hash>] scheduled_package_update_details_list
56
- # @return [Peddler::XMLParser]
57
- def update_scheduled_packages(marketplace_id,
58
- scheduled_package_update_details_list)
59
- operation('UpdateScheduledPackages')
60
- .add('MarketplaceId' => marketplace_id,
61
- 'ScheduledPackageUpdateDetailsList' =>
62
- scheduled_package_update_details_list)
63
- .structure!('ScheduledPackageUpdateDetailsList',
64
- 'PackageUpdateDetails')
65
-
66
- run
67
- end
68
-
69
- # Returns information about a scheduled package
70
- #
71
- # @see https://docs.developer.amazonservices.com/en_US/easy_ship/EasyShip_GetScheduledPackage.html
72
- # @param [String] marketplace_id
73
- # @param [Struct, Hash] scheduled_package_id
74
- # @return [Peddler::XMLParser]
75
- def get_scheduled_package(marketplace_id, scheduled_package_id)
76
- operation('GetScheduledPackage')
77
- .add('MarketplaceId' => marketplace_id,
78
- 'ScheduledPackageId' => scheduled_package_id)
79
-
80
- run
81
- end
82
-
83
- # Returns the operational status of the API
84
- #
85
- # @see https://docs.developer.amazonservices.com/en_US/shipment_invoicing/ShipmentInvoicing_GetServiceStatus.html
86
- # @return [Peddler::XMLParser]
87
- def get_service_status
88
- operation('GetServiceStatus')
89
- run
90
- end
91
- end
92
- end
93
- end
data/lib/mws/easy_ship.rb DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mws/easy_ship/client'
@@ -1,122 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'peddler/client'
4
-
5
- module MWS
6
- module Feeds
7
- # The MWS Feeds API lets you upload inventory and order data to Amazon. You
8
- # can also use this API to get information about the processing of feeds.
9
- # @see https://sellercentral.amazon.com/gp/help/help-page.html?itemID=1611
10
- class Client < ::Peddler::Client
11
- self.version = '2009-01-01'
12
- self.path = "/Feeds/#{version}"
13
-
14
- # Uploads a feed
15
- #
16
- # @note Feed size is limited to 2,147,483,647 bytes (2^31 -1) per feed.
17
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_SubmitFeed.html
18
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
19
- # @param [String] feed_content an XML or flat file feed
20
- # @param [String] feed_type the feed type
21
- # @param [Hash] opts
22
- # @option opts [Array<String>, String] :marketplace_id_list
23
- # @option opts [Boolean] :purge_and_replace
24
- # @return [Peddler::XMLParser]
25
- def submit_feed(feed_content, feed_type, opts = {})
26
- self.body = feed_content
27
-
28
- operation('SubmitFeed')
29
- .add(opts)
30
- .add('FeedType' => feed_type)
31
- .structure!('MarketplaceIdList', 'Id')
32
-
33
- run
34
- end
35
-
36
- # Lists feed submissions
37
- #
38
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionList.html
39
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
40
- # @param [Hash] opts
41
- # @option opts [Array<String>, String] :feed_submission_id_list
42
- # @option opts [Integer] :max_count
43
- # @option opts [Array<String>, String] :feed_type_list
44
- # @option opts [Array<String>, String] :feed_processing_status_list
45
- # @option opts [String, #iso8601] :submitted_from_date
46
- # @option opts [String, #iso8601] :submitted_to_date
47
- # @return [Peddler::XMLParser]
48
- def get_feed_submission_list(opts = {})
49
- operation('GetFeedSubmissionList')
50
- .add(opts)
51
- .structure!('FeedSubmissionIdList', 'Id')
52
- .structure!('FeedTypeList', 'Type')
53
- .structure!('FeedProcessingStatusList', 'Status')
54
-
55
- run
56
- end
57
-
58
- # Lists the next page of feed submissions
59
- #
60
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionListByNextToken.html
61
- # @param [String] next_token
62
- # @return [Peddler::XMLParser]
63
- def get_feed_submission_list_by_next_token(next_token)
64
- operation('GetFeedSubmissionListByNextToken')
65
- .add('NextToken' => next_token)
66
-
67
- run
68
- end
69
-
70
- # Counts submitted feeds
71
- #
72
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionCount.html
73
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
74
- # @param [Hash] opts
75
- # @option opts [Array<String>, String] :feed_type_list
76
- # @option opts [Array<String>, String] :feed_processing_status_list
77
- # @option opts [String, #iso8601] :submitted_from_date
78
- # @option opts [String, #iso8601] :submitted_to_date
79
- # @return [Peddler::XMLParser]
80
- def get_feed_submission_count(opts = {})
81
- operation('GetFeedSubmissionCount')
82
- .add(opts)
83
- .structure!('FeedTypeList', 'Type')
84
- .structure!('FeedProcessingStatusList', 'Status')
85
-
86
- run
87
- end
88
-
89
- # Cancels one or more feed submissions
90
- #
91
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_CancelFeedSubmissions.html
92
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_FeedType.html
93
- # @param [Hash] opts
94
- # @option opts [Array<String>, String] :feed_submission_id_list
95
- # @option opts [Array<String>, String] :feed_type_list
96
- # @option opts [String, #iso8601] :submitted_from_date
97
- # @option opts [String, #iso8601] :submitted_to_date
98
- # @return [Peddler::XMLParser]
99
- def cancel_feed_submissions(opts = {})
100
- operation('CancelFeedSubmissions')
101
- .add(opts)
102
- .structure!('FeedSubmissionIdList', 'Id')
103
- .structure!('FeedTypeList', 'Type')
104
-
105
- run
106
- end
107
-
108
- # Gets the processing report for a feed and its Content-MD5 header
109
- #
110
- # @see https://docs.developer.amazonservices.com/en_US/feeds/Feeds_GetFeedSubmissionResult.html
111
- # @param [Integer, String] feed_submission_id
112
- # @return [Peddler::XMLParser] if the report is in XML format
113
- # @return [Peddler::FlatFileParser] if the report is a flat file
114
- def get_feed_submission_result(feed_submission_id)
115
- operation('GetFeedSubmissionResult')
116
- .add('FeedSubmissionId' => feed_submission_id)
117
-
118
- run
119
- end
120
- end
121
- end
122
- end
data/lib/mws/feeds.rb DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mws/feeds/client'
@@ -1,82 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'peddler/client'
4
-
5
- module MWS
6
- module Finances
7
- # With the MWS Finances API you can retrieve financial transactions for your
8
- # seller account.
9
- class Client < ::Peddler::Client
10
- self.version = '2015-05-01'
11
- self.path = "/Finances/#{version}"
12
-
13
- # Lists financial events
14
- #
15
- # @see https://docs.developer.amazonservices.com/en_US/finances/Finances_ListFinancialEvents.html
16
- # @param [Hash] opts
17
- # @option opts [Integer] :max_results_per_page
18
- # @option opts [String] :amazon_order_id
19
- # @option opts [String] :financial_event_group_id
20
- # @option opts [String, #iso8601] :posted_after
21
- # @option opts [String, #iso8601] :posted_before
22
- # @return [Peddler::XMLParser]
23
- def list_financial_events(opts = {})
24
- operation('ListFinancialEvents')
25
- .add(opts)
26
-
27
- run
28
- end
29
-
30
- # Lists the next page of financial events
31
- #
32
- # @see https://docs.developer.amazonservices.com/en_US/finances/Finances_ListFinancialEventsByNextToken.html
33
- # @param [String] next_token
34
- # @return [Peddler::XMLParser]
35
- def list_financial_events_by_next_token(next_token)
36
- operation('ListFinancialEventsByNextToken')
37
- .add('NextToken' => next_token)
38
-
39
- run
40
- end
41
-
42
- # Lists financial event groups
43
- #
44
- # @see https://docs.developer.amazonservices.com/en_US/finances/Finances_ListFinancialEventGroups.html
45
- # @param [String, #iso8601] financial_event_group_started_after
46
- # @param [Hash] opts
47
- # @option opts [Integer] :max_results_per_page
48
- # @option opts [String, #iso8601] :financial_event_group_started_before
49
- # @return [Peddler::XMLParser]
50
- def list_financial_event_groups(financial_event_group_started_after,
51
- opts = {})
52
- operation('ListFinancialEventGroups')
53
- .add(opts)
54
- .add('FinancialEventGroupStartedAfter' =>
55
- financial_event_group_started_after)
56
-
57
- run
58
- end
59
-
60
- # Lists the next page of financial event groups
61
- #
62
- # @see https://docs.developer.amazonservices.com/en_US/finances/Finances_ListFinancialEventGroupsByNextToken.html
63
- # @param [String] next_token
64
- # @return [Peddler::XMLParser]
65
- def list_financial_event_groups_by_next_token(next_token)
66
- operation('ListFinancialEventGroupsByNextToken')
67
- .add('NextToken' => next_token)
68
-
69
- run
70
- end
71
-
72
- # Gets API status
73
- #
74
- # @see https://docs.developer.amazonservices.com/en_US/finances/Finances_GetServiceStatus.html
75
- # @return [Peddler::XMLParser]
76
- def get_service_status
77
- operation('GetServiceStatus')
78
- run
79
- end
80
- end
81
- end
82
- end
data/lib/mws/finances.rb DELETED
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'mws/finances/client'