Module: Paggi::Rest::Create::ClassMethods
- Defined in:
- lib/paggi/rest/create.rb
Instance Method Summary collapse
Instance Method Details
#create(params = {}, header = {}) ⇒ Object
37 38 39 40 41 |
# File 'lib/paggi/rest/create.rb', line 37 def create(params={}, header={}) result = request(nil, params, :POST, header) raise result if result.kind_of? StandardError result end |
#create!(params = {}, header = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/paggi/rest/create.rb', line 27 def create!(params={}, header={}) begin create(params, header) rescue PaggiError => e build(params, e) rescue StandardError => e e end end |