plenty_client 0.0.9 → 0.1.0

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 (124) hide show
  1. checksums.yaml +5 -5
  2. data/lib/plenty_client/account/address.rb +37 -0
  3. data/lib/plenty_client/account/contact/address.rb +8 -6
  4. data/lib/plenty_client/account/contact/bank.rb +7 -5
  5. data/lib/plenty_client/account/contact/type.rb +7 -5
  6. data/lib/plenty_client/account/contact.rb +7 -5
  7. data/lib/plenty_client/account.rb +11 -9
  8. data/lib/plenty_client/accounting.rb +6 -4
  9. data/lib/plenty_client/authentication.rb +7 -5
  10. data/lib/plenty_client/authorization.rb +4 -2
  11. data/lib/plenty_client/basket/item.rb +4 -2
  12. data/lib/plenty_client/basket.rb +3 -1
  13. data/lib/plenty_client/category/branch.rb +4 -2
  14. data/lib/plenty_client/category/template.rb +5 -3
  15. data/lib/plenty_client/category.rb +12 -10
  16. data/lib/plenty_client/comment.rb +8 -6
  17. data/lib/plenty_client/config.rb +6 -0
  18. data/lib/plenty_client/document/category.rb +6 -4
  19. data/lib/plenty_client/document/order.rb +7 -5
  20. data/lib/plenty_client/document.rb +4 -2
  21. data/lib/plenty_client/endpoint.rb +1 -1
  22. data/lib/plenty_client/item/attribute/name.rb +8 -6
  23. data/lib/plenty_client/item/attribute/value.rb +8 -6
  24. data/lib/plenty_client/item/attribute/value_name.rb +8 -6
  25. data/lib/plenty_client/item/attribute.rb +7 -5
  26. data/lib/plenty_client/item/barcode.rb +11 -9
  27. data/lib/plenty_client/item/cross_selling.rb +5 -3
  28. data/lib/plenty_client/item/image/availability.rb +6 -4
  29. data/lib/plenty_client/item/image/name.rb +8 -6
  30. data/lib/plenty_client/item/image.rb +15 -12
  31. data/lib/plenty_client/item/manufacturer/commission.rb +8 -6
  32. data/lib/plenty_client/item/manufacturer.rb +7 -5
  33. data/lib/plenty_client/item/property/market_reference.rb +8 -6
  34. data/lib/plenty_client/item/property/name.rb +8 -6
  35. data/lib/plenty_client/item/property.rb +7 -5
  36. data/lib/plenty_client/item/property_group.rb +7 -5
  37. data/lib/plenty_client/item/property_group_name.rb +8 -6
  38. data/lib/plenty_client/item/sales_price.rb +7 -5
  39. data/lib/plenty_client/item/shipping_profile.rb +5 -3
  40. data/lib/plenty_client/item/unit.rb +7 -5
  41. data/lib/plenty_client/item/unit_name.rb +7 -5
  42. data/lib/plenty_client/item/variation/barcode.rb +3 -1
  43. data/lib/plenty_client/item/variation/bundle.rb +8 -6
  44. data/lib/plenty_client/item/variation/category.rb +14 -6
  45. data/lib/plenty_client/item/variation/client.rb +6 -4
  46. data/lib/plenty_client/item/variation/default_category.rb +7 -5
  47. data/lib/plenty_client/item/variation/description.rb +8 -6
  48. data/lib/plenty_client/item/variation/image.rb +8 -6
  49. data/lib/plenty_client/item/variation/market.rb +6 -4
  50. data/lib/plenty_client/item/variation/market_ident_number.rb +8 -6
  51. data/lib/plenty_client/item/variation/property/text.rb +8 -6
  52. data/lib/plenty_client/item/variation/property.rb +22 -17
  53. data/lib/plenty_client/item/variation/sales_price.rb +15 -19
  54. data/lib/plenty_client/item/variation/sku.rb +8 -6
  55. data/lib/plenty_client/item/variation/stock.rb +9 -7
  56. data/lib/plenty_client/item/variation/supplier.rb +8 -6
  57. data/lib/plenty_client/item/variation/warehouse.rb +8 -6
  58. data/lib/plenty_client/item/variation.rb +8 -6
  59. data/lib/plenty_client/item.rb +11 -4
  60. data/lib/plenty_client/item_set/component.rb +9 -7
  61. data/lib/plenty_client/item_set/config.rb +4 -2
  62. data/lib/plenty_client/item_set.rb +9 -7
  63. data/lib/plenty_client/listing/layout_template.rb +5 -3
  64. data/lib/plenty_client/listing/market/directory.rb +6 -4
  65. data/lib/plenty_client/listing/market/history.rb +7 -5
  66. data/lib/plenty_client/listing/market/info.rb +3 -1
  67. data/lib/plenty_client/listing/market/text.rb +7 -5
  68. data/lib/plenty_client/listing/market.rb +9 -7
  69. data/lib/plenty_client/listing/option_template.rb +7 -5
  70. data/lib/plenty_client/listing/shipping_profile.rb +4 -2
  71. data/lib/plenty_client/listing/stock_dependence_type.rb +4 -2
  72. data/lib/plenty_client/listing/type.rb +4 -2
  73. data/lib/plenty_client/listing.rb +7 -5
  74. data/lib/plenty_client/market/credentials.rb +7 -5
  75. data/lib/plenty_client/market/ebay/authentication.rb +4 -2
  76. data/lib/plenty_client/market/ebay/parts_fitment.rb +8 -6
  77. data/lib/plenty_client/market/ebay/shop_category.rb +3 -1
  78. data/lib/plenty_client/order/contact_wish.rb +4 -2
  79. data/lib/plenty_client/order/coupon_code/contact.rb +3 -1
  80. data/lib/plenty_client/order/coupon_code/validation.rb +3 -1
  81. data/lib/plenty_client/order/coupon_code.rb +3 -1
  82. data/lib/plenty_client/order/currency.rb +6 -4
  83. data/lib/plenty_client/order/date.rb +6 -4
  84. data/lib/plenty_client/order/item/serial_number.rb +4 -2
  85. data/lib/plenty_client/order/item.rb +3 -1
  86. data/lib/plenty_client/order/referrer.rb +4 -2
  87. data/lib/plenty_client/order/shipping/country.rb +3 -1
  88. data/lib/plenty_client/order/shipping/information.rb +12 -17
  89. data/lib/plenty_client/order/shipping/package.rb +9 -7
  90. data/lib/plenty_client/order/shipping/profile.rb +4 -2
  91. data/lib/plenty_client/order/shipping/service_provider.rb +5 -3
  92. data/lib/plenty_client/order/status_history.rb +23 -0
  93. data/lib/plenty_client/order.rb +9 -7
  94. data/lib/plenty_client/order_summary.rb +9 -7
  95. data/lib/plenty_client/payment/contact.rb +4 -2
  96. data/lib/plenty_client/payment/method.rb +10 -8
  97. data/lib/plenty_client/payment/method_name.rb +5 -3
  98. data/lib/plenty_client/payment/order.rb +5 -3
  99. data/lib/plenty_client/payment/property/type/name.rb +7 -5
  100. data/lib/plenty_client/payment/property/type.rb +7 -5
  101. data/lib/plenty_client/payment/property.rb +9 -7
  102. data/lib/plenty_client/payment/status.rb +3 -1
  103. data/lib/plenty_client/payment/transaction.rb +3 -1
  104. data/lib/plenty_client/payment.rb +8 -6
  105. data/lib/plenty_client/request.rb +54 -24
  106. data/lib/plenty_client/sales_price/account.rb +5 -3
  107. data/lib/plenty_client/sales_price/country.rb +5 -3
  108. data/lib/plenty_client/sales_price/currency.rb +5 -3
  109. data/lib/plenty_client/sales_price/customer_class.rb +6 -4
  110. data/lib/plenty_client/sales_price/name.rb +7 -5
  111. data/lib/plenty_client/sales_price/online_store.rb +5 -3
  112. data/lib/plenty_client/sales_price/referrer.rb +5 -3
  113. data/lib/plenty_client/stock.rb +5 -3
  114. data/lib/plenty_client/ticket.rb +6 -4
  115. data/lib/plenty_client/version.rb +3 -1
  116. data/lib/plenty_client/warehouse/management/rack.rb +6 -4
  117. data/lib/plenty_client/warehouse/management/shelf.rb +6 -4
  118. data/lib/plenty_client/warehouse/management/storage_location.rb +6 -4
  119. data/lib/plenty_client/warehouse/management.rb +21 -5
  120. data/lib/plenty_client/warehouse/stock.rb +8 -6
  121. data/lib/plenty_client/warehouse.rb +5 -3
  122. data/lib/plenty_client/webstore.rb +3 -1
  123. data/lib/plenty_client.rb +5 -1
  124. metadata +5 -3
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Market
3
5
  module Ebay
