beyond_api 0.1.0.pre → 0.2.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/GETTING_STARTED.md +231 -0
- data/Gemfile.lock +2 -2
- data/README.md +14 -0
- data/lib/beyond_api/resources/signers.rb +1 -1
- data/lib/beyond_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc0c667088b9a29af62b04496ee5642c16f1bbf3e74abfa7bd917e43db5abb0
|
4
|
+
data.tar.gz: '0535918ec99664dd693e819783232dd56f41e6070016d34df3befc483b8a2805'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4637dea341eb07f339b86f3a36902d315ccaba39528125bf27271d8422c22fbb61eacca442fc6eef8ec5fb667a4ac0de2b49a7a25fe57a28949148c017027086
|
7
|
+
data.tar.gz: 5f0c2f1c94dccad53d473fa6a3a9c863ce21851339e6e820bda5331d5eaad8c5416502424d25c20918e0f42e06283ddbfb52ec90eb16bd6f4e69e36994ecde72
|
data/GETTING_STARTED.md
CHANGED
@@ -0,0 +1,231 @@
|
|
1
|
+
# Getting started
|
2
|
+
|
3
|
+
## Get your credentials
|
4
|
+
|
5
|
+
### Sign up for a developer test shop
|
6
|
+
|
7
|
+
First you will need to sign up for a Beyond test shop.
|
8
|
+
Visit [our sign up form](https://signup.beyondshop.cloud), fill out the form with your data, and click the **Sign up** button.
|
9
|
+
|
10
|
+
### Create a custom app
|
11
|
+
|
12
|
+
Log in to the cockpit of your test shop, navigate to **Apps > Custom apps** and click **Add custom app**.
|
13
|
+
Fill out the form with the **App name**, **Application Callback URL** and **App scopes**.
|
14
|
+
Save your app.
|
15
|
+
|
16
|
+
You will then receive your `client_id` and `client_secret`.
|
17
|
+
|
18
|
+
## Authenticating a shop (the session object)
|
19
|
+
|
20
|
+
### Obtaining a token from an authentication code
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
session = BeyondApi::Session.new(api_url: "https://your-shop-name.beyondshop.cloud/api")
|
24
|
+
session.token.create("your-auth-code")
|
25
|
+
```
|
26
|
+
|
27
|
+
> You can get an authentication code by clicking the **Test authorization** button in your test shop's cockpit on your custom app's page.
|
28
|
+
Clicking the button will redirect you to the **Application Callback URL** you have specified, attaching the code as a query parameter.
|
29
|
+
|
30
|
+
### Obtaining a token from a refresh token
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
session = BeyondApi::Session.new(api_url: "https://your-shop-name.beyondshop.cloud/api",
|
34
|
+
refresh_token: "your-refresh-token")
|
35
|
+
session.token.refresh
|
36
|
+
```
|
37
|
+
|
38
|
+
## Consuming the API
|
39
|
+
|
40
|
+
Here you can find a list with all available methods:
|
41
|
+
|
42
|
+
* Carts
|
43
|
+
* `session.carts.add_line_item(cart_id, body)`
|
44
|
+
* `session.carts.create(body)`
|
45
|
+
* `session.carts.create_order(cart_id, body)`
|
46
|
+
* `session.carts.create_payment(cart_id, body)`
|
47
|
+
* `session.carts.create_payment_and_order(cart_id, body)`
|
48
|
+
* `session.carts.delete(cart_id)`
|
49
|
+
* `session.carts.delete_line_item(cart_id, line_item_id)`
|
50
|
+
* `session.carts.delete_shipping_address(cart_id)`
|
51
|
+
* `session.carts.find(cart_id)`
|
52
|
+
* `session.carts.payment_method(cart_id)`
|
53
|
+
* `session.carts.payment_methods(cart_id)`
|
54
|
+
* `session.carts.replace_line_item(cart_id, line_item_id, body)`
|
55
|
+
* `session.carts.replace_line_items(cart_id, body)`
|
56
|
+
* `session.carts.set_billing_address(cart_id, body)`
|
57
|
+
* `session.carts.set_payment_method(cart_id, payment_method_id)`
|
58
|
+
* `session.carts.set_payment_method_to_default(cart_id)`
|
59
|
+
* `session.carts.set_shipping_address(cart_id, body)`
|
60
|
+
* `session.carts.set_shipping_method(cart_id, shipping_zone_id, shipping_method_id)`
|
61
|
+
* `session.carts.set_shipping_method_to_default(cart_id)`
|
62
|
+
* `session.carts.shipping_method(cart_id)`
|
63
|
+
* `session.carts.shipping_methods(cart_id)`
|
64
|
+
* Categories View
|
65
|
+
* `session.categories_view.all(params = {})`
|
66
|
+
* `session.categories_view.find(category_id)`
|
67
|
+
* `session.categories_view.products(category_id, params = {})`
|
68
|
+
* `session.categories_view.search_by_label(label)`
|
69
|
+
* `session.categories_view.search_by_product(body, params = {})`
|
70
|
+
* `session.categories_view.search_by_product_id(product_id, params = {})`
|
71
|
+
* Categories
|
72
|
+
* `session.categories.all(params = {})`
|
73
|
+
* `session.categories.create(body)`
|
74
|
+
* `session.categories.delete(category_id)`
|
75
|
+
* `session.categories.find(category_id)`
|
76
|
+
* `session.categories.patch(category_id, body)`
|
77
|
+
* `session.categories.update(category_id, body)`
|
78
|
+
* Checkout Settings
|
79
|
+
* `session.checkout_settings.all`
|
80
|
+
* `session.checkout_settings.update(body)`
|
81
|
+
* Newsletter Target
|
82
|
+
* `session.newsletter_target.create(submit_url)`
|
83
|
+
* `session.newsletter_target.delete`
|
84
|
+
* `session.newsletter_target.find`
|
85
|
+
* `session.newsletter_target.update(submit_url)`
|
86
|
+
* Order Settings
|
87
|
+
* `session.order_settings.all(params = {})`
|
88
|
+
* `session.order_settings.update(order_settings, body)`
|
89
|
+
* Orders
|
90
|
+
* `session.orders.active_payment_process(order_id)`
|
91
|
+
* `session.orders.active_refund_process(order_id)`
|
92
|
+
* `session.orders.all(params = {})`
|
93
|
+
* `session.orders.cancel(order_id, body)`
|
94
|
+
* `session.orders.cancelation_process(order_id, cancelation_id)`
|
95
|
+
* `session.orders.cancelation_processes(order_id, params = {})`
|
96
|
+
* `session.orders.capture_payment_process(order_id, payment_id)`
|
97
|
+
* `session.orders.create_cancelation_process(order_id, body)`
|
98
|
+
* `session.orders.create_invoice(order_id, body)`
|
99
|
+
* `session.orders.create_return_process(order_id, body)`
|
100
|
+
* `session.orders.create_shipping_process(order_id, body)`
|
101
|
+
* `session.orders.events(order_id, params = {})`
|
102
|
+
* `session.orders.find(order_id)`
|
103
|
+
* `session.orders.mark_payment_process_as_paid(order_id, payment_id, body)`
|
104
|
+
* `session.orders.mark_payment_process_as_voided(order_id, payment_id, body)`
|
105
|
+
* `session.orders.mark_refund_process_as_paid(order_id)`
|
106
|
+
* `session.orders.mark_shipping_process_as_delivered(order_id, shipping_process_id, body)`
|
107
|
+
* `session.orders.mark_shipping_process_as_shipped(order_id, shipping_id, body)`
|
108
|
+
* `session.orders.payment_process(order_id, payment_id)`
|
109
|
+
* `session.orders.payment_processes(order_id, params = {})`
|
110
|
+
* `session.orders.processes(order_id)`
|
111
|
+
* `session.orders.refund_process(order_id, refund_id)`
|
112
|
+
* `session.orders.refund_processes(order_id, params = {})`
|
113
|
+
* `session.orders.return_process(order_id, return_process_id)`
|
114
|
+
* `session.orders.return_processes(order_id, params = {})`
|
115
|
+
* `session.orders.search_by_cart_id(cart_id)`
|
116
|
+
* `session.orders.search_order_number_by_cart_id(cart_id)`
|
117
|
+
* `session.orders.send_invoice(order_id)`
|
118
|
+
* `session.orders.shipping_process(order_id, shipping_process_id)`
|
119
|
+
* `session.orders.shipping_processes(order_id, params = {})`
|
120
|
+
* `session.orders.update_billing_address(order_id, body)`
|
121
|
+
* `session.orders.update_order_note(order_id, body)`
|
122
|
+
* `session.orders.update_shipping_address(order_id, body)`
|
123
|
+
* Payment Methods
|
124
|
+
* `session.payment_methods.activate(payment_method_id)`
|
125
|
+
* `session.payment_methods.all(params = {})`
|
126
|
+
* `session.payment_methods.deactivate(payment_method_id)`
|
127
|
+
* `session.payment_methods.find(payment_method_id)`
|
128
|
+
* `session.payment_methods.sort(payment_method_ids)`
|
129
|
+
* `session.payment_methods.update(payment_method_id, body)`
|
130
|
+
* Product Attribute Definitions
|
131
|
+
* `session.product_attribute_definitions.all(params = {})`
|
132
|
+
* `session.product_attribute_definitions.create(product_attribute_name)`
|
133
|
+
* `session.product_attribute_definitions.delete(product_attribute_name)`
|
134
|
+
* `session.product_attribute_definitions.find(product_attribute_name)`
|
135
|
+
* Product Settings
|
136
|
+
* `session.product_settings.all`
|
137
|
+
* Products View
|
138
|
+
* `session.products_view.all(params = {})`
|
139
|
+
* `session.products_view.available_tags`
|
140
|
+
* `session.products_view.find(product_id)`
|
141
|
+
* `session.products_view.search_by_query(query)`
|
142
|
+
* `session.products_view.search_by_tag(tag, params = {})`
|
143
|
+
* `session.products_view.search_by_term(term, params = {})`
|
144
|
+
* Products
|
145
|
+
* `session.products.all(params = {})`
|
146
|
+
* `session.products.create(body)`
|
147
|
+
* `session.products.create_variation(body)`
|
148
|
+
* `session.products.delete(product_id)`
|
149
|
+
* `session.products.find(product_id)`
|
150
|
+
* `session.products.find_variation(product_id)`
|
151
|
+
* `session.products.update(product_id, body)`
|
152
|
+
* `session.products.update_variation(product_id, body)`
|
153
|
+
* Scopes
|
154
|
+
* `session.scopes.all(params = {})`
|
155
|
+
* Script Tags
|
156
|
+
* `session.script_tags.all(params = {})`
|
157
|
+
* `session.script_tags.create(script_tag_url)`
|
158
|
+
* `session.script_tags.delete(script_tag_id)`
|
159
|
+
* `session.script_tags.find(script_tag_id)`
|
160
|
+
* `session.script_tags.update(script_tag_id, script_tag_url)`
|
161
|
+
* Shipping Zones
|
162
|
+
* `session.shipping_zones.all(params = {})`
|
163
|
+
* `session.shipping_zones.create(body)`
|
164
|
+
* `session.shipping_zones.create_shipping_method(shipping_zone_id, body)`
|
165
|
+
* `session.shipping_zones.delete(shipping_zone_id)`
|
166
|
+
* `session.shipping_zones.delete_shipping_method(shipping_zone_id, shipping_method_id)`
|
167
|
+
* `session.shipping_zones.find(shipping_zone_id)`
|
168
|
+
* `session.shipping_zones.find_serviceable_countries`
|
169
|
+
* `session.shipping_zones.shipping_method(shipping_zone_id, shipping_method_id)`
|
170
|
+
* `session.shipping_zones.shipping_methods(shipping_zone_id, params = {})`
|
171
|
+
* `session.shipping_zones.sort(shipping_zone_ids)`
|
172
|
+
* `session.shipping_zones.sort_shipping_methods(shipping_zone_id)`
|
173
|
+
* `session.shipping_zones.update(shipping_zone_id, body)`
|
174
|
+
* Shop
|
175
|
+
* `session.shop.address`
|
176
|
+
* `session.shop.attribute(attribute_name)`
|
177
|
+
* `session.shop.attributes(params = {})`
|
178
|
+
* `session.shop.close`
|
179
|
+
* `session.shop.create_attribute(body)`
|
180
|
+
* `session.shop.create_image(body)`
|
181
|
+
* `session.shop.current`
|
182
|
+
* `session.shop.delete_attribute(attribute_name)`
|
183
|
+
* `session.shop.delete_image(image_id)`
|
184
|
+
* `session.shop.image(image_id)`
|
185
|
+
* `session.shop.images(params = {})`
|
186
|
+
* `session.shop.legal_content(legal_content_type)`
|
187
|
+
* `session.shop.legal_contents(params = {})`
|
188
|
+
* `session.shop.legal_details`
|
189
|
+
* `session.shop.open`
|
190
|
+
* `session.shop.search_images_by_label(label)`
|
191
|
+
* `session.shop.update(body)`
|
192
|
+
* `session.shop.update_address(body)`
|
193
|
+
* `session.shop.update_attribute(attribute_name, body)`
|
194
|
+
* `session.shop.update_legal_content(body)`
|
195
|
+
* `session.shop.update_legal_details(body)`
|
196
|
+
* `session.shop.upload_image(image_path, image_name, label)`
|
197
|
+
* Signers
|
198
|
+
* `session.signers.all`
|
199
|
+
* `session.signers.create`
|
200
|
+
* `session.signers.delete(signer_id)`
|
201
|
+
* Token
|
202
|
+
* `session.token.create(code)`
|
203
|
+
* `session.token.refresh`
|
204
|
+
* Users
|
205
|
+
* `session.users.add_roles(user_id, body)`
|
206
|
+
* `session.users.all(params = {})`
|
207
|
+
* `session.users.change_password(user_id, current_password, new_password)`
|
208
|
+
* `session.users.change_username(user_id, new_username, current_password)`
|
209
|
+
* `session.users.create(body)`
|
210
|
+
* `session.users.disable_support_access`
|
211
|
+
* `session.users.enable_support_access`
|
212
|
+
* `session.users.find(user_id)`
|
213
|
+
* `session.users.roles(user_id)`
|
214
|
+
* `session.users.search_by_username(username)`
|
215
|
+
* `session.users.send_email_address_change(user_id, new_email, current_password, locale)`
|
216
|
+
* `session.users.send_reset_password_email(email, locale)`
|
217
|
+
* `session.users.set_roles(user_id, body)`
|
218
|
+
* `session.users.support_access`
|
219
|
+
* `session.users.verify_password(password)`
|
220
|
+
* Variations
|
221
|
+
* `session.variations.all(product_id, params = {})`
|
222
|
+
* `session.variations.find(product_id, variation_id)`
|
223
|
+
* `session.variations.update(product_id, variation_id, body)`
|
224
|
+
* Webhook Subscriptions
|
225
|
+
* `session.webhook_subscriptions.activate(webhook_subscription_id)`
|
226
|
+
* `session.webhook_subscriptions.all(params = {})`
|
227
|
+
* `session.webhook_subscriptions.create(body)`
|
228
|
+
* `session.webhook_subscriptions.deactivate(webhook_subscription_id)`
|
229
|
+
* `session.webhook_subscriptions.delete(webhook_subscription_id)`
|
230
|
+
* `session.webhook_subscriptions.find(webhook_subscription_id)`
|
231
|
+
* `session.webhook_subscriptions.update(webhook_subscription_id, body)`
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
beyond_api (0.
|
4
|
+
beyond_api (0.2.0.pre)
|
5
5
|
faraday (~> 0.15)
|
6
6
|
|
7
7
|
GEM
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
dotenv (2.7.5)
|
14
14
|
faker (2.4.0)
|
15
15
|
i18n (~> 1.6.0)
|
16
|
-
faraday (0.
|
16
|
+
faraday (0.17.0)
|
17
17
|
multipart-post (>= 1.2, < 3)
|
18
18
|
i18n (1.6.0)
|
19
19
|
concurrent-ruby (~> 1.0)
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Beyond API Ruby Client
|
2
2
|
|
3
|
+
![Gem Version](https://img.shields.io/gem/v/beyond_api?label=gem%20version)
|
4
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/1d173fa0b393e8eaf2a2/maintainability)](https://codeclimate.com/github/ePages-de/beyond_api-ruby_client/maintainability)
|
5
|
+
![License](https://img.shields.io/github/license/ePages-de/beyond_api-ruby_client)
|
6
|
+
|
3
7
|
## Installation
|
4
8
|
|
5
9
|
Add this line to your application's Gemfile:
|
@@ -32,6 +36,8 @@ $ gem install beyond_api
|
|
32
36
|
|
33
37
|
## Documentation
|
34
38
|
|
39
|
+
See [GETTING_STARTED](https://github.com/ePages-de/beyond_api-ruby_client/blob/master/GETTING_STARTED.md) for information on consuming the Beyond API.
|
40
|
+
|
35
41
|
## Development
|
36
42
|
|
37
43
|
Check out the repo an run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -49,3 +55,11 @@ Beyond API's changelog is available [here](https://github.com/ePages-de/beyond_a
|
|
49
55
|
## License
|
50
56
|
|
51
57
|
beyond_api is Copyright © 2019 ePages GmbH. It is free software, and may be redistributed under the terms specified in the [LICENSE](https://github.com/ePages-de/beyond_api-ruby_client/blob/master/LICENSE) file.
|
58
|
+
|
59
|
+
## About ePages
|
60
|
+
|
61
|
+
As the largest independent provider of online shop software in Europe, ePages specialises in high-performance ecommerce solutions for small and medium-sized businesses.
|
62
|
+
Today, 100,000 companies in 70 countries operate professional online shops with ePages software in the cloud.
|
63
|
+
|
64
|
+
And we love open source software!
|
65
|
+
Check out our [other projects](https://github.com/ePages-de), or [become part of our team](https://developer.epages.com/devjobs/) and develop great ecommerce software with us!
|
@@ -55,7 +55,7 @@ module BeyondApi
|
|
55
55
|
# session.signers.delete("6bb72afd-340e-439a-9990-eef2e0883e1e")
|
56
56
|
#
|
57
57
|
def delete(signer_id)
|
58
|
-
response, status = BeyondApi::Request.delete(@session, "/signers
|
58
|
+
response, status = BeyondApi::Request.delete(@session, "/signers/#{signer_id}")
|
59
59
|
|
60
60
|
handle_response(response, status, respond_with_true: true)
|
61
61
|
end
|
data/lib/beyond_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unai Abrisketa
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-10-
|
13
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|