beyond_api 0.5.1.pre → 0.6.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +57 -3
  3. data/Gemfile.lock +3 -3
  4. data/lib/beyond_api/resources/carts.rb +18 -9
  5. data/lib/beyond_api/resources/categories.rb +2 -2
  6. data/lib/beyond_api/resources/categories_view.rb +13 -2
  7. data/lib/beyond_api/resources/checkout_settings.rb +16 -1
  8. data/lib/beyond_api/resources/customers.rb +333 -0
  9. data/lib/beyond_api/resources/newsletter_target.rb +1 -1
  10. data/lib/beyond_api/resources/order_settings.rb +45 -28
  11. data/lib/beyond_api/resources/orders.rb +175 -87
  12. data/lib/beyond_api/resources/payment_methods.rb +28 -25
  13. data/lib/beyond_api/resources/product_attribute_definitions.rb +3 -5
  14. data/lib/beyond_api/resources/products/attachments.rb +13 -14
  15. data/lib/beyond_api/resources/products/availability.rb +12 -10
  16. data/lib/beyond_api/resources/products/cross_sells.rb +159 -0
  17. data/lib/beyond_api/resources/products/custom_attributes.rb +7 -7
  18. data/lib/beyond_api/resources/products/images.rb +47 -8
  19. data/lib/beyond_api/resources/products/videos.rb +146 -0
  20. data/lib/beyond_api/resources/products.rb +11 -9
  21. data/lib/beyond_api/resources/products_view.rb +6 -51
  22. data/lib/beyond_api/resources/shipping_zones.rb +5 -5
  23. data/lib/beyond_api/resources/shop.rb +16 -21
  24. data/lib/beyond_api/resources/signers.rb +1 -1
  25. data/lib/beyond_api/resources/users.rb +13 -10
  26. data/lib/beyond_api/resources/variations/images.rb +160 -0
  27. data/lib/beyond_api/resources/variations.rb +40 -37
  28. data/lib/beyond_api/resources/webhook_subscriptions.rb +1 -1
  29. data/lib/beyond_api/session.rb +5 -5
  30. data/lib/beyond_api/version.rb +1 -1
  31. metadata +7 -4
  32. data/lib/beyond_api/resources/product_settings.rb +0 -28
@@ -13,14 +13,14 @@ module BeyondApi
13
13
  # -H 'Accept: application/hal+json' \
14
14
  # -H 'Authorization: Bearer <Access token>'
15
15
  #
16
- # @beyond_api.scopes +oset:r
16
+ # @beyond_api.scopes +oset:r+
17
17
  #
18
18
  # @return [OpenStruct]
19
19
  #
20
20
  # @example
21
21
  # @order_settings = session.payment_methods.all
22
22
  #
23
- def all(params = {})
23
+ def all
24
24
  response, status = BeyondApi::Request.get(@session, "/order-settings")
25
25
 
26
26
  handle_response(response, status)
@@ -33,19 +33,30 @@ module BeyondApi
33
33
  # -H 'Content-Type: application/json' \
34
34
  # -H 'Accept: application/hal+json' \
35
35
  # -H 'Authorization: Bearer <Access token>' \
