Class: ShopifyAPI::ApplePayCertificate

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

Instance Attribute Summary collapse

Attributes inherited from Rest::Base

#errors, #original_state

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rest::Base

api_call_limit, base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, get_path_ids, has_many?, has_one?, inherited, json_body_name, json_response_body_names, #method_missing, next_page?, next_page_info, prev_page?, prev_page_info, primary_key, read_only_attributes, request, #respond_to_missing?, retry_request_after, #save, #save!, #to_hash

Constructor Details

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

Returns a new instance of ApplePayCertificate.



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

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

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

  super(session: session, from_hash: from_hash)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ShopifyAPI::Rest::Base

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#merchant_idObject (readonly)

Returns the value of attribute merchant_id.



41
42
43
# File 'lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb', line 41

def merchant_id
  @merchant_id
end

#statusObject (readonly)

Returns the value of attribute status.



43
44
45
# File 'lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb', line 43

def status
  @status
end

Class Method Details

.csr(id:, session: ShopifyAPI::Context.active_session, **kwargs) ⇒ Object



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb', line 90

def csr(
  id:,
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  request(
    http_method: :get,
    operation: :csr,
    session: session,
    ids: {id: id},
    params: {}.merge(kwargs).compact,
    body: {},
    entity: nil,
  )
end

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



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb', line 70

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



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/shopify_api/rest/resources/2022_04/apple_pay_certificate.rb', line 52

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