intersoft_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d83f118dfaac8cbbaf059cb7c7c405bb5aad5b62a1aa63d826ff408e862e2332
|
4
|
+
data.tar.gz: 815d70a522ee59715946ca10802c9701a0e38859d606ca15045417ea780f7023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 286262e90a27af7e055bb1f7f72a5bfebd6350dbd6b7c0e055094922c872f6e5000c8cdc3f358713dc63c9f6b9598bb7f52bd76af87dbe5cb1370c7b3a635474
|
7
|
+
data.tar.gz: 01c522607f9788c77c48befbaa898bd5d8a97e9d91a04664e50103baed472225dc360d177c004abcd5c7a41a2063986c00663655827c25b06cd1f9a2d225be9c
|
data/lib/intersoft_api/client.rb
CHANGED
@@ -13,11 +13,11 @@ module IntersoftAPI
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def post_request(url, body:, headers: {})
|
16
|
-
handle_response client.connection.post(url, body, headers)
|
16
|
+
handle_response client.connection.post(url, parse_body(body), headers)
|
17
17
|
end
|
18
18
|
|
19
19
|
def put_request(url, body:, headers: {})
|
20
|
-
handle_response client.connection.put(url, body, headers)
|
20
|
+
handle_response client.connection.put(url, parse_body(body), headers)
|
21
21
|
end
|
22
22
|
|
23
23
|
private
|
@@ -25,5 +25,9 @@ module IntersoftAPI
|
|
25
25
|
def handle_response(response)
|
26
26
|
client.handle_response(response)
|
27
27
|
end
|
28
|
+
|
29
|
+
def parse_body(params)
|
30
|
+
params.deep_transform_keys { |key| key.to_s.camelcase }
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
@@ -6,8 +6,8 @@ module IntersoftAPI
|
|
6
6
|
ShippingAccount.new(post_request("shippingAccounts/rm", body: attributes).body)
|
7
7
|
end
|
8
8
|
|
9
|
-
def find(
|
10
|
-
ShippingAccount.new(get_request("shippingAccounts/rm/#{
|
9
|
+
def find(shipping_account_id)
|
10
|
+
ShippingAccount.new(get_request("shippingAccounts/rm/#{shipping_account_id}").body)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intersoft_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Farm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -112,7 +112,7 @@ licenses:
|
|
112
112
|
- MIT
|
113
113
|
metadata:
|
114
114
|
homepage_uri: https://github.com/PostCo/intersoft_api
|
115
|
-
source_code_uri: https://github.com/PostCo/intersoft_api
|
115
|
+
source_code_uri: https://github.com/PostCo/intersoft_api
|
116
116
|
changelog_uri: https://github.com/PostCo/intersoft_api/releases
|
117
117
|
post_install_message:
|
118
118
|
rdoc_options: []
|