spree-api-client 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spree_client/api/v1/resources.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67d6635e5c79e15954da4a4dcb9a1195c40c7934b413793f489812a50ebc6a62
|
4
|
+
data.tar.gz: 0ed5f6068609f7c7ef10f5c7a63784e0f6a018af01318c5ba4b2e8fce2ee641b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c610df0bd9d36699a06b6018f518fcfa4f397e7d145b2cd13048725d7bbf3cd46114d26e9bfb832aae23b5a61242cc7ae45858e515821d910e7e39f485cfb44
|
7
|
+
data.tar.gz: 8ce57ca19a2c3a719569b0d862386f9ea1c2c5178578b94a79b7e7b7a49e828e9617c7cc9d083929429f573edc3c24fdf794c1687db0eaeef50edca19d44d0c7
|
@@ -26,7 +26,7 @@ module SpreeClient
|
|
26
26
|
# @param [Hash] Attributes
|
27
27
|
# @return [Struct]
|
28
28
|
def new(**args)
|
29
|
-
resource_class.new
|
29
|
+
resource_class.new(**args)
|
30
30
|
end
|
31
31
|
|
32
32
|
# Gets all products or filter with params
|
@@ -63,7 +63,7 @@ module SpreeClient
|
|
63
63
|
# @param [Struct,Hash] Model instance
|
64
64
|
# @return [Boolean]
|
65
65
|
def create(resource)
|
66
|
-
resource = new
|
66
|
+
resource = new(**resource) unless resource.is_a? resource_class
|
67
67
|
|
68
68
|
@response = api.class.post endpoint(resource),
|
69
69
|
body: params(resource),
|
@@ -78,7 +78,7 @@ module SpreeClient
|
|
78
78
|
# @param [Struct,Hash]
|
79
79
|
# @return [Boolean]
|
80
80
|
def update(resource)
|
81
|
-
resource = new
|
81
|
+
resource = new(**resource) unless resource.is_a? resource_class
|
82
82
|
|
83
83
|
@response = api.class.patch endpoint(resource),
|
84
84
|
body: params(resource),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -111,14 +111,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
111
|
requirements:
|
112
112
|
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: 2.
|
114
|
+
version: 2.7.0
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.3.26
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: Spree Ecommerce API client
|