shopify_api 13.3.1 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +0 -1
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +12 -0
- data/CODE_OF_CONDUCT.md +46 -0
- data/Gemfile.lock +39 -42
- data/dev.yml +3 -2
- data/docs/usage/graphql.md +30 -1
- data/docs/usage/rest.md +81 -13
- data/docs/usage/webhooks.md +34 -9
- data/lib/shopify_api/admin_versions.rb +2 -1
- data/lib/shopify_api/auth/oauth/access_token_response.rb +37 -0
- data/lib/shopify_api/auth/oauth.rb +2 -33
- data/lib/shopify_api/auth/session.rb +26 -0
- data/lib/shopify_api/auth/token_exchange.rb +80 -0
- data/lib/shopify_api/clients/graphql/client.rb +1 -0
- data/lib/shopify_api/clients/http_client.rb +7 -2
- data/lib/shopify_api/clients/http_response.rb +29 -2
- data/lib/shopify_api/context.rb +8 -1
- data/lib/shopify_api/logger.rb +1 -1
- data/lib/shopify_api/rest/base.rb +93 -22
- data/lib/shopify_api/rest/resources/2022_04/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/android_pay_key.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/assigned_fulfillment_order.rb +12 -6
- data/lib/shopify_api/rest/resources/2022_04/balance.rb +6 -3
- data/lib/shopify_api/rest/resources/2022_04/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/customer_address.rb +17 -3
- data/lib/shopify_api/rest/resources/2022_04/customer_saved_search.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_request.rb +17 -3
- data/lib/shopify_api/rest/resources/2022_04/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/order_risk.rb +12 -6
- data/lib/shopify_api/rest/resources/2022_04/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/payment_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/shop.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/variant.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_04/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/android_pay_key.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/assigned_fulfillment_order.rb +12 -6
- data/lib/shopify_api/rest/resources/2022_07/balance.rb +11 -3
- data/lib/shopify_api/rest/resources/2022_07/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/customer_address.rb +17 -3
- data/lib/shopify_api/rest/resources/2022_07/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/dispute_evidence.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/dispute_file_upload.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_request.rb +17 -3
- data/lib/shopify_api/rest/resources/2022_07/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/order.rb +10 -3
- data/lib/shopify_api/rest/resources/2022_07/order_risk.rb +12 -6
- data/lib/shopify_api/rest/resources/2022_07/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/payment_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/shop.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/variant.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_07/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/android_pay_key.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/assigned_fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/balance.rb +11 -3
- data/lib/shopify_api/rest/resources/2022_10/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/customer_address.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/dispute_evidence.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/dispute_file_upload.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/order.rb +10 -3
- data/lib/shopify_api/rest/resources/2022_10/order_risk.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/payment_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/shop.rb +7 -6
- data/lib/shopify_api/rest/resources/2022_10/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2022_10/variant.rb +8 -8
- data/lib/shopify_api/rest/resources/2022_10/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/assigned_fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/balance.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/customer_address.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/customer_saved_search.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/dispute_evidence.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/dispute_file_upload.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_order.rb +12 -6
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/order_risk.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/payment_transaction.rb +12 -5
- data/lib/shopify_api/rest/resources/2023_01/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/shop.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/variant.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_01/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/assigned_fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/balance.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/customer_address.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/customer_saved_search.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/dispute_evidence.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/dispute_file_upload.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_order.rb +12 -6
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/order.rb +7 -9
- data/lib/shopify_api/rest/resources/2023_04/order_risk.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/payment_transaction.rb +12 -5
- data/lib/shopify_api/rest/resources/2023_04/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/shop.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/variant.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_04/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/assigned_fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/balance.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/customer_address.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/customer_saved_search.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/dispute_evidence.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/dispute_file_upload.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_order.rb +12 -6
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/order.rb +7 -9
- data/lib/shopify_api/rest/resources/2023_07/order_risk.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/payment_transaction.rb +12 -5
- data/lib/shopify_api/rest/resources/2023_07/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/shop.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/variant.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/abandoned_checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/access_scope.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/apple_pay_certificate.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/application_credit.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/article.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/asset.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/assigned_fulfillment_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/balance.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/blog.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/cancellation_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/carrier_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/checkout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/collect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/collection_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/comment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/country.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/currency.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/custom_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/customer.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/customer_address.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/deprecated_api_call.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/discount_code.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/dispute.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/dispute_evidence.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/dispute_file_upload.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/draft_order.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/fulfillment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_order.rb +12 -6
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_request.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_service.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/gift_card.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/gift_card_adjustment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/image.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/inventory_level.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/location.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/locations_for_move.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/marketing_event.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/metafield.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/mobile_platform_application.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/order.rb +7 -9
- data/lib/shopify_api/rest/resources/2023_10/order_risk.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/page.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/payment.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/payment_gateway.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/payment_transaction.rb +12 -5
- data/lib/shopify_api/rest/resources/2023_10/payout.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/policy.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/price_rule.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/product.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/product_listing.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/product_resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/province.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/recurring_application_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/redirect.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/refund.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/report.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/resource_feedback.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/script_tag.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/shipping_zone.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/shop.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/smart_collection.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/storefront_access_token.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/tender_transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/theme.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/transaction.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/usage_charge.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/user.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/variant.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_10/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2024_01/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2024_01/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2024_01/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2024_01/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2024_01/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2024_01/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2024_01/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_01/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_01/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2024_01/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2024_01/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_01/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2024_01/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/{2022_07/customer_saved_search.rb → 2024_01/collect.rb} +29 -52
- data/lib/shopify_api/rest/resources/2024_01/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_01/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2024_01/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2024_01/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2024_01/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_01/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2024_01/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2024_01/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2024_01/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2024_01/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2024_01/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2024_01/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2024_01/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2024_01/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2024_01/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2024_01/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2024_01/fulfillment_event.rb +170 -0
- data/lib/shopify_api/rest/resources/2024_01/fulfillment_order.rb +326 -0
- data/lib/shopify_api/rest/resources/2024_01/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_01/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2024_01/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_01/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2024_01/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2024_01/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2024_01/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2024_01/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2024_01/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2024_01/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2024_01/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2024_01/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_01/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2024_01/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2024_01/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2024_01/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2024_01/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2024_01/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2024_01/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2024_01/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2024_01/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_01/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2024_01/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2024_01/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2024_01/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2024_01/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2024_01/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2024_01/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2024_01/report.rb +125 -0
- data/lib/shopify_api/rest/resources/2024_01/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/{2022_10/customer_saved_search.rb → 2024_01/script_tag.rb} +44 -54
- data/lib/shopify_api/rest/resources/2024_01/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2024_01/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2024_01/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2024_01/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2024_01/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2024_01/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2024_01/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2024_01/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2024_01/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2024_01/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2024_01/webhook.rb +172 -0
- data/lib/shopify_api/utils/attributes_comparator.rb +85 -0
- data/lib/shopify_api/utils/hmac_validator.rb +1 -1
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/handler.rb +24 -1
- data/lib/shopify_api/webhooks/registration.rb +2 -2
- data/lib/shopify_api/webhooks/registry.rb +13 -2
- data/lib/shopify_api/webhooks/request.rb +10 -0
- data/shopify_api.gemspec +1 -1
- metadata +82 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d335207bd3fc2cf7798f48f3b7a0ff9ea05c05969e189423a9cd89a06c9d155b
|
4
|
+
data.tar.gz: 873f2d725e8e1b84e4d8fc617e1b9aa6d3ddec6a9791646a76fb2f946d39ac9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 994fa799e6f84043aeec3ffd7c49789588299cf55d40de6bfe091b1b3d935fa99312666d78addb4238532345d6cae97d65f3785ef4fc38a576dfdc9eaa127ca9
|
7
|
+
data.tar.gz: 2ff189f2ecb5bb7a9ead4852162857c6e13a29f5fa2229e15378b1ba05ff92cd9c0a3e663161f4f17285a843a88882b53a358c1070ca881e49ba185be98184e7
|
data/.github/workflows/build.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,18 @@ Note: For changes to the API, see https://shopify.dev/changelog?filter=api
|
|
4
4
|
|
5
5
|
## Unreleased
|
6
6
|
|
7
|
+
## 14.0.0
|
8
|
+
- [#1274](https://github.com/Shopify/shopify-api-ruby/pull/1274) ⚠️ [Breaking] Update sorbet and rbi dependencies. Remove support for ruby 2.7. Minimum required Ruby version is 3.0
|
9
|
+
- [#1282](https://github.com/Shopify/shopify-api-ruby/pull/1282) Fixes a bug where diffing attributes to update not take into account of Array changes and required ids.
|
10
|
+
- [#1254](https://github.com/Shopify/shopify-api-ruby/pull/1254) Introduce token exchange API for fetching access tokens. This feature is currently unstable and cannot be used yet.
|
11
|
+
- [#1268](https://github.com/Shopify/shopify-api-ruby/pull/1268) Add [new webhook handler interface](https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/webhooks.md#create-a-webhook-handler) to provide `webhook_id ` and `api_version` information to webhook handlers.
|
12
|
+
- [#1275](https://github.com/Shopify/shopify-api-ruby/pull/1275) Allow adding custom headers in REST Resource HTTP calls.
|
13
|
+
|
14
|
+
## 13.4.0
|
15
|
+
- [#1210](https://github.com/Shopify/shopify-api-ruby/pull/1246) Add context option `response_as_struct` to allow GraphQL API responses to be accessed via dot notation.
|
16
|
+
- [#1257](https://github.com/Shopify/shopify-api-ruby/pull/1257) Add `api_call_limit` and `retry_request_after` to REST resources to expose rate limit information.
|
17
|
+
- [#1257](https://github.com/Shopify/shopify-api-ruby/pull/1257) Added support for the 2024-01 API version. This also includes a fix for the `for_hash` option when creating resources.
|
18
|
+
|
7
19
|
## 13.3.1
|
8
20
|
|
9
21
|
- [#1244](https://github.com/Shopify/shopify-api-ruby/pull/1244) Add `expired?` to `ShopifyAPI::Auth::Session` to check if the session is expired (mainly for user sessions)
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all
|
5
|
+
people who contribute through reporting issues, posting feature
|
6
|
+
requests, updating documentation, submitting pull requests or patches,
|
7
|
+
and other activities.
|
8
|
+
|
9
|
+
We are committed to making participation in this project a
|
10
|
+
harassment-free experience for everyone, regardless of level of
|
11
|
+
experience, gender, gender identity and expression, sexual orientation,
|
12
|
+
disability, personal appearance, body size, race, ethnicity, age,
|
13
|
+
religion, or nationality.
|
14
|
+
|
15
|
+
Examples of unacceptable behavior by participants include:
|
16
|
+
|
17
|
+
- The use of sexualized language or imagery
|
18
|
+
- Personal attacks
|
19
|
+
- Trolling or insulting/derogatory comments
|
20
|
+
- Public or private harassment
|
21
|
+
- Publishing other's private information, such as physical or electronic
|
22
|
+
addresses, without explicit permission
|
23
|
+
- Other unethical or unprofessional conduct
|
24
|
+
|
25
|
+
Project maintainers have the right and responsibility to remove, edit,
|
26
|
+
or reject comments, commits, code, wiki edits, issues, and other
|
27
|
+
contributions that are not aligned to this Code of Conduct, or to ban
|
28
|
+
temporarily or permanently any contributor for other behaviors that they
|
29
|
+
deem inappropriate, threatening, offensive, or harmful.
|
30
|
+
|
31
|
+
By adopting this Code of Conduct, project maintainers commit themselves
|
32
|
+
to fairly and consistently applying these principles to every aspect of
|
33
|
+
managing this project. Project maintainers who do not follow or enforce
|
34
|
+
the Code of Conduct may be permanently removed from the project team.
|
35
|
+
|
36
|
+
This Code of Conduct applies both within project spaces and in public
|
37
|
+
spaces when an individual is representing the project or its community.
|
38
|
+
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may
|
40
|
+
be reported by contacting a project maintainer at <opensource@shopify.com>.
|
41
|
+
All complaints will be reviewed and investigated and will result in a response
|
42
|
+
that is deemed necessary and appropriate to the circumstances. Maintainers are
|
43
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
44
|
+
|
45
|
+
This Code of Conduct is adapted from the Contributor Covenant, version
|
46
|
+
1.3.0, available from http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
shopify_api (
|
4
|
+
shopify_api (14.0.0)
|
5
5
|
activesupport
|
6
6
|
concurrent-ruby
|
7
7
|
hash_diff
|
@@ -16,7 +16,7 @@ PATH
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
activesupport (7.1.
|
19
|
+
activesupport (7.1.3)
|
20
20
|
base64
|
21
21
|
bigdecimal
|
22
22
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -30,16 +30,16 @@ GEM
|
|
30
30
|
public_suffix (>= 2.0.2, < 5.0)
|
31
31
|
ast (2.4.2)
|
32
32
|
base64 (0.2.0)
|
33
|
-
bigdecimal (3.1.
|
33
|
+
bigdecimal (3.1.6)
|
34
34
|
byebug (11.1.3)
|
35
35
|
coderay (1.1.3)
|
36
|
-
concurrent-ruby (1.2.
|
36
|
+
concurrent-ruby (1.2.3)
|
37
37
|
connection_pool (2.4.1)
|
38
38
|
crack (0.4.5)
|
39
39
|
rexml
|
40
|
-
diff-lcs (1.5.0)
|
41
40
|
drb (2.2.0)
|
42
41
|
ruby2_keywords
|
42
|
+
erubi (1.12.0)
|
43
43
|
fakefs (1.4.1)
|
44
44
|
hash_diff (1.1.1)
|
45
45
|
hashdiff (1.0.1)
|
@@ -57,27 +57,28 @@ GEM
|
|
57
57
|
multi_xml (0.6.0)
|
58
58
|
mutex_m (0.2.0)
|
59
59
|
netrc (0.11.0)
|
60
|
-
oj (3.16.
|
60
|
+
oj (3.16.3)
|
61
|
+
bigdecimal (>= 3.0)
|
61
62
|
openssl (3.2.0)
|
62
|
-
parallel (1.
|
63
|
-
parser (3.
|
63
|
+
parallel (1.24.0)
|
64
|
+
parser (3.3.0.5)
|
64
65
|
ast (~> 2.4.1)
|
65
66
|
racc
|
66
|
-
|
67
|
+
prettier_print (1.2.1)
|
68
|
+
prism (0.21.0)
|
69
|
+
pry (0.14.2)
|
67
70
|
coderay (~> 1.1)
|
68
71
|
method_source (~> 1.0)
|
69
72
|
pry-byebug (3.10.1)
|
70
73
|
byebug (~> 11.0)
|
71
74
|
pry (>= 0.13, < 0.15)
|
72
75
|
public_suffix (4.0.6)
|
73
|
-
racc (1.7.
|
76
|
+
racc (1.7.3)
|
74
77
|
rainbow (3.1.1)
|
75
78
|
rake (13.0.6)
|
76
|
-
rbi (0.
|
77
|
-
|
78
|
-
parser (>= 2.6.4.0)
|
79
|
+
rbi (0.1.8)
|
80
|
+
prism (>= 0.18.0, < 0.22)
|
79
81
|
sorbet-runtime (>= 0.5.9204)
|
80
|
-
unparser
|
81
82
|
regexp_parser (2.5.0)
|
82
83
|
rexml (3.2.5)
|
83
84
|
rubocop (1.36.0)
|
@@ -98,48 +99,44 @@ GEM
|
|
98
99
|
rubocop (>= 0.90.0)
|
99
100
|
ruby-progressbar (1.11.0)
|
100
101
|
ruby2_keywords (0.0.5)
|
101
|
-
securerandom (0.3.
|
102
|
-
sorbet (0.5.
|
103
|
-
sorbet-static (= 0.5.
|
104
|
-
sorbet-runtime (0.5.
|
105
|
-
sorbet-static (0.5.
|
106
|
-
sorbet-static (0.5.
|
107
|
-
sorbet-static (0.5.
|
108
|
-
|
109
|
-
sorbet (= 0.5.
|
110
|
-
|
111
|
-
|
112
|
-
sorbet (>= 0.5.
|
113
|
-
|
102
|
+
securerandom (0.3.1)
|
103
|
+
sorbet (0.5.11230)
|
104
|
+
sorbet-static (= 0.5.11230)
|
105
|
+
sorbet-runtime (0.5.11230)
|
106
|
+
sorbet-static (0.5.11230-universal-darwin)
|
107
|
+
sorbet-static (0.5.11230-x86_64-linux)
|
108
|
+
sorbet-static-and-runtime (0.5.11230)
|
109
|
+
sorbet (= 0.5.11230)
|
110
|
+
sorbet-runtime (= 0.5.11230)
|
111
|
+
spoom (1.2.4)
|
112
|
+
erubi (>= 1.10.0)
|
113
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
114
|
+
syntax_tree (>= 6.1.1)
|
114
115
|
thor (>= 0.19.2)
|
115
|
-
|
116
|
-
|
116
|
+
syntax_tree (6.2.0)
|
117
|
+
prettier_print (>= 1.2.0)
|
118
|
+
tapioca (0.12.0)
|
119
|
+
bundler (>= 2.2.25)
|
117
120
|
netrc (>= 0.11.0)
|
118
121
|
parallel (>= 1.21.0)
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
spoom (~> 1.1.0, >= 1.1.11)
|
122
|
+
rbi (>= 0.1.4, < 0.2)
|
123
|
+
sorbet-static-and-runtime (>= 0.5.10820)
|
124
|
+
spoom (~> 1.2.0, >= 1.2.0)
|
123
125
|
thor (>= 1.2.0)
|
124
126
|
yard-sorbet
|
125
|
-
thor (1.
|
127
|
+
thor (1.3.0)
|
126
128
|
tzinfo (2.0.6)
|
127
129
|
concurrent-ruby (~> 1.0)
|
128
130
|
unicode-display_width (2.3.0)
|
129
|
-
unparser (0.6.5)
|
130
|
-
diff-lcs (~> 1.3)
|
131
|
-
parser (>= 3.1.0)
|
132
131
|
webmock (3.14.0)
|
133
132
|
addressable (>= 2.8.0)
|
134
133
|
crack (>= 0.3.2)
|
135
134
|
hashdiff (>= 0.4.0, < 2.0.0)
|
136
|
-
|
137
|
-
yard (0.
|
138
|
-
webrick (~> 1.7.0)
|
139
|
-
yard-sorbet (0.7.0)
|
135
|
+
yard (0.9.34)
|
136
|
+
yard-sorbet (0.8.1)
|
140
137
|
sorbet-runtime (>= 0.5)
|
141
138
|
yard (>= 0.9)
|
142
|
-
zeitwerk (2.6.
|
139
|
+
zeitwerk (2.6.13)
|
143
140
|
|
144
141
|
PLATFORMS
|
145
142
|
arm64-darwin-21
|
data/dev.yml
CHANGED
data/docs/usage/graphql.md
CHANGED
@@ -117,7 +117,7 @@ response = client.query(query: query, variables: variables)
|
|
117
117
|
|
118
118
|
### Output
|
119
119
|
#### Success
|
120
|
-
If the request is successful these methods will all return a [`ShopifyAPI::Clients::HttpResponse`](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/http_response.rb) object, which has the following methods:
|
120
|
+
If the request is successful these methods will all return a [`ShopifyAPI::Clients::HttpResponse`](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/http_response.rb) object, which has the following methods:
|
121
121
|
| Methods | Type | Notes |
|
122
122
|
|---------|------|-------|
|
123
123
|
| `code` |`Integer`| HTTP Response code, e.g. `200`|
|
@@ -137,6 +137,35 @@ This library also supports cursor-based pagination for GraphQL Admin API request
|
|
137
137
|
|
138
138
|
After making a request, the `next_page_info` and `prev_page_info` can be found on the response object and be used in the query param in other requests.
|
139
139
|
|
140
|
+
## Response as Struct
|
141
|
+
By default the response body is returned as a `Hash{String, Untyped}`. If you would like to return the response body as a `Struct`, you can pass `response_as_struct: true` to the `ShopifyAPI::Context.setup` method.
|
142
|
+
Then you can access the object with both dot and hash notation.
|
143
|
+
|
144
|
+
```ruby
|
145
|
+
ShopifyAPI::Context.setup(
|
146
|
+
api_key: ShopifyApp.configuration.api_key,
|
147
|
+
api_secret_key: ShopifyApp.configuration.secret,
|
148
|
+
...
|
149
|
+
response_as_struct: true
|
150
|
+
)
|
151
|
+
|
152
|
+
# Make a graphql query
|
153
|
+
response = client.query(
|
154
|
+
query: CREATE_PRODUCTS_MUTATION,
|
155
|
+
variables: {
|
156
|
+
input: {
|
157
|
+
title: random_title,
|
158
|
+
variants: [{ price: random_price }],
|
159
|
+
},
|
160
|
+
},
|
161
|
+
)
|
162
|
+
# Access result with dot notation
|
163
|
+
created_product2 = response.body.data.productCreate.product
|
164
|
+
# Access result with hash notation
|
165
|
+
created_product = response.body["data"]["productCreate"]["product"]
|
166
|
+
|
167
|
+
```
|
168
|
+
|
140
169
|
## Proxy a GraphQL Query
|
141
170
|
|
142
171
|
If you would like to give your front end the ability to make authenticated graphql queries to the Shopify Admin API, the `shopify_api` gem makes proxy-ing a graphql request easy! The gem provides a utility function which will accept the raw request body (a GraphQL query), the headers, and the cookies (optional). It will add authentication to the request, proxy it to the Shopify Admin API, and return a `ShopifyAPI::Clients::HttpResponse`. An example utilization of this in Rails is shown below:
|
data/docs/usage/rest.md
CHANGED
@@ -69,18 +69,18 @@ Typical methods provided for each resources are:
|
|
69
69
|
Full list of methods can be found on each of the resource class.
|
70
70
|
- Path:
|
71
71
|
- https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/rest/resources/#{version}/#{resource}.rb
|
72
|
-
- Example for `Order` resource on `
|
73
|
-
- https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/rest/resources/
|
72
|
+
- Example for `Order` resource on `2024-01` version:
|
73
|
+
- https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/rest/resources/2024_01/order.rb
|
74
74
|
|
75
|
-
###
|
76
|
-
⚠️ Reference documentation on [shopify.dev](https://shopify.dev/docs/api/admin-rest) contains more examples on how to use each REST Resources.
|
75
|
+
### The `save` method
|
77
76
|
|
78
|
-
|
79
|
-
# Find and update a customer email
|
80
|
-
customer = ShopifyAPI::Customer.find(id: customer_id)
|
81
|
-
customer.email = "steve-lastnameson@example.com"
|
82
|
-
customer.save!
|
77
|
+
The `save` or `save!` method on a resource allows you to `create` or `update` that resource.
|
83
78
|
|
79
|
+
#### Create a new resource
|
80
|
+
|
81
|
+
To create a new resource using the `save` or `save!` method, you can initialize the resource with a hash of values or simply assigning them manually. For example:
|
82
|
+
|
83
|
+
```Ruby
|
84
84
|
# Create a new product from hash
|
85
85
|
product_properties = {
|
86
86
|
title: "My awesome product"
|
@@ -88,10 +88,63 @@ product_properties = {
|
|
88
88
|
product = ShopifyAPI::Product.new(from_hash: product_properties)
|
89
89
|
product.save!
|
90
90
|
|
91
|
-
# Create a product manually
|
91
|
+
# Create a new product manually
|
92
92
|
product = ShopifyAPI::Product.new
|
93
93
|
product.title = "Another one"
|
94
94
|
product.save!
|
95
|
+
```
|
96
|
+
|
97
|
+
#### Update an existing resource
|
98
|
+
|
99
|
+
To update an existing resource using the `save` or `save!` method, you'll need to fetch the resource from Shopify first. Then, you can manually assign new values to the resource before calling `save` or `save!`. For example:
|
100
|
+
|
101
|
+
```Ruby
|
102
|
+
# Update a product's title
|
103
|
+
product = ShopifyAPI::Product.find(id: product_id)
|
104
|
+
product.title = "My new title"
|
105
|
+
product.save!
|
106
|
+
|
107
|
+
# Remove a line item from a draft order
|
108
|
+
draft_order = ShopifyAPI::DraftOrder.find(id: draft_order_id)
|
109
|
+
|
110
|
+
new_line_items = draft_order.line_items.reject { |line_item| line_item["id"] == 12345 }
|
111
|
+
draft_order.line_items = new_line_items
|
112
|
+
|
113
|
+
draft_order.save!
|
114
|
+
```
|
115
|
+
|
116
|
+
> [!IMPORTANT]
|
117
|
+
> If you need to unset an existing value,
|
118
|
+
> please explicitly set that attribute to `nil` or empty values such as `[]` or `{}`. For example:
|
119
|
+
>
|
120
|
+
> ```Ruby
|
121
|
+
> # Removes shipping address from draft_order
|
122
|
+
> draft_order.shipping_address = {}
|
123
|
+
> draft_order.save!
|
124
|
+
> ```
|
125
|
+
>
|
126
|
+
> This is because only modified values are sent to the API, so if `shipping_address` is not "modified" to `{}`. It won't be part of the PUT request payload
|
127
|
+
|
128
|
+
When updating a resource, only the modified attributes, the resource's primary key, and required parameters are sent to the API. The primary key is usually the `id` attribute of the resource, but it can vary if the `primary_key` method is overwritten in the resource's class. The required parameters are identified using the path parameters of the `PUT` endpoint of the resource.
|
129
|
+
|
130
|
+
### Headers
|
131
|
+
You can add custom headers to the HTTP calls made by methods like `find`, `delete`, `all`, `count`
|
132
|
+
by setting the `headers` attribute on the `ShopifyAPI::Rest::Base` class in an initializer, like so:
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
ShopifyAPI::Rest::Base.headers = { "X-Custom-Header" => "Custom Value" }
|
136
|
+
# `find` will call the API endpoint with the custom header
|
137
|
+
ShopifyAPI::Customer.find(id: customer_id)
|
138
|
+
```
|
139
|
+
|
140
|
+
### Usage Examples
|
141
|
+
⚠️ The [API reference documentation](https://shopify.dev/docs/api/admin-rest) contains more examples on how to use each REST Resources.
|
142
|
+
|
143
|
+
```Ruby
|
144
|
+
# Find and update a customer email
|
145
|
+
customer = ShopifyAPI::Customer.find(id: customer_id)
|
146
|
+
customer.email = "steve-lastnameson@example.com"
|
147
|
+
customer.save!
|
95
148
|
|
96
149
|
# Get all orders
|
97
150
|
orders = ShopifyAPI::Orders.all
|
@@ -122,7 +175,7 @@ Create an instance of [`ShopifyAPI::Clients::Rest::Admin`](https://github.com/Sh
|
|
122
175
|
|
123
176
|
Examples:
|
124
177
|
```ruby
|
125
|
-
# Create a default client with `ShopifyAPI::Context.api_version`
|
178
|
+
# Create a default client with `ShopifyAPI::Context.api_version`
|
126
179
|
# and the active session from `ShopifyAPI::Context.active_session`
|
127
180
|
client = ShopifyAPI::Clients::Rest::Admin.new
|
128
181
|
|
@@ -147,7 +200,7 @@ The `ShopifyAPI::Clients::Rest::Admin` client offers the 4 core request methods:
|
|
147
200
|
|
148
201
|
#### Input Parameters
|
149
202
|
|
150
|
-
Each method can take the parameters outlined in the table below.
|
203
|
+
Each method can take the parameters outlined in the table below.
|
151
204
|
|
152
205
|
| Parameter | Type | Required in Methods | Default Value | Notes |
|
153
206
|
| -------------- | -------------------------------------------------------- | :-----------------: | :-----------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
@@ -161,7 +214,7 @@ Each method can take the parameters outlined in the table below.
|
|
161
214
|
|
162
215
|
#### Output
|
163
216
|
##### Success
|
164
|
-
If the request is successful these methods will all return a [`ShopifyAPI::Clients::HttpResponse`](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/http_response.rb) object, which has the following methods:
|
217
|
+
If the request is successful these methods will all return a [`ShopifyAPI::Clients::HttpResponse`](https://github.com/Shopify/shopify-api-ruby/blob/main/lib/shopify_api/clients/http_response.rb) object, which has the following methods:
|
165
218
|
| Methods | Type | Notes |
|
166
219
|
|---------|------|-------|
|
167
220
|
| `code` |`Integer`| HTTP Response code, e.g. `200`|
|
@@ -247,6 +300,21 @@ _For more information on the `products` endpoint, [check out our API reference g
|
|
247
300
|
|
248
301
|
_For more information on the `products` endpoint, [check out our API reference guide](https://shopify.dev/docs/api/admin-rest/latest/resources/product)._
|
249
302
|
|
303
|
+
#### Accessing Rate Limit information
|
304
|
+
|
305
|
+
The REST resources have `api_call_limit` and `retry_after` can be found on the Resource class. These values correspond to the `X-Shopify-Shop-Api-Call-Limit` and `Retry-After` [headers](https://shopify.dev/docs/api/usage/rate-limits#rest-admin-api-rate-limits) respectively.
|
306
|
+
|
307
|
+
```ruby
|
308
|
+
product = ShopifyAPI::Product.find(session: session, id: 12345)
|
309
|
+
|
310
|
+
# X-Shopify-Shop-Api-Call-Limit: 32/40
|
311
|
+
request_count = ShopifyAPI::Product.api_call_limit[:request_count] # 32
|
312
|
+
bucket_size = ShopifyAPI::Product.api_call_limit[:bucket_size] # 40
|
313
|
+
|
314
|
+
retry_after = ShopifyAPI::Product.retry_request_after
|
315
|
+
|
316
|
+
```
|
317
|
+
|
250
318
|
### Pagination
|
251
319
|
|
252
320
|
This library also supports cursor-based pagination for REST Admin API requests. [Learn more about REST request pagination](https://shopify.dev/docs/api/usage/pagination-rest).
|
data/docs/usage/webhooks.md
CHANGED
@@ -7,10 +7,37 @@ If using in the Rails framework, we highly recommend you use the [shopify_app](h
|
|
7
7
|
|
8
8
|
## Create a Webhook Handler
|
9
9
|
|
10
|
-
If you want to register for an http webhook you need to implement a webhook handler which the `shopify_api` gem can use to determine how to process your webhook. You can make multiple implementations (one per topic) or you can make one implementation capable of handling all the topics you want to subscribe to. To do this simply make a module or class that includes or extends `ShopifyAPI::Webhooks::WebhookHandler` and implement the handle method which accepts the following named parameters:
|
10
|
+
If you want to register for an http webhook you need to implement a webhook handler which the `shopify_api` gem can use to determine how to process your webhook. You can make multiple implementations (one per topic) or you can make one implementation capable of handling all the topics you want to subscribe to. To do this simply make a module or class that includes or extends `ShopifyAPI::Webhooks::WebhookHandler` and implement the `handle` method which accepts the following named parameters: data: `WebhookMetadata`. An example implementation is shown below:
|
11
|
+
|
12
|
+
`data` will have the following keys
|
13
|
+
- `topic`, `String` - The topic of the webhook
|
14
|
+
- `shop`, `String` - The shop domain of the webhook
|
15
|
+
- `body`, `T::Hash[String, T.untyped]`- The body of the webhook
|
16
|
+
- `webhook_id`, `String` - The id of the webhook event to [avoid duplicates](https://shopify.dev/docs/apps/webhooks/best-practices#ignore-duplicates)
|
17
|
+
- `api_version`, `String` - The api version of the webhook
|
11
18
|
|
12
19
|
```ruby
|
13
|
-
module WebhookHandler
|
20
|
+
module WebhookHandler
|
21
|
+
extend ShopifyAPI::Webhooks::Handler
|
22
|
+
|
23
|
+
class << self
|
24
|
+
def handle_webhook(data)
|
25
|
+
puts "Received webhook! topic: #{data.topic} shop: #{data.shop} body: #{data.body} webhook_id: #{data.webhook_id} api_version: #{data.api_version"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
**Note:** As of version 13.5.0 the `ShopifyAPI::Webhooks::Handler` class is still available to be used but will be removed in a future version of the gem.
|
32
|
+
|
33
|
+
### Best Practices
|
34
|
+
It is recommended that in order to respond quickly to the Shopify webhook request that the handler not do any heavy logic or network calls, rather it should simply enqueue the work in some job queue in order to be executed later.
|
35
|
+
|
36
|
+
### Webhook Handler for versions 13.4.0 and prior
|
37
|
+
If you want to register for an http webhook you need to implement a webhook handler which the `shopify_api` gem can use to determine how to process your webhook. You can make multiple implementations (one per topic) or you can make one implementation capable of handling all the topics you want to subscribe to. To do this simply make a module or class that includes or extends `ShopifyAPI::Webhooks::Handler` and implement the handle method which accepts the following named parameters: topic: `String`, shop: `String`, and body: `Hash[String, untyped]`. An example implementation is shown below:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
module WebhookHandler
|
14
41
|
extend ShopifyAPI::Webhooks::Handler
|
15
42
|
|
16
43
|
class << self
|
@@ -21,25 +48,23 @@ module WebhookHandler
|
|
21
48
|
end
|
22
49
|
```
|
23
50
|
|
24
|
-
**Note:** It is recommended that in order to respond quickly to the Shopify webhook request that the handler not do any heavy logic or network calls, rather it should simply enqueue the work in some job queue in order to be executed later.
|
25
|
-
|
26
51
|
## Add to Webhook Registry
|
27
52
|
|
28
53
|
The next step is to add all the webhooks you would like to subscribe to for any shop to the webhook registry. To do this you can call `ShopifyAPI::Webhooks::Registry.add_registration` for each webhook you would like to handle. `add_registration` accepts a topic string, a delivery_method symbol (currently supporting `:http`, `:event_bridge`, and `:pub_sub`), a webhook path (the relative path for an http webhook) and a handler. This only needs to be done once when the app is started and we recommend doing this at the same time that you setup `ShopifyAPI::Context`. An example is shown below to register an http webhook:
|
29
54
|
|
30
55
|
```ruby
|
31
|
-
registration = ShopifyAPI::Webhooks::Registry.add_registration(topic: "orders/create",
|
56
|
+
registration = ShopifyAPI::Webhooks::Registry.add_registration(topic: "orders/create",
|
32
57
|
delivery_method: :http,
|
33
58
|
handler: WebhookHandler,
|
34
|
-
path: 'callback/orders/create')
|
59
|
+
path: 'callback/orders/create')
|
35
60
|
```
|
36
61
|
If you are only interested in particular fields, you can optionally filter the data sent by Shopify by specifying the `fields` parameter. Note that you will still receive a webhook request from Shopify every time the resource is updated, but only the specified fields will be sent:
|
37
62
|
|
38
63
|
```ruby
|
39
64
|
registration = ShopifyAPI::Webhooks::Registry.add_registration(
|
40
|
-
topic: "orders/create",
|
41
|
-
delivery_method: :http,
|
42
|
-
handler: WebhookHandler,
|
65
|
+
topic: "orders/create",
|
66
|
+
delivery_method: :http,
|
67
|
+
handler: WebhookHandler,
|
43
68
|
path: 'callback/orders/create',
|
44
69
|
fields: ["number","note"] # this can also be a single comma separated string
|
45
70
|
)
|
@@ -5,6 +5,7 @@ module ShopifyAPI
|
|
5
5
|
module AdminVersions
|
6
6
|
SUPPORTED_ADMIN_VERSIONS = T.let([
|
7
7
|
"unstable",
|
8
|
+
"2024-01",
|
8
9
|
"2023-10",
|
9
10
|
"2023-07",
|
10
11
|
"2023-04",
|
@@ -15,7 +16,7 @@ module ShopifyAPI
|
|
15
16
|
"2022-01",
|
16
17
|
], T::Array[String])
|
17
18
|
|
18
|
-
LATEST_SUPPORTED_ADMIN_VERSION = T.let("
|
19
|
+
LATEST_SUPPORTED_ADMIN_VERSION = T.let("2024-01", String)
|
19
20
|
end
|
20
21
|
|
21
22
|
SUPPORTED_ADMIN_VERSIONS = ShopifyAPI::AdminVersions::SUPPORTED_ADMIN_VERSIONS
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module ShopifyAPI
|
5
|
+
module Auth
|
6
|
+
module Oauth
|
7
|
+
class AccessTokenResponse < T::Struct
|
8
|
+
extend T::Sig
|
9
|
+
|
10
|
+
const :access_token, String
|
11
|
+
const :scope, String
|
12
|
+
const :session, T.nilable(String)
|
13
|
+
const :expires_in, T.nilable(Integer)
|
14
|
+
const :associated_user, T.nilable(AssociatedUser)
|
15
|
+
const :associated_user_scope, T.nilable(String)
|
16
|
+
|
17
|
+
sig { returns(T::Boolean) }
|
18
|
+
def online_token?
|
19
|
+
!associated_user.nil?
|
20
|
+
end
|
21
|
+
|
22
|
+
alias_method :eql?, :==
|
23
|
+
sig { params(other: T.nilable(AccessTokenResponse)).returns(T::Boolean) }
|
24
|
+
def ==(other)
|
25
|
+
return false unless other
|
26
|
+
|
27
|
+
access_token == other.access_token &&
|
28
|
+
scope == other.scope &&
|
29
|
+
session == other.session &&
|
30
|
+
expires_in == other.expires_in &&
|
31
|
+
associated_user == other.associated_user &&
|
32
|
+
associated_user_scope == other.associated_user_scope
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -89,7 +89,8 @@ module ShopifyAPI
|
|
89
89
|
end
|
90
90
|
|
91
91
|
session_params = T.cast(response.body, T::Hash[String, T.untyped]).to_h
|
92
|
-
session =
|
92
|
+
session = Session.from(shop: auth_query.shop,
|
93
|
+
access_token_response: Oauth::AccessTokenResponse.from_hash(session_params))
|
93
94
|
|
94
95
|
cookie = if Context.embedded?
|
95
96
|
SessionCookie.new(
|
@@ -105,38 +106,6 @@ module ShopifyAPI
|
|
105
106
|
|
106
107
|
{ session: session, cookie: cookie }
|
107
108
|
end
|
108
|
-
|
109
|
-
private
|
110
|
-
|
111
|
-
sig { params(session_params: T::Hash[String, T.untyped], shop: String).returns(Session) }
|
112
|
-
def create_new_session(session_params, shop)
|
113
|
-
session_params = session_params.to_h { |k, v| [k.to_sym, v] }
|
114
|
-
|
115
|
-
scope = session_params[:scope]
|
116
|
-
|
117
|
-
is_online = !session_params[:associated_user].nil?
|
118
|
-
|
119
|
-
if is_online
|
120
|
-
associated_user = AssociatedUser.new(session_params[:associated_user].to_h { |k, v| [k.to_sym, v] })
|
121
|
-
expires = Time.now + session_params[:expires_in].to_i
|
122
|
-
associated_user_scope = session_params[:associated_user_scope]
|
123
|
-
id = "#{shop}_#{associated_user.id}"
|
124
|
-
else
|
125
|
-
id = "offline_#{shop}"
|
126
|
-
end
|
127
|
-
|
128
|
-
Session.new(
|
129
|
-
id: id,
|
130
|
-
shop: shop,
|
131
|
-
access_token: session_params[:access_token],
|
132
|
-
scope: scope,
|
133
|
-
is_online: is_online,
|
134
|
-
associated_user_scope: associated_user_scope,
|
135
|
-
associated_user: associated_user,
|
136
|
-
expires: expires,
|
137
|
-
shopify_session_id: session_params[:session],
|
138
|
-
)
|
139
|
-
end
|
140
109
|
end
|
141
110
|
end
|
142
111
|
end
|
@@ -89,6 +89,32 @@ module ShopifyAPI
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
+
sig { params(shop: String, access_token_response: Oauth::AccessTokenResponse).returns(Session) }
|
93
|
+
def from(shop:, access_token_response:)
|
94
|
+
is_online = access_token_response.online_token?
|
95
|
+
|
96
|
+
if is_online
|
97
|
+
associated_user = T.must(access_token_response.associated_user)
|
98
|
+
expires = Time.now + access_token_response.expires_in.to_i
|
99
|
+
associated_user_scope = access_token_response.associated_user_scope
|
100
|
+
id = "#{shop}_#{associated_user.id}"
|
101
|
+
else
|
102
|
+
id = "offline_#{shop}"
|
103
|
+
end
|
104
|
+
|
105
|
+
new(
|
106
|
+
id: id,
|
107
|
+
shop: shop,
|
108
|
+
access_token: access_token_response.access_token,
|
109
|
+
scope: access_token_response.scope,
|
110
|
+
is_online: is_online,
|
111
|
+
associated_user_scope: associated_user_scope,
|
112
|
+
associated_user: associated_user,
|
113
|
+
expires: expires,
|
114
|
+
shopify_session_id: access_token_response.session,
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
92
118
|
sig { params(str: String).returns(Session) }
|
93
119
|
def deserialize(str)
|
94
120
|
Oj.load(str)
|