Module: TreezorConnect::ApiOperations::Create
- Included in:
- Payin, SctInst::Payin, SctInst::Recall
- Defined in:
- lib/treezor_connect/api_operations/create.rb
Instance Method Summary collapse
Instance Method Details
#create(params = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/treezor_connect/api_operations/create.rb', line 6 def create(params = {}) treezor_response = request(:post, resource_url, body: params) data = defined?(self::OBJECT_KEY) ? treezor_response.data.fetch(self::OBJECT_KEY)[0] : treezor_response.data Util.convert_to_treezor_object(data, { object_class: self::OBJECT_NAME }) end |