shopify_api 11.0.1 → 11.1.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/.github/workflows/cla.yml +22 -0
- data/CHANGELOG.md +55 -53
- data/Gemfile.lock +16 -14
- data/README.md +3 -3
- data/docs/usage/graphql.md +1 -1
- data/lib/shopify_api/auth/file_session_storage.rb +2 -0
- data/lib/shopify_api/auth/session.rb +6 -6
- data/lib/shopify_api/auth.rb +26 -0
- data/lib/shopify_api/errors/missing_required_argument_error.rb +9 -0
- data/lib/shopify_api/version.rb +1 -1
- metadata +5 -3
- data/.github/probots.yml +0 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d1425c7556a52cb215845c0706990664207eb78bf0e42f5ef555f16ebb3398b
|
|
4
|
+
data.tar.gz: 8fbe1be46b5ebdfaac394195cbf44ae6bcd69fc90b6c8dc0709c417936f9dc2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0efde28dd28d29310a940a27d081e1979e44c8b32d282e845af4caaa93352a2d8a213b644b8868cc4416aece4a4867126b03c6e6f13b5bc36da0e2e3605caf26
|
|
7
|
+
data.tar.gz: 3c82238434799b244e9106eaa4c3736944bc4792c7e7794604d4c68ab9ba3587dae5b4573a5dd586c8087253726bed56dc87c257f1cd4d124c149ce3637f6c32
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Contributor License Agreement (CLA)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, synchronize]
|
|
6
|
+
issue_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
cla:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
if: |
|
|
13
|
+
(github.event.issue.pull_request
|
|
14
|
+
&& !github.event.issue.pull_request.merged_at
|
|
15
|
+
&& contains(github.event.comment.body, 'signed')
|
|
16
|
+
)
|
|
17
|
+
|| (github.event.pull_request && !github.event.pull_request.merged)
|
|
18
|
+
steps:
|
|
19
|
+
- uses: Shopify/shopify-cla-action@v1
|
|
20
|
+
with:
|
|
21
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
cla-token: ${{ secrets.CLA_TOKEN }}
|
data/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,9 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Version 11.1.0
|
|
8
|
+
|
|
9
|
+
- [#1002](https://github.com/Shopify/shopify-api-ruby/pull/1002) Add new method to construct the host app URL for an embedded app, allowing for safer redirect to app inside appropriate shop admin
|
|
8
10
|
|
|
9
11
|
## Version 11.0.1
|
|
10
12
|
|
|
@@ -12,71 +14,71 @@ N/A
|
|
|
12
14
|
|
|
13
15
|
## Version 11.0.0
|
|
14
16
|
|
|
15
|
-
- [#987](https://github.com/Shopify/
|
|
16
|
-
- [#979](https://github.com/Shopify/
|
|
17
|
-
- [#977](https://github.com/Shopify/
|
|
17
|
+
- [#987](https://github.com/Shopify/shopify-api-ruby/pull/987) ⚠️ [Breaking] Add REST resources for July 2022 API version, remove support and REST resources for July 2021 (`2021-07`) API version
|
|
18
|
+
- [#979](https://github.com/Shopify/shopify-api-ruby/pull/979) Update `ShopifyAPI::Context.setup` to take `old_api_secret_key` to support API credentials rotation
|
|
19
|
+
- [#977](https://github.com/Shopify/shopify-api-ruby/pull/977) Fix webhook requests when a header is present having a symbol key (e.g. `:clearance`)
|
|
18
20
|
|
|
19
21
|
## Version 10.1.0
|
|
20
22
|
|
|
21
|
-
- [#933](https://github.com/Shopify/
|
|
22
|
-
- [#941](https://github.com/Shopify/
|
|
23
|
-
- [#959](https://github.com/Shopify/
|
|
23
|
+
- [#933](https://github.com/Shopify/shopify-api-ruby/pull/933) Fix syntax of GraphQL query in `Webhooks.get_webhook_id` method by removing extra curly brace
|
|
24
|
+
- [#941](https://github.com/Shopify/shopify-api-ruby/pull/941) Fix `to_hash` to return readonly attributes, unless being used for serialize the object for saving - fix issue [#930](https://github.com/Shopify/shopify-api-ruby/issues/930)
|
|
25
|
+
- [#959](https://github.com/Shopify/shopify-api-ruby/pull/959) Update `LATEST_SUPPORTED_ADMIN_VERSION` to `2022-04` to align it with the current value
|
|
24
26
|
|
|
25
27
|
## Version 10.0.3
|
|
26
28
|
|
|
27
29
|
### Fixed
|
|
28
30
|
|
|
29
|
-
- [#935](https://github.com/Shopify/
|
|
30
|
-
- [#944](https://github.com/Shopify/
|
|
31
|
+
- [#935](https://github.com/Shopify/shopify-api-ruby/pull/935) Fix issue [#931](https://github.com/Shopify/shopify-api-ruby/pull/931), weight of variant should be float
|
|
32
|
+
- [#944](https://github.com/Shopify/shopify-api-ruby/pull/944) Deprecated the `validate_shop` method from the JWT class since we can trust the token payload, since it comes from Shopify.
|
|
31
33
|
|
|
32
34
|
## Version 10.0.2
|
|
33
35
|
|
|
34
|
-
- [#929](https://github.com/Shopify/
|
|
36
|
+
- [#929](https://github.com/Shopify/shopify-api-ruby/pull/929) Aligning sorbet dependencies
|
|
35
37
|
|
|
36
38
|
## Version 10.0.1
|
|
37
39
|
|
|
38
40
|
### Fixed
|
|
39
41
|
|
|
40
|
-
- [#919](https://github.com/Shopify/
|
|
41
|
-
- [#920](https://github.com/Shopify/
|
|
42
|
-
- [#927](https://github.com/Shopify/
|
|
42
|
+
- [#919](https://github.com/Shopify/shopify-api-ruby/pull/919) Allow REST resources to configure a deny list of attributes to be excluded when saving
|
|
43
|
+
- [#920](https://github.com/Shopify/shopify-api-ruby/pull/920) Set all values received from the API response to REST resource objects, and allow setting / getting attributes with special characters (such as `?`)
|
|
44
|
+
- [#927](https://github.com/Shopify/shopify-api-ruby/pull/927) Fix the `ShopifyAPI::AdminVersions` module for backward compatibility
|
|
43
45
|
|
|
44
46
|
## Version 10.0.0
|
|
45
47
|
|
|
46
|
-
- Major update to the library to provide _all_ essential functions needed for a Shopify app, supporting embedded apps with session tokens. See the [full list of changes](https://github.com/Shopify/
|
|
48
|
+
- Major update to the library to provide _all_ essential functions needed for a Shopify app, supporting embedded apps with session tokens. See the [full list of changes](https://github.com/Shopify/shopify-api-ruby#breaking-change-notice-for-version-1000) here
|
|
47
49
|
|
|
48
50
|
## Version 9.5.1
|
|
49
51
|
|
|
50
|
-
- [#891](https://github.com/Shopify/
|
|
52
|
+
- [#891](https://github.com/Shopify/shopify-api-ruby/pull/891) Removed the upper bound on the `activeresource` dependency to allow apps to use the latest version
|
|
51
53
|
|
|
52
54
|
## Version 9.5
|
|
53
55
|
|
|
54
|
-
- [#883](https://github.com/Shopify/
|
|
56
|
+
- [#883](https://github.com/Shopify/shopify-api-ruby/pull/883) Add support for Ruby 3.0
|
|
55
57
|
|
|
56
58
|
## Version 9.4.1
|
|
57
59
|
|
|
58
|
-
- [#847](https://github.com/Shopify/
|
|
59
|
-
- [#852](https://github.com/Shopify/
|
|
60
|
+
- [#847](https://github.com/Shopify/shopify-api-ruby/pull/847) Update `create_permission_url` method to use grant_options
|
|
61
|
+
- [#852](https://github.com/Shopify/shopify-api-ruby/pull/852) Bumping kramdown to fix a security vulnerability
|
|
60
62
|
|
|
61
63
|
## Version 9.4.0
|
|
62
64
|
|
|
63
|
-
- [#843](https://github.com/Shopify/
|
|
65
|
+
- [#843](https://github.com/Shopify/shopify-api-ruby/pull/843) Introduce a new `access_scopes` attribute on the Session class.
|
|
64
66
|
- Specifying this in the Session constructor is optional. By default, this attribute returns `nil`.
|
|
65
67
|
|
|
66
68
|
## Version 9.3.0
|
|
67
69
|
|
|
68
|
-
- [#797](https://github.com/Shopify/
|
|
70
|
+
- [#797](https://github.com/Shopify/shopify-api-ruby/pull/797) Release new Endpoint `fulfillment_order.open` and `fulfillment_order.reschedule`.
|
|
69
71
|
|
|
70
|
-
- [#818](https://github.com/Shopify/
|
|
72
|
+
- [#818](https://github.com/Shopify/shopify-api-ruby/pull/818) Avoid depending on ActiveSupport in Sesssion class.
|
|
71
73
|
|
|
72
74
|
- Freeze all string literals. This should have no impact unless your application is modifying ('monkeypatching') the internals of the library in an unusual way.
|
|
73
75
|
|
|
74
|
-
- [#802](https://github.com/Shopify/
|
|
76
|
+
- [#802](https://github.com/Shopify/shopify-api-ruby/pull/802) Made `inventory_quantity` a read-only field in Variant
|
|
75
77
|
|
|
76
|
-
- [#821](https://github.com/Shopify/
|
|
78
|
+
- [#821](https://github.com/Shopify/shopify-api-ruby/pull/821) Add logging based on environment variable, move log subscriber out of `detailed_log_subscriber`.
|
|
77
79
|
The `ActiveResource::DetailedLogSubscriber` no longer automatically attaches when the class is loaded. If you were previously relying on that behaviour, you'll now need to call `ActiveResource::DetailedLogSubscriber.attach_to(:active_resource_detailed)`. (If using the new `SHOPIFY_LOG_PATH` environment setting then this is handled for you).
|
|
78
80
|
|
|
79
|
-
- Provide `ApiAccess` value object to encapsulate scope operations [#829](https://github.com/Shopify/
|
|
81
|
+
- Provide `ApiAccess` value object to encapsulate scope operations [#829](https://github.com/Shopify/shopify-api-ruby/pull/829)
|
|
80
82
|
|
|
81
83
|
## Version 9.2.0
|
|
82
84
|
|
|
@@ -84,52 +86,52 @@ N/A
|
|
|
84
86
|
|
|
85
87
|
## Version 9.1.1
|
|
86
88
|
|
|
87
|
-
- Make cursor based pagination return relative uri's when fetching next and previous pages. [#726](https://github.com/Shopify/
|
|
89
|
+
- Make cursor based pagination return relative uri's when fetching next and previous pages. [#726](https://github.com/Shopify/shopify-api-ruby/pull/726)
|
|
88
90
|
|
|
89
91
|
## Version 9.1.0
|
|
90
92
|
|
|
91
|
-
- Implements equality operator on `Session` [#714](https://github.com/Shopify/
|
|
93
|
+
- Implements equality operator on `Session` [#714](https://github.com/Shopify/shopify-api-ruby/pull/714)
|
|
92
94
|
|
|
93
95
|
## Version 9.0.4
|
|
94
96
|
|
|
95
|
-
- Contains [#708](https://github.com/Shopify/
|
|
97
|
+
- Contains [#708](https://github.com/Shopify/shopify-api-ruby/pull/708) which is a revert for [#655](https://github.com/Shopify/shopify-api-ruby/pull/655) due to the deprecated inventory parameters not being removed correctly in some cases
|
|
96
98
|
|
|
97
99
|
## Version 9.0.3
|
|
98
100
|
|
|
99
|
-
- We now raise a `ShopifyAPI::ValidationException` exception when clients try to use `Product` and `Variant` with deprecated inventory-related fields in API version `2019-10` or later. [#655](https://github.com/shopify/
|
|
101
|
+
- We now raise a `ShopifyAPI::ValidationException` exception when clients try to use `Product` and `Variant` with deprecated inventory-related fields in API version `2019-10` or later. [#655](https://github.com/Shopify/shopify-api-ruby/pull/655) Deprecation and migration information can be found in the following documents:
|
|
100
102
|
- [Product Variant REST API Reference](https://shopify.dev/docs/admin-api/rest/reference/products/product-variant)
|
|
101
103
|
- [Migrate your app to support multiple locations](https://shopify.dev/tutorials/migrate-your-app-to-support-multiple-locations)
|
|
102
104
|
- [Manage product inventory with the Admin API](https://shopify.dev/tutorials/manage-product-inventory-with-admin-api)
|
|
103
|
-
- Added support for the Discount Code API batch endpoints [#701](https://github.com/shopify/
|
|
105
|
+
- Added support for the Discount Code API batch endpoints [#701](https://github.com/Shopify/shopify-api-ruby/pull/701)
|
|
104
106
|
- [Create](https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#batch_create-2020-01)
|
|
105
107
|
- [Show](https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#batch_show-2020-01)
|
|
106
108
|
- [List](https://shopify.dev/docs/admin-api/rest/reference/discounts/discountcode#batch_discount_codes_index-2020-01)
|
|
107
|
-
- Fix issue in the README to explicitly say clients need to require the `shopify_api` gem [#700](https://github.com/Shopify/
|
|
109
|
+
- Fix issue in the README to explicitly say clients need to require the `shopify_api` gem [#700](https://github.com/Shopify/shopify-api-ruby/pull/700)
|
|
108
110
|
|
|
109
111
|
## Version 9.0.2
|
|
110
112
|
|
|
111
|
-
- Added optional flag passed to `initialize_clients` to prevent from raising the `InvalidSchema` exception [#693](https://github.com/Shopify/
|
|
113
|
+
- Added optional flag passed to `initialize_clients` to prevent from raising the `InvalidSchema` exception [#693](https://github.com/Shopify/shopify-api-ruby/pull/693)
|
|
112
114
|
|
|
113
115
|
## Version 9.0.1
|
|
114
116
|
|
|
115
|
-
- Added warning message if API version used is unsupported or soon to be unsupported [#685](https://github.com/Shopify/
|
|
116
|
-
- Take into account "errors" messages from response body [#677](https://github.com/Shopify/
|
|
117
|
+
- Added warning message if API version used is unsupported or soon to be unsupported [#685](https://github.com/Shopify/shopify-api-ruby/pull/685)
|
|
118
|
+
- Take into account "errors" messages from response body [#677](https://github.com/Shopify/shopify-api-ruby/pull/677)
|
|
117
119
|
|
|
118
120
|
## Version 9.0.0
|
|
119
121
|
|
|
120
|
-
- Breaking change: Improved GraphQL client [#672](https://github.com/Shopify/
|
|
122
|
+
- Breaking change: Improved GraphQL client [#672](https://github.com/Shopify/shopify-api-ruby/pull/672). See the [client docs](docs/graphql.md) for usage and a migration guide.
|
|
121
123
|
|
|
122
|
-
- Added options hash to create_permission_url and makes redirect_uri required [#670](https://github.com/Shopify/
|
|
124
|
+
- Added options hash to create_permission_url and makes redirect_uri required [#670](https://github.com/Shopify/shopify-api-ruby/pull/670)
|
|
123
125
|
|
|
124
|
-
- Release new Endpoint `fulfillment_order.locations_for_move` in 2020-01 REST API version [#669](https://github.com/Shopify/
|
|
126
|
+
- Release new Endpoint `fulfillment_order.locations_for_move` in 2020-01 REST API version [#669](https://github.com/Shopify/shopify-api-ruby/pull/669)
|
|
125
127
|
|
|
126
|
-
- Release new Endpoints for `fulfillment` in 2020-01 REST API version [#639](https://github.com/Shopify/
|
|
128
|
+
- Release new Endpoints for `fulfillment` in 2020-01 REST API version [#639](https://github.com/Shopify/shopify-api-ruby/pull/639):
|
|
127
129
|
|
|
128
130
|
- `fulfillment.create` with `line_items_by_fulfillment_order`
|
|
129
131
|
- `fulfillment.update_tracking`
|
|
130
132
|
- `fulfillment.cancel`
|
|
131
133
|
|
|
132
|
-
- Release new Endpoints for `fulfillment_order` in 2020-01 REST API version [#637](https://github.com/Shopify/
|
|
134
|
+
- Release new Endpoints for `fulfillment_order` in 2020-01 REST API version [#637](https://github.com/Shopify/shopify-api-ruby/pull/637):
|
|
133
135
|
|
|
134
136
|
- `fulfillment_order.fulfillment_request`
|
|
135
137
|
- `fulfillment_order.fulfillment_request.accept`
|
|
@@ -138,35 +140,35 @@ N/A
|
|
|
138
140
|
- `fulfillment_order.cancellation_request.accept`
|
|
139
141
|
- `fulfillment_order.cancellation_request.reject`
|
|
140
142
|
|
|
141
|
-
- Release new Endpoints `fulfillment_order.move`, `fulfillment_order.cancel` and `fulfillment_order.close` in 2020-01 REST API version [#635](https://github.com/Shopify/
|
|
143
|
+
- Release new Endpoints `fulfillment_order.move`, `fulfillment_order.cancel` and `fulfillment_order.close` in 2020-01 REST API version [#635](https://github.com/Shopify/shopify-api-ruby/pull/635)
|
|
142
144
|
|
|
143
|
-
- Release new Endpoint `order.fulfillment_orders`, and active resources `AssignedFulfillmentOrder` and `FulfillmentOrder` in 2020-01 REST API version [#633](https://github.com/Shopify/
|
|
145
|
+
- Release new Endpoint `order.fulfillment_orders`, and active resources `AssignedFulfillmentOrder` and `FulfillmentOrder` in 2020-01 REST API version [#633](https://github.com/Shopify/shopify-api-ruby/pull/633)
|
|
144
146
|
|
|
145
147
|
## Version 8.1.0
|
|
146
148
|
|
|
147
|
-
- Release 2020-01 REST ADMIN API VERSION [#656](https://github.com/Shopify/
|
|
148
|
-
- Release new Endpoint `collection.products` and `collection.find()` in 2020-01 REST API version [#657](https://github.com/Shopify/
|
|
149
|
-
- Enrich 4xx errors with error message from response body [#647](https://github.com/Shopify/
|
|
150
|
-
- Make relative cursor based pagination work across page loads [#625](https://github.com/Shopify/
|
|
151
|
-
- Small ruby compat fix [#623](https://github.com/Shopify/
|
|
152
|
-
- Small consistency change [#621](https://github.com/Shopify/
|
|
149
|
+
- Release 2020-01 REST ADMIN API VERSION [#656](https://github.com/Shopify/shopify-api-ruby/pull/656)
|
|
150
|
+
- Release new Endpoint `collection.products` and `collection.find()` in 2020-01 REST API version [#657](https://github.com/Shopify/shopify-api-ruby/pull/657)
|
|
151
|
+
- Enrich 4xx errors with error message from response body [#647](https://github.com/Shopify/shopify-api-ruby/pull/647)
|
|
152
|
+
- Make relative cursor based pagination work across page loads [#625](https://github.com/Shopify/shopify-api-ruby/pull/625)
|
|
153
|
+
- Small ruby compat fix [#623](https://github.com/Shopify/shopify-api-ruby/pull/623)
|
|
154
|
+
- Small consistency change [#621](https://github.com/Shopify/shopify-api-ruby/pull/621)
|
|
153
155
|
|
|
154
156
|
## Version 8.0.0
|
|
155
157
|
|
|
156
|
-
- Api Version changes [#600](https://github.com/Shopify/
|
|
158
|
+
- Api Version changes [#600](https://github.com/Shopify/shopify-api-ruby/pull/600)
|
|
157
159
|
- Remove static Api Version definitions.
|
|
158
160
|
- Introduces Api Version lookup modes: `:define_on_unknown` and `:raise_on_unknown`
|
|
159
161
|
- See [migration notes](README.md#-breaking-change-notice-for-version-800-)
|
|
160
162
|
- `Session.valid?` checks that api_version `is_a?(ApiVersion)` instead of `present?`
|
|
161
|
-
- `ApiVersion::NullVersion` cannot be instantiated and now has a `match?` method [#615](https://github.com/Shopify/
|
|
162
|
-
- Introduces new Collection endpoint for looking up products without knowing collection type. Only available if ApiVersion is `:unstable` [#609](https://github.com/Shopify/
|
|
163
|
+
- `ApiVersion::NullVersion` cannot be instantiated and now has a `match?` method [#615](https://github.com/Shopify/shopify-api-ruby/pull/615/files)
|
|
164
|
+
- Introduces new Collection endpoint for looking up products without knowing collection type. Only available if ApiVersion is `:unstable` [#609](https://github.com/Shopify/shopify-api-ruby/pull/609)
|
|
163
165
|
|
|
164
166
|
## Version 7.1.0
|
|
165
167
|
|
|
166
168
|
- Add 2019-10 to known API versions
|
|
167
|
-
- Add support for cursor pagination [#594](https://github.com/Shopify/
|
|
168
|
-
[#611](https://github.com/Shopify/
|
|
169
|
-
- `ShopifyAPI::Base.api_version` now defaults to `ShopifyAPI::ApiVersion::NullVersion` instead of `nil`. Making requests without first setting an ApiVersion raises `ApiVersionNotSetError` instead of `NoMethodError: undefined method 'construct_api_path' for nil:NilClass'` [#605](https://github.com/Shopify/
|
|
169
|
+
- Add support for cursor pagination [#594](https://github.com/Shopify/shopify-api-ruby/pull/594) and
|
|
170
|
+
[#611](https://github.com/Shopify/shopify-api-ruby/pull/611)
|
|
171
|
+
- `ShopifyAPI::Base.api_version` now defaults to `ShopifyAPI::ApiVersion::NullVersion` instead of `nil`. Making requests without first setting an ApiVersion raises `ApiVersionNotSetError` instead of `NoMethodError: undefined method 'construct_api_path' for nil:NilClass'` [#605](https://github.com/Shopify/shopify-api-ruby/pull/605)
|
|
170
172
|
|
|
171
173
|
## Version 7.0.2
|
|
172
174
|
|
|
@@ -174,7 +176,7 @@ N/A
|
|
|
174
176
|
|
|
175
177
|
## Version 7.0.1
|
|
176
178
|
|
|
177
|
-
- Support passing version string to `ShopifyAPI::Base.api_version` [#563](https://github.com/Shopify/
|
|
179
|
+
- Support passing version string to `ShopifyAPI::Base.api_version` [#563](https://github.com/Shopify/shopify-api-ruby/pull/563)
|
|
178
180
|
|
|
179
181
|
## Version 7.0.0
|
|
180
182
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
shopify_api (11.0
|
|
4
|
+
shopify_api (11.1.0)
|
|
5
5
|
concurrent-ruby
|
|
6
6
|
hash_diff
|
|
7
7
|
httparty
|
|
@@ -44,10 +44,11 @@ GEM
|
|
|
44
44
|
minitest (5.15.0)
|
|
45
45
|
mocha (1.13.0)
|
|
46
46
|
multi_xml (0.6.0)
|
|
47
|
-
|
|
47
|
+
netrc (0.11.0)
|
|
48
|
+
oj (3.13.20)
|
|
48
49
|
openssl (3.0.0)
|
|
49
|
-
parallel (1.
|
|
50
|
-
parser (3.1.2.
|
|
50
|
+
parallel (1.22.1)
|
|
51
|
+
parser (3.1.2.1)
|
|
51
52
|
ast (~> 2.4.1)
|
|
52
53
|
pry (0.14.1)
|
|
53
54
|
coderay (~> 1.1)
|
|
@@ -55,7 +56,7 @@ GEM
|
|
|
55
56
|
public_suffix (4.0.6)
|
|
56
57
|
rainbow (3.1.1)
|
|
57
58
|
rake (13.0.6)
|
|
58
|
-
rbi (0.0.
|
|
59
|
+
rbi (0.0.15)
|
|
59
60
|
ast
|
|
60
61
|
parser (>= 2.6.4.0)
|
|
61
62
|
sorbet-runtime (>= 0.5.9204)
|
|
@@ -79,20 +80,21 @@ GEM
|
|
|
79
80
|
rubocop (>= 0.90.0)
|
|
80
81
|
ruby-progressbar (1.11.0)
|
|
81
82
|
securerandom (0.2.0)
|
|
82
|
-
sorbet (0.5.
|
|
83
|
-
sorbet-static (= 0.5.
|
|
84
|
-
sorbet-runtime (0.5.
|
|
85
|
-
sorbet-static (0.5.
|
|
86
|
-
sorbet-static (0.5.
|
|
87
|
-
sorbet-static-and-runtime (0.5.
|
|
88
|
-
sorbet (= 0.5.
|
|
89
|
-
sorbet-runtime (= 0.5.
|
|
83
|
+
sorbet (0.5.10297)
|
|
84
|
+
sorbet-static (= 0.5.10297)
|
|
85
|
+
sorbet-runtime (0.5.10297)
|
|
86
|
+
sorbet-static (0.5.10297-universal-darwin-21)
|
|
87
|
+
sorbet-static (0.5.10297-x86_64-linux)
|
|
88
|
+
sorbet-static-and-runtime (0.5.10297)
|
|
89
|
+
sorbet (= 0.5.10297)
|
|
90
|
+
sorbet-runtime (= 0.5.10297)
|
|
90
91
|
spoom (1.1.11)
|
|
91
92
|
sorbet (>= 0.5.9204)
|
|
92
93
|
sorbet-runtime (>= 0.5.9204)
|
|
93
94
|
thor (>= 0.19.2)
|
|
94
|
-
tapioca (0.
|
|
95
|
+
tapioca (0.9.2)
|
|
95
96
|
bundler (>= 1.17.3)
|
|
97
|
+
netrc (>= 0.11.0)
|
|
96
98
|
parallel (>= 1.21.0)
|
|
97
99
|
pry (>= 0.12.2)
|
|
98
100
|
rbi (~> 0.0.0, >= 0.0.14)
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- ![Build Status]() -->
|
|
4
4
|
[](LICENSE)
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
This library provides support for Ruby [Shopify apps](https://apps.shopify.com/) to access the [Shopify Admin API](https://shopify.dev/api/admin), by making it easier to perform the following actions:
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ In addition to the Admin API, this library also allows querying the [Storefront
|
|
|
15
15
|
|
|
16
16
|
You can use this library in any application that has a Ruby backend, since it doesn't rely on any specific framework — you can include it alongside your preferred stack and use the features that you need to build your app.
|
|
17
17
|
|
|
18
|
-
**Note**: These instructions apply to v10 or later of this package. If you're running v9 in your app, you can find the documentation [in this branch](https://github.com/Shopify/
|
|
18
|
+
**Note**: These instructions apply to v10 or later of this package. If you're running v9 in your app, you can find the documentation [in this branch](https://github.com/Shopify/shopify-api-ruby/tree/v9).
|
|
19
19
|
|
|
20
20
|
## Requirements
|
|
21
21
|
|
|
@@ -97,7 +97,7 @@ Here are the main features it provides:
|
|
|
97
97
|
- Webhook management, with features for adding handlers and registering them with Shopify.
|
|
98
98
|
- Storefront GraphQL API support
|
|
99
99
|
|
|
100
|
-
Please refer to [the documentation](
|
|
100
|
+
Please refer to [the documentation](docs/getting_started.md) in this repository for instructions on how to use each of these components.
|
|
101
101
|
|
|
102
102
|
With this, a lot changed in how apps access the library. Here are the updates you should make when migrating to v10:
|
|
103
103
|
|
data/docs/usage/graphql.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Make a GraphQL API call
|
|
2
2
|
|
|
3
|
-
Once you have a [session](
|
|
3
|
+
Once you have a [session](oauth.md#fetching-sessions) after completing oauth, you can make GraphQL queries to the Admin API with `ShopifyAPI::Clients::Graphql::Admin`
|
|
4
4
|
|
|
5
5
|
Below is an example
|
|
6
6
|
|
|
@@ -83,6 +83,11 @@ module ShopifyAPI
|
|
|
83
83
|
Context.activate_session(original_session)
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
|
+
|
|
87
|
+
sig { params(str: String).returns(Session) }
|
|
88
|
+
def deserialize(str)
|
|
89
|
+
Oj.load(str)
|
|
90
|
+
end
|
|
86
91
|
end
|
|
87
92
|
|
|
88
93
|
sig { returns(String) }
|
|
@@ -90,16 +95,11 @@ module ShopifyAPI
|
|
|
90
95
|
Oj.dump(self)
|
|
91
96
|
end
|
|
92
97
|
|
|
93
|
-
sig { params(str: String).returns(Session) }
|
|
94
|
-
def self.deserialize(str)
|
|
95
|
-
Oj.load(str)
|
|
96
|
-
end
|
|
97
|
-
|
|
98
98
|
alias_method :eql?, :==
|
|
99
99
|
sig { params(other: T.nilable(Session)).returns(T::Boolean) }
|
|
100
100
|
def ==(other)
|
|
101
101
|
if other
|
|
102
|
-
|
|
102
|
+
(
|
|
103
103
|
id == other.id &&
|
|
104
104
|
shop == other.shop &&
|
|
105
105
|
state == other.state &&
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module ShopifyAPI
|
|
5
|
+
module Auth
|
|
6
|
+
extend T::Sig
|
|
7
|
+
|
|
8
|
+
class << self
|
|
9
|
+
extend T::Sig
|
|
10
|
+
|
|
11
|
+
sig { params(host: T.nilable(String)).returns(String) }
|
|
12
|
+
def embedded_app_url(host)
|
|
13
|
+
unless Context.setup?
|
|
14
|
+
raise Errors::ContextNotSetupError, "ShopifyAPI::Context not setup, please call ShopifyAPI::Context.setup"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
unless host
|
|
18
|
+
raise Errors::MissingRequiredArgumentError, "host argument is required"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
decoded_host = Base64.decode64(host)
|
|
22
|
+
"https://#{decoded_host}/apps/#{Context.api_key}"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
data/lib/shopify_api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopify_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 11.0
|
|
4
|
+
version: 11.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|
|
@@ -247,9 +247,9 @@ files:
|
|
|
247
247
|
- ".github/CODEOWNERS"
|
|
248
248
|
- ".github/ISSUE_TEMPLATE.md"
|
|
249
249
|
- ".github/dependabot.yml"
|
|
250
|
-
- ".github/probots.yml"
|
|
251
250
|
- ".github/pull_request_template.md"
|
|
252
251
|
- ".github/workflows/build.yml"
|
|
252
|
+
- ".github/workflows/cla.yml"
|
|
253
253
|
- ".rubocop.yml"
|
|
254
254
|
- BREAKING_CHANGES_FOR_OLDER_VERSIONS.md
|
|
255
255
|
- CHANGELOG.md
|
|
@@ -274,6 +274,7 @@ files:
|
|
|
274
274
|
- docs/usage/webhooks.md
|
|
275
275
|
- lib/shopify_api.rb
|
|
276
276
|
- lib/shopify_api/admin_versions.rb
|
|
277
|
+
- lib/shopify_api/auth.rb
|
|
277
278
|
- lib/shopify_api/auth/associated_user.rb
|
|
278
279
|
- lib/shopify_api/auth/auth_scopes.rb
|
|
279
280
|
- lib/shopify_api/auth/file_session_storage.rb
|
|
@@ -302,6 +303,7 @@ files:
|
|
|
302
303
|
- lib/shopify_api/errors/invalid_webhook_registration_error.rb
|
|
303
304
|
- lib/shopify_api/errors/max_http_retries_exceeded_error.rb
|
|
304
305
|
- lib/shopify_api/errors/missing_jwt_token_error.rb
|
|
306
|
+
- lib/shopify_api/errors/missing_required_argument_error.rb
|
|
305
307
|
- lib/shopify_api/errors/no_active_session_error.rb
|
|
306
308
|
- lib/shopify_api/errors/no_session_cookie_error.rb
|
|
307
309
|
- lib/shopify_api/errors/no_webhook_handler.rb
|
data/.github/probots.yml
DELETED