Class: PlatformAPI::Credit
- Inherits:
-
Object
- Object
- PlatformAPI::Credit
- 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
-
#create(body = {}) ⇒ Object
Create a new credit.
-
#info(credit_id) ⇒ Object
Info for existing credit.
-
#initialize(client) ⇒ Credit
constructor
A new instance of Credit.
-
#list ⇒ Object
List existing credits.
Constructor Details
#initialize(client) ⇒ Credit
Returns a new instance of Credit.
1137 1138 1139 |
# File 'lib/platform-api/client.rb', line 1137 def initialize(client) @client = client end |
Instance Method Details
#create(body = {}) ⇒ Object
Create a new credit.
1144 1145 1146 |
# File 'lib/platform-api/client.rb', line 1144 def create(body = {}) @client.credit.create(body) end |
#info(credit_id) ⇒ Object
Info for existing credit.
1151 1152 1153 |
# File 'lib/platform-api/client.rb', line 1151 def info(credit_id) @client.credit.info(credit_id) end |
#list ⇒ Object
List existing credits.
1156 1157 1158 |
# File 'lib/platform-api/client.rb', line 1156 def list() @client.credit.list() end |