@@ -5,12 +7,12 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_MARKET_EBAY_PARTS_FITMENTS = '/markets/ebay/parts-fitments'.freeze
9
- FIND_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments/{fitmentId}'.freeze
10
- CREATE_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments'.freeze
11
- UPDATE_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments/{fitmentId}'.freeze
12
- DELETE_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments/{fitmentId}'.freeze
13
- SEARCH_MARKET_EBAY_PARTS_FITMENTS = '/markets/ebay/parts-fitments/search'.freeze
10
+ LIST_MARKET_EBAY_PARTS_FITMENTS = '/markets/ebay/parts-fitments'
11
+ FIND_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments/{fitmentId}'
12
+ CREATE_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments'
13
+ UPDATE_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments/{fitmentId}'
14
+ DELETE_MARKET_EBAY_PARTS_FITMENT = '/markets/ebay/parts-fitments/{fitmentId}'
15
+ SEARCH_MARKET_EBAY_PARTS_FITMENTS = '/markets/ebay/parts-fitments/search'
14
16
 
15
17
  class << self
16
18
  def list(headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Market
3
5
  module Ebay
@@ -5,7 +7,7 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_MARKET_EBAY_SHOP_CATEGORIES = '/markets/ebay/shop_categories'.freeze
10
+ LIST_MARKET_EBAY_SHOP_CATEGORIES = '/markets/ebay/shop_categories'
9
11
 
10
12
  class << self
11
13
  def list(headers = {}, &block)
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module ContactWish
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- FIND_ORDER_COTACT_WISH = '/orders/{orderId}/contactWish'.freeze
9
+ FIND_ORDER_CONTACT_WISH = '/orders/{orderId}/contactWish'
8
10
 
9
11
  class << self
10
12
  def find(order_id, headers = {}, &block)
11
- get(build_endpoint(FIND_ORDER_COTACT_WISH, order: order_id), headers, &block)
13
+ get(build_endpoint(FIND_ORDER_CONTACT_WISH, order: order_id), headers, &block)
12
14
  end
13
15
  end
14
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module CouponCode
@@ -5,7 +7,7 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_COUPON_CONTACTS = '/orders/coupons/codes/contacts/{contactId}'.freeze
10
+ LIST_COUPON_CONTACTS = '/orders/coupons/codes/contacts/{contactId}'
9
11
 
10
12
  class << self
11
13
  def update(contact_id, headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module CouponCode
@@ -5,7 +7,7 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- VALIDATE_COUPON = '/orders/coupons/codes/{coupon}'.freeze
10
+ VALIDATE_COUPON = '/orders/coupons/codes/{coupon}'
9
11
 
10
12
  class << self
11
13
  def update(coupon_string, headers = {}, &block)
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module CouponCode
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- UPDATE_COUPON_CODE = '/orders/{orderId}/coupons/{coupon}'.freeze
9
+ UPDATE_COUPON_CODE = '/orders/{orderId}/coupons/{coupon}'
8
10
 
9
11
  class << self
10
12
  def update(order_id, coupon_string, headers = {}, &block)
@@ -1,13 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  class Currency
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_CURRENCIES = '/orders/currencies'.freeze
8
- FIND_CURRENCY_ISO = '/orders/currencies/{currencyIso}'.freeze
9
- FIND_COUNTRIES_FOR_CURRENCY = '/orders/currencies/{currencyIso}/countries'.freeze
10
- FIND_CURRENCY_FOR_COUNTRY = '/orders/currencies/countries/{countryId}'.freeze
9
+ LIST_CURRENCIES = '/orders/currencies'
10
+ FIND_CURRENCY_ISO = '/orders/currencies/{currencyIso}'
11
+ FIND_COUNTRIES_FOR_CURRENCY = '/orders/currencies/{currencyIso}/countries'
12
+ FIND_CURRENCY_FOR_COUNTRY = '/orders/currencies/countries/{countryId}'
11
13
 
12
14
  class << self
13
15
  def list(headers = {}, &block)
@@ -1,13 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  class Date
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_ORDER_DATE_TYPE_NAMES = '/orders/dates/types/{typeId}/names'.freeze
8
- FIND_ORDER_DATE_TYPE_NAME = '/orders/dates/types/{typeId}/names/{lang}'.freeze
9
- LIST_ORDER_DATES = '/orders/{orderId}/dates'.freeze
10
- FIND_ORDER_DATE = '/orders/{orderId}/dates/{typeId}'.freeze
9
+ LIST_ORDER_DATE_TYPE_NAMES = '/orders/dates/types/{typeId}/names'
10
+ FIND_ORDER_DATE_TYPE_NAME = '/orders/dates/types/{typeId}/names/{lang}'
11
+ LIST_ORDER_DATES = '/orders/{orderId}/dates'
12
+ FIND_ORDER_DATE = '/orders/{orderId}/dates/{typeId}'
11
13
 
12
14
  class << self
13
15
  def list_date_type_names(type_id, headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Item
@@ -5,8 +7,8 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_SERIAL_NUMBERS = '/orders/{orderId}/items/serialNumbers'.freeze
9
- LIST_ORDER_ITEM_SERIAL_NUMBERS = '/orders/{orderId}/items/{orderItemId}/serialNumbers'.freeze
10
+ LIST_SERIAL_NUMBERS = '/orders/{orderId}/items/serialNumbers'
11
+ LIST_ORDER_ITEM_SERIAL_NUMBERS = '/orders/{orderId}/items/{orderItemId}/serialNumbers'
10
12
 
11
13
  class << self
12
14
  def list(order_id, headers = {}, &block)
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Item
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- DELETE_ORDERS_ORDER_ITEM = '/orders/{orderId}/items/{orderItemId}'.freeze
9
+ DELETE_ORDERS_ORDER_ITEM = '/orders/{orderId}/items/{orderItemId}'
8
10
 
9
11
  class << self
10
12
  def destroy(order_id, order_item_id)
@@ -1,11 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  class Referrer
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_REFERRERS = '/orders/referrers'.freeze
8
- CREATE_ORDER_REFERRER = '/orders/referrers/{parentReferrerId}'.freeze
9
+ LIST_REFERRERS = '/orders/referrers'
10
+ CREATE_ORDER_REFERRER = '/orders/referrers/{parentReferrerId}'
9
11
 
10
12
  class << self
11
13
  def list(headers = {})
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Shipping
@@ -5,7 +7,7 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_SHIPPING_COUNTRIES = '/orders/shipping/countries'.freeze
10
+ LIST_SHIPPING_COUNTRIES = '/orders/shipping/countries'
9
11
 
10
12
  class << self
11
13
  def list(headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Shipping
@@ -5,38 +7,31 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- BASE_ORDERS_SHIPPING_INFORMATION_PATH = '/orders/{orderId}/shipping'.freeze
10
+ SINGLE_PATH = '/orders/{orderId}/shipping/shipping_information'
11
+ MULTIPLE_PATH = '/orders/shipping/shipping_information'
9
12
 
10
- LIST_ORDERS_SHIPPING_INFORMATION = '/shipping_information'.freeze
11
- DELETE_ORDER_SHIPPING_INFORMATION = '/shipping_information'.freeze
12
- CREATE_ORDER_SHIPPING_INFORMATION = '/shipping_information'.freeze
13
- UPDATE_ORDER_SHIPPING_STATUS = '/shipping_information/status'.freeze
14
- UPDATE_ORDER_SHIPPING_DATA = '/shipping_information/additional_data'.freeze
13
+ UPDATE_STATUS = SINGLE_PATH + '/status'
14
+ UPDATE_ADDITIONAL_DATA = SINGLE_PATH + '/additional_data'
15
15
 
16
16
  class << self
17
17
  def list(order_id, headers = {}, &block)
18
- get(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{LIST_ORDERS_SHIPPING_INFORMATION}",
19
- order: order_id), headers, &block)
18
+ get(build_endpoint(SINGLE_PATH, order: order_id), headers, &block)
20
19
  end
21
20
 
22
- def create(order_id, body = {})
23
- post(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{CREATE_ORDER_SHIPPING_INFORMATION}",
24
- order: order_id), body)
21
+ def create(body = {})
22
+ post(MULTIPLE_PATH, body)
25
23
  end
26
24
 
27
25
  def update_status(order_id, body = {})
28
- put(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{UPDATE_ORDER_SHIPPING_STATUS}",
29
- order: order_id), body)
26
+ put(build_endpoint(UPDATE_STATUS, order: order_id), body)
30
27
  end
31
28
 
32
29
  def update_data(order_id, body = {})
33
- put(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{UPDATE_ORDER_SHIPPING_DATA}",
34
- order: order_id), body)
30
+ put(build_endpoint(UPDATE_ADDITIONAL_DATA, order: order_id), body)
35
31
  end
