lucid_shopify 0.26.0 → 0.27.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 +4 -4
- data/lib/lucid_shopify/response.rb +34 -0
- data/lib/lucid_shopify/send_request.rb +1 -1
- data/lib/lucid_shopify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af502c346fe73acee9ef214473ba7003a6198e4ff4522590c2bee940e9da95da
|
4
|
+
data.tar.gz: 122b20a7745c3665bdaaffe620e8f059725b46581b2ebe14580e41fa749bb4d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7edd4b2079dbb08cf1c2fb6ff932c1c635d620a55d65dd11e5d1d8457a7373f1b8da33cce54c52b811fcba8992d44afd2738b708160cca378260a0a37853e9
|
7
|
+
data.tar.gz: 394f62834d4375cc9b3b9fd108b8841f8c44aca88b20a1a145b627a57e50304f80a385fb449f72c5445dfe68dea0bc947f815c2b672dcdfd0cff7bd692004a67
|
@@ -30,6 +30,8 @@ module LucidShopify
|
|
30
30
|
|
31
31
|
extend Dry::Initializer
|
32
32
|
|
33
|
+
include Enumerable
|
34
|
+
|
33
35
|
# @return [Request] the original request
|
34
36
|
param :request
|
35
37
|
# @return [Integer]
|
@@ -106,5 +108,37 @@ module LucidShopify
|
|
106
108
|
return {'resource' => errors} if errors.is_a?(String)
|
107
109
|
errors
|
108
110
|
end
|
111
|
+
|
112
|
+
#
|
113
|
+
# @see Hash#each
|
114
|
+
#
|
115
|
+
def each(&block)
|
116
|
+
data_hash.each(&block)
|
117
|
+
end
|
118
|
+
|
119
|
+
#
|
120
|
+
# @param key [String]
|
121
|
+
#
|
122
|
+
# @return [Object]
|
123
|
+
#
|
124
|
+
def [](key)
|
125
|
+
data_hash[key]
|
126
|
+
end
|
127
|
+
|
128
|
+
alias_method :to_h, :data_hash
|
129
|
+
|
130
|
+
#
|
131
|
+
# @return [Hash]
|
132
|
+
#
|
133
|
+
def as_json(*)
|
134
|
+
to_h
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# @return [String]
|
139
|
+
#
|
140
|
+
def to_json(*args)
|
141
|
+
as_json.to_json(*args)
|
142
|
+
end
|
109
143
|
end
|
110
144
|
end
|