Class: PlatformAPI::Credit

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

A credit represents value that will be used up before further charges are assigned to an account.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Credit

Returns a new instance of Credit.



2311
2312
2313
# File 'lib/platform-api/client.rb', line 2311

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object



2323
2324
2325
# File 'lib/platform-api/client.rb', line 2323

def create(body = {})
  @client.credit.create(body)
end

#info(credit_id) ⇒ Object



2335
2336
2337
# File 'lib/platform-api/client.rb', line 2335

def info(credit_id)
  @client.credit.info(credit_id)
end

#listObject

List existing credits.



2342
2343
2344
# File 'lib/platform-api/client.rb', line 2342

def list()
  @client.credit.list()
end