36
- # -d '{"invoiceCancelationNote": "This is an invoice cancelation note","invoiceCancellationNote": "This is an invoice cancellation note","defaultDeliveryDateNote": "This is the default delivery date note","defaultInvoiceNote": "This is the default invoice note","orderNumberConfiguration": {
37
- # "stringPrefix" : "2017-shop-",
38
- # "nextNumericSuffix" : 1000,
39
- # "numericSuffixLength" : 4
40
- # },
41
- # "invoiceNumberConfiguration": {
42
- # "stringPrefix" : "2017-invoice-",
43
- # "nextNumericSuffix" : 1000,
44
- # "numericSuffixLength" : 4
45
- # }
46
- # }'
36
+ # -d '{
37
+ # "invoiceCancelationNote" : "This is an invoice cancelation note",
38
+ # "defaultDeliveryDateNote" : "This is the default delivery date note",
39
+ # "defaultInvoiceNote" : "This is the default invoice note",
40
+ # "orderNumberConfiguration" : {
41
+ # "stringPrefix" : "2017-shop-",
42
+ # "nextNumericSuffix" : 1000,
43
+ # "numericSuffixLength" : 4
44
+ # },
45
+ # "invoiceNumberConfiguration" : {
46
+ # "stringPrefix" : "2017-invoice-",
47
+ # "nextNumericSuffix" : 1000,
48
+ # "numericSuffixLength" : 4
49
+ # },
50
+ # "customOrderOpenMailText" : " Your <br /> 1",
51
+ # "customOrderCanceledMailText" : " Your <br /> 2",
52
+ # "customInvoiceCustomerMailText" : " Your <br /> 3",
53
+ # "customInvoiceCanceledMailText" : " Your <br /> 4",
54
+ # "customOrderShippedMailText" : " Your <br /> 5",
55
+ # "customOrderPendingMailText" : " Your <br /> 6",
56
+ # "customOrderReturnedMailText" : " Your <br /> 7"
57
+ # }'
47
58
  #
48
- # @beyond_api.scopes +oset:u
59
+ # @beyond_api.scopes +oset:u+
49
60
  #
50
61
  # @param body [Hash] the request body
51
62
  #
@@ -53,25 +64,31 @@ module BeyondApi
53
64
  #
54
65
  # @example
55
66
  # body = {
56
- # "invoiceCancelationNote"=> "This is an invoice cancelation note",
57
- # "invoiceCancellationNote"=> "This is an invoice cancellation note",
58
- # "defaultDeliveryDateNote"=> "This is the default delivery date note",
59
- # "defaultInvoiceNote"=> "This is the default invoice note",
60
- # "orderNumberConfiguration"=> {
61
- # "stringPrefix"=> "2017-shop-",
62
- # "nextNumericSuffix"=> 1000,
63
- # "numericSuffixLength"=> 4
67
+ # "invoiceCancelationNote" : "This is an invoice cancelation note",
68
+ # "defaultDeliveryDateNote" : "This is the default delivery date note",
69
+ # "defaultInvoiceNote" : "This is the default invoice note",
70
+ # "orderNumberConfiguration" : {
71
+ # "stringPrefix" : "2017-shop-",
72
+ # "nextNumericSuffix" : 1000,
73
+ # "numericSuffixLength" : 4
74
+ # },
75
+ # "invoiceNumberConfiguration" : {
76
+ # "stringPrefix" : "2017-invoice-",
77
+ # "nextNumericSuffix" : 1000,
78
+ # "numericSuffixLength" : 4
64
79
  # },
65
- # "invoiceNumberConfiguration"=> {
66
- # "stringPrefix"=> "2017-invoice-",
67
- # "nextNumericSuffix"=> 1000,
68
- # "numericSuffixLength"=> 4
69
- # }
80
+ # "customOrderOpenMailText" : " Your <br /> 1",
81
+ # "customOrderCanceledMailText" : " Your <br /> 2",
82
+ # "customInvoiceCustomerMailText" : " Your <br /> 3",
83
+ # "customInvoiceCanceledMailText" : " Your <br /> 4",
84
+ # "customOrderShippedMailText" : " Your <br /> 5",
85
+ # "customOrderPendingMailText" : " Your <br /> 6",
86
+ # "customOrderReturnedMailText" : " Your <br /> 7"
70
87
  # }
71
88
  #
72
89
  # @order_settings = session.order_settings.update(body)
73
90
  #
74
- def update(order_settings, body)
91
+ def update(body)
75
92
  response, status = BeyondApi::Request.put(@session, "/order-settings", body)
76
93
 
77
94
  handle_response(response, status)