Class: ShopifyAPI::Auth::Oauth::AuthQuery

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Utils::VerifiableQuery
Defined in:
lib/shopify_api/auth/oauth/auth_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, shop:, timestamp:, state:, host:, hmac:) ⇒ AuthQuery

Returns a new instance of AuthQuery.



24
25
26
27
28
29
30
31
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 24

def initialize(code:, shop:, timestamp:, state:, host:, hmac:)
  @code = code
  @shop = shop
  @timestamp = timestamp
  @state = state
  @host = host
  @hmac = hmac
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



12
13
14
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 12

def code
  @code
end

#hmacObject (readonly)

Returns the value of attribute hmac.



12
13
14
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 12

def hmac
  @hmac
end

#hostObject (readonly)

Returns the value of attribute host.



12
13
14
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 12

def host
  @host
end

#shopObject (readonly)

Returns the value of attribute shop.



12
13
14
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 12

def shop
  @shop
end

#stateObject (readonly)

Returns the value of attribute state.



12
13
14
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 12

def state
  @state
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



12
13
14
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 12

def timestamp
  @timestamp
end

Instance Method Details

#to_signable_stringObject



34
35
36
37
38
39
40
41
42
43
# File 'lib/shopify_api/auth/oauth/auth_query.rb', line 34

def to_signable_string
  params = {
    code: code,
    host: host,
    shop: shop,
    state: state,
    timestamp: timestamp,
  }
  URI.encode_www_form(params)
end