Class: ShopifyGraphql::CurrentShop
- Inherits:
-
Object
- Object
- ShopifyGraphql::CurrentShop
- Includes:
- Query
- Defined in:
- app/graphql/shopify_graphql/current_shop.rb
Constant Summary collapse
- QUERY =
<<~GRAPHQL query { shop { id name email contactEmail myshopifyDomain primaryDomain { host } #CREATED_AT# #UPDATED_AT# #SHOP_OWNER_NAME# currencyCode billingAddress { country countryCodeV2 province city address1 address2 zip latitude longitude phone } timezoneAbbreviation ianaTimezone plan { displayName } currencyFormats { moneyFormat moneyInEmailsFormat moneyWithCurrencyFormat moneyWithCurrencyInEmailsFormat } weightUnit taxShipping taxesIncluded setupRequired checkoutApiSupported transactionalSmsDisabled enabledPresentmentCurrencies #SMS_CONSENT# } #LOCALES_SUBQUERY# } GRAPHQL
- LOCALES_SUBQUERY =
<<~GRAPHQL shopLocales { locale primary } GRAPHQL
Instance Method Summary collapse
Methods included from Query
Instance Method Details
#call(with_locales: false) ⇒ Object
62 63 64 65 66 |
# File 'app/graphql/shopify_graphql/current_shop.rb', line 62 def call(with_locales: false) query = prepare_query(QUERY, with_locales: with_locales) response = execute(query) parse_data(response.data, with_locales: with_locales) end |