Closed kirillplatonov closed 2 years ago
Adds basic queries and mutations for AppSubscription management.
Get app subscription:
subscription = ShopifyGraphql::GetAppSubscription.call(id: "gid://shopify/AppSubscription/123").data subscription.name # => Standard Plan
Create recurring subscription:
response = ShopifyGraphql::CreateRecurringSubscription.call( name: "Standard Plan", price: 29.99, return_url: "https://example.com/returnUrl", trial_days: 3, test: true, interval: :annual ).data response.confirmation_url # => https://test-shop.myshopify.com/admin/charges/...
Create usage subscription:
response = ShopifyGraphql::CreateUsageSubscription.call( name: "Standard Plan", return_url: "https://example.com/returnUrl", test: true, terms: "Terms Description", capped_amount: 50 ).data response.confirmation_url # => https://test-shop.myshopify.com/admin/charges/...
Adds basic queries and mutations for AppSubscription management.
Usage examples
Get app subscription:
Create recurring subscription:
Create usage subscription:
TODO