Conekta.Orders (Conekta v1.2.0)

Copy Markdown View Source

Functions for retrieving and managing information about orders.

We can create, update, find and get all orders:

Endpoint: https://api.conekta.io/orders

Summary

Functions

Get charges from an order

Create a new order by passing a %Conekta.Order{} struct Conekta Documenation

Creates a new charge for an existing order.

Finds an order by passing the unique order ID

Get all the current orders Conekta Documenation

Update an order by passing an %Conekta.Order{} object with the new modifications

Functions

charges(order_id)

Get charges from an order

Method: GET

Conekta.Orders.charges(order_id)
# => { :ok, %Conekta.OrderChargesResponse{}}

create(order)

Create a new order by passing a %Conekta.Order{} struct Conekta Documenation

Method: GET

Conekta.Orders.create(%Conekta.Order{})
# => { :ok, %Conekta.OrdersCreateResponse{}}

create_charge(order_id, charge)

Creates a new charge for an existing order.

Method: POST

Conekta.Orders.create_charge(order_id, charge)
# => { :ok, %Conekta.OrderCreateChargeResponse{}}

find(order_id)

Finds an order by passing the unique order ID

Method: GET

Conekta.Orders.find(order_id)
# => { :ok, %Conekta.OrdersFindResponse{}}

orders()

Get all the current orders Conekta Documenation

Method: GET

Conekta.Orders.orders()
# => { :ok, %Conekta.OrdersResponse{}}

partial_refund(order_id, refund)

refund(order_id, refund)

update(order_id, order)

Update an order by passing an %Conekta.Order{} object with the new modifications

Method: PUT

Conekta.Orders.update(client_id, %Conekta.Order{})
# => { :ok, %{}}