shopbuilder_api v0.1.20 ExSbapi View Source
Elixir Wrapper Around Shopbuilder API
Link to this section Summary
Functions
Returns {:ok,_ }
or {:error, %{reason: "unauthorized"}}
This function is expecting list_of_uuid
,date
, access_token
and client
Set app settings
Link to this section Functions
Returns {:ok,_ }
or {:error, %{reason: "unauthorized"}}
Endpoint:
This function is being called from /lib/RtCheckoutWeb/templates/install/channel.js.eex
by
this.channel.join()
Params:
checkout:checkout_id
, message
, socket
Functionality:
It checks website_id
and order_od
that has been sent from client side
with website_id
and
order_id
that has been verified in user_socket
.
This function is expecting list_of_uuid
,date
, access_token
and client
The format of date should be:
date: %{
start: %{
year: "2018",
month: "4",
day: "12"
},
end: %{
year: "2018",
month: "4",
day: "20"
}
}
Set app settings
Endpoint:
This function is being called from /lib/zaq_web/controllers/auth_controller.ex
by
callback/2
Parameters:
website_url::String
, access_token::String
, body::Map %{scripts: "", html: "", hash_key: ""}
Examples:
iex> set_app_settings(
"http://merhi.dev.shopbuilder.me",
"01a1f82c447c1ffc19f54a8174ae1b8e648cc864",
%{hash_key: "5tQ4jHbQAqdfjI3cNEqoLAIChw6ZK2BI9tJR9omkzNCAFZS7odwcx+yC5xxTgt47wUg0iaoKuoRyClhU/3+okQ=="}
)
{:ok, %{"success": ["App settings has been updated."]}}