Module: Recharge::HTTPRequest::Create

Includes:
Recharge::HTTPRequest
Included in:
Customer, Subscription, Webhook
Defined in:
lib/recharge/http_request.rb

Overview

Create an new record for the included/extended entity

Arguments

data (Hash)

New record’s attributes

See the appropriate create call in ReCharge’s documentation for valid attributes

Returns

An instance of the created entity

Errors

Recharge::ConnectionError, Recharge::RequestError

Instance Method Summary collapse

Instance Method Details

#create(data) ⇒ Object



149
150
151
# File 'lib/recharge/http_request.rb', line 149

def create(data)
  new(POST(self::PATH, data)[self::SINGLE])
end