peddler 5.0.0.pre.4 → 5.0.0.pre.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a92ebec97b53b45e1eff33494b844fe2eb578ba62b93cf20eaa7b062085f0f1
4
- data.tar.gz: c2bc809cda80a7dd1d315fbf64d8416b66797ef3fffdb6579e2b4aedcd6ca5a2
3
+ metadata.gz: 3d1837d301edb091b7fd706a20e3cb3920007ba4977922656f2963bb6aacdcb1
4
+ data.tar.gz: 1f39a61eccbe0563e8e366df4950ce090cedaee1efdb1893429d7897251619b8
5
5
  SHA512:
6
- metadata.gz: ee97d6201c41796488f74d21909d5a604c5aa6ea7d3557193cc3d4278255e0912904fc37932685dc92bbcf2464b54963e09f736461f1d2a28d87071cfe6b5e87
7
- data.tar.gz: 56897e80705274a926c4954e92a2c81db8f958d6e71d6e46e14b76b493faa98029259e7676beb668e517428a4539a81f326b8a9188f74e320a73da9cd3544d88
6
+ metadata.gz: 434a7ffd5b7c9d7816d98f0b25a6fa915c35b6e77105a95a575dfecf7cf124521823237d837f2c23804bf023e61aa370a191d3ef6d6d6c8e72549254ad8e4206
7
+ data.tar.gz: c244f0a40d0bcb33efd35cc537db376b90f013362f623db571b85c7e7d9d6194fa659deb5fd3faaac695f55efd3e993d71cba354708b67aa468cf63cb673db3d
data/README.md CHANGED
@@ -488,15 +488,9 @@ parsed_data = JSON.parse(http_response.to_s)
488
488
  sales_data = Peddler::DataKiosk::SalesAndTraffic20231115.parse(parsed_data)
489
489
  ```
490
490
 
491
- **Query Document Management (Optional):**
491
+ **Query Document Management:**
492
492
 
493
- Peddler provides a helper method for downloading query documents. Enable this by adding the graphql gem to your Gemfile (optional, only needed for schema validation):
494
-
495
- ```ruby
496
- gem "graphql", "~> 2.0"
497
- ```
498
-
499
- Then use the helper method:
493
+ Peddler provides a helper method for downloading query documents:
500
494
 
501
495
  ```ruby
502
496
  api = Peddler.data_kiosk.new(aws_region, access_token)
@@ -8,6 +8,7 @@ module Peddler
8
8
  # Mapping of camelized forms to their uppercase acronym equivalents
9
9
  MAP = {
10
10
  "Api" => "API",
11
+ "Apis" => "APIs",
11
12
  "Asin" => "ASIN",
12
13
  "B2b" => "B2B",
13
14
  "Cgst" => "CGST",
@@ -20,15 +21,17 @@ module Peddler
20
21
  "Sku" => "SKU",
21
22
  "Tds" => "TDS",
22
23
  "Url" => "URL",
24
+ "Urls" => "URLs",
23
25
  }.freeze
24
26
 
25
27
  # Transforms acronyms in camelized words to uppercase equivalents. Uses lookahead to prevent partial matches
26
- # within words (e.g., "Cod" won't match inside "Code"). Handles singular and plural forms (e.g., "Apis" to "APIs").
28
+ # within words (e.g., "Cod" won't match inside "Code"). Plural forms require explicit mappings (e.g.,
29
+ # "Urls" => "URLs").
27
30
  #
28
31
  # @param word [String]
29
32
  # @return [String]
30
33
  def apply(word)
31
- MAP.reduce(word) { |w, (from, to)| w.gsub(/#{from}(s?)(?=[A-Z]|$)/) { "#{to}#{::Regexp.last_match(1)}" } }
34
+ MAP.reduce(word) { |w, (from, to)| w.gsub(/#{from}(?=[A-Z]|$)/) { to } }
32
35
  end
33
36
 
34
37
  # @return [Array<String>] Array of uppercase acronyms
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Peddler
4
- VERSION = "5.0.0.pre.4"
4
+ VERSION = "5.0.0.pre.5"
5
5
  end
data/lib/peddler.rb CHANGED
@@ -7,8 +7,10 @@ require "peddler/inflector"
7
7
 
8
8
  loader = Zeitwerk::Loader.for_gem
9
9
  loader.inflector = Peddler::Inflector.new(__FILE__)
10
- loader.ignore("#{__dir__}/generator")
11
- loader.ignore("#{__dir__}/generator.rb")
10
+ if File.exist?("#{__dir__}/generator.rb")
11
+ loader.ignore("#{__dir__}/generator.rb")
12
+ loader.ignore("#{__dir__}/generator")
13
+ end
12
14
  loader.setup
13
15
 
14
16
  module Peddler
@@ -31,7 +33,6 @@ module Peddler
31
33
  def feeds_2021_06_30 = APIs::Feeds20210630
32
34
  def finances_v0 = APIs::FinancesV0
33
35
  def finances_2024_06_19 = APIs::Finances20240619
34
- def transfers_2024_06_01 = APIs::Transfers20240601
35
36
  def fulfillment_inbound_v0 = APIs::FulfillmentInboundV0
36
37
  def fulfillment_inbound_2024_03_20 = APIs::FulfillmentInbound20240320
37
38
  def fulfillment_outbound_2020_07_01 = APIs::FulfillmentOutbound20200701
@@ -59,6 +60,7 @@ module Peddler
59
60
  def solicitations_v1 = APIs::SolicitationsV1
60
61
  def supply_sources_2020_07_01 = APIs::SupplySources20200701
61
62
  def tokens_2021_03_01 = APIs::Tokens20210301
63
+ def transfers_2024_06_01 = APIs::Transfers20240601
62
64
  def uploads_2020_11_01 = APIs::Uploads20201101
63
65
  def vehicles_2024_11_01 = APIs::Vehicles20241101
64
66
  def vendor_direct_fulfillment_inventory_v1 = APIs::VendorDirectFulfillmentInventoryV1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peddler
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.pre.4
4
+ version: 5.0.0.pre.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
@@ -1484,7 +1484,7 @@ files:
1484
1484
  - lib/peddler/apis/shipping_v2/channel_details.rb
1485
1485
  - lib/peddler/apis/shipping_v2/charge_component.rb
1486
1486
  - lib/peddler/apis/shipping_v2/charge_list.rb
1487
- - lib/peddler/apis/shipping_v2/claim_proof_ur_ls.rb
1487
+ - lib/peddler/apis/shipping_v2/claim_proof_urls.rb
1488
1488
  - lib/peddler/apis/shipping_v2/client_reference_detail.rb
1489
1489
  - lib/peddler/apis/shipping_v2/client_reference_details.rb
1490
1490
  - lib/peddler/apis/shipping_v2/collect_on_delivery.rb
@@ -2478,7 +2478,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2478
2478
  - !ruby/object:Gem::Version
2479
2479
  version: '0'
2480
2480
  requirements: []
2481
- rubygems_version: 3.6.9
2481
+ rubygems_version: 3.7.2
2482
2482
  specification_version: 4
2483
2483
  summary: Amazon Selling Partner API (SP-API) in Ruby
2484
2484
  test_files: []