fulfil_api 0.5.0 → 0.6.0

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: 22b6b63d1460a3a0d6b6c5ef3b33b018291d6919a27c32664c7649922a930852
4
- data.tar.gz: 0a87ce490bca0026c5764ded0e887a3cdffd4cf0d9a3f13bcfd8e5a5a888cb43
3
+ metadata.gz: ffd7b3a51a8fa0a8f76213567280c36f7c273115f46a6e397bbd3e8aefbc42df
4
+ data.tar.gz: 854ab5226509922e32fbccfdf7a2b49a7f8a2af25e313776a6a6d4284f4666c4
5
5
  SHA512:
6
- metadata.gz: dedeecd3042e63045c2a5215d5bc6121c99a0863a65db953657cef068ff75f060271533d8ce2dd39a9b24ca94834b5b0b1282778ba6f0fb8d18efd419ecdff32
7
- data.tar.gz: b39a10b911e3c9909cb7f21bfdf4cde91db64438eb6060a54700e4596ec4fe32961b691e49f4370211fdca0f8b343b0c63421ccfeb6d5959b6c05524ba415a94
6
+ metadata.gz: 41e59d1b1d6a746d7fee0286d5af9290a6a38e474c45e3181a2a4ebca24ad5c7e65df00b6e84128763b5d753ba8a7e89bc7be0279de2c12c31c67298a866d610
7
+ data.tar.gz: d5598d3ae10daf60f75272cba43d185bb8a14cb8070297e9ab560bbca3758728dae40e9639d0bd6123f69cc17a9add6b61ac1a0d6d9113ea5fcd5c6cdf6ccdd4
data/README.md CHANGED
@@ -153,16 +153,16 @@ The 3PL client is accessible via `FulfilApi.tpl_client` and supports the standar
153
153
 
154
154
  ```ruby
155
155
  # GET request with optional URL parameters
156
- FulfilApi.tpl_client.get("inbound-transfers", url_parameters: { page: 1, per_page: 25 })
156
+ FulfilApi.tpl_client.get("inbound-transfers", page: 1, per_page: 25)
157
157
 
158
158
  # POST request with a request body
159
- FulfilApi.tpl_client.post("inbound-transfers/receive.json", body: { tracking_number: "ABC123" })
159
+ FulfilApi.tpl_client.post("inbound-transfers/receive.json", { tracking_number: "ABC123" })
160
160
 
161
161
  # PUT request with a request body
162
- FulfilApi.tpl_client.put("inbound-transfers/receive.json", body: { status: "received" })
162
+ FulfilApi.tpl_client.put("inbound-transfers/receive.json", { status: "received" })
163
163
 
164
164
  # PATCH request with a request body
165
- FulfilApi.tpl_client.patch("inbound-transfers/receive.json", body: { status: "received" })
165
+ FulfilApi.tpl_client.patch("inbound-transfers/receive.json", { status: "received" })
166
166
 
167
167
  ```
168
168
 
@@ -9,8 +9,8 @@ module FulfilApi
9
9
  # the 3PL supplier API using standard HTTP methods.
10
10
  #
11
11
  # @example Using the TPL client
12
- # FulfilApi.tpl_client.get("inbound-transfers", url_parameters: { page: 1 })
13
- # FulfilApi.tpl_client.post("inbound-transfers/receive.json", body: { tracking_number: "123" })
12
+ # FulfilApi.tpl_client.get("inbound-transfers", page: 1)
13
+ # FulfilApi.tpl_client.post("inbound-transfers/receive.json", { tracking_number: "123" })
14
14
  class TplClient
15
15
  class ConfigurationError < FulfilApi::Error; end
16
16
 
@@ -33,10 +33,10 @@ module FulfilApi
33
33
  # Performs an HTTP GET request to a 3PL API endpoint.
34
34
  #
35
35
  # @param relative_path [String] The relative path to the endpoint.
36
- # @param url_parameters [Hash, nil] The optional URL parameters for the API endpoint.
36
+ # @param url_parameters [Hash] The optional URL parameters for the API endpoint.
37
37
  # @return [Array, Hash, String] The parsed response body.
38
- def get(relative_path, url_parameters: nil)
39
- request(:get, relative_path, url_parameters)
38
+ def get(relative_path, **url_parameters)
39
+ request(:get, relative_path, url_parameters.presence)
40
40
  end
41
41
 
42
42
  # Performs an HTTP PATCH request to a 3PL API endpoint.
@@ -44,7 +44,7 @@ module FulfilApi
44
44
  # @param relative_path [String] The relative path to the endpoint.
45
45
  # @param body [Array, Hash, nil] The request body for the PATCH HTTP request.
46
46
  # @return [Array, Hash, String] The parsed response body.
47
- def patch(relative_path, body: {})
47
+ def patch(relative_path, body = {})
48
48
  request(:patch, relative_path, body)
49
49
  end
50
50
 
@@ -53,7 +53,7 @@ module FulfilApi
53
53
  # @param relative_path [String] The relative path to the endpoint.
54
54
  # @param body [Array, Hash, nil] The request body for the POST HTTP request.
55
55
  # @return [Array, Hash, String] The parsed response body.
56
- def post(relative_path, body: {})
56
+ def post(relative_path, body = {})
57
57
  request(:post, relative_path, body)
58
58
  end
59
59
 
@@ -62,7 +62,7 @@ module FulfilApi
62
62
  # @param relative_path [String] The relative path to the endpoint.
63
63
  # @param body [Array, Hash, nil] The optional request body for the PUT HTTP request.
64
64
  # @return [Array, Hash, String] The parsed response body.
65
- def put(relative_path, body: nil)
65
+ def put(relative_path, body = nil)
66
66
  return request(:put, relative_path) if body.nil?
67
67
 
68
68
  request(:put, relative_path, body)
@@ -137,7 +137,7 @@ module FulfilApi
137
137
  #
138
138
  # @example
139
139
  # FulfilApi.tpl_client.get("inbound-transfers")
140
- # FulfilApi.tpl_client.post("inbound-transfers/receive.json", body: { tracking_number: "123" })
140
+ # FulfilApi.tpl_client.post("inbound-transfers/receive.json", { tracking_number: "123" })
141
141
  #
142
142
  # @return [FulfilApi::TplClient]
143
143
  def self.tpl_client
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FulfilApi
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulfil_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Vermaas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-02-11 00:00:00.000000000 Z
11
+ date: 2026-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport