Class: EML::UK::Card

Inherits:
APIResource show all
Extended by:
T::Sig
Defined in:
lib/eml/uk/resources/card.rb

Constant Summary collapse

ENDPOINT_BASE =
T.let("cards", String)

Class Method Summary collapse

Methods inherited from APIResource

#initialize, #request

Constructor Details

This class inherits a constructor from EML::UK::APIResource

Class Method Details

.activate(id:, payload:, params: {}) ⇒ Object



28
29
30
31
# File 'lib/eml/uk/resources/card.rb', line 28

def activate(id:, payload:, params: {})
  new(id: id).
    request(:post, "activations", payload: payload, params: params)
end

.lock(id:, payload:, params: {}) ⇒ Object



138
139
140
# File 'lib/eml/uk/resources/card.rb', line 138

def lock(id:, payload:, params: {})
  new(id: id).request(:post, "locks", payload: payload, params: params)
end

.register(id:, payload:, params: {}) ⇒ Object



48
49
50
51
# File 'lib/eml/uk/resources/card.rb', line 48

def register(id:, payload:, params: {})
  new(id: id).
    request(:post, "register", payload: payload, params: params)
end

.reload(id:, payload:, params: {}) ⇒ Object



100
101
102
103
# File 'lib/eml/uk/resources/card.rb', line 100

def reload(id:, payload:, params: {})
  new(id: id).
    request(:post, "reloads", payload: payload, params: params)
end

.show(id:, params: {}) ⇒ Object



62
63
64
# File 'lib/eml/uk/resources/card.rb', line 62

def show(id:, params: {})
  new(id: id).request(:get, params: params)
end

.transactions(id:, params: {}) ⇒ Object



80
81
82
# File 'lib/eml/uk/resources/card.rb', line 80

def transactions(id:, params: {})
  new(id: id).request(:get, "transactions", params: params)
end

.unload(id:, payload:, params: {}) ⇒ Object



120
121
122
# File 'lib/eml/uk/resources/card.rb', line 120

def unload(id:, payload:, params: {})
  new(id: id).request(:post, "unload", payload: payload, params: params)
end

.unlock(id:, payload:, params: {}) ⇒ Object



156
157
158
159
# File 'lib/eml/uk/resources/card.rb', line 156

def unlock(id:, payload:, params: {})
  new(id: id).
    request(:post, "unlocks", payload: payload, params: params)
end

.void(id:, payload:, params: {}) ⇒ Object



175
176
177
# File 'lib/eml/uk/resources/card.rb', line 175

def void(id:, payload:, params: {})
  new(id: id).request(:post, "voids", payload: payload, params: params)
end