beyond_api 0.7.1.pre → 0.11.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +50 -3
- data/GETTING_STARTED.md +184 -197
- data/Gemfile.lock +2 -2
- data/README.md +15 -0
- data/lib/beyond_api.rb +1 -2
- data/lib/beyond_api/error.rb +17 -0
- data/lib/beyond_api/resources/categories.rb +2 -3
- data/lib/beyond_api/resources/categories_view.rb +2 -3
- data/lib/beyond_api/resources/customers.rb +2 -3
- data/lib/beyond_api/resources/orders.rb +2 -3
- data/lib/beyond_api/resources/payment_methods.rb +2 -3
- data/lib/beyond_api/resources/product_attribute_definitions.rb +4 -22
- data/lib/beyond_api/resources/products.rb +2 -3
- data/lib/beyond_api/resources/products_view.rb +2 -3
- data/lib/beyond_api/resources/script_tags.rb +2 -3
- data/lib/beyond_api/resources/shipping_zones.rb +2 -3
- data/lib/beyond_api/resources/shop.rb +0 -40
- data/lib/beyond_api/resources/token.rb +21 -7
- data/lib/beyond_api/resources/users.rb +2 -3
- data/lib/beyond_api/resources/webhook_subscriptions.rb +2 -3
- data/lib/beyond_api/session.rb +0 -5
- data/lib/beyond_api/utils.rb +29 -3
- data/lib/beyond_api/version.rb +1 -1
- metadata +3 -3
- data/lib/beyond_api/resources/scopes.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78c3366e77c86e546074cbbc049e2161b231511deede234a92f96d315575ba45
|
4
|
+
data.tar.gz: f8e08acff7d5f80be7ffd249c83d6116abd86ddfb216e5c25e955deaffe439be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f0be05bb0c55da87c1c650b86f112993ce8346f6178f3cf27d865d8415377924263d0b2ec648b8a1d8026c6a5a4250221a8dc68ba39bd154bfb43c0913649c
|
7
|
+
data.tar.gz: 8400df3f3b61240c0516fc4d86e386eea7e67f88ca56324e68989f731d415e77ab9907817b092dc59c87f79794d96d1e7a76960e4785ebf0237b384ca6ed64e7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,50 @@
|
|
1
|
+
### v0.11.0.pre
|
2
|
+
|
3
|
+
* enhancements
|
4
|
+
* Improve error handling class
|
5
|
+
* Improve `BeyondApi::Error` class
|
6
|
+
|
7
|
+
### v0.10.0.pre
|
8
|
+
|
9
|
+
* features
|
10
|
+
* Add optional `paginated: false` parameter to `session.categories_view.all(paginated: false)`
|
11
|
+
* Add optional `paginated: false` parameter to `session.categories.all(paginated: false)`
|
12
|
+
* Add optional `paginated: false` parameter to `session.customers.all(paginated: false)`
|
13
|
+
* Add optional `paginated: false` parameter to `session.orders.all(paginated: false)`
|
14
|
+
* Add optional `paginated: false` parameter to `session.payment_methods.all(paginated: false)`
|
15
|
+
* Add optional `paginated: false` parameter to `session.products_view.all(paginated: false)`
|
16
|
+
* Add optional `paginated: false` parameter to `session.script_tags.all(paginated: false)`
|
17
|
+
* Add optional `paginated: false` parameter to `session.shipping_zones.all(paginated: false)`
|
18
|
+
* Add optional `paginated: false` parameter to `session.users.all(paginated: false)`
|
19
|
+
* Add optional `paginated: false` parameter to `session.webhook_subscriptions.all(paginated: false)`
|
20
|
+
|
21
|
+
### v0.9.0.pre
|
22
|
+
|
23
|
+
* bug-fixes
|
24
|
+
* Fix typo
|
25
|
+
|
26
|
+
* features
|
27
|
+
* Add optional `paginated: false` parameter to `session.products.all(paginated: false)`
|
28
|
+
|
29
|
+
### v0.8.1.pre
|
30
|
+
|
31
|
+
* bug-fixes
|
32
|
+
* Fix exception handling
|
33
|
+
|
34
|
+
### v0.8.0.pre
|
35
|
+
|
36
|
+
* deprecations
|
37
|
+
* Remove `BeyondApi::Shop#open`
|
38
|
+
* Remove `BeyondApi::Shop#close`
|
39
|
+
* Remove `BeyondApi::Scopes`
|
40
|
+
|
41
|
+
* features
|
42
|
+
* Add `BeyondApi::Token#client_credentials`
|
43
|
+
|
44
|
+
* enhancements
|
45
|
+
* Create a custom `BeyondApi::Error` class
|
46
|
+
* Avoid duplicated code on token response handling
|
47
|
+
|
1
48
|
### v0.7.1.pre
|
2
49
|
|
3
50
|
* bug-fixes
|
@@ -6,12 +53,12 @@
|
|
6
53
|
|
7
54
|
### v0.7.0.pre
|
8
55
|
|
9
|
-
* features
|
10
|
-
* Add `Products#assign_variation_images_differentiator` method
|
11
|
-
|
12
56
|
* deprecations
|
13
57
|
* `Variations#adjust_stock_level` receives parameter `relative_amount` instead of `body`
|
14
58
|
|
59
|
+
* features
|
60
|
+
* Add `Products#assign_variation_images_differentiator` method
|
61
|
+
|
15
62
|
### v0.6.0.pre
|
16
63
|
|
17
64
|
* bug-fixes
|
data/GETTING_STARTED.md
CHANGED
@@ -1,20 +1,5 @@
|
|
1
1
|
# Getting started
|
2
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
3
|
## Authenticating a shop (the session object)
|
19
4
|
|
20
5
|
### Obtaining a token from an authentication code
|
@@ -42,192 +27,194 @@ Check the [_rubydoc_ documentation](https://rubydoc.info/github/ePages-de/beyond
|
|
42
27
|
Here you can find a list with all available methods:
|
43
28
|
|
44
29
|
* Carts
|
45
|
-
* `session.carts.add_line_item(cart_id, body)`
|
46
|
-
* `session.carts.create(
|
47
|
-
* `session.carts.create_order(cart_id, body)`
|
48
|
-
* `session.carts.create_payment(cart_id, body)`
|
49
|
-
* `session.carts.create_payment_and_order(cart_id, body)`
|
50
|
-
* `session.carts.delete(cart_id)`
|
51
|
-
* `session.carts.delete_line_item(cart_id, line_item_id)`
|
52
|
-
* `session.carts.delete_shipping_address(cart_id)`
|
53
|
-
* `session.carts.find(cart_id)`
|
54
|
-
* `session.carts.payment_method(cart_id)`
|
55
|
-
* `session.carts.payment_methods(cart_id)`
|
56
|
-
* `session.carts.replace_line_item(cart_id, line_item_id, body)`
|
57
|
-
* `session.carts.replace_line_items(cart_id, body)`
|
58
|
-
* `session.carts.set_billing_address(cart_id, body)`
|
59
|
-
* `session.carts.set_payment_method(cart_id, payment_method_id)`
|
60
|
-
* `session.carts.set_payment_method_to_default(cart_id)`
|
61
|
-
* `session.carts.set_shipping_address(cart_id, body)`
|
62
|
-
* `session.carts.set_shipping_method(cart_id, shipping_zone_id, shipping_method_id)`
|
63
|
-
* `session.carts.set_shipping_method_to_default(cart_id)`
|
64
|
-
* `session.carts.shipping_method(cart_id)`
|
65
|
-
* `session.carts.shipping_methods(cart_id)`
|
66
|
-
* Categories
|
67
|
-
* `session.categories_view.all(params = {})`
|
68
|
-
* `session.categories_view.find(category_id)`
|
69
|
-
* `session.categories_view.products(category_id, params = {})`
|
70
|
-
* `session.categories_view.search_by_label(label)`
|
71
|
-
* `session.categories_view.search_by_product(body, params = {})`
|
72
|
-
* `session.categories_view.search_by_product_id(product_id, params = {})`
|
30
|
+
* [`session.carts.add_line_item(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#add_line_item-instance_method)
|
31
|
+
* [`session.carts.create`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#create-instance_method)
|
32
|
+
* [`session.carts.create_order(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#create_order-instance_method)
|
33
|
+
* [`session.carts.create_payment(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#create_payment-instance_method)
|
34
|
+
* [`session.carts.create_payment_and_order(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#create_payment_and_order-instance_method)
|
35
|
+
* [`session.carts.delete(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#delete-instance_method)
|
36
|
+
* [`session.carts.delete_line_item(cart_id, line_item_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#delete_line_item-instance_method)
|
37
|
+
* [`session.carts.delete_shipping_address(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#delete_shipping_address-instance_method)
|
38
|
+
* [`session.carts.find(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#find-instance_method)
|
39
|
+
* [`session.carts.payment_method(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#payment_method-instance_method)
|
40
|
+
* [`session.carts.payment_methods(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#payment_methods-instance_method)
|
41
|
+
* [`session.carts.replace_line_item(cart_id, line_item_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#replace_line_item-instance_method)
|
42
|
+
* [`session.carts.replace_line_items(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#replace_line_items-instance_method)
|
43
|
+
* [`session.carts.set_billing_address(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#set_billing_address-instance_method)
|
44
|
+
* [`session.carts.set_payment_method(cart_id, payment_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#set_payment_method-instance_method)
|
45
|
+
* [`session.carts.set_payment_method_to_default(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#set_payment_method_to_default-instance_method)
|
46
|
+
* [`session.carts.set_shipping_address(cart_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#set_shipping_address-instance_method)
|
47
|
+
* [`session.carts.set_shipping_method(cart_id, shipping_zone_id, shipping_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#set_shipping_method-instance_method)
|
48
|
+
* [`session.carts.set_shipping_method_to_default(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#set_shipping_method_to_default-instance_method)
|
49
|
+
* [`session.carts.shipping_method(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#shipping_method-instance_method)
|
50
|
+
* [`session.carts.shipping_methods(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Carts#shipping_methods-instance_method)
|
51
|
+
* Categories view
|
52
|
+
* [`session.categories_view.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CategoriesView#all-instance_method)
|
53
|
+
* [`session.categories_view.find(category_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CategoriesView#find-instance_method)
|
54
|
+
* [`session.categories_view.products(category_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CategoriesView#products-instance_method)
|
55
|
+
* [`session.categories_view.search_by_label(label)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CategoriesView#search_by_label-instance_method)
|
56
|
+
* [`session.categories_view.search_by_product(body, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CategoriesView#search_by_product-instance_method)
|
57
|
+
* [`session.categories_view.search_by_product_id(product_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CategoriesView#search_by_product_id-instance_method)
|
73
58
|
* Categories
|
74
|
-
* `session.categories.all(params = {})`
|
75
|
-
* `session.categories.create(body)`
|
76
|
-
* `session.categories.delete(category_id)`
|
77
|
-
* `session.categories.find(category_id)`
|
78
|
-
* `session.categories.patch(category_id, body)`
|
79
|
-
* `session.categories.update(category_id, body)`
|
80
|
-
* Checkout
|
81
|
-
* `session.checkout_settings.all`
|
82
|
-
* `session.checkout_settings.update(body)`
|
83
|
-
*
|
84
|
-
* `session.
|
85
|
-
* `session.
|
86
|
-
* `session.
|
87
|
-
* `session.
|
88
|
-
*
|
89
|
-
* `session.
|
90
|
-
* `session.
|
59
|
+
* [`session.categories.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Categories#all-instance_method)
|
60
|
+
* [`session.categories.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Categories#create-instance_method)
|
61
|
+
* [`session.categories.delete(category_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Categories#delete-instance_method)
|
62
|
+
* [`session.categories.find(category_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Categories#find-instance_method)
|
63
|
+
* [`session.categories.patch(category_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Categories#patch-instance_method)
|
64
|
+
* [`session.categories.update(category_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Categories#update-instance_method)
|
65
|
+
* Checkout settings
|
66
|
+
* [`session.checkout_settings.all`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CheckoutSettings#all-instance_method)
|
67
|
+
* [`session.checkout_settings.update(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/CheckoutSettings#update-instance_method)
|
68
|
+
* Token
|
69
|
+
* [`session.token.client_credentials`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Token#client_credentials-instance_method)
|
70
|
+
* [`session.token.create(code)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Token#create-instance_method)
|
71
|
+
* [`session.token.refresh`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Token#refresh-instance_method)
|
72
|
+
* [`session.token.session`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Token#session-instance_method)
|
73
|
+
* Customers
|
74
|
+
* [`session.customers.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Customers#all-instance_method)
|
75
|
+
* [`session.customers.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Customers#create-instance_method)
|
76
|
+
* [`session.customers.delete(customer_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Customers#delete-instance_method)
|
77
|
+
* [`session.customers.find(customer_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Customers#find-instance_method)
|
78
|
+
* [`session.customers.update(customer_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Customers#update-instance_method)
|
79
|
+
* Newsletter target
|
80
|
+
* [`session.newsletter_target.create(submit_url)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/NewsletterTarget#create-instance_method)
|
81
|
+
* [`session.newsletter_target.delete`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/NewsletterTarget#delete-instance_method)
|
82
|
+
* [`session.newsletter_target.find`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/NewsletterTarget#find-instance_method)
|
83
|
+
* [`session.newsletter_target.update(submit_url)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/NewsletterTarget#update-instance_method)
|
84
|
+
* Order settings
|
85
|
+
* [`session.order_settings.all`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/OrderSettings#all-instance_method)
|
86
|
+
* [`session.order_settings.update(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/OrderSettings#update-instance_method)
|
91
87
|
* Orders
|
92
|
-
* `session.orders.active_payment_process(order_id)`
|
93
|
-
* `session.orders.active_refund_process(order_id)`
|
94
|
-
* `session.orders.all(params = {})`
|
95
|
-
* `session.orders.cancel(order_id, body)`
|
96
|
-
* `session.orders.cancelation_process(order_id, cancelation_id)`
|
97
|
-
* `session.orders.cancelation_processes(order_id, params = {})`
|
98
|
-
* `session.orders.capture_payment_process(order_id, payment_id)`
|
99
|
-
* `session.orders.create_cancelation_process(order_id, body)`
|
100
|
-
* `session.orders.create_invoice(order_id, body)`
|
101
|
-
* `session.orders.create_return_process(order_id, body)`
|
102
|
-
* `session.orders.create_shipping_process(order_id, body)`
|
103
|
-
* `session.orders.events(order_id, params = {})`
|
104
|
-
* `session.orders.find(order_id)`
|
105
|
-
* `session.orders.mark_payment_process_as_paid(order_id, payment_id, body)`
|
106
|
-
* `session.orders.mark_payment_process_as_voided(order_id, payment_id, body)`
|
107
|
-
* `session.orders.mark_refund_process_as_paid(order_id)`
|
108
|
-
* `session.orders.mark_shipping_process_as_delivered(order_id, shipping_process_id, body)`
|
109
|
-
* `session.orders.mark_shipping_process_as_shipped(order_id, shipping_id, body)`
|
110
|
-
* `session.orders.payment_process(order_id, payment_id)`
|
111
|
-
* `session.orders.payment_processes(order_id, params = {})`
|
112
|
-
* `session.orders.processes(order_id)`
|
113
|
-
* `session.orders.refund_process(order_id, refund_id)`
|
114
|
-
* `session.orders.refund_processes(order_id, params = {})`
|
115
|
-
* `session.orders.return_process(order_id, return_process_id)`
|
116
|
-
* `session.orders.return_processes(order_id, params = {})`
|
117
|
-
* `session.orders.search_by_cart_id(cart_id)`
|
118
|
-
* `session.orders.search_order_number_by_cart_id(cart_id)`
|
119
|
-
* `session.orders.
|
120
|
-
* `session.orders.shipping_process(order_id, shipping_process_id)`
|
121
|
-
* `session.orders.shipping_processes(order_id, params = {})`
|
122
|
-
* `session.orders.update_billing_address(order_id, body)`
|
123
|
-
* `session.orders.update_order_note(order_id,
|
124
|
-
* `session.orders.update_shipping_address(order_id, body)`
|
125
|
-
* Payment
|
126
|
-
* `session.payment_methods.activate(payment_method_id)`
|
127
|
-
* `session.payment_methods.all(params = {})`
|
128
|
-
* `session.payment_methods.deactivate(payment_method_id)`
|
129
|
-
* `session.payment_methods.find(payment_method_id)`
|
130
|
-
* `session.payment_methods.sort(payment_method_ids)`
|
131
|
-
* `session.payment_methods.update(payment_method_id, body)`
|
132
|
-
* Product
|
133
|
-
* `session.product_attribute_definitions.all(params = {})`
|
134
|
-
* `session.product_attribute_definitions.create(
|
135
|
-
* `session.product_attribute_definitions.delete(product_attribute_name)`
|
136
|
-
* `session.product_attribute_definitions.find(product_attribute_name)`
|
137
|
-
*
|
138
|
-
* `session.
|
139
|
-
*
|
140
|
-
* `session.products_view.
|
141
|
-
* `session.products_view.
|
142
|
-
* `session.products_view.
|
143
|
-
* `session.products_view.search_by_query(query)`
|
144
|
-
* `session.products_view.search_by_tag(tag, params = {})`
|
145
|
-
* `session.products_view.search_by_term(term, params = {})`
|
88
|
+
* [`session.orders.active_payment_process(order_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#active_payment_process-instance_method)
|
89
|
+
* [`session.orders.active_refund_process(order_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#active_refund_process-instance_method)
|
90
|
+
* [`session.orders.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#all-instance_method)
|
91
|
+
* [`session.orders.cancel(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#cancel-instance_method)
|
92
|
+
* [`session.orders.cancelation_process(order_id, cancelation_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#cancelation_process-instance_method)
|
93
|
+
* [`session.orders.cancelation_processes(order_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#cancelation_processes-instance_method)
|
94
|
+
* [`session.orders.capture_payment_process(order_id, payment_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#capture_payment_process-instance_method)
|
95
|
+
* [`session.orders.create_cancelation_process(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#create_cancelation_process-instance_method)
|
96
|
+
* [`session.orders.create_invoice(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#create_invoice-instance_method)
|
97
|
+
* [`session.orders.create_return_process(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#create_return_process-instance_method)
|
98
|
+
* [`session.orders.create_shipping_process(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#create_shipping_process-instance_method)
|
99
|
+
* [`session.orders.events(order_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#events-instance_method)
|
100
|
+
* [`session.orders.find(order_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#find-instance_method)
|
101
|
+
* [`session.orders.mark_payment_process_as_paid(order_id, payment_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#mark_payment_process_as_paid-instance_method)
|
102
|
+
* [`session.orders.mark_payment_process_as_voided(order_id, payment_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#mark_payment_process_as_voided-instance_method)
|
103
|
+
* [`session.orders.mark_refund_process_as_paid(order_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#mark_refund_process_as_paid-instance_method)
|
104
|
+
* [`session.orders.mark_shipping_process_as_delivered(order_id, shipping_process_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#mark_shipping_process_as_delivered-instance_method)
|
105
|
+
* [`session.orders.mark_shipping_process_as_shipped(order_id, shipping_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#mark_shipping_process_as_shipped-instance_method)
|
106
|
+
* [`session.orders.payment_process(order_id, payment_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#payment_process-instance_method)
|
107
|
+
* [`session.orders.payment_processes(order_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#payment_processes-instance_method)
|
108
|
+
* [`session.orders.processes(order_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#processes-instance_method)
|
109
|
+
* [`session.orders.refund_process(order_id, refund_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#refund_process-instance_method)
|
110
|
+
* [`session.orders.refund_processes(order_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#refund_processes-instance_method)
|
111
|
+
* [`session.orders.return_process(order_id, return_process_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#return_process-instance_method)
|
112
|
+
* [`session.orders.return_processes(order_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#return_processes-instance_method)
|
113
|
+
* [`session.orders.search_by_cart_id(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#search_by_cart_id-instance_method)
|
114
|
+
* [`session.orders.search_order_number_by_cart_id(cart_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#search_order_number_by_cart_id-instance_method)
|
115
|
+
* [`session.orders.send_order_document(order_id, order_document_uri)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#send_order_document-instance_method)
|
116
|
+
* [`session.orders.shipping_process(order_id, shipping_process_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#shipping_process-instance_method)
|
117
|
+
* [`session.orders.shipping_processes(order_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#shipping_processes-instance_method)
|
118
|
+
* [`session.orders.update_billing_address(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#update_billing_address-instance_method)
|
119
|
+
* [`session.orders.update_order_note(order_id, order_note)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#update_order_note-instance_method)
|
120
|
+
* [`session.orders.update_shipping_address(order_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Orders#update_shipping_address-instance_method)
|
121
|
+
* Payment methods
|
122
|
+
* [`session.payment_methods.activate(payment_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/PaymentMethods#activate-instance_method)
|
123
|
+
* [`session.payment_methods.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/PaymentMethods#all-instance_method)
|
124
|
+
* [`session.payment_methods.deactivate(payment_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/PaymentMethods#deactivate-instance_method)
|
125
|
+
* [`session.payment_methods.find(payment_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/PaymentMethods#find-instance_method)
|
126
|
+
* [`session.payment_methods.sort(payment_method_ids)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/PaymentMethods#sort-instance_method)
|
127
|
+
* [`session.payment_methods.update(payment_method_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/PaymentMethods#update-instance_method)
|
128
|
+
* Product attribute definitions
|
129
|
+
* [`session.product_attribute_definitions.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductAttributeDefinitions#all-instance_method)
|
130
|
+
* [`session.product_attribute_definitions.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductAttributeDefinitions#create-instance_method)
|
131
|
+
* [`session.product_attribute_definitions.delete(product_attribute_name)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductAttributeDefinitions#delete-instance_method)
|
132
|
+
* [`session.product_attribute_definitions.find(product_attribute_name)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductAttributeDefinitions#find-instance_method)
|
133
|
+
* Products view
|
134
|
+
* [`session.products_view.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductsView#all-instance_method)
|
135
|
+
* [`session.products_view.available_tags`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductsView#available_tags-instance_method)
|
136
|
+
* [`session.products_view.find(product_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductsView#find-instance_method)
|
137
|
+
* [`session.products_view.search_by_tag(tag, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductsView#search_by_tag-instance_method)
|
138
|
+
* [`session.products_view.search_by_term(term, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ProductsView#search_by_term-instance_method)
|
146
139
|
* Products
|
147
|
-
* `session.products.all(params = {})`
|
148
|
-
* `session.products.
|
149
|
-
* `session.products.
|
150
|
-
* `session.products.
|
151
|
-
* `session.products.
|
152
|
-
* `session.products.
|
153
|
-
* `session.products.
|
154
|
-
* `session.products.
|
155
|
-
*
|
156
|
-
|
157
|
-
*
|
158
|
-
* `session.script_tags.
|
159
|
-
* `session.script_tags.
|
160
|
-
* `session.script_tags.
|
161
|
-
* `session.script_tags.
|
162
|
-
|
163
|
-
*
|
164
|
-
* `session.shipping_zones.
|
165
|
-
* `session.shipping_zones.
|
166
|
-
* `session.shipping_zones.
|
167
|
-
* `session.shipping_zones.
|
168
|
-
* `session.shipping_zones.
|
169
|
-
* `session.shipping_zones.
|
170
|
-
* `session.shipping_zones.
|
171
|
-
* `session.shipping_zones.
|
172
|
-
* `session.shipping_zones.
|
173
|
-
* `session.shipping_zones.
|
174
|
-
* `session.shipping_zones.
|
175
|
-
* `session.shipping_zones.update(shipping_zone_id, body)`
|
140
|
+
* [`session.products.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#all-instance_method)
|
141
|
+
* [`session.products.assign_variation_images_differentiator(product_id, differentiator)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#assign_variation_images_differentiator-instance_method)
|
142
|
+
* [`session.products.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#create-instance_method)
|
143
|
+
* [`session.products.create_variation(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#create_variation-instance_method)
|
144
|
+
* [`session.products.delete(product_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#delete-instance_method)
|
145
|
+
* [`session.products.find(product_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#find-instance_method)
|
146
|
+
* [`session.products.find_variation(product_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#find_variation-instance_method)
|
147
|
+
* [`session.products.update(product_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#update-instance_method)
|
148
|
+
* [`session.products.update_variation(product_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Products#update_variation-instance_method)
|
149
|
+
* Script tags
|
150
|
+
* [`session.script_tags.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ScriptTags#all-instance_method)
|
151
|
+
* [`session.script_tags.create(script_tag_url)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ScriptTags#create-instance_method)
|
152
|
+
* [`session.script_tags.delete(script_tag_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ScriptTags#delete-instance_method)
|
153
|
+
* [`session.script_tags.find(script_tag_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ScriptTags#find-instance_method)
|
154
|
+
* [`session.script_tags.update(script_tag_id, script_tag_url)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ScriptTags#update-instance_method)
|
155
|
+
* Shipping zones
|
156
|
+
* [`session.shipping_zones.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#all-instance_method)
|
157
|
+
* [`session.shipping_zones.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#create-instance_method)
|
158
|
+
* [`session.shipping_zones.create_shipping_method(shipping_zone_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#create_shipping_method-instance_method)
|
159
|
+
* [`session.shipping_zones.delete(shipping_zone_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#delete-instance_method)
|
160
|
+
* [`session.shipping_zones.delete_shipping_method(shipping_zone_id, shipping_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#delete_shipping_method-instance_method)
|
161
|
+
* [`session.shipping_zones.find(shipping_zone_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#find-instance_method)
|
162
|
+
* [`session.shipping_zones.find_serviceable_countries`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#find_serviceable_countries-instance_method)
|
163
|
+
* [`session.shipping_zones.shipping_method(shipping_zone_id, shipping_method_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#shipping_method-instance_method)
|
164
|
+
* [`session.shipping_zones.shipping_methods(shipping_zone_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#shipping_methods-instance_method)
|
165
|
+
* [`session.shipping_zones.sort(shipping_zone_ids)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#sort-instance_method)
|
166
|
+
* [`session.shipping_zones.sort_shipping_methods(shipping_zone_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#sort_shipping_methods-instance_method)
|
167
|
+
* [`session.shipping_zones.update(shipping_zone_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/ShippingZones#update-instance_method)
|
176
168
|
* Shop
|
177
|
-
* `session.shop.address`
|
178
|
-
* `session.shop.attribute(attribute_name)`
|
179
|
-
* `session.shop.attributes(params = {})`
|
180
|
-
* `session.shop.
|
181
|
-
* `session.shop.
|
182
|
-
* `session.shop.
|
183
|
-
* `session.shop.
|
184
|
-
* `session.shop.
|
185
|
-
* `session.shop.
|
186
|
-
* `session.shop.
|
187
|
-
* `session.shop.
|
188
|
-
* `session.shop.
|
189
|
-
* `session.shop.
|
190
|
-
* `session.shop.
|
191
|
-
* `session.shop.
|
192
|
-
* `session.shop.
|
193
|
-
* `session.shop.
|
194
|
-
* `session.shop.
|
195
|
-
* `session.shop.
|
196
|
-
* `session.shop.
|
197
|
-
* `session.shop.update_legal_details(body)`
|
198
|
-
* `session.shop.upload_image(image_path, image_name, label)`
|
169
|
+
* [`session.shop.address`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#address-instance_method)
|
170
|
+
* [`session.shop.attribute(attribute_name)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#attribute-instance_method)
|
171
|
+
* [`session.shop.attributes(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#attributes-instance_method)
|
172
|
+
* [`session.shop.create_attribute(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#create_attribute-instance_method)
|
173
|
+
* [`session.shop.create_image(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#create_image-instance_method)
|
174
|
+
* [`session.shop.current`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#current-instance_method)
|
175
|
+
* [`session.shop.delete_attribute(attribute_name)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#delete_attribute-instance_method)
|
176
|
+
* [`session.shop.delete_image(image_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#delete_image-instance_method)
|
177
|
+
* [`session.shop.image(image_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#image-instance_method)
|
178
|
+
* [`session.shop.images(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#images-instance_method)
|
179
|
+
* [`session.shop.legal_content(legal_content_type)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#legal_content-instance_method)
|
180
|
+
* [`session.shop.legal_contents(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#legal_contents-instance_method)
|
181
|
+
* [`session.shop.legal_details`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#legal_details-instance_method)
|
182
|
+
* [`session.shop.search_images_by_label(label)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#search_images_by_label-instance_method)
|
183
|
+
* [`session.shop.update(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#update-instance_method)
|
184
|
+
* [`session.shop.update_address(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#update_address-instance_method)
|
185
|
+
* [`session.shop.update_attribute(attribute_name, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#update_attribute-instance_method)
|
186
|
+
* [`session.shop.update_legal_content(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#update_legal_content-instance_method)
|
187
|
+
* [`session.shop.update_legal_details(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#update_legal_details-instance_method)
|
188
|
+
* [`session.shop.upload_image(image_path, image_name, label)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Shop#upload_image-instance_method)
|
199
189
|
* Signers
|
200
|
-
* `session.signers.all`
|
201
|
-
* `session.signers.create`
|
202
|
-
* `session.signers.delete(signer_id)`
|
203
|
-
* Token
|
204
|
-
* `session.token.create(code)`
|
205
|
-
* `session.token.refresh`
|
190
|
+
* [`session.signers.all`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Signers#all-instance_method)
|
191
|
+
* [`session.signers.create`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Signers#create-instance_method)
|
192
|
+
* [`session.signers.delete(signer_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Signers#delete-instance_method)
|
206
193
|
* Users
|
207
|
-
* `session.users.add_roles(user_id, body)`
|
208
|
-
* `session.users.all(params = {})`
|
209
|
-
* `session.users.change_password(user_id, current_password, new_password)`
|
210
|
-
* `session.users.change_username(user_id, new_username, current_password)`
|
211
|
-
* `session.users.create(body)`
|
212
|
-
* `session.users.disable_support_access`
|
213
|
-
* `session.users.enable_support_access`
|
214
|
-
* `session.users.find(user_id)`
|
215
|
-
* `session.users.roles(user_id)`
|
216
|
-
* `session.users.search_by_username(username)`
|
217
|
-
* `session.users.send_email_address_change(user_id, new_email, current_password, locale)`
|
218
|
-
* `session.users.send_reset_password_email(email, locale)`
|
219
|
-
* `session.users.set_roles(user_id, body)`
|
220
|
-
* `session.users.support_access`
|
221
|
-
* `session.users.verify_password(password)`
|
194
|
+
* [`session.users.add_roles(user_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#add_roles-instance_method)
|
195
|
+
* [`session.users.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#all-instance_method)
|
196
|
+
* [`session.users.change_password(user_id, current_password, new_password)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#change_password-instance_method)
|
197
|
+
* [`session.users.change_username(user_id, new_username, current_password)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#change_username-instance_method)
|
198
|
+
* [`session.users.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#create-instance_method)
|
199
|
+
* [`session.users.disable_support_access`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#disable_support_access-instance_method)
|
200
|
+
* [`session.users.enable_support_access`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#enable_support_access-instance_method)
|
201
|
+
* [`session.users.find(user_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#find-instance_method)
|
202
|
+
* [`session.users.roles(user_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#roles-instance_method)
|
203
|
+
* [`session.users.search_by_username(username)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#search_by_username-instance_method)
|
204
|
+
* [`session.users.send_email_address_change(user_id, new_email, current_password, locale)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#send_email_address_change-instance_method)
|
205
|
+
* [`session.users.send_reset_password_email(email, locale)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#send_reset_password_email-instance_method)
|
206
|
+
* [`session.users.set_roles(user_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#set_roles-instance_method)
|
207
|
+
* [`session.users.support_access`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#support_access-instance_method)
|
208
|
+
* [`session.users.verify_password(password, user_role)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Users#verify_password-instance_method)
|
222
209
|
* Variations
|
223
|
-
* `session.variations.all(product_id, params = {})`
|
224
|
-
* `session.variations.find(product_id, variation_id)`
|
225
|
-
* `session.variations.update(product_id, variation_id, body)`
|
226
|
-
* Webhook
|
227
|
-
* `session.webhook_subscriptions.activate(webhook_subscription_id)`
|
228
|
-
* `session.webhook_subscriptions.all(params = {})`
|
229
|
-
* `session.webhook_subscriptions.create(body)`
|
230
|
-
* `session.webhook_subscriptions.deactivate(webhook_subscription_id)`
|
231
|
-
* `session.webhook_subscriptions.delete(webhook_subscription_id)`
|
232
|
-
* `session.webhook_subscriptions.find(webhook_subscription_id)`
|
233
|
-
* `session.webhook_subscriptions.update(webhook_subscription_id, body)`
|
210
|
+
* [`session.variations.all(product_id, params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Variations#all-instance_method)
|
211
|
+
* [`session.variations.find(product_id, variation_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Variations#find-instance_method)
|
212
|
+
* [`session.variations.update(product_id, variation_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/Variations#update-instance_method)
|
213
|
+
* Webhook subscriptions
|
214
|
+
* [`session.webhook_subscriptions.activate(webhook_subscription_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#activate-instance_method)
|
215
|
+
* [`session.webhook_subscriptions.all(params = {})`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#all-instance_method)
|
216
|
+
* [`session.webhook_subscriptions.create(body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#create-instance_method)
|
217
|
+
* [`session.webhook_subscriptions.deactivate(webhook_subscription_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#deactivate-instance_method)
|
218
|
+
* [`session.webhook_subscriptions.delete(webhook_subscription_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#delete-instance_method)
|
219
|
+
* [`session.webhook_subscriptions.find(webhook_subscription_id)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#find-instance_method)
|
220
|
+
* [`session.webhook_subscriptions.update(webhook_subscription_id, body)`](https://rubydoc.info/github/ePages-de/beyond_api-ruby_client/BeyondApi/WebhookSubscriptions#update-instance_method)
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,21 @@
|
|
5
5
|
[![Maintainability](https://api.codeclimate.com/v1/badges/1d173fa0b393e8eaf2a2/maintainability)](https://codeclimate.com/github/ePages-de/beyond_api-ruby_client/maintainability)
|
6
6
|
![License](https://img.shields.io/github/license/ePages-de/beyond_api-ruby_client)
|
7
7
|
|
8
|
+
## Get your credentials
|
9
|
+
|
10
|
+
### Sign up for a developer test shop
|
11
|
+
|
12
|
+
First you will need to sign up for a Beyond test shop.
|
13
|
+
Visit [our sign up form](https://signup.beyondshop.cloud), fill out the form with your data, and click the **Sign up** button.
|
14
|
+
|
15
|
+
### Create a custom app
|
16
|
+
|
17
|
+
Log in to the cockpit of your test shop, navigate to **Apps > Custom apps** and click **Add custom app**.
|
18
|
+
Fill out the form with the **App name**, **Application Callback URL** and **App scopes**.
|
19
|
+
Save your app.
|
20
|
+
|
21
|
+
You will then receive your `client_id` and `client_secret`.
|
22
|
+
|
8
23
|
## Installation
|
9
24
|
|
10
25
|
Add this line to your application's Gemfile:
|
data/lib/beyond_api.rb
CHANGED
@@ -3,6 +3,7 @@ require "beyond_api/version"
|
|
3
3
|
require "beyond_api/connection"
|
4
4
|
require "beyond_api/request"
|
5
5
|
require "beyond_api/session"
|
6
|
+
require "beyond_api/error"
|
6
7
|
|
7
8
|
require "beyond_api/ext"
|
8
9
|
require "beyond_api/utils"
|
@@ -10,8 +11,6 @@ require "beyond_api/utils"
|
|
10
11
|
require "logger"
|
11
12
|
|
12
13
|
module BeyondApi
|
13
|
-
class Error < StandardError; end
|
14
|
-
|
15
14
|
def self.logger
|
16
15
|
@@logger ||= defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
17
16
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BeyondApi
|
4
|
+
class Error < StandardError
|
5
|
+
attr_reader :error_id, :details, :trace_id, :full_message, :status_code
|
6
|
+
|
7
|
+
def initialize(data, status_code = nil)
|
8
|
+
@error_id = data['errorId']
|
9
|
+
@details = data['details']
|
10
|
+
@trace_id = data['traceId']
|
11
|
+
@full_message = data
|
12
|
+
@status_code = status_code
|
13
|
+
|
14
|
+
super(data['message'])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -16,6 +16,7 @@ module BeyondApi
|
|
16
16
|
#
|
17
17
|
# @beyond_api.scopes +catg:r+
|
18
18
|
#
|
19
|
+
# @option params [Boolean] :paginated
|
19
20
|
# @option params [Integer] :size the page size
|
20
21
|
# @option params [Integer] :page the page number
|
21
22
|
#
|
@@ -25,9 +26,7 @@ module BeyondApi
|
|
25
26
|
# @categories = session.categories.all(size: 100, page: 0)
|
26
27
|
#
|
27
28
|
def all(params = {})
|
28
|
-
|
29
|
-
|
30
|
-
handle_response(response, status)
|
29
|
+
handle_all_request("/categories", :categories, params)
|
31
30
|
end
|
32
31
|
|
33
32
|
#
|
@@ -14,6 +14,7 @@ module BeyondApi
|
|
14
14
|
# -H 'Accept: application/hal+json'
|
15
15
|
#
|
16
16
|
#
|
17
|
+
# @option params [Boolean] :paginated
|
17
18
|
# @option params [Integer] :size the page size
|
18
19
|
# @option params [Integer] :page the page number
|
19
20
|
#
|
@@ -23,9 +24,7 @@ module BeyondApi
|
|
23
24
|
# @categories = session.categories_view.all(size: 100, page: 0)
|
24
25
|
#
|
25
26
|
def all(params = {})
|
26
|
-
|
27
|
-
|
28
|
-
handle_response(response, status)
|
27
|
+
handle_all_request("/product-view/categories", :categories, params)
|
29
28
|
end
|
30
29
|
|
31
30
|
#
|
@@ -14,6 +14,7 @@ module BeyondApi
|
|
14
14
|
#
|
15
15
|
# @beyond_api.scopes +cust:r+
|
16
16
|
#
|
17
|
+
# @option params [Boolean] :paginated
|
17
18
|
# @option params [Integer] :size the page size
|
18
19
|
# @option params [Integer] :page the page number
|
19
20
|
#
|
@@ -23,9 +24,7 @@ module BeyondApi
|
|
23
24
|
# @customers = session.customers.all(size: 20, page: 0)
|
24
25
|
#
|
25
26
|
def all(params = {})
|
26
|
-
|
27
|
-
|
28
|
-
handle_response(response, status)
|
27
|
+
handle_all_request("/customers", :customers, params)
|
29
28
|
end
|
30
29
|
|
31
30
|
#
|
@@ -57,6 +57,7 @@ module BeyondApi
|
|
57
57
|
#
|
58
58
|
# @beyond_api.scopes +ordr:r+
|
59
59
|
#
|
60
|
+
# @option params [Boolean] :paginated
|
60
61
|
# @option params [Integer] :size the page size
|
61
62
|
# @option params [Integer] :page the page number
|
62
63
|
#
|
@@ -66,9 +67,7 @@ module BeyondApi
|
|
66
67
|
# @orders = session.orders.all(size: 100, page: 0)
|
67
68
|
#
|
68
69
|
def all(params = {})
|
69
|
-
|
70
|
-
|
71
|
-
handle_response(response, status)
|
70
|
+
handle_all_request("/orders", :orders, params)
|
72
71
|
end
|
73
72
|
|
74
73
|
#
|
@@ -38,6 +38,7 @@ module BeyondApi
|
|
38
38
|
#
|
39
39
|
# @beyond_api.scopes +pymt:r+
|
40
40
|
#
|
41
|
+
# @option params [Boolean] :paginated
|
41
42
|
# @option params [Integer] :size the page size
|
42
43
|
# @option params [Integer] :page the page number
|
43
44
|
#
|
@@ -47,9 +48,7 @@ module BeyondApi
|
|
47
48
|
# @payment_methods = session.payment_methods.all(size: 100, page: 0)
|
48
49
|
#
|
49
50
|
def all(params = {})
|
50
|
-
|
51
|
-
|
52
|
-
handle_response(response, status)
|
51
|
+
handle_all_request("/payment-methods", :payment_methods, params)
|
53
52
|
end
|
54
53
|
|
55
54
|
#
|
@@ -14,9 +14,9 @@ module BeyondApi
|
|
14
14
|
#
|
15
15
|
# @beyond_api.scopes +prad:r+
|
16
16
|
#
|
17
|
-
# @option
|
18
|
-
# @option
|
19
|
-
# @option
|
17
|
+
# @option params [Boolean] :paginated
|
18
|
+
# @option params [Integer] :size the page size
|
19
|
+
# @option params [Integer] :page the page number
|
20
20
|
#
|
21
21
|
# @return [OpenStruct]
|
22
22
|
#
|
@@ -24,18 +24,7 @@ module BeyondApi
|
|
24
24
|
# @product_attribute_definitions = session.product_attribute_definitions.all(size: 100, page: 0)
|
25
25
|
#
|
26
26
|
def all(params = {})
|
27
|
-
|
28
|
-
result = all_paginated(page: 0, size: 1000)
|
29
|
-
|
30
|
-
(1..result[:page][:total_pages] - 1).each do |page|
|
31
|
-
result[:embedded][:product_attribute_definition].concat(all_paginated(page: page, size: 1000)[:embedded][:product_attribute_definitions])
|
32
|
-
end
|
33
|
-
|
34
|
-
result.is_a?(Hash) ? result.delete(:page) : result.delete_field(:page)
|
35
|
-
result
|
36
|
-
else
|
37
|
-
all_paginated(params)
|
38
|
-
end
|
27
|
+
handle_all_request("/product-attribute-definitions", :product_attribute_definitions, params)
|
39
28
|
end
|
40
29
|
|
41
30
|
#
|
@@ -113,12 +102,5 @@ module BeyondApi
|
|
113
102
|
|
114
103
|
handle_response(response, status)
|
115
104
|
end
|
116
|
-
|
117
|
-
private
|
118
|
-
|
119
|
-
def all_paginated(params = {})
|
120
|
-
response, status = BeyondApi::Request.get(@session, "/product-attribute-definitions", params)
|
121
|
-
handle_response(response, status)
|
122
|
-
end
|
123
105
|
end
|
124
106
|
end
|
@@ -32,6 +32,7 @@ module BeyondApi
|
|
32
32
|
#
|
33
33
|
# @beyond_api.scopes +prod:r+
|
34
34
|
#
|
35
|
+
# @option params [Boolean] :paginated
|
35
36
|
# @option params [Integer] :size the page size
|
36
37
|
# @option params [Integer] :page the page number
|
37
38
|
#
|
@@ -41,9 +42,7 @@ module BeyondApi
|
|
41
42
|
# @products = session.products.all(size: 100, page: 0)
|
42
43
|
#
|
43
44
|
def all(params = {})
|
44
|
-
|
45
|
-
|
46
|
-
handle_response(response, status)
|
45
|
+
handle_all_request("/products", :products, params)
|
47
46
|
end
|
48
47
|
|
49
48
|
#
|
@@ -13,6 +13,7 @@ module BeyondApi
|
|
13
13
|
# -H 'Content-Type: application/json' \
|
14
14
|
# -H 'Accept: application/hal+json'
|
15
15
|
#
|
16
|
+
# @option params [Boolean] :paginated
|
16
17
|
# @option params [Integer] :size the page size
|
17
18
|
# @option params [Integer] :page the page number
|
18
19
|
#
|
@@ -22,9 +23,7 @@ module BeyondApi
|
|
22
23
|
# @products = session.products_view.all(page: 0, size: 100)
|
23
24
|
#
|
24
25
|
def all(params = {})
|
25
|
-
|
26
|
-
|
27
|
-
handle_response(response, status)
|
26
|
+
handle_all_request("/product-view/products", :products, params)
|
28
27
|
end
|
29
28
|
|
30
29
|
#
|
@@ -12,6 +12,7 @@ module BeyondApi
|
|
12
12
|
# $ curl 'https://api-shop.beyondshop.cloud/api/script-tags' -i -X GET \
|
13
13
|
# -H 'Authorization: Bearer <Access token>'
|
14
14
|
#
|
15
|
+
# @option params [Boolean] :paginated
|
15
16
|
# @option params [Integer] :size the page size
|
16
17
|
# @option params [Integer] :page the page number
|
17
18
|
#
|
@@ -21,9 +22,7 @@ module BeyondApi
|
|
21
22
|
# @script_tags = session.script_tags.all(size: 20, page: 0)
|
22
23
|
#
|
23
24
|
def all(params = {})
|
24
|
-
|
25
|
-
|
26
|
-
handle_response(response, status)
|
25
|
+
handle_all_request("/script-tags", :script_tags, params)
|
27
26
|
end
|
28
27
|
|
29
28
|
#
|
@@ -14,6 +14,7 @@ module BeyondApi
|
|
14
14
|
# $ curl 'https://api-shop.beyondshop.cloud/api/shipping-zones' -i -X GET \
|
15
15
|
# -H 'Authorization: Bearer <Access token>'
|
16
16
|
#
|
17
|
+
# @option params [Boolean] :paginated
|
17
18
|
# @option params [Integer] :size the page size
|
18
19
|
# @option params [Integer] :page the page number
|
19
20
|
#
|
@@ -23,9 +24,7 @@ module BeyondApi
|
|
23
24
|
# @shipping_zones = session.shipping_zones.all(size: 20, page: 0)
|
24
25
|
#
|
25
26
|
def all(params = {})
|
26
|
-
|
27
|
-
|
28
|
-
handle_response(response, status)
|
27
|
+
handle_all_request("/shipping-zones", :shipping_zones, params)
|
29
28
|
end
|
30
29
|
|
31
30
|
#
|
@@ -65,26 +65,6 @@ module BeyondApi
|
|
65
65
|
handle_response(response, status)
|
66
66
|
end
|
67
67
|
|
68
|
-
#
|
69
|
-
# A +POST+ request is used to close a shop.
|
70
|
-
#
|
71
|
-
# $ curl 'https://api-shop.beyondshop.cloud/api/shop/close' -i -X POST \
|
72
|
-
# -H 'Content-Type: application/json' \
|
73
|
-
# -H 'Authorization: Bearer <Access token>'
|
74
|
-
#
|
75
|
-
# @beyond_api.scopes +shcl:c+
|
76
|
-
#
|
77
|
-
# @return true
|
78
|
-
#
|
79
|
-
# @example
|
80
|
-
# session.shop.close
|
81
|
-
#
|
82
|
-
def close
|
83
|
-
response, status = BeyondApi::Request.post(@session, "/shop/close")
|
84
|
-
|
85
|
-
handle_response(response, status, respond_with_true: true)
|
86
|
-
end
|
87
|
-
|
88
68
|
#
|
89
69
|
# A +POST+ request is used to create a shop attribute.
|
90
70
|
#
|
@@ -310,26 +290,6 @@ module BeyondApi
|
|
310
290
|
handle_response(response, status)
|
311
291
|
end
|
312
292
|
|
313
|
-
#
|
314
|
-
# A +POST+ request is used to open a shop.
|
315
|
-
#
|
316
|
-
# $ curl 'https://api-shop.beyondshop.cloud/api/shop/open' -i -X POST \
|
317
|
-
# -H 'Content-Type: application/json' \
|
318
|
-
# -H 'Authorization: Bearer <Access token>'
|
319
|
-
#
|
320
|
-
# @beyond_api.scopes +shcl:c+
|
321
|
-
#
|
322
|
-
# @return true
|
323
|
-
#
|
324
|
-
# @example
|
325
|
-
# session.shop.open
|
326
|
-
#
|
327
|
-
def open
|
328
|
-
response, status = BeyondApi::Request.post(@session, "/shop/open")
|
329
|
-
|
330
|
-
handle_response(response, status, respond_with_true: true)
|
331
|
-
end
|
332
|
-
|
333
293
|
#
|
334
294
|
# A +GET+ request is issued to search for shop images by label.
|
335
295
|
#
|
@@ -1,13 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "beyond_api/utils"
|
4
|
+
|
3
5
|
module BeyondApi
|
4
6
|
class Token
|
5
7
|
class InvalidSessionError < StandardError; end
|
6
8
|
|
9
|
+
include BeyondApi::Utils
|
10
|
+
|
7
11
|
attr_reader :session
|
8
12
|
|
9
13
|
def initialize(session)
|
10
14
|
@session = session
|
15
|
+
|
11
16
|
raise InvalidSessionError.new("Invalid session") unless session.is_a? BeyondApi::Session
|
12
17
|
raise InvalidSessionError.new("Session api_url cannot be nil") if session.api_url.nil?
|
13
18
|
end
|
@@ -17,12 +22,7 @@ module BeyondApi
|
|
17
22
|
grant_type: "authorization_code",
|
18
23
|
code: code)
|
19
24
|
|
20
|
-
|
21
|
-
@session.access_token = response["access_token"]
|
22
|
-
@session.refresh_token = response["refresh_token"]
|
23
|
-
else
|
24
|
-
BeyondApi::Error.new(response)
|
25
|
-
end
|
25
|
+
handle_response(response, status)
|
26
26
|
end
|
27
27
|
|
28
28
|
def refresh
|
@@ -30,11 +30,25 @@ module BeyondApi
|
|
30
30
|
grant_type: "refresh_token",
|
31
31
|
refresh_token: @session.refresh_token)
|
32
32
|
|
33
|
+
handle_response(response, status)
|
34
|
+
end
|
35
|
+
|
36
|
+
def client_credentials
|
37
|
+
response, status = BeyondApi::Request.token(@session.api_url + "/oauth/token",
|
38
|
+
grant_type: "client_credentials")
|
39
|
+
|
40
|
+
handle_response(response, status)
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def handle_response(response, status)
|
33
46
|
if status.between?(200, 299)
|
34
47
|
@session.access_token = response["access_token"]
|
35
48
|
@session.refresh_token = response["refresh_token"]
|
49
|
+
@session
|
36
50
|
else
|
37
|
-
|
51
|
+
handle_error(response, status)
|
38
52
|
end
|
39
53
|
end
|
40
54
|
end
|
@@ -40,6 +40,7 @@ module BeyondApi
|
|
40
40
|
#
|
41
41
|
# @beyond_api.scopes +user:r+
|
42
42
|
#
|
43
|
+
# @option params [Boolean] :paginated
|
43
44
|
# @option params [Integer] :size the page size
|
44
45
|
# @option params [Integer] :page the page number
|
45
46
|
#
|
@@ -49,9 +50,7 @@ module BeyondApi
|
|
49
50
|
# @users = session.users.all(size: 100, page: 0)
|
50
51
|
#
|
51
52
|
def all(params = {})
|
52
|
-
|
53
|
-
|
54
|
-
handle_response(response, status)
|
53
|
+
handle_all_request("/users", :users, params)
|
55
54
|
end
|
56
55
|
|
57
56
|
#
|
@@ -34,6 +34,7 @@ module BeyondApi
|
|
34
34
|
# -H 'Accept: application/hal+json' \
|
35
35
|
# -H 'Authorization: Bearer <Access token>'
|
36
36
|
#
|
37
|
+
# @option params [Boolean] :paginated
|
37
38
|
# @option params [Integer] :size the page size
|
38
39
|
# @option params [Integer] :page the page number
|
39
40
|
#
|
@@ -43,9 +44,7 @@ module BeyondApi
|
|
43
44
|
# @webhook_subscriptions = session.webhook_subscriptions.all(size: 100, page: 0)
|
44
45
|
#
|
45
46
|
def all(params = {})
|
46
|
-
|
47
|
-
|
48
|
-
handle_response(response, status)
|
47
|
+
handle_all_request("/webhook-subscriptions", :webhook_subscriptions, params)
|
49
48
|
end
|
50
49
|
|
51
50
|
#
|
data/lib/beyond_api/session.rb
CHANGED
@@ -13,7 +13,6 @@ require "beyond_api/resources/payment_methods"
|
|
13
13
|
require "beyond_api/resources/product_attribute_definitions"
|
14
14
|
require "beyond_api/resources/products_view"
|
15
15
|
require "beyond_api/resources/products"
|
16
|
-
require "beyond_api/resources/scopes"
|
17
16
|
require "beyond_api/resources/script_tags"
|
18
17
|
require "beyond_api/resources/shipping_zones"
|
19
18
|
require "beyond_api/resources/shop"
|
@@ -82,10 +81,6 @@ module BeyondApi
|
|
82
81
|
BeyondApi::Products.new(self)
|
83
82
|
end
|
84
83
|
|
85
|
-
def scopes
|
86
|
-
BeyondApi::Scopes.new(self)
|
87
|
-
end
|
88
|
-
|
89
84
|
def script_tags
|
90
85
|
BeyondApi::ScriptTags.new(self)
|
91
86
|
end
|
data/lib/beyond_api/utils.rb
CHANGED
@@ -10,12 +10,16 @@ module BeyondApi
|
|
10
10
|
response = sanitize_response(response)
|
11
11
|
BeyondApi.configuration.object_struct_responses ? to_object_struct(response) : response
|
12
12
|
else
|
13
|
-
|
14
|
-
BeyondApi.logger.error "[Beyond API] #{response}"
|
15
|
-
BeyondApi.configuration.raise_error_requests ? raise(error) : error
|
13
|
+
handle_error(response, status)
|
16
14
|
end
|
17
15
|
end
|
18
16
|
|
17
|
+
def handle_error(response, status)
|
18
|
+
BeyondApi.logger.error "[Beyond API] #{status}: #{response}"
|
19
|
+
error = BeyondApi::Error.new(response, status)
|
20
|
+
BeyondApi.configuration.raise_error_requests ? raise(error) : error
|
21
|
+
end
|
22
|
+
|
19
23
|
def to_object_struct(data)
|
20
24
|
if data.is_a? Hash
|
21
25
|
return OpenStruct.new(data.map { |key, val| [key, to_object_struct(val)] }.to_h)
|
@@ -40,6 +44,22 @@ module BeyondApi
|
|
40
44
|
key.chars.first == "_" ? key[1..-1] : key
|
41
45
|
end
|
42
46
|
|
47
|
+
def handle_all_request(url, resource, params = {})
|
48
|
+
if params[:paginated] == false
|
49
|
+
result = all_paginated(url, { page: 0, size: 1000 })
|
50
|
+
|
51
|
+
(1..result[:page][:total_pages] - 1).each do |page|
|
52
|
+
result[:embedded][resource].concat(all_paginated(url, { page: page, size: 1000 })[:embedded][resource])
|
53
|
+
end
|
54
|
+
|
55
|
+
result.is_a?(Hash) ? result.delete(:page) : result.delete_field(:page)
|
56
|
+
|
57
|
+
result
|
58
|
+
else
|
59
|
+
all_paginated(url, params)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
43
63
|
private
|
44
64
|
|
45
65
|
def transform(thing)
|
@@ -49,5 +69,11 @@ module BeyondApi
|
|
49
69
|
else; thing
|
50
70
|
end
|
51
71
|
end
|
72
|
+
|
73
|
+
def all_paginated(url, params = {})
|
74
|
+
response, status = BeyondApi::Request.get(@session, url, params)
|
75
|
+
|
76
|
+
handle_response(response, status)
|
77
|
+
end
|
52
78
|
end
|
53
79
|
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.11.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: 2020-
|
13
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- bin/setup
|
134
134
|
- lib/beyond_api.rb
|
135
135
|
- lib/beyond_api/connection.rb
|
136
|
+
- lib/beyond_api/error.rb
|
136
137
|
- lib/beyond_api/ext.rb
|
137
138
|
- lib/beyond_api/request.rb
|
138
139
|
- lib/beyond_api/resources/base.rb
|
@@ -156,7 +157,6 @@ files:
|
|
156
157
|
- lib/beyond_api/resources/products/variation_properties.rb
|
157
158
|
- lib/beyond_api/resources/products/videos.rb
|
158
159
|
- lib/beyond_api/resources/products_view.rb
|
159
|
-
- lib/beyond_api/resources/scopes.rb
|
160
160
|
- lib/beyond_api/resources/script_tags.rb
|
161
161
|
- lib/beyond_api/resources/shipping_zones.rb
|
162
162
|
- lib/beyond_api/resources/shop.rb
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "beyond_api/utils"
|
4
|
-
|
5
|
-
module BeyondApi
|
6
|
-
class Scopes < Base
|
7
|
-
include BeyondApi::Utils
|
8
|
-
|
9
|
-
#
|
10
|
-
# A +GET+ request will list all scopes in the system.
|
11
|
-
#
|
12
|
-
# $ curl 'https://api-shop.beyondshop.cloud/api/scopes' -i -X GET \
|
13
|
-
# -H 'Authorization: Bearer <Access token>'
|
14
|
-
#
|
15
|
-
# @beyond_api.scopes +scop:r+
|
16
|
-
#
|
17
|
-
# @option params [Integer] :size the page size
|
18
|
-
# @option params [Integer] :page the page number
|
19
|
-
|
20
|
-
# @return [OpenStruct]
|
21
|
-
#
|
22
|
-
# @example
|
23
|
-
# @scopes = session.scopes.all(size: 20, page: 0)
|
24
|
-
#
|
25
|
-
def all(params = {})
|
26
|
-
response, status = BeyondApi::Request.get(@session, "/scopes", params)
|
27
|
-
|
28
|
-
handle_response(response, status)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|