Class: ShopifyAPI::AndroidPayKey

Inherits:
Rest::Base
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2022_04/android_pay_key.rb,
lib/shopify_api/rest/resources/2022_07/android_pay_key.rb,
lib/shopify_api/rest/resources/2022_10/android_pay_key.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session: ShopifyAPI::Context.active_session, from_hash: nil) ⇒ AndroidPayKey

Returns a new instance of AndroidPayKey.



19
20
21
22
23
24
25
# File 'lib/shopify_api/rest/resources/2022_04/android_pay_key.rb', line 19

def initialize(session: ShopifyAPI::Context.active_session, from_hash: nil)

  @id = T.let(nil, T.nilable(Integer))
  @public_key = T.let(nil, T.nilable(String))

  super(session: session, from_hash: from_hash)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



36
37
38
# File 'lib/shopify_api/rest/resources/2022_04/android_pay_key.rb', line 36

def id
  @id
end

#public_keyObject (readonly)

Returns the value of attribute public_key.



38
39
40
# File 'lib/shopify_api/rest/resources/2022_04/android_pay_key.rb', line 38

def public_key
  @public_key
end

Class Method Details

.delete(id:, session: ShopifyAPI::Context.active_session) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/shopify_api/rest/resources/2022_04/android_pay_key.rb', line 65

def delete(
  id:,
  session: ShopifyAPI::Context.active_session
)
  request(
    http_method: :delete,
    operation: :delete,
    session: session,
    ids: {id: id},
    params: {},
  )
end

.find(id:, session: ShopifyAPI::Context.active_session) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/shopify_api/rest/resources/2022_04/android_pay_key.rb', line 47

def find(
  id:,
  session: ShopifyAPI::Context.active_session
)
  result = base_find(
    session: session,
    ids: {id: id},
    params: {},
  )
  T.cast(result[0], T.nilable(AndroidPayKey))
end