Class: ShopifyAPI::PaymentGateway

Inherits:
Rest::Base show all
Extended by:
T::Sig
Defined in:
lib/shopify_api/rest/resources/2022_04/payment_gateway.rb,
lib/shopify_api/rest/resources/2022_07/payment_gateway.rb,
lib/shopify_api/rest/resources/2022_10/payment_gateway.rb,
lib/shopify_api/rest/resources/2023_01/payment_gateway.rb,
lib/shopify_api/rest/resources/2023_04/payment_gateway.rb,
lib/shopify_api/rest/resources/2023_07/payment_gateway.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

base_find, class_name, create_instance, create_instances_from_response, #delete, get_path, has_many?, has_one?, 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?, #save, #save!, #to_hash

Constructor Details

#initialize(session: ShopifyAPI::Context.active_session) ⇒ PaymentGateway

Returns a new instance of PaymentGateway.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 16

def initialize(session: ShopifyAPI::Context.active_session)
  super(session: session)

  @attachment = T.let(nil, T.nilable(String))
  @created_at = T.let(nil, T.nilable(String))
  @credential1 = T.let(nil, T.nilable(String))
  @credential2 = T.let(nil, T.nilable(String))
  @credential3 = T.let(nil, T.nilable(String))
  @credential4 = T.let(nil, T.nilable(String))
  @disabled = T.let(nil, T.nilable(T::Boolean))
  @enabled_card_brands = T.let(nil, T.nilable(T::Array[T.untyped]))
  @id = T.let(nil, T.nilable(Integer))
  @name = T.let(nil, T.nilable(String))
  @processing_method = T.let(nil, T.nilable(String))
  @provider_id = T.let(nil, T.nilable(Integer))
  @sandbox = T.let(nil, T.nilable(T::Boolean))
  @service_name = T.let(nil, T.nilable(String))
  @supports_network_tokenization = T.let(nil, T.nilable(T::Boolean))
  @type = T.let(nil, T.nilable(String))
  @updated_at = T.let(nil, T.nilable(String))
end

Dynamic Method Handling

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

Instance Attribute Details

#attachmentObject (readonly)

Returns the value of attribute attachment.



49
50
51
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 49

def attachment
  @attachment
end

#created_atObject (readonly)

Returns the value of attribute created_at.



51
52
53
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 51

def created_at
  @created_at
end

#credential1Object (readonly)

Returns the value of attribute credential1.



53
54
55
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 53

def credential1
  @credential1
end

#credential2Object (readonly)

Returns the value of attribute credential2.



55
56
57
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 55

def credential2
  @credential2
end

#credential3Object (readonly)

Returns the value of attribute credential3.



57
58
59
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 57

def credential3
  @credential3
end

#credential4Object (readonly)

Returns the value of attribute credential4.



59
60
61
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 59

def credential4
  @credential4
end

#disabledObject (readonly)

Returns the value of attribute disabled.



61
62
63
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 61

def disabled
  @disabled
end

#enabled_card_brandsObject (readonly)

Returns the value of attribute enabled_card_brands.



63
64
65
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 63

def enabled_card_brands
  @enabled_card_brands
end

#idObject (readonly)

Returns the value of attribute id.



65
66
67
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 65

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



67
68
69
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 67

def name
  @name
end

#processing_methodObject (readonly)

Returns the value of attribute processing_method.



69
70
71
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 69

def processing_method
  @processing_method
end

#provider_idObject (readonly)

Returns the value of attribute provider_id.



71
72
73
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 71

def provider_id
  @provider_id
end

#sandboxObject (readonly)

Returns the value of attribute sandbox.



73
74
75
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 73

def sandbox
  @sandbox
end

#service_nameObject (readonly)

Returns the value of attribute service_name.



75
76
77
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 75

def service_name
  @service_name
end

#supports_network_tokenizationObject (readonly)

Returns the value of attribute supports_network_tokenization.



77
78
79
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 77

def supports_network_tokenization
  @supports_network_tokenization
end

#typeObject (readonly)

Returns the value of attribute type.



79
80
81
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 79

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



81
82
83
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 81

def updated_at
  @updated_at
end

Class Method Details

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



127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 127

def all(
  session: ShopifyAPI::Context.active_session,
  **kwargs
)
  response = base_find(
    session: session,
    ids: {},
    params: {}.merge(kwargs).compact,
  )

  T.cast(response, T::Array[PaymentGateway])
end

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



108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/shopify_api/rest/resources/2022_04/payment_gateway.rb', line 108

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



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

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