shopify_api 13.1.0 → 13.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/workflows/build.yml +4 -0
- data/BREAKING_CHANGES_FOR_V10.md +231 -0
- data/CHANGELOG.md +14 -1
- data/CONTRIBUTING.md +25 -0
- data/Gemfile.lock +8 -15
- data/README.md +10 -34
- data/ROADMAP.md +10 -0
- data/docs/README.md +0 -1
- data/docs/getting_started.md +20 -3
- data/docs/usage/custom_apps.md +75 -0
- data/docs/usage/graphql.md +63 -18
- data/docs/usage/oauth.md +160 -27
- data/docs/usage/rest.md +204 -62
- data/docs/usage/webhooks.md +22 -4
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/auth/jwt_payload.rb +2 -2
- data/lib/shopify_api/auth/oauth.rb +15 -5
- data/lib/shopify_api/clients/http_client.rb +5 -1
- data/lib/shopify_api/context.rb +11 -5
- data/lib/shopify_api/rest/base.rb +22 -14
- data/lib/shopify_api/rest/resources/2022_10/assigned_fulfillment_order.rb +5 -3
- data/lib/shopify_api/rest/resources/2022_10/customer_address.rb +10 -0
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_request.rb +10 -0
- data/lib/shopify_api/rest/resources/2022_10/order_risk.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_01/assigned_fulfillment_order.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_01/balance.rb +4 -0
- data/lib/shopify_api/rest/resources/2023_01/customer_address.rb +10 -0
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_request.rb +10 -0
- data/lib/shopify_api/rest/resources/2023_01/order.rb +3 -0
- data/lib/shopify_api/rest/resources/2023_01/order_risk.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +0 -3
- data/lib/shopify_api/rest/resources/2023_01/variant.rb +1 -5
- data/lib/shopify_api/rest/resources/2023_04/assigned_fulfillment_order.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_04/balance.rb +4 -0
- data/lib/shopify_api/rest/resources/2023_04/customer_address.rb +10 -0
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_request.rb +10 -0
- data/lib/shopify_api/rest/resources/2023_04/order.rb +3 -0
- data/lib/shopify_api/rest/resources/2023_04/order_risk.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_04/shop.rb +0 -3
- data/lib/shopify_api/rest/resources/2023_04/variant.rb +1 -5
- data/lib/shopify_api/rest/resources/2023_07/assigned_fulfillment_order.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_07/balance.rb +4 -0
- data/lib/shopify_api/rest/resources/2023_07/customer_address.rb +10 -0
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_request.rb +10 -0
- data/lib/shopify_api/rest/resources/2023_07/order.rb +3 -0
- data/lib/shopify_api/rest/resources/2023_07/order_risk.rb +5 -3
- data/lib/shopify_api/rest/resources/2023_07/report.rb +121 -0
- data/lib/shopify_api/rest/resources/2023_07/shop.rb +0 -3
- data/lib/shopify_api/rest/resources/2023_07/variant.rb +1 -5
- data/lib/shopify_api/rest/resources/2023_10/abandoned_checkout.rb +190 -0
- data/lib/shopify_api/rest/resources/2023_10/access_scope.rb +58 -0
- data/lib/shopify_api/rest/resources/2023_10/apple_pay_certificate.rb +105 -0
- data/lib/shopify_api/rest/resources/2023_10/application_charge.rb +109 -0
- data/lib/shopify_api/rest/resources/2023_10/application_credit.rb +91 -0
- data/lib/shopify_api/rest/resources/2023_10/article.rb +265 -0
- data/lib/shopify_api/rest/resources/2023_10/asset.rb +118 -0
- data/lib/shopify_api/rest/resources/2023_10/assigned_fulfillment_order.rb +88 -0
- data/lib/shopify_api/rest/resources/2023_10/balance.rb +54 -0
- data/lib/shopify_api/rest/resources/2023_10/blog.rb +162 -0
- data/lib/shopify_api/rest/resources/2023_10/cancellation_request.rb +83 -0
- data/lib/shopify_api/rest/resources/2023_10/carrier_service.rb +116 -0
- data/lib/shopify_api/rest/resources/2023_10/checkout.rb +209 -0
- data/lib/shopify_api/rest/resources/2023_10/collect.rb +142 -0
- data/lib/shopify_api/rest/resources/2023_10/collection.rb +110 -0
- data/lib/shopify_api/rest/resources/2023_10/collection_listing.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_10/comment.rb +283 -0
- data/lib/shopify_api/rest/resources/2023_10/country.rb +137 -0
- data/lib/shopify_api/rest/resources/2023_10/currency.rb +57 -0
- data/lib/shopify_api/rest/resources/2023_10/custom_collection.rb +187 -0
- data/lib/shopify_api/rest/resources/2023_10/customer.rb +329 -0
- data/lib/shopify_api/rest/resources/2023_10/customer_address.rb +211 -0
- data/lib/shopify_api/rest/resources/2023_10/deprecated_api_call.rb +57 -0
- data/lib/shopify_api/rest/resources/2023_10/discount_code.rb +222 -0
- data/lib/shopify_api/rest/resources/2023_10/dispute.rb +111 -0
- data/lib/shopify_api/rest/resources/2023_10/dispute_evidence.rb +117 -0
- data/lib/shopify_api/rest/resources/2023_10/dispute_file_upload.rb +81 -0
- data/lib/shopify_api/rest/resources/2023_10/draft_order.rb +275 -0
- data/lib/shopify_api/rest/resources/2023_10/event.rb +148 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment.rb +231 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +166 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_order.rb +312 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_request.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_service.rb +130 -0
- data/lib/shopify_api/rest/resources/2023_10/gift_card.rb +218 -0
- data/lib/shopify_api/rest/resources/2023_10/gift_card_adjustment.rb +118 -0
- data/lib/shopify_api/rest/resources/2023_10/image.rb +157 -0
- data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +108 -0
- data/lib/shopify_api/rest/resources/2023_10/inventory_level.rb +179 -0
- data/lib/shopify_api/rest/resources/2023_10/location.rb +167 -0
- data/lib/shopify_api/rest/resources/2023_10/locations_for_move.rb +56 -0
- data/lib/shopify_api/rest/resources/2023_10/marketing_event.rb +209 -0
- data/lib/shopify_api/rest/resources/2023_10/metafield.rb +344 -0
- data/lib/shopify_api/rest/resources/2023_10/mobile_platform_application.rb +110 -0
- data/lib/shopify_api/rest/resources/2023_10/order.rb +491 -0
- data/lib/shopify_api/rest/resources/2023_10/order_risk.rb +144 -0
- data/lib/shopify_api/rest/resources/2023_10/page.rb +194 -0
- data/lib/shopify_api/rest/resources/2023_10/payment.rb +140 -0
- data/lib/shopify_api/rest/resources/2023_10/payment_gateway.rb +143 -0
- data/lib/shopify_api/rest/resources/2023_10/payment_transaction.rb +107 -0
- data/lib/shopify_api/rest/resources/2023_10/payout.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_10/policy.rb +69 -0
- data/lib/shopify_api/rest/resources/2023_10/price_rule.rb +223 -0
- data/lib/shopify_api/rest/resources/2023_10/product.rb +223 -0
- data/lib/shopify_api/rest/resources/2023_10/product_listing.rb +196 -0
- data/lib/shopify_api/rest/resources/2023_10/product_resource_feedback.rb +88 -0
- data/lib/shopify_api/rest/resources/2023_10/province.rb +132 -0
- data/lib/shopify_api/rest/resources/2023_10/recurring_application_charge.rb +172 -0
- data/lib/shopify_api/rest/resources/2023_10/redirect.rb +139 -0
- data/lib/shopify_api/rest/resources/2023_10/refund.rb +151 -0
- data/lib/shopify_api/rest/resources/2023_10/report.rb +121 -0
- data/lib/shopify_api/rest/resources/2023_10/resource_feedback.rb +73 -0
- data/lib/shopify_api/rest/resources/2023_10/script_tag.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_10/shipping_zone.rb +83 -0
- data/lib/shopify_api/rest/resources/2023_10/shop.rb +218 -0
- data/lib/shopify_api/rest/resources/2023_10/smart_collection.rb +216 -0
- data/lib/shopify_api/rest/resources/2023_10/storefront_access_token.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_10/tender_transaction.rb +93 -0
- data/lib/shopify_api/rest/resources/2023_10/theme.rb +123 -0
- data/lib/shopify_api/rest/resources/2023_10/transaction.rb +184 -0
- data/lib/shopify_api/rest/resources/2023_10/usage_charge.rb +102 -0
- data/lib/shopify_api/rest/resources/2023_10/user.rb +138 -0
- data/lib/shopify_api/rest/resources/2023_10/variant.rb +208 -0
- data/lib/shopify_api/rest/resources/2023_10/webhook.rb +168 -0
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/registration.rb +19 -4
- data/lib/shopify_api/webhooks/registrations/event_bridge.rb +1 -1
- data/lib/shopify_api/webhooks/registrations/http.rb +1 -1
- data/lib/shopify_api/webhooks/registrations/pub_sub.rb +2 -1
- data/lib/shopify_api/webhooks/registry.rb +25 -5
- data/shopify_api.gemspec +0 -1
- metadata +81 -20
- data/.github/workflows/stale.yml +0 -43
- data/docs/issues.md +0 -39
- data/docs/usage/session_storage.md +0 -46
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: 13.
|
4
|
+
version: 13.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -220,20 +220,6 @@ dependencies:
|
|
220
220
|
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: ruby-lsp
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - ">="
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: '0'
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: '0'
|
237
223
|
- !ruby/object:Gem::Dependency
|
238
224
|
name: sorbet
|
239
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -286,9 +272,9 @@ files:
|
|
286
272
|
- ".github/workflows/cla.yml"
|
287
273
|
- ".github/workflows/close-waiting-for-response-issues.yml"
|
288
274
|
- ".github/workflows/remove-labels-on-activity.yml"
|
289
|
-
- ".github/workflows/stale.yml"
|
290
275
|
- ".rubocop.yml"
|
291
276
|
- BREAKING_CHANGES_FOR_OLDER_VERSIONS.md
|
277
|
+
- BREAKING_CHANGES_FOR_V10.md
|
292
278
|
- CHANGELOG.md
|
293
279
|
- CONTRIBUTING.md
|
294
280
|
- Gemfile
|
@@ -296,18 +282,18 @@ files:
|
|
296
282
|
- LICENSE
|
297
283
|
- README.md
|
298
284
|
- RELEASING.md
|
285
|
+
- ROADMAP.md
|
299
286
|
- Rakefile
|
300
287
|
- SECURITY.md
|
301
288
|
- bin/tapioca
|
302
289
|
- dev.yml
|
303
290
|
- docs/README.md
|
304
291
|
- docs/getting_started.md
|
305
|
-
- docs/
|
292
|
+
- docs/usage/custom_apps.md
|
306
293
|
- docs/usage/graphql.md
|
307
294
|
- docs/usage/graphql_storefront.md
|
308
295
|
- docs/usage/oauth.md
|
309
296
|
- docs/usage/rest.md
|
310
|
-
- docs/usage/session_storage.md
|
311
297
|
- docs/usage/webhooks.md
|
312
298
|
- lib/shopify_api.rb
|
313
299
|
- lib/shopify_api/admin_versions.rb
|
@@ -792,6 +778,7 @@ files:
|
|
792
778
|
- lib/shopify_api/rest/resources/2023_07/recurring_application_charge.rb
|
793
779
|
- lib/shopify_api/rest/resources/2023_07/redirect.rb
|
794
780
|
- lib/shopify_api/rest/resources/2023_07/refund.rb
|
781
|
+
- lib/shopify_api/rest/resources/2023_07/report.rb
|
795
782
|
- lib/shopify_api/rest/resources/2023_07/resource_feedback.rb
|
796
783
|
- lib/shopify_api/rest/resources/2023_07/script_tag.rb
|
797
784
|
- lib/shopify_api/rest/resources/2023_07/shipping_zone.rb
|
@@ -805,6 +792,80 @@ files:
|
|
805
792
|
- lib/shopify_api/rest/resources/2023_07/user.rb
|
806
793
|
- lib/shopify_api/rest/resources/2023_07/variant.rb
|
807
794
|
- lib/shopify_api/rest/resources/2023_07/webhook.rb
|
795
|
+
- lib/shopify_api/rest/resources/2023_10/abandoned_checkout.rb
|
796
|
+
- lib/shopify_api/rest/resources/2023_10/access_scope.rb
|
797
|
+
- lib/shopify_api/rest/resources/2023_10/apple_pay_certificate.rb
|
798
|
+
- lib/shopify_api/rest/resources/2023_10/application_charge.rb
|
799
|
+
- lib/shopify_api/rest/resources/2023_10/application_credit.rb
|
800
|
+
- lib/shopify_api/rest/resources/2023_10/article.rb
|
801
|
+
- lib/shopify_api/rest/resources/2023_10/asset.rb
|
802
|
+
- lib/shopify_api/rest/resources/2023_10/assigned_fulfillment_order.rb
|
803
|
+
- lib/shopify_api/rest/resources/2023_10/balance.rb
|
804
|
+
- lib/shopify_api/rest/resources/2023_10/blog.rb
|
805
|
+
- lib/shopify_api/rest/resources/2023_10/cancellation_request.rb
|
806
|
+
- lib/shopify_api/rest/resources/2023_10/carrier_service.rb
|
807
|
+
- lib/shopify_api/rest/resources/2023_10/checkout.rb
|
808
|
+
- lib/shopify_api/rest/resources/2023_10/collect.rb
|
809
|
+
- lib/shopify_api/rest/resources/2023_10/collection.rb
|
810
|
+
- lib/shopify_api/rest/resources/2023_10/collection_listing.rb
|
811
|
+
- lib/shopify_api/rest/resources/2023_10/comment.rb
|
812
|
+
- lib/shopify_api/rest/resources/2023_10/country.rb
|
813
|
+
- lib/shopify_api/rest/resources/2023_10/currency.rb
|
814
|
+
- lib/shopify_api/rest/resources/2023_10/custom_collection.rb
|
815
|
+
- lib/shopify_api/rest/resources/2023_10/customer.rb
|
816
|
+
- lib/shopify_api/rest/resources/2023_10/customer_address.rb
|
817
|
+
- lib/shopify_api/rest/resources/2023_10/deprecated_api_call.rb
|
818
|
+
- lib/shopify_api/rest/resources/2023_10/discount_code.rb
|
819
|
+
- lib/shopify_api/rest/resources/2023_10/dispute.rb
|
820
|
+
- lib/shopify_api/rest/resources/2023_10/dispute_evidence.rb
|
821
|
+
- lib/shopify_api/rest/resources/2023_10/dispute_file_upload.rb
|
822
|
+
- lib/shopify_api/rest/resources/2023_10/draft_order.rb
|
823
|
+
- lib/shopify_api/rest/resources/2023_10/event.rb
|
824
|
+
- lib/shopify_api/rest/resources/2023_10/fulfillment.rb
|
825
|
+
- lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb
|
826
|
+
- lib/shopify_api/rest/resources/2023_10/fulfillment_order.rb
|
827
|
+
- lib/shopify_api/rest/resources/2023_10/fulfillment_request.rb
|
828
|
+
- lib/shopify_api/rest/resources/2023_10/fulfillment_service.rb
|
829
|
+
- lib/shopify_api/rest/resources/2023_10/gift_card.rb
|
830
|
+
- lib/shopify_api/rest/resources/2023_10/gift_card_adjustment.rb
|
831
|
+
- lib/shopify_api/rest/resources/2023_10/image.rb
|
832
|
+
- lib/shopify_api/rest/resources/2023_10/inventory_item.rb
|
833
|
+
- lib/shopify_api/rest/resources/2023_10/inventory_level.rb
|
834
|
+
- lib/shopify_api/rest/resources/2023_10/location.rb
|
835
|
+
- lib/shopify_api/rest/resources/2023_10/locations_for_move.rb
|
836
|
+
- lib/shopify_api/rest/resources/2023_10/marketing_event.rb
|
837
|
+
- lib/shopify_api/rest/resources/2023_10/metafield.rb
|
838
|
+
- lib/shopify_api/rest/resources/2023_10/mobile_platform_application.rb
|
839
|
+
- lib/shopify_api/rest/resources/2023_10/order.rb
|
840
|
+
- lib/shopify_api/rest/resources/2023_10/order_risk.rb
|
841
|
+
- lib/shopify_api/rest/resources/2023_10/page.rb
|
842
|
+
- lib/shopify_api/rest/resources/2023_10/payment.rb
|
843
|
+
- lib/shopify_api/rest/resources/2023_10/payment_gateway.rb
|
844
|
+
- lib/shopify_api/rest/resources/2023_10/payment_transaction.rb
|
845
|
+
- lib/shopify_api/rest/resources/2023_10/payout.rb
|
846
|
+
- lib/shopify_api/rest/resources/2023_10/policy.rb
|
847
|
+
- lib/shopify_api/rest/resources/2023_10/price_rule.rb
|
848
|
+
- lib/shopify_api/rest/resources/2023_10/product.rb
|
849
|
+
- lib/shopify_api/rest/resources/2023_10/product_listing.rb
|
850
|
+
- lib/shopify_api/rest/resources/2023_10/product_resource_feedback.rb
|
851
|
+
- lib/shopify_api/rest/resources/2023_10/province.rb
|
852
|
+
- lib/shopify_api/rest/resources/2023_10/recurring_application_charge.rb
|
853
|
+
- lib/shopify_api/rest/resources/2023_10/redirect.rb
|
854
|
+
- lib/shopify_api/rest/resources/2023_10/refund.rb
|
855
|
+
- lib/shopify_api/rest/resources/2023_10/report.rb
|
856
|
+
- lib/shopify_api/rest/resources/2023_10/resource_feedback.rb
|
857
|
+
- lib/shopify_api/rest/resources/2023_10/script_tag.rb
|
858
|
+
- lib/shopify_api/rest/resources/2023_10/shipping_zone.rb
|
859
|
+
- lib/shopify_api/rest/resources/2023_10/shop.rb
|
860
|
+
- lib/shopify_api/rest/resources/2023_10/smart_collection.rb
|
861
|
+
- lib/shopify_api/rest/resources/2023_10/storefront_access_token.rb
|
862
|
+
- lib/shopify_api/rest/resources/2023_10/tender_transaction.rb
|
863
|
+
- lib/shopify_api/rest/resources/2023_10/theme.rb
|
864
|
+
- lib/shopify_api/rest/resources/2023_10/transaction.rb
|
865
|
+
- lib/shopify_api/rest/resources/2023_10/usage_charge.rb
|
866
|
+
- lib/shopify_api/rest/resources/2023_10/user.rb
|
867
|
+
- lib/shopify_api/rest/resources/2023_10/variant.rb
|
868
|
+
- lib/shopify_api/rest/resources/2023_10/webhook.rb
|
808
869
|
- lib/shopify_api/utils/graphql_proxy.rb
|
809
870
|
- lib/shopify_api/utils/hmac_validator.rb
|
810
871
|
- lib/shopify_api/utils/http_utils.rb
|
@@ -896,7 +957,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
896
957
|
- !ruby/object:Gem::Version
|
897
958
|
version: '0'
|
898
959
|
requirements: []
|
899
|
-
rubygems_version: 3.4.
|
960
|
+
rubygems_version: 3.4.21
|
900
961
|
signing_key:
|
901
962
|
specification_version: 4
|
902
963
|
summary: The gem for accessing the Shopify API
|
data/.github/workflows/stale.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
name: Close inactive issues / prs
|
2
|
-
on:
|
3
|
-
schedule:
|
4
|
-
- cron: "30 1 * * *"
|
5
|
-
|
6
|
-
jobs:
|
7
|
-
stale:
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
permissions:
|
10
|
-
issues: write
|
11
|
-
pull-requests: write
|
12
|
-
steps:
|
13
|
-
- uses: actions/stale@v7
|
14
|
-
with:
|
15
|
-
days-before-issue-stale: 60
|
16
|
-
days-before-issue-close: 14
|
17
|
-
days-before-pr-stale: 60
|
18
|
-
days-before-pr-close: 14
|
19
|
-
operations-per-run: 1000
|
20
|
-
stale-issue-label: "Stale"
|
21
|
-
stale-pr-label: "Stale"
|
22
|
-
stale-issue-message: >
|
23
|
-
This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.
|
24
|
-
close-issue-message: |
|
25
|
-
We are closing this issue because it has been inactive for a few months.
|
26
|
-
This probably means that it is not reproducible or it has been fixed in a newer version.
|
27
|
-
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
|
28
|
-
|
29
|
-
If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the [CONTRIBUTING.md](https://github.com/Shopify/shopify-api-ruby/blob/main/CONTRIBUTING.md) file for guidelines
|
30
|
-
|
31
|
-
Thank you!
|
32
|
-
stale-pr-message: >
|
33
|
-
This pull request is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.
|
34
|
-
close-pr-message: |
|
35
|
-
We are closing this pull request because it has been inactive for a few months.
|
36
|
-
This probably means that it is not reproducible or it has been fixed in a newer version.
|
37
|
-
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.
|
38
|
-
|
39
|
-
If you still encounter this pull request with the latest stable version, please reopen using the pull request template. You can also contribute directly by submitting a pull request– see the [CONTRIBUTING.md](https://github.com/Shopify/shopify-api-ruby/blob/main/CONTRIBUTING.md) file for guidelines
|
40
|
-
|
41
|
-
Thank you!
|
42
|
-
repo-token: ${{ github.token }}
|
43
|
-
close-issue-reason: "not_planned"
|
data/docs/issues.md
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
# Known issues and caveats
|
2
|
-
|
3
|
-
By following this guide, you will have a fully functional Shopify app. However, there are some things you should be aware of before using your new app in a production environment.
|
4
|
-
|
5
|
-
## Notes on session handling
|
6
|
-
|
7
|
-
Before you start writing your application, please note that the Shopify library needs to store some information for OAuth in sessions. Since each application may choose a different strategy to store information, the library cannot dictate any specific storage strategy. When calling `ShopifyAPI::Context.setup`, you'll need to provide an instance of a class that implements the `ShopifyAPI::Auth::SessionStorage` interface.
|
8
|
-
|
9
|
-
This library provides a very simple implementation of that interface which stores sessions in files, `ShopifyAPI::Auth::FileSessionStorage` ([source code](../lib/shopify_api/auth/file_session_storage.rb)). This class is meant to speed up development with this library, but it is not suitable for production use, because it will lead to disk build-up as old sessions are not cleaned up.
|
10
|
-
|
11
|
-
Before you deploy your app to production, it should use your selected storage method for sessions. You can do that by creating a class that implements the `SessionStorage` interface and pass that in your `Context.setup` call. Your class will need to implement the methods below.
|
12
|
-
|
13
|
-
**Note**: After you create your implementation of `SessionStorage`, you should make sure to clean up old sessions periodically in your data storage. The library will delete some sessions when they are no longer useful, but it cannot guarantee that expired sessions are deleted automatically.
|
14
|
-
|
15
|
-
#### `SessionStorage.storeSession`
|
16
|
-
|
17
|
-
Creates **or updates** a `Session` object in your storage. This function should return a `bool` indicating whether the operation was successful.
|
18
|
-
|
19
|
-
| Param | Type | Notes |
|
20
|
-
| --------- | --------- | --------------------------- |
|
21
|
-
| `session` | `Session` | The session object to store |
|
22
|
-
|
23
|
-
#### `SessionStorage.loadSession`
|
24
|
-
|
25
|
-
Fetches a `Session` object from your storage. This function should return a `Session` object, or `null` if it was not found.
|
26
|
-
|
27
|
-
| Param | Type | Notes |
|
28
|
-
| ----------- | -------- | ----------------------------- |
|
29
|
-
| `sessionId` | `string` | The id of the session to load |
|
30
|
-
|
31
|
-
#### `SessionStorage.deleteSession`
|
32
|
-
|
33
|
-
Deletes a session from your storage. This function should return a `bool` indicating whether the operation was successful.
|
34
|
-
|
35
|
-
| Param | Type | Notes |
|
36
|
-
| ----------- | -------- | ------------------------------- |
|
37
|
-
| `sessionId` | `string` | The id of the session to delete |
|
38
|
-
|
39
|
-
[Back to guide index](README.md)
|
@@ -1,46 +0,0 @@
|
|
1
|
-
|
2
|
-
# Create a Session Storage Implementation
|
3
|
-
|
4
|
-
The implementation of session storage that you pass in `ShopifyAPI::Context.setup` is what the Shopify gem will use to store and load sessions. [Shopify::Auth::FileSessionStorage](../../lib/shopify_api/auth/file_session_storage.rb) can be used for testing purposes and as an example of how to make an implementation in your app. This is not recommended for production, we recommend you implement a solution that will store and load serialized sessions from a more ideal store such as a database like MySQL or MongoDB.
|
5
|
-
|
6
|
-
## Create a New Session Storage Class
|
7
|
-
|
8
|
-
You can create a session storage class that includes `ShopifyAPI::Auth::SessionStorage` and override the methods as shown in the table and example below:
|
9
|
-
|
10
|
-
| Method Name | Input Type | Return Type |
|
11
|
-
| ---------------------- | --------------------------------- | ------------------------------ |
|
12
|
-
| `store_session` | `ShopifyAPI::Auth::Session` | `Boolean` (true if successful) |
|
13
|
-
| `load_session` | `String` (session id) | `ShopifyAPI::Auth::Session` |
|
14
|
-
| `delete_session` | `String` (session id) | `Boolean` (true if successful) |
|
15
|
-
|
16
|
-
|
17
|
-
```ruby
|
18
|
-
class CustomSessionStorage
|
19
|
-
include ShopifyAPI::Auth::SessionStorage
|
20
|
-
|
21
|
-
def initialize
|
22
|
-
# Initialize as needed
|
23
|
-
end
|
24
|
-
|
25
|
-
def store_session(session)
|
26
|
-
# Implement a store function
|
27
|
-
some_store_function(id: session.id, session_data: session.serialize)
|
28
|
-
end
|
29
|
-
|
30
|
-
def load_session(id)
|
31
|
-
# Implement a fetch function
|
32
|
-
session_data = some_fetch_function(id)
|
33
|
-
ShopifyAPI::Auth::Session.deserialize(session_data)
|
34
|
-
end
|
35
|
-
|
36
|
-
def delete_session(id)
|
37
|
-
# Implement a delete function
|
38
|
-
some_delete_function(id)
|
39
|
-
true
|
40
|
-
end
|
41
|
-
end
|
42
|
-
```
|
43
|
-
|
44
|
-
**Note:** We recommend utilizing the Session `serialize` and `deserialize` functions to make storing and loading sessions easier.
|
45
|
-
|
46
|
-
Once this is complete you can pass an instance of this session storage class as `session_storage` in `ShopifyAPI::Context.setup`
|