Module: BeyondApi::ShopAddress
- Included in:
- Shop
- Defined in:
- lib/beyond_api/resources/shops/address.rb
Instance Method Summary collapse
-
#address ⇒ OpenStruct
A
GET
request is used to retrieve the details of a shop’s address. -
#update_address(body) ⇒ OpenStruct
A
PATCH
request is used to patch a shop’s address partially with json content type.
Instance Method Details
#address ⇒ OpenStruct
A GET
request is used to retrieve the details of a shop’s address.
$ curl 'https://api-shop.beyondshop.cloud/api/shop/address' -i -X GET
17 18 19 20 21 |
# File 'lib/beyond_api/resources/shops/address.rb', line 17 def address response, status = BeyondApi::Request.get(@session, "/shop/address") handle_response(response, status) end |
#update_address(body) ⇒ OpenStruct
A PATCH
request is used to patch a shop’s address partially with json content type.
$ curl 'https://api-shop.beyondshop.cloud/api/shop/address' -i -X PATCH \
-H 'Content-Type: application/json' \
-H 'Accept: application/hal+json' \
-H 'Authorization: Bearer <Access token>' \
-d '{
"city" : "Barcelona"
}'
47 48 49 50 51 |
# File 'lib/beyond_api/resources/shops/address.rb', line 47 def update_address(body) response, status = BeyondApi::Request.patch(@session, "/shop/address", body) handle_response(response, status) end |