36
32
 
37
33
  def destroy(order_id, body = {})
38
- delete(build_endpoint("#{BASE_ORDERS_SHIPPING_INFORMATION_PATH}#{DELETE_ORDER_SHIPPING_INFORMATION}",
39
- order: order_id), body)
34
+ delete(build_endpoint(SINGLE_PATH, order: order_id), body)
40
35
  end
41
36
  end
42
37
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Shipping
@@ -5,14 +7,14 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- BASE_ORDERS_SHIPPING_PATH = '/orders/{orderId}/shipping'.freeze
10
+ BASE_ORDERS_SHIPPING_PATH = '/orders/{orderId}/shipping'
9
11
 
10
- FIND_ORDERS_SHIPPING_PACKAGE = '/packages/{orderShippingPackageId}'.freeze
11
- LIST_ORDERS_SHIPPING_PACKAGE = '/packages'.freeze
12
- CREATE_ORDER_SHIPPING_PACKAGE = '/packages'.freeze
13
- UPDATE_ORDER_SHIPPING_PACKAGE = '/packages/{orderShippingPackageId}'.freeze
14
- DELETE_ORDER_SHIPPING_PACKAGE = '/packages/{orderShippingPackageId}'.freeze
15
- DELETE_ORDER_SHIPPING_PACKAGES = '/packages'.freeze
12
+ FIND_ORDERS_SHIPPING_PACKAGE = '/packages/{orderShippingPackageId}'
13
+ LIST_ORDERS_SHIPPING_PACKAGE = '/packages'
14
+ CREATE_ORDER_SHIPPING_PACKAGE = '/packages'
15
+ UPDATE_ORDER_SHIPPING_PACKAGE = '/packages/{orderShippingPackageId}'
16
+ DELETE_ORDER_SHIPPING_PACKAGE = '/packages/{orderShippingPackageId}'
17
+ DELETE_ORDER_SHIPPING_PACKAGES = '/packages'
16
18
 
17
19
  class << self
18
20
  def list(order_id, headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Shipping
@@ -5,8 +7,8 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_SHIPPING_PRESET = '/orders/shipping/presets'.freeze
9
- FIND_SHIPPING_PRESETS = '/orders/shipping/presets/{presetId}'.freeze
10
+ LIST_SHIPPING_PRESET = '/orders/shipping/presets'
11
+ FIND_SHIPPING_PRESETS = '/orders/shipping/presets/{presetId}'
10
12
 
11
13
  class << self
12
14
  def list(headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  module Shipping
@@ -5,10 +7,10 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- BASE_ORDERS_SHIPPING_SERVICE_PROVIDER_PATH = '/orders/shipping'.freeze
10
+ BASE_ORDERS_SHIPPING_SERVICE_PROVIDER_PATH = '/orders/shipping'
9
11
 
10
- LIST_ORDERS_SHIPPING_SERVICE_PROVIDER = '/shipping_service_providers'.freeze
11
- FIND_ORDER_SHIPPING_SERVICE_PROVIDER = '/shipping_service_providers/{shippingServiceProviderID}'.freeze
12
+ LIST_ORDERS_SHIPPING_SERVICE_PROVIDER = '/shipping_service_providers'
13
+ FIND_ORDER_SHIPPING_SERVICE_PROVIDER = '/shipping_service_providers/{shippingServiceProviderID}'
12
14
 
13
15
  class << self
14
16
  def list(headers = {}, &block)
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlentyClient
4
+ module Order
5
+ module StatusHistory
6
+ include PlentyClient::Endpoint
7
+ include PlentyClient::Request
8
+
9
+ FIND_ORDER_STATUS_HISTORY = '/orders/{orderId}/status-history'
10
+ LIST_ORDER_STATUS_HISTORIES = '/orders/status-history'
11
+
12
+ class << self
13
+ def find(order_id, headers = {}, &block)
14
+ get(build_endpoint(FIND_ORDER_STATUS_HISTORY, order: order_id), headers, &block)
15
+ end
16
+
17
+ def list(headers = {}, &block)
18
+ get(build_endpoint(LIST_ORDER_STATUS_HISTORIES), headers, &block)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,15 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Order
3
5
  include PlentyClient::Endpoint
4
6
  include PlentyClient::Request
5
7
 
6
- CREATE_ORDER = '/orders'.freeze
7
- LIST_ORDERS = '/orders'.freeze
8
- FIND_ORDER = '/orders/{orderId}'.freeze
9
- LIST_CONTACTS_ORDERS = '/orders/contacts/{contactId}'.freeze
10
- UPDATE_ORDER = '/orders/{orderId}'.freeze
11
- LIST_ORDERS_PACKAGE_NUMBERS = '/orders/{orderId}/packagenumbers'.freeze
12
- DELETE_ORDER = '/orders/{orderId}'.freeze
8
+ CREATE_ORDER = '/orders'
9
+ LIST_ORDERS = '/orders'
10
+ FIND_ORDER = '/orders/{orderId}'
11
+ LIST_CONTACTS_ORDERS = '/orders/contacts/{contactId}'
12
+ UPDATE_ORDER = '/orders/{orderId}'
13
+ LIST_ORDERS_PACKAGE_NUMBERS = '/orders/{orderId}/packagenumbers'
14
+ DELETE_ORDER = '/orders/{orderId}'
13
15
 
14
16
  class << self
15
17
  def create(body = {})
@@ -1,15 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module OrderSummary
3
5
  include PlentyClient::Endpoint
4
6
  include PlentyClient::Request
5
7
 
6
- LIST_ORDER_SUMMARYS = '/order_summaries'.freeze
7
- CREATE_ORDER_SUMMARY = '/order_summaries'.freeze
8
- FIND_ORDER_SUMMARY = '/order_summaries/{orderSummaryId}'.freeze
9
- FIND_ORDER_SUMMARY_BY_CONTACT = '/order_summaries/contacts/{contactId}'.freeze
10
- FIND_ORDER_SUMMARY_BY_ADDRESS = '/order_summaries/orders/{addressId}'.freeze
11
- UPDATE_ORDER_SUMMARY = '/order_summaries/{orderSummaryId}'.freeze
12
- DELETE_ORDER_SUMMARY = '/order_summaries/{orderSummaryId}'.freeze
8
+ LIST_ORDER_SUMMARYS = '/order_summaries'
9
+ CREATE_ORDER_SUMMARY = '/order_summaries'
10
+ FIND_ORDER_SUMMARY = '/order_summaries/{orderSummaryId}'
11
+ FIND_ORDER_SUMMARY_BY_CONTACT = '/order_summaries/contacts/{contactId}'
12
+ FIND_ORDER_SUMMARY_BY_ADDRESS = '/order_summaries/orders/{addressId}'
13
+ UPDATE_ORDER_SUMMARY = '/order_summaries/{orderSummaryId}'
14
+ DELETE_ORDER_SUMMARY = '/order_summaries/{orderSummaryId}'
13
15
 
14
16
  class << self
15
17
  def create(body = {})
@@ -1,11 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  class Contact
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- CREATE_PAYMENT_CONTACT_RELATION = '/payment/{paymentId}/contact/{contactId}'.freeze
8
- DELETE_CONTACTS_PAYMENT = '/payment/{paymentId}/contact'.freeze
9
+ CREATE_PAYMENT_CONTACT_RELATION = '/payment/{paymentId}/contact/{contactId}'
10
+ DELETE_CONTACTS_PAYMENT = '/payment/{paymentId}/contact'
9
11
 
10
12
  class << self
11
13
  def create(payment_id, contact_id, body = {})
@@ -1,17 +1,19 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  module Method
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_PAYMENT_METHODS = '/payments/methods'.freeze
8
- FIND_PAYMENT_METHOD = '/payments/methods/{paymentMethodId}'.freeze
9
- FIND_PLUGIN_PAYMENT_METHOD = '/payments/methods/{pluginKey}'.freeze
10
- CREATE_PAYMENT_METHOD = '/payments/methods'.freeze
11
- UPDATE_PAYMENT_METHOD = '/payments/methods'.freeze
12
- UPDATE_PAYMENT_METHOD_WITH_ID = '/payments/methods/{pluginKey}'.freeze
13
- LIST_PAYMENT_EBICS_ACCOUNTS = '/payments/methods/ebics'.freeze
14
- CREATE_PAYMENT_EBICS_ACCOUNT = '/payments/methods/ebics'.freeze
9
+ LIST_PAYMENT_METHODS = '/payments/methods'
10
+ FIND_PAYMENT_METHOD = '/payments/methods/{paymentMethodId}'
11
+ FIND_PLUGIN_PAYMENT_METHOD = '/payments/methods/{pluginKey}'
12
+ CREATE_PAYMENT_METHOD = '/payments/methods'
13
+ UPDATE_PAYMENT_METHOD = '/payments/methods'
14
+ UPDATE_PAYMENT_METHOD_WITH_ID = '/payments/methods/{pluginKey}'
15
+ LIST_PAYMENT_EBICS_ACCOUNTS = '/payments/methods/ebics'
16
+ CREATE_PAYMENT_EBICS_ACCOUNT = '/payments/methods/ebics'
15
17
 
16
18
  class << self
17
19
  def list(headers = {}, &block)
@@ -1,12 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  module MethodName
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_METHOD_NAMES = '/payments/methodNames'.freeze
8
- LIST_METHOD_NAMES_FOR_PAYMENT_METHOD = '/payments/methodNames/{paymentMethodId}'.freeze
9
- FIND_METHOD_NAMES_FOR_PAYMENT_METHOD_BY_LANG = '/payments/methodNames/{paymentMethodId}/{land}'.freeze
9
+ LIST_METHOD_NAMES = '/payments/methodNames'
10
+ LIST_METHOD_NAMES_FOR_PAYMENT_METHOD = '/payments/methodNames/{paymentMethodId}'
11
+ FIND_METHOD_NAMES_FOR_PAYMENT_METHOD_BY_LANG = '/payments/methodNames/{paymentMethodId}/{land}'
10
12
 
11
13
  class << self
12
14
  def list(headers = {}, &block)
@@ -1,12 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  class Order
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_ORDERS_PAYMENTS = '/payments/orders/{orderId}'.freeze
8
- CREATE_PAYMENT_ORDER_RELATION = '/payment/{paymentId}/order/{orderId}'.freeze
9
- DELETE_ORDERS_PAYMENT = '/payment/{paymentId}/order'.freeze
9
+ LIST_ORDERS_PAYMENTS = '/payments/orders/{orderId}'
10
+ CREATE_PAYMENT_ORDER_RELATION = '/payment/{paymentId}/order/{orderId}'
11
+ DELETE_ORDERS_PAYMENT = '/payment/{paymentId}/order'
10
12
 
11
13
  class << self
12
14
  def list(order_id, headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  module Property
@@ -6,11 +8,11 @@ module PlentyClient
6
8
  include PlentyClient::Endpoint
7
9
  include PlentyClient::Request
8
10
 
9
- LIST_PAYMENT_PROPERTY_TYPE_NAMES = '/payments/properties/types/names/{lang}'.freeze
10
- FIND_PAYMENT_PROPERTY_TYPE_NAME = '/payments/properties/types/names/{nameId}'.freeze
11
- CREATE_PAYMENT_PROPERTY_TYPE_NAME = '/payments/properties/types/names'.freeze
12
- UPDATE_PAYMENT_PROPERTY_TYPE_NAME_WITH_ID = '/payments/properties/types/names/{nameId}'.freeze
13
- UPDATE_PAYMENT_PROPERTY_TYPE_NAME = '/payments/properties/types/names'.freeze
11
+ LIST_PAYMENT_PROPERTY_TYPE_NAMES = '/payments/properties/types/names/{lang}'
12
+ FIND_PAYMENT_PROPERTY_TYPE_NAME = '/payments/properties/types/names/{nameId}'
13
+ CREATE_PAYMENT_PROPERTY_TYPE_NAME = '/payments/properties/types/names'
14
+ UPDATE_PAYMENT_PROPERTY_TYPE_NAME_WITH_ID = '/payments/properties/types/names/{nameId}'
15
+ UPDATE_PAYMENT_PROPERTY_TYPE_NAME = '/payments/properties/types/names'
14
16
 
15
17
  class << self
16
18
  def list(lang, headers = {}, &block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  module Property
@@ -5,11 +7,11 @@ module PlentyClient
5
7
  include PlentyClient::Endpoint
6
8
  include PlentyClient::Request
7
9
 
8
- LIST_PAYMENT_PROPERTY_TYPES = '/payments/properties/types'.freeze
9
- FIND_PAYMENT_PROPERTY_TYPE = '/payments/properties/types/{typeId}'.freeze
10
- CREATE_PAYMENT_PROPERTY_TYPE = '/payments/properties/types'.freeze
11
- UPDATE_PAYMENT_PROPERTY_TYPE_WITH_ID = '/payments/properties/types/{typeId}'.freeze
12
- UPDATE_PAYMENT_PROPERTY_TYPE = '/payments/properties/types'.freeze
10
+ LIST_PAYMENT_PROPERTY_TYPES = '/payments/properties/types'
11
+ FIND_PAYMENT_PROPERTY_TYPE = '/payments/properties/types/{typeId}'
12
+ CREATE_PAYMENT_PROPERTY_TYPE = '/payments/properties/types'
13
+ UPDATE_PAYMENT_PROPERTY_TYPE_WITH_ID = '/payments/properties/types/{typeId}'
14
+ UPDATE_PAYMENT_PROPERTY_TYPE = '/payments/properties/types'
13
15
 
14
16
  class << self
15
17
  def list(headers = {}, &block)
@@ -1,16 +1,18 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  module Property
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- LIST_PAYMENT_PROPERTIES = '/payments/properties'.freeze
8
- LIST_PAYMENT_PROPERTIES_BY_PAYMENT = '/payments/{paymentId}/properties'.freeze
9
- FIND_PLUGIN_PAYMENT_PROPERTY = '/payments/properties/{propertyId}'.freeze
10
- CREATE_PAYMENT_PROPERTY = '/payments/properties'.freeze
11
- UPDATE_PAYMENT_PROPERTY_WITH_ID = '/payments/properties/{propertyId}'.freeze
12
- UPDATE_PAYMENT_PROPERTY = '/payments/properties'.freeze
13
- LIST_P_PROPERTIES_BY_TYPE_AND_VALUE = '/payments/property/{propertyTypeId}/{propertyValue}'.freeze
9
+ LIST_PAYMENT_PROPERTIES = '/payments/properties'
10
+ LIST_PAYMENT_PROPERTIES_BY_PAYMENT = '/payments/{paymentId}/properties'
11
+ FIND_PLUGIN_PAYMENT_PROPERTY = '/payments/properties/{propertyId}'
12
+ CREATE_PAYMENT_PROPERTY = '/payments/properties'
13
+ UPDATE_PAYMENT_PROPERTY_WITH_ID = '/payments/properties/{propertyId}'
14
+ UPDATE_PAYMENT_PROPERTY = '/payments/properties'
15
+ LIST_P_PROPERTIES_BY_TYPE_AND_VALUE = '/payments/property/{propertyTypeId}/{propertyValue}'
14
16
  class << self
15
17
  def list(headers = {}, &block)
16
18
  get(build_endpoint(LIST_PAYMENT_PROPERTIES), headers, &block)
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  class Status
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- FIND_PAYMENT_STATUS = '/payments/status/{statusId}'.freeze
9
+ FIND_PAYMENT_STATUS = '/payments/status/{statusId}'
8
10
 
9
11
  class << self
10
12
  def find(status_id, headers = {}, &block)
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  class Transaction
4
6
  include PlentyClient::Endpoint
5
7
  include PlentyClient::Request
6
8
 
7
- FIND_PAYMENT_TRANSACTIONS = '/payments/transactions/{transactionTypeId}'.freeze
9
+ FIND_PAYMENT_TRANSACTIONS = '/payments/transactions/{transactionTypeId}'
8
10
 
9
11
  class << self
10
12
  def find(transaction_type_id, headers = {}, &block)
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PlentyClient
2
4
  module Payment
3
5
  include PlentyClient::Endpoint
4
6
  include PlentyClient::Request
5
7
 
6
- LIST_PAYMENTS = '/payments'.freeze
7
- FIND_PAYMENT = '/payments/{paymentId}'.freeze
8
- CREATE_PAYMENT = '/payments'.freeze
9
- UPDATE_PAYMENT = '/payments/{paymentId}'.freeze
10
- PAYMENT_ENTRYDATE = '/payments/entrydate'.freeze
11
- PAYMENT_IMPORTDATE = '/payments/importdate'.freeze
8
+ LIST_PAYMENTS = '/payments'
9
+ FIND_PAYMENT = '/payments/{paymentId}'
10
+ CREATE_PAYMENT = '/payments'
11
+ UPDATE_PAYMENT = '/payments/{paymentId}'
12
+ PAYMENT_ENTRYDATE = '/payments/entrydate'
13
+ PAYMENT_IMPORTDATE = '/payments/importdate'
12
14
 
13
15
  class << self
14
16
  def list(headers = {}, &block)