Class: IronBank::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/iron_bank/action.rb

Overview

Base class for Zuora actions, e.g., subscribe

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(args) ⇒ Object



9
10
11
# File 'lib/iron_bank/action.rb', line 9

def self.call(args)
  new(args).call
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
# File 'lib/iron_bank/action.rb', line 13

def call
  @body = IronBank.client.connection.post(endpoint, params).body

  raise ::IronBank::UnprocessableEntityError, errors unless success?

  IronBank::Object.new(body).deep_underscore
end