Class: Shift4::Credits
Class Method Summary
collapse
communicator, communicator=
Class Method Details
.create(params, config = Configuration) ⇒ Object
7
8
9
|
# File 'lib/shift4/credits.rb', line 7
def self.create(params, config = Configuration)
communicator.post("#{config.api_url}/credits", json: params, config: config)
end
|
.list(params = nil, config = Configuration) ⇒ Object
19
20
21
|
# File 'lib/shift4/credits.rb', line 19
def self.list(params = nil, config = Configuration)
communicator.get("#{config.api_url}/credits", query: params, config: config)
end
|
.retrieve(credit_id, config = Configuration) ⇒ Object
11
12
13
|
# File 'lib/shift4/credits.rb', line 11
def self.retrieve(credit_id, config = Configuration)
communicator.get("#{config.api_url}/credits/#{credit_id}", config: config)
end
|
.update(credit_id, params, config = Configuration) ⇒ Object
15
16
17
|
# File 'lib/shift4/credits.rb', line 15
def self.update(credit_id, params, config = Configuration)
communicator.post("#{config.api_url}/credits/#{credit_id}", json: params, config: config)
end
|