Class: SnapDeploy::Provider::Heroku::API::Credit

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.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.



777
778
779
# File 'lib/snap_deploy/provider/heroku/api.rb', line 777

def initialize(client)
  @client = client
end

Instance Method Details

#create(body) ⇒ Object

Create a new credit.

Parameters:

  • body:

    the object to pass as the request payload



784
785
786
# File 'lib/snap_deploy/provider/heroku/api.rb', line 784

def create(body)
  @client.credit.create(body)
end

#info(credit_identity) ⇒ Object

Info for existing credit.

Parameters:

  • credit_identity:


791
792
793
# File 'lib/snap_deploy/provider/heroku/api.rb', line 791

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

#listObject

List existing credits.



796
797
798
# File 'lib/snap_deploy/provider/heroku/api.rb', line 796

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