Conekta.Plans (Conekta v1.2.0)

Copy Markdown View Source

Functions for retrieving and managing information about plans.

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

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

Summary

Functions

Create a new plan by passing a %Conekta.Plan{} struct Conekta Documentation

Delete a plan by passing a unique ID Conekta Documentation

Get a plan by passing the unique ID

Get all the current plans Conekta Documenation

Update a plan by passing a %Conekta.PlanUpdateResponse{} struct with the new data Conekta Documentation

Functions

create(plan)

Create a new plan by passing a %Conekta.Plan{} struct Conekta Documentation

Method: POST

Conekta.Plans.create(%Conekta.Plan{})
# => { :ok, %Conekta.PlanCreateResponse{}}

delete(id)

Delete a plan by passing a unique ID Conekta Documentation

Method: DELETE

Conekta.Plans.delete(id)
# => { :ok, %Conekta.PlanDeleteResponse{}}

find(id)

Get a plan by passing the unique ID

Method: GET

Conekta.Plans.find(id)
# => { :ok, %Conekta.PlanFindResponse{}}

plans()

Get all the current plans Conekta Documenation

Method: GET

Conekta.Plans.plans()
# => { :ok, %Conekta.PlansResponse{}}

update(id, plan)

Update a plan by passing a %Conekta.PlanUpdateResponse{} struct with the new data Conekta Documentation

Method: PUT

Conekta.Plans.update(%Conekta.Plan{})
# => { :ok, %Conekta.PlanUpdateResponse{}}