shopify_api 13.0.0 → 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/CODEOWNERS +1 -1
- data/.github/workflows/build.yml +4 -1
- data/.rubocop.yml +2 -0
- data/BREAKING_CHANGES_FOR_V10.md +231 -0
- data/CHANGELOG.md +38 -1
- data/CODE_OF_CONDUCT.md +46 -0
- data/CONTRIBUTING.md +25 -0
- data/Gemfile.lock +56 -54
- data/README.md +10 -41
- data/ROADMAP.md +10 -0
- data/dev.yml +3 -2
- data/docs/README.md +0 -1
- data/docs/getting_started.md +21 -11
- data/docs/usage/custom_apps.md +75 -0
- data/docs/usage/graphql.md +91 -17
- data/docs/usage/oauth.md +160 -27
- data/docs/usage/rest.md +269 -59
- data/docs/usage/webhooks.md +54 -11
- data/lib/shopify_api/admin_versions.rb +4 -1
- data/lib/shopify_api/auth/jwt_payload.rb +2 -2
- data/lib/shopify_api/auth/oauth/access_token_response.rb +37 -0
- data/lib/shopify_api/auth/oauth.rb +17 -38
- data/lib/shopify_api/auth/session.rb +31 -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 +12 -3
- data/lib/shopify_api/clients/http_response.rb +29 -2
- data/lib/shopify_api/context.rb +19 -5
- data/lib/shopify_api/logger.rb +1 -1
- data/lib/shopify_api/rest/base.rb +112 -29
- 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 +10 -10
- 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 +9 -5
- 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 +10 -10
- 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 +9 -5
- 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 +12 -6
- 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 +17 -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 +10 -10
- data/lib/shopify_api/rest/resources/2022_10/fulfillment_request.rb +17 -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 +12 -6
- 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 +9 -8
- 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 +12 -6
- data/lib/shopify_api/rest/resources/2023_01/balance.rb +11 -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 +17 -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 +15 -13
- data/lib/shopify_api/rest/resources/2023_01/fulfillment_request.rb +17 -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 +10 -3
- data/lib/shopify_api/rest/resources/2023_01/order_risk.rb +12 -6
- 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 +9 -8
- 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 +8 -8
- 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 +12 -6
- data/lib/shopify_api/rest/resources/2023_04/balance.rb +11 -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 +17 -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 +17 -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 +10 -9
- data/lib/shopify_api/rest/resources/2023_04/order_risk.rb +12 -6
- 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 +9 -8
- 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 +8 -8
- data/lib/shopify_api/rest/resources/2023_04/webhook.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2023_07/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2023_07/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2023_07/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2023_07/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2023_07/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2023_07/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2023_07/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2023_07/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2023_07/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2023_07/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_07/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2023_07/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/{2022_07/customer_saved_search.rb → 2023_07/collect.rb} +29 -52
- data/lib/shopify_api/rest/resources/2023_07/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2023_07/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2023_07/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2023_07/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2023_07/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2023_07/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2023_07/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2023_07/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/{2022_10 → 2023_07}/customer_saved_search.rb +7 -3
- data/lib/shopify_api/rest/resources/2023_07/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2023_07/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2023_07/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2023_07/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2023_07/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2023_07/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2023_07/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2023_07/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_event.rb +170 -0
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_order.rb +318 -0
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2023_07/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2023_07/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2023_07/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2023_07/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2023_07/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2023_07/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2023_07/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2023_07/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2023_07/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2023_07/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2023_07/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2023_07/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2023_07/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2023_07/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2023_07/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2023_07/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2023_07/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2023_07/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2023_07/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2023_07/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2023_07/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2023_07/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2023_07/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2023_07/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2023_07/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2023_07/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2023_07/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_07/report.rb +125 -0
- data/lib/shopify_api/rest/resources/2023_07/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2023_07/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2023_07/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_07/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2023_07/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2023_07/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2023_07/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_07/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2023_07/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2023_07/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2023_07/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2023_07/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2023_07/webhook.rb +172 -0
- data/lib/shopify_api/rest/resources/2023_10/abandoned_checkout.rb +194 -0
- data/lib/shopify_api/rest/resources/2023_10/access_scope.rb +62 -0
- data/lib/shopify_api/rest/resources/2023_10/apple_pay_certificate.rb +109 -0
- data/lib/shopify_api/rest/resources/2023_10/application_charge.rb +113 -0
- data/lib/shopify_api/rest/resources/2023_10/application_credit.rb +95 -0
- data/lib/shopify_api/rest/resources/2023_10/article.rb +269 -0
- data/lib/shopify_api/rest/resources/2023_10/asset.rb +122 -0
- data/lib/shopify_api/rest/resources/2023_10/assigned_fulfillment_order.rb +92 -0
- data/lib/shopify_api/rest/resources/2023_10/balance.rb +58 -0
- data/lib/shopify_api/rest/resources/2023_10/blog.rb +166 -0
- data/lib/shopify_api/rest/resources/2023_10/cancellation_request.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_10/carrier_service.rb +120 -0
- data/lib/shopify_api/rest/resources/2023_10/checkout.rb +213 -0
- data/lib/shopify_api/rest/resources/2023_10/collect.rb +146 -0
- data/lib/shopify_api/rest/resources/2023_10/collection.rb +114 -0
- data/lib/shopify_api/rest/resources/2023_10/collection_listing.rb +159 -0
- data/lib/shopify_api/rest/resources/2023_10/comment.rb +287 -0
- data/lib/shopify_api/rest/resources/2023_10/country.rb +141 -0
- data/lib/shopify_api/rest/resources/2023_10/currency.rb +61 -0
- data/lib/shopify_api/rest/resources/2023_10/custom_collection.rb +191 -0
- data/lib/shopify_api/rest/resources/2023_10/customer.rb +333 -0
- data/lib/shopify_api/rest/resources/2023_10/customer_address.rb +215 -0
- data/lib/shopify_api/rest/resources/2023_10/deprecated_api_call.rb +61 -0
- data/lib/shopify_api/rest/resources/2023_10/discount_code.rb +226 -0
- data/lib/shopify_api/rest/resources/2023_10/dispute.rb +115 -0
- data/lib/shopify_api/rest/resources/2023_10/dispute_evidence.rb +121 -0
- data/lib/shopify_api/rest/resources/2023_10/dispute_file_upload.rb +85 -0
- data/lib/shopify_api/rest/resources/2023_10/draft_order.rb +279 -0
- data/lib/shopify_api/rest/resources/2023_10/event.rb +152 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment.rb +235 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_event.rb +170 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_order.rb +318 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_request.rb +101 -0
- data/lib/shopify_api/rest/resources/2023_10/fulfillment_service.rb +134 -0
- data/lib/shopify_api/rest/resources/2023_10/gift_card.rb +222 -0
- data/lib/shopify_api/rest/resources/2023_10/gift_card_adjustment.rb +122 -0
- data/lib/shopify_api/rest/resources/2023_10/image.rb +161 -0
- data/lib/shopify_api/rest/resources/2023_10/inventory_item.rb +112 -0
- data/lib/shopify_api/rest/resources/2023_10/inventory_level.rb +183 -0
- data/lib/shopify_api/rest/resources/2023_10/location.rb +171 -0
- data/lib/shopify_api/rest/resources/2023_10/locations_for_move.rb +60 -0
- data/lib/shopify_api/rest/resources/2023_10/marketing_event.rb +213 -0
- data/lib/shopify_api/rest/resources/2023_10/metafield.rb +348 -0
- data/lib/shopify_api/rest/resources/2023_10/mobile_platform_application.rb +114 -0
- data/lib/shopify_api/rest/resources/2023_10/order.rb +489 -0
- data/lib/shopify_api/rest/resources/2023_10/order_risk.rb +148 -0
- data/lib/shopify_api/rest/resources/2023_10/page.rb +198 -0
- data/lib/shopify_api/rest/resources/2023_10/payment.rb +144 -0
- data/lib/shopify_api/rest/resources/2023_10/payment_gateway.rb +147 -0
- data/lib/shopify_api/rest/resources/2023_10/payment_transaction.rb +114 -0
- data/lib/shopify_api/rest/resources/2023_10/payout.rb +101 -0
- data/lib/shopify_api/rest/resources/2023_10/policy.rb +73 -0
- data/lib/shopify_api/rest/resources/2023_10/price_rule.rb +227 -0
- data/lib/shopify_api/rest/resources/2023_10/product.rb +227 -0
- data/lib/shopify_api/rest/resources/2023_10/product_listing.rb +200 -0
- data/lib/shopify_api/rest/resources/2023_10/product_resource_feedback.rb +92 -0
- data/lib/shopify_api/rest/resources/2023_10/province.rb +136 -0
- data/lib/shopify_api/rest/resources/2023_10/recurring_application_charge.rb +176 -0
- data/lib/shopify_api/rest/resources/2023_10/redirect.rb +143 -0
- data/lib/shopify_api/rest/resources/2023_10/refund.rb +155 -0
- data/lib/shopify_api/rest/resources/2023_10/report.rb +125 -0
- data/lib/shopify_api/rest/resources/2023_10/resource_feedback.rb +77 -0
- data/lib/shopify_api/rest/resources/2023_10/script_tag.rb +159 -0
- data/lib/shopify_api/rest/resources/2023_10/shipping_zone.rb +87 -0
- data/lib/shopify_api/rest/resources/2023_10/shop.rb +222 -0
- data/lib/shopify_api/rest/resources/2023_10/smart_collection.rb +220 -0
- data/lib/shopify_api/rest/resources/2023_10/storefront_access_token.rb +91 -0
- data/lib/shopify_api/rest/resources/2023_10/tender_transaction.rb +97 -0
- data/lib/shopify_api/rest/resources/2023_10/theme.rb +127 -0
- data/lib/shopify_api/rest/resources/2023_10/transaction.rb +188 -0
- data/lib/shopify_api/rest/resources/2023_10/usage_charge.rb +106 -0
- data/lib/shopify_api/rest/resources/2023_10/user.rb +142 -0
- data/lib/shopify_api/rest/resources/2023_10/variant.rb +212 -0
- data/lib/shopify_api/rest/resources/2023_10/webhook.rb +172 -0
- 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/2024_01/collect.rb +146 -0
- 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/2024_01/script_tag.rb +159 -0
- 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 +2 -2
- data/lib/shopify_api/version.rb +1 -1
- data/lib/shopify_api/webhooks/handler.rb +24 -1
- data/lib/shopify_api/webhooks/registration.rb +21 -6
- 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 +49 -7
- data/lib/shopify_api/webhooks/request.rb +10 -0
- data/shopify_api.gemspec +2 -3
- metadata +234 -29
- data/.github/workflows/stale.yml +0 -43
- data/docs/issues.md +0 -39
- data/docs/usage/session_storage.md +0 -46
@@ -0,0 +1,212 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class Variant < ShopifyAPI::Rest::Base
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
13
|
+
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
14
|
+
|
15
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@barcode = T.let(nil, T.nilable(String))
|
22
|
+
@compare_at_price = T.let(nil, T.nilable(String))
|
23
|
+
@created_at = T.let(nil, T.nilable(String))
|
24
|
+
@fulfillment_service = T.let(nil, T.nilable(String))
|
25
|
+
@grams = T.let(nil, T.nilable(Integer))
|
26
|
+
@id = T.let(nil, T.nilable(Integer))
|
27
|
+
@image_id = T.let(nil, T.nilable(Integer))
|
28
|
+
@inventory_item_id = T.let(nil, T.nilable(Integer))
|
29
|
+
@inventory_management = T.let(nil, T.nilable(String))
|
30
|
+
@inventory_policy = T.let(nil, T.nilable(String))
|
31
|
+
@inventory_quantity = T.let(nil, T.nilable(Integer))
|
32
|
+
@old_inventory_quantity = T.let(nil, T.nilable(Integer))
|
33
|
+
@option = T.let(nil, T.nilable(T::Hash[T.untyped, T.untyped]))
|
34
|
+
@position = T.let(nil, T.nilable(Integer))
|
35
|
+
@presentment_prices = T.let(nil, T.nilable(T::Array[T.untyped]))
|
36
|
+
@price = T.let(nil, T.nilable(String))
|
37
|
+
@product_id = T.let(nil, T.nilable(Integer))
|
38
|
+
@requires_shipping = T.let(nil, T.nilable(T::Boolean))
|
39
|
+
@sku = T.let(nil, T.nilable(String))
|
40
|
+
@tax_code = T.let(nil, T.nilable(String))
|
41
|
+
@taxable = T.let(nil, T.nilable(T::Boolean))
|
42
|
+
@title = T.let(nil, T.nilable(String))
|
43
|
+
@updated_at = T.let(nil, T.nilable(String))
|
44
|
+
@weight = T.let(nil, T.nilable(Float))
|
45
|
+
@weight_unit = T.let(nil, T.nilable(String))
|
46
|
+
|
47
|
+
super(session: session, from_hash: from_hash)
|
48
|
+
end
|
49
|
+
|
50
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
51
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
52
|
+
@paths = T.let([
|
53
|
+
{http_method: :delete, operation: :delete, ids: [:product_id, :id], path: "products/<product_id>/variants/<id>.json"},
|
54
|
+
{http_method: :get, operation: :count, ids: [:product_id], path: "products/<product_id>/variants/count.json"},
|
55
|
+
{http_method: :get, operation: :get, ids: [:product_id], path: "products/<product_id>/variants.json"},
|
56
|
+
{http_method: :get, operation: :get, ids: [:id], path: "variants/<id>.json"},
|
57
|
+
{http_method: :post, operation: :post, ids: [:product_id], path: "products/<product_id>/variants.json"},
|
58
|
+
{http_method: :put, operation: :put, ids: [:id], path: "variants/<id>.json"}
|
59
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
60
|
+
@read_only_attributes = T.let([
|
61
|
+
:inventory_quantity
|
62
|
+
], T::Array[Symbol])
|
63
|
+
|
64
|
+
sig { returns(T.nilable(String)) }
|
65
|
+
attr_reader :barcode
|
66
|
+
sig { returns(T.nilable(String)) }
|
67
|
+
attr_reader :compare_at_price
|
68
|
+
sig { returns(T.nilable(String)) }
|
69
|
+
attr_reader :created_at
|
70
|
+
sig { returns(T.nilable(String)) }
|
71
|
+
attr_reader :fulfillment_service
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
73
|
+
attr_reader :grams
|
74
|
+
sig { returns(T.nilable(Integer)) }
|
75
|
+
attr_reader :id
|
76
|
+
sig { returns(T.nilable(Integer)) }
|
77
|
+
attr_reader :image_id
|
78
|
+
sig { returns(T.nilable(Integer)) }
|
79
|
+
attr_reader :inventory_item_id
|
80
|
+
sig { returns(T.nilable(String)) }
|
81
|
+
attr_reader :inventory_management
|
82
|
+
sig { returns(T.nilable(String)) }
|
83
|
+
attr_reader :inventory_policy
|
84
|
+
sig { returns(T.nilable(Integer)) }
|
85
|
+
attr_reader :inventory_quantity
|
86
|
+
sig { returns(T.nilable(Integer)) }
|
87
|
+
attr_reader :old_inventory_quantity
|
88
|
+
sig { returns(T.nilable(T::Hash[T.untyped, T.untyped])) }
|
89
|
+
attr_reader :option
|
90
|
+
sig { returns(T.nilable(Integer)) }
|
91
|
+
attr_reader :position
|
92
|
+
sig { returns(T.nilable(T::Array[T::Hash[T.untyped, T.untyped]])) }
|
93
|
+
attr_reader :presentment_prices
|
94
|
+
sig { returns(T.nilable(String)) }
|
95
|
+
attr_reader :price
|
96
|
+
sig { returns(T.nilable(Integer)) }
|
97
|
+
attr_reader :product_id
|
98
|
+
sig { returns(T.nilable(T::Boolean)) }
|
99
|
+
attr_reader :requires_shipping
|
100
|
+
sig { returns(T.nilable(String)) }
|
101
|
+
attr_reader :sku
|
102
|
+
sig { returns(T.nilable(String)) }
|
103
|
+
attr_reader :tax_code
|
104
|
+
sig { returns(T.nilable(T::Boolean)) }
|
105
|
+
attr_reader :taxable
|
106
|
+
sig { returns(T.nilable(String)) }
|
107
|
+
attr_reader :title
|
108
|
+
sig { returns(T.nilable(String)) }
|
109
|
+
attr_reader :updated_at
|
110
|
+
sig { returns(T.nilable(Float)) }
|
111
|
+
attr_reader :weight
|
112
|
+
sig { returns(T.nilable(String)) }
|
113
|
+
attr_reader :weight_unit
|
114
|
+
|
115
|
+
class << self
|
116
|
+
sig do
|
117
|
+
params(
|
118
|
+
id: T.any(Integer, String),
|
119
|
+
fields: T.untyped,
|
120
|
+
session: Auth::Session
|
121
|
+
).returns(T.nilable(Variant))
|
122
|
+
end
|
123
|
+
def find(
|
124
|
+
id:,
|
125
|
+
fields: nil,
|
126
|
+
session: ShopifyAPI::Context.active_session
|
127
|
+
)
|
128
|
+
result = base_find(
|
129
|
+
session: session,
|
130
|
+
ids: {id: id},
|
131
|
+
params: {fields: fields},
|
132
|
+
)
|
133
|
+
T.cast(result[0], T.nilable(Variant))
|
134
|
+
end
|
135
|
+
|
136
|
+
sig do
|
137
|
+
params(
|
138
|
+
id: T.any(Integer, String),
|
139
|
+
product_id: T.nilable(T.any(Integer, String)),
|
140
|
+
session: Auth::Session
|
141
|
+
).returns(T.untyped)
|
142
|
+
end
|
143
|
+
def delete(
|
144
|
+
id:,
|
145
|
+
product_id: nil,
|
146
|
+
session: ShopifyAPI::Context.active_session
|
147
|
+
)
|
148
|
+
request(
|
149
|
+
http_method: :delete,
|
150
|
+
operation: :delete,
|
151
|
+
session: session,
|
152
|
+
ids: {id: id, product_id: product_id},
|
153
|
+
params: {},
|
154
|
+
)
|
155
|
+
end
|
156
|
+
|
157
|
+
sig do
|
158
|
+
params(
|
159
|
+
product_id: T.nilable(T.any(Integer, String)),
|
160
|
+
limit: T.untyped,
|
161
|
+
presentment_currencies: T.untyped,
|
162
|
+
since_id: T.untyped,
|
163
|
+
fields: T.untyped,
|
164
|
+
session: Auth::Session,
|
165
|
+
kwargs: T.untyped
|
166
|
+
).returns(T::Array[Variant])
|
167
|
+
end
|
168
|
+
def all(
|
169
|
+
product_id: nil,
|
170
|
+
limit: nil,
|
171
|
+
presentment_currencies: nil,
|
172
|
+
since_id: nil,
|
173
|
+
fields: nil,
|
174
|
+
session: ShopifyAPI::Context.active_session,
|
175
|
+
**kwargs
|
176
|
+
)
|
177
|
+
response = base_find(
|
178
|
+
session: session,
|
179
|
+
ids: {product_id: product_id},
|
180
|
+
params: {limit: limit, presentment_currencies: presentment_currencies, since_id: since_id, fields: fields}.merge(kwargs).compact,
|
181
|
+
)
|
182
|
+
|
183
|
+
T.cast(response, T::Array[Variant])
|
184
|
+
end
|
185
|
+
|
186
|
+
sig do
|
187
|
+
params(
|
188
|
+
product_id: T.nilable(T.any(Integer, String)),
|
189
|
+
session: Auth::Session,
|
190
|
+
kwargs: T.untyped
|
191
|
+
).returns(T.untyped)
|
192
|
+
end
|
193
|
+
def count(
|
194
|
+
product_id: nil,
|
195
|
+
session: ShopifyAPI::Context.active_session,
|
196
|
+
**kwargs
|
197
|
+
)
|
198
|
+
request(
|
199
|
+
http_method: :get,
|
200
|
+
operation: :count,
|
201
|
+
session: session,
|
202
|
+
ids: {product_id: product_id},
|
203
|
+
params: {}.merge(kwargs).compact,
|
204
|
+
body: {},
|
205
|
+
entity: nil,
|
206
|
+
)
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
212
|
+
end
|
@@ -0,0 +1,172 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
########################################################################################################################
|
5
|
+
# This file is auto-generated. If you have an issue, please create a GitHub issue. #
|
6
|
+
########################################################################################################################
|
7
|
+
|
8
|
+
module ShopifyAPI
|
9
|
+
class Webhook < ShopifyAPI::Rest::Base
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
@prev_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
13
|
+
@next_page_info = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
14
|
+
|
15
|
+
@api_call_limit = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
16
|
+
@retry_request_after = T.let(Concurrent::ThreadLocalVar.new { nil }, Concurrent::ThreadLocalVar)
|
17
|
+
|
18
|
+
sig { params(session: T.nilable(ShopifyAPI::Auth::Session), from_hash: T.nilable(T::Hash[T.untyped, T.untyped])).void }
|
19
|
+
def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)
|
20
|
+
|
21
|
+
@address = T.let(nil, T.nilable(String))
|
22
|
+
@topic = T.let(nil, T.nilable(String))
|
23
|
+
@api_version = T.let(nil, T.nilable(String))
|
24
|
+
@created_at = T.let(nil, T.nilable(String))
|
25
|
+
@fields = T.let(nil, T.nilable(T::Array[T.untyped]))
|
26
|
+
@format = T.let(nil, T.nilable(String))
|
27
|
+
@id = T.let(nil, T.nilable(Integer))
|
28
|
+
@metafield_namespaces = T.let(nil, T.nilable(T::Array[T.untyped]))
|
29
|
+
@private_metafield_namespaces = T.let(nil, T.nilable(T::Array[T.untyped]))
|
30
|
+
@updated_at = T.let(nil, T.nilable(String))
|
31
|
+
|
32
|
+
super(session: session, from_hash: from_hash)
|
33
|
+
end
|
34
|
+
|
35
|
+
@has_one = T.let({}, T::Hash[Symbol, Class])
|
36
|
+
@has_many = T.let({}, T::Hash[Symbol, Class])
|
37
|
+
@paths = T.let([
|
38
|
+
{http_method: :delete, operation: :delete, ids: [:id], path: "webhooks/<id>.json"},
|
39
|
+
{http_method: :get, operation: :count, ids: [], path: "webhooks/count.json"},
|
40
|
+
{http_method: :get, operation: :get, ids: [], path: "webhooks.json"},
|
41
|
+
{http_method: :get, operation: :get, ids: [:id], path: "webhooks/<id>.json"},
|
42
|
+
{http_method: :post, operation: :post, ids: [], path: "webhooks.json"},
|
43
|
+
{http_method: :put, operation: :put, ids: [:id], path: "webhooks/<id>.json"}
|
44
|
+
], T::Array[T::Hash[String, T.any(T::Array[Symbol], String, Symbol)]])
|
45
|
+
|
46
|
+
sig { returns(T.nilable(String)) }
|
47
|
+
attr_reader :address
|
48
|
+
sig { returns(T.nilable(String)) }
|
49
|
+
attr_reader :topic
|
50
|
+
sig { returns(T.nilable(String)) }
|
51
|
+
attr_reader :api_version
|
52
|
+
sig { returns(T.nilable(String)) }
|
53
|
+
attr_reader :created_at
|
54
|
+
sig { returns(T.nilable(T::Array[String])) }
|
55
|
+
attr_reader :fields
|
56
|
+
sig { returns(T.nilable(String)) }
|
57
|
+
attr_reader :format
|
58
|
+
sig { returns(T.nilable(Integer)) }
|
59
|
+
attr_reader :id
|
60
|
+
sig { returns(T.nilable(T::Array[String])) }
|
61
|
+
attr_reader :metafield_namespaces
|
62
|
+
sig { returns(T.nilable(T::Array[String])) }
|
63
|
+
attr_reader :private_metafield_namespaces
|
64
|
+
sig { returns(T.nilable(String)) }
|
65
|
+
attr_reader :updated_at
|
66
|
+
|
67
|
+
class << self
|
68
|
+
sig do
|
69
|
+
params(
|
70
|
+
id: T.any(Integer, String),
|
71
|
+
fields: T.untyped,
|
72
|
+
session: Auth::Session
|
73
|
+
).returns(T.nilable(Webhook))
|
74
|
+
end
|
75
|
+
def find(
|
76
|
+
id:,
|
77
|
+
fields: nil,
|
78
|
+
session: ShopifyAPI::Context.active_session
|
79
|
+
)
|
80
|
+
result = base_find(
|
81
|
+
session: session,
|
82
|
+
ids: {id: id},
|
83
|
+
params: {fields: fields},
|
84
|
+
)
|
85
|
+
T.cast(result[0], T.nilable(Webhook))
|
86
|
+
end
|
87
|
+
|
88
|
+
sig do
|
89
|
+
params(
|
90
|
+
id: T.any(Integer, String),
|
91
|
+
session: Auth::Session
|
92
|
+
).returns(T.untyped)
|
93
|
+
end
|
94
|
+
def delete(
|
95
|
+
id:,
|
96
|
+
session: ShopifyAPI::Context.active_session
|
97
|
+
)
|
98
|
+
request(
|
99
|
+
http_method: :delete,
|
100
|
+
operation: :delete,
|
101
|
+
session: session,
|
102
|
+
ids: {id: id},
|
103
|
+
params: {},
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
107
|
+
sig do
|
108
|
+
params(
|
109
|
+
address: T.untyped,
|
110
|
+
created_at_max: T.untyped,
|
111
|
+
created_at_min: T.untyped,
|
112
|
+
fields: T.untyped,
|
113
|
+
limit: T.untyped,
|
114
|
+
since_id: T.untyped,
|
115
|
+
topic: T.untyped,
|
116
|
+
updated_at_min: T.untyped,
|
117
|
+
updated_at_max: T.untyped,
|
118
|
+
session: Auth::Session,
|
119
|
+
kwargs: T.untyped
|
120
|
+
).returns(T::Array[Webhook])
|
121
|
+
end
|
122
|
+
def all(
|
123
|
+
address: nil,
|
124
|
+
created_at_max: nil,
|
125
|
+
created_at_min: nil,
|
126
|
+
fields: nil,
|
127
|
+
limit: nil,
|
128
|
+
since_id: nil,
|
129
|
+
topic: nil,
|
130
|
+
updated_at_min: nil,
|
131
|
+
updated_at_max: nil,
|
132
|
+
session: ShopifyAPI::Context.active_session,
|
133
|
+
**kwargs
|
134
|
+
)
|
135
|
+
response = base_find(
|
136
|
+
session: session,
|
137
|
+
ids: {},
|
138
|
+
params: {address: address, created_at_max: created_at_max, created_at_min: created_at_min, fields: fields, limit: limit, since_id: since_id, topic: topic, updated_at_min: updated_at_min, updated_at_max: updated_at_max}.merge(kwargs).compact,
|
139
|
+
)
|
140
|
+
|
141
|
+
T.cast(response, T::Array[Webhook])
|
142
|
+
end
|
143
|
+
|
144
|
+
sig do
|
145
|
+
params(
|
146
|
+
address: T.untyped,
|
147
|
+
topic: T.untyped,
|
148
|
+
session: Auth::Session,
|
149
|
+
kwargs: T.untyped
|
150
|
+
).returns(T.untyped)
|
151
|
+
end
|
152
|
+
def count(
|
153
|
+
address: nil,
|
154
|
+
topic: nil,
|
155
|
+
session: ShopifyAPI::Context.active_session,
|
156
|
+
**kwargs
|
157
|
+
)
|
158
|
+
request(
|
159
|
+
http_method: :get,
|
160
|
+
operation: :count,
|
161
|
+
session: session,
|
162
|
+
ids: {},
|
163
|
+
params: {address: address, topic: topic}.merge(kwargs).compact,
|
164
|
+
body: {},
|
165
|
+
entity: nil,
|
166
|
+
)
|
167
|
+
end
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "hash_diff"
|
5
|
+
|
6
|
+
module ShopifyAPI
|
7
|
+
module Utils
|
8
|
+
module AttributesComparator
|
9
|
+
class << self
|
10
|
+
extend T::Sig
|
11
|
+
|
12
|
+
sig do
|
13
|
+
params(
|
14
|
+
original_attributes: T::Hash[String, T.untyped],
|
15
|
+
updated_attributes: T::Hash[String, T.untyped],
|
16
|
+
).returns(T::Hash[String, T.untyped])
|
17
|
+
end
|
18
|
+
def compare(original_attributes, updated_attributes)
|
19
|
+
attributes_diff = HashDiff::Comparison.new(
|
20
|
+
original_attributes,
|
21
|
+
updated_attributes,
|
22
|
+
).left_diff
|
23
|
+
|
24
|
+
update_value = build_update_value(
|
25
|
+
attributes_diff,
|
26
|
+
reference_values: updated_attributes,
|
27
|
+
)
|
28
|
+
|
29
|
+
update_value
|
30
|
+
end
|
31
|
+
|
32
|
+
sig do
|
33
|
+
params(
|
34
|
+
diff: T::Hash[String, T.untyped],
|
35
|
+
path: T::Array[String],
|
36
|
+
reference_values: T::Hash[String, T.untyped],
|
37
|
+
).returns(T::Hash[String, T.untyped])
|
38
|
+
end
|
39
|
+
def build_update_value(diff, path: [], reference_values: {})
|
40
|
+
new_hash = {}
|
41
|
+
|
42
|
+
diff.each do |key, value|
|
43
|
+
current_path = path + [key.to_s]
|
44
|
+
|
45
|
+
if value.is_a?(Hash)
|
46
|
+
has_numbered_key = value.keys.any? { |k| k.is_a?(Integer) }
|
47
|
+
ref_value = T.unsafe(reference_values).dig(*current_path)
|
48
|
+
|
49
|
+
if has_numbered_key && ref_value.is_a?(Array)
|
50
|
+
new_hash[key] = ref_value
|
51
|
+
else
|
52
|
+
new_value = build_update_value(value, path: current_path, reference_values: reference_values)
|
53
|
+
|
54
|
+
# Only add to new_hash if the user intentionally updates
|
55
|
+
# to empty value like `{}` or `[]`. For example:
|
56
|
+
#
|
57
|
+
# original = { "a" => { "foo" => 1 } }
|
58
|
+
# updated = { "a" => {} }
|
59
|
+
# diff = { "a" => { "foo" => HashDiff::NO_VALUE } }
|
60
|
+
# key = "a", new_value = {}, ref_value = {}
|
61
|
+
# new_hash = { "a" => {} }
|
62
|
+
#
|
63
|
+
# In addition, we omit cases where after removing `HashDiff::NO_VALUE`
|
64
|
+
# we only have `{}` left. For example:
|
65
|
+
#
|
66
|
+
# original = { "a" => { "foo" => 1, "bar" => 2} }
|
67
|
+
# updated = { "a" => { "foo" => 1 } }
|
68
|
+
# diff = { "a" => { "bar" => HashDiff::NO_VALUE } }
|
69
|
+
# key = "a", new_value = {}, ref_value = { "foo" => 1 }
|
70
|
+
# new_hash = {}
|
71
|
+
#
|
72
|
+
# new_hash is empty because nothing changes
|
73
|
+
new_hash[key] = new_value if !new_value.empty? || ref_value.empty?
|
74
|
+
end
|
75
|
+
elsif value != HashDiff::NO_VALUE
|
76
|
+
new_hash[key] = value
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
new_hash
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -14,7 +14,7 @@ module ShopifyAPI
|
|
14
14
|
return false unless verifiable_query.hmac
|
15
15
|
|
16
16
|
result = validate_signature(verifiable_query, Context.api_secret_key)
|
17
|
-
if result || Context.old_api_secret_key.
|
17
|
+
if result || Context.old_api_secret_key.nil? || T.must(Context.old_api_secret_key).empty?
|
18
18
|
result
|
19
19
|
else
|
20
20
|
validate_signature(verifiable_query, T.must(Context.old_api_secret_key))
|
@@ -27,7 +27,7 @@ module ShopifyAPI
|
|
27
27
|
def validate_signature(verifiable_query, secret)
|
28
28
|
received_signature = verifiable_query.hmac
|
29
29
|
computed_signature = compute_signature(verifiable_query.to_signable_string, secret)
|
30
|
-
OpenSSL.secure_compare(computed_signature, received_signature)
|
30
|
+
OpenSSL.secure_compare(computed_signature, T.must(received_signature))
|
31
31
|
end
|
32
32
|
|
33
33
|
sig { params(signable_string: String, secret: String).returns(String) }
|
data/lib/shopify_api/version.rb
CHANGED
@@ -3,13 +3,36 @@
|
|
3
3
|
|
4
4
|
module ShopifyAPI
|
5
5
|
module Webhooks
|
6
|
+
class WebhookMetadata < T::Struct
|
7
|
+
const :topic, String
|
8
|
+
const :shop, String
|
9
|
+
const :body, T::Hash[String, T.untyped]
|
10
|
+
const :api_version, String
|
11
|
+
const :webhook_id, String
|
12
|
+
end
|
13
|
+
|
6
14
|
module Handler
|
15
|
+
include Kernel
|
7
16
|
extend T::Sig
|
8
17
|
extend T::Helpers
|
9
18
|
interface!
|
10
19
|
|
11
|
-
sig
|
20
|
+
sig do
|
21
|
+
abstract.params(topic: String, shop: String, body: T::Hash[String, T.untyped]).void
|
22
|
+
end
|
12
23
|
def handle(topic:, shop:, body:); end
|
13
24
|
end
|
25
|
+
|
26
|
+
module WebhookHandler
|
27
|
+
include Kernel
|
28
|
+
extend T::Sig
|
29
|
+
extend T::Helpers
|
30
|
+
interface!
|
31
|
+
|
32
|
+
sig do
|
33
|
+
abstract.params(data: WebhookMetadata).void
|
34
|
+
end
|
35
|
+
def handle(data:); end
|
36
|
+
end
|
14
37
|
end
|
15
38
|
end
|
@@ -13,22 +13,27 @@ module ShopifyAPI
|
|
13
13
|
sig { returns(String) }
|
14
14
|
attr_reader :topic
|
15
15
|
|
16
|
-
sig { returns(T.nilable(Handler)) }
|
16
|
+
sig { returns(T.nilable(T.any(Handler, WebhookHandler))) }
|
17
17
|
attr_reader :handler
|
18
18
|
|
19
19
|
sig { returns(T.nilable(T::Array[String])) }
|
20
20
|
attr_reader :fields
|
21
21
|
|
22
|
+
sig { returns(T.nilable(T::Array[String])) }
|
23
|
+
attr_reader :metafield_namespaces
|
24
|
+
|
22
25
|
sig do
|
23
|
-
params(topic: String, path: String, handler: T.nilable(Handler),
|
24
|
-
fields: T.nilable(T.any(String, T::Array[String]))
|
26
|
+
params(topic: String, path: String, handler: T.nilable(T.any(Handler, WebhookHandler)),
|
27
|
+
fields: T.nilable(T.any(String, T::Array[String])),
|
28
|
+
metafield_namespaces: T.nilable(T::Array[String])).void
|
25
29
|
end
|
26
|
-
def initialize(topic:, path:, handler: nil, fields: nil)
|
30
|
+
def initialize(topic:, path:, handler: nil, fields: nil, metafield_namespaces: nil)
|
27
31
|
@topic = T.let(topic.gsub("/", "_").upcase, String)
|
28
32
|
@path = path
|
29
33
|
@handler = handler
|
30
34
|
fields_array = fields.is_a?(String) ? fields.split(FIELDS_DELIMITER) : fields
|
31
35
|
@fields = T.let(fields_array&.map(&:strip)&.compact, T.nilable(T::Array[String]))
|
36
|
+
@metafield_namespaces = T.let(metafield_namespaces&.map(&:strip)&.compact, T.nilable(T::Array[String]))
|
32
37
|
end
|
33
38
|
|
34
39
|
sig { abstract.returns(String) }
|
@@ -51,7 +56,7 @@ module ShopifyAPI
|
|
51
56
|
identifier = webhook_id ? "id: \"#{webhook_id}\"" : "topic: #{@topic}"
|
52
57
|
|
53
58
|
subscription_args_string = subscription_args.map do |k, v|
|
54
|
-
"#{k}: #{
|
59
|
+
"#{k}: #{[:includeFields, :metafieldNamespaces].include?(k) ? v : %("#{v}")}"
|
55
60
|
end.join(", ")
|
56
61
|
|
57
62
|
<<~QUERY
|
@@ -62,12 +67,22 @@ module ShopifyAPI
|
|
62
67
|
message
|
63
68
|
}
|
64
69
|
webhookSubscription {
|
65
|
-
|
70
|
+
#{subscription_response_attributes.join("\n ")}
|
66
71
|
}
|
67
72
|
}
|
68
73
|
}
|
69
74
|
QUERY
|
70
75
|
end
|
76
|
+
|
77
|
+
private
|
78
|
+
|
79
|
+
sig { returns(T::Array[String]) }
|
80
|
+
def subscription_response_attributes
|
81
|
+
attributes = ["id"]
|
82
|
+
attributes << "includeFields" if @fields
|
83
|
+
attributes << "metafieldNamespaces" if @metafield_namespaces
|
84
|
+
attributes
|
85
|
+
end
|
71
86
|
end
|
72
87
|
end
|
73
88
|
end
|
@@ -14,7 +14,7 @@ module ShopifyAPI
|
|
14
14
|
|
15
15
|
sig { override.returns(T::Hash[Symbol, String]) }
|
16
16
|
def subscription_args
|
17
|
-
{ arn: callback_address, includeFields: fields }.compact
|
17
|
+
{ arn: callback_address, includeFields: fields, metafieldNamespaces: metafield_namespaces }.compact
|
18
18
|
end
|
19
19
|
|
20
20
|
sig { override.params(webhook_id: T.nilable(String)).returns(String) }
|
@@ -20,7 +20,7 @@ module ShopifyAPI
|
|
20
20
|
|
21
21
|
sig { override.returns(T::Hash[Symbol, String]) }
|
22
22
|
def subscription_args
|
23
|
-
{ callbackUrl: callback_address, includeFields: fields }.compact
|
23
|
+
{ callbackUrl: callback_address, includeFields: fields, metafieldNamespaces: metafield_namespaces }.compact
|
24
24
|
end
|
25
25
|
|
26
26
|
sig { override.params(webhook_id: T.nilable(String)).returns(String) }
|
@@ -17,7 +17,8 @@ module ShopifyAPI
|
|
17
17
|
project_topic_pair = callback_address.gsub(%r{^pubsub://}, "").split(":")
|
18
18
|
project = project_topic_pair[0]
|
19
19
|
topic = project_topic_pair[1]
|
20
|
-
{ pubSubProject: project, pubSubTopic: topic, includeFields: fields
|
20
|
+
{ pubSubProject: project, pubSubTopic: topic, includeFields: fields,
|
21
|
+
metafieldNamespaces: metafield_namespaces, }.compact
|
21
22
|
end
|
22
23
|
|
23
24
|
sig { override.params(webhook_id: T.nilable(String)).returns(String) }
|