Class: CloudPayments::Namespaces::Orders
- Defined in:
- lib/cloud_payments/namespaces/orders.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #request, resource_name
Constructor Details
This class inherits a constructor from CloudPayments::Namespaces::Base
Instance Method Details
#cancel(order_id) ⇒ Object
10 11 12 |
# File 'lib/cloud_payments/namespaces/orders.rb', line 10 def cancel(order_id) request(:cancel, id: order_id)[:success] end |
#create(attributes) ⇒ Object
5 6 7 8 |
# File 'lib/cloud_payments/namespaces/orders.rb', line 5 def create(attributes) response = request(:create, attributes) Order.new(response[:model]) end |