plenty_client 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/README.md +9 -36
  4. data/Rakefile +3 -3
  5. data/lib/plenty_client.rb +8 -5
  6. data/lib/plenty_client/accounting.rb +2 -2
  7. data/lib/plenty_client/authentication.rb +2 -2
  8. data/lib/plenty_client/authorization.rb +2 -2
  9. data/lib/plenty_client/basket.rb +2 -2
  10. data/lib/plenty_client/basket/item.rb +2 -2
  11. data/lib/plenty_client/category.rb +6 -7
  12. data/lib/plenty_client/category/branch.rb +2 -2
  13. data/lib/plenty_client/category/template.rb +3 -3
  14. data/lib/plenty_client/comment.rb +3 -3
  15. data/lib/plenty_client/config.rb +3 -1
  16. data/lib/plenty_client/endpoint.rb +74 -68
  17. data/lib/plenty_client/item.rb +7 -2
  18. data/lib/plenty_client/item/attribute.rb +3 -3
  19. data/lib/plenty_client/item/attribute/name.rb +12 -20
  20. data/lib/plenty_client/item/attribute/value.rb +13 -18
  21. data/lib/plenty_client/item/attribute/value_name.rb +12 -12
  22. data/lib/plenty_client/item/barcode.rb +3 -3
  23. data/lib/plenty_client/item/cross_selling.rb +3 -3
  24. data/lib/plenty_client/item/image.rb +6 -6
  25. data/lib/plenty_client/item/image/availability.rb +10 -10
  26. data/lib/plenty_client/item/image/name.rb +14 -24
  27. data/lib/plenty_client/item/manufacturer.rb +4 -4
  28. data/lib/plenty_client/item/manufacturer/commission.rb +3 -3
  29. data/lib/plenty_client/item/property.rb +3 -3
  30. data/lib/plenty_client/item/property/market_reference.rb +11 -11
  31. data/lib/plenty_client/item/property/name.rb +12 -17
  32. data/lib/plenty_client/item/property_group.rb +3 -3
  33. data/lib/plenty_client/item/property_group_name.rb +8 -10
  34. data/lib/plenty_client/item/sales_price.rb +3 -4
  35. data/lib/plenty_client/item/shipping_profile.rb +6 -6
  36. data/lib/plenty_client/item/unit.rb +3 -4
  37. data/lib/plenty_client/item/unit_name.rb +12 -11
  38. data/lib/plenty_client/item/variation.rb +10 -4
  39. data/lib/plenty_client/item/variation/barcode.rb +3 -3
  40. data/lib/plenty_client/item/variation/bundle.rb +14 -16
  41. data/lib/plenty_client/item/variation/category.rb +8 -10
  42. data/lib/plenty_client/item/variation/client.rb +3 -3
  43. data/lib/plenty_client/item/variation/default_category.rb +3 -3
  44. data/lib/plenty_client/item/variation/description.rb +3 -3
  45. data/lib/plenty_client/item/variation/image.rb +5 -4
  46. data/lib/plenty_client/item/variation/market.rb +3 -3
  47. data/lib/plenty_client/item/variation/market_ident_number.rb +3 -3
  48. data/lib/plenty_client/item/variation/sales_price.rb +13 -17
  49. data/lib/plenty_client/item/variation/sku.rb +12 -15
  50. data/lib/plenty_client/item/variation/stock.rb +3 -3
  51. data/lib/plenty_client/item/variation/supplier.rb +12 -15
  52. data/lib/plenty_client/item/variation/warehouse.rb +6 -5
  53. data/lib/plenty_client/item/variation_property.rb +3 -3
  54. data/lib/plenty_client/item/variation_property_value.rb +10 -14
  55. data/lib/plenty_client/item_set.rb +4 -4
  56. data/lib/plenty_client/item_set/component.rb +15 -22
  57. data/lib/plenty_client/item_set/config.rb +3 -2
  58. data/lib/plenty_client/order.rb +5 -4
  59. data/lib/plenty_client/order/contact_wish.rb +2 -3
  60. data/lib/plenty_client/order/coupon_code.rb +5 -7
  61. data/lib/plenty_client/order/coupon_code/contact.rb +4 -6
  62. data/lib/plenty_client/order/coupon_code/validation.rb +4 -6
  63. data/lib/plenty_client/order/currency.rb +2 -3
  64. data/lib/plenty_client/order/date.rb +3 -4
  65. data/lib/plenty_client/order/item.rb +3 -3
  66. data/lib/plenty_client/order/item/date.rb +2 -2
  67. data/lib/plenty_client/order/item/property.rb +2 -2
  68. data/lib/plenty_client/order/item/serial_number.rb +3 -3
  69. data/lib/plenty_client/order/property.rb +2 -3
  70. data/lib/plenty_client/order/referrer.rb +2 -3
  71. data/lib/plenty_client/order/shipping.rb +2 -3
  72. data/lib/plenty_client/order/shipping/country.rb +2 -2
  73. data/lib/plenty_client/order/shipping/information.rb +3 -3
  74. data/lib/plenty_client/order/shipping/package.rb +4 -4
  75. data/lib/plenty_client/order/shipping/profile.rb +2 -2
  76. data/lib/plenty_client/order/shipping/service_provider.rb +2 -2
  77. data/lib/plenty_client/request.rb +121 -98
  78. data/lib/plenty_client/sales_price/account.rb +2 -3
  79. data/lib/plenty_client/sales_price/country.rb +2 -2
  80. data/lib/plenty_client/sales_price/currency.rb +2 -2
  81. data/lib/plenty_client/sales_price/customer_class.rb +2 -2
  82. data/lib/plenty_client/sales_price/name.rb +4 -4
  83. data/lib/plenty_client/sales_price/online_store.rb +2 -3
  84. data/lib/plenty_client/sales_price/referrer.rb +3 -2
  85. data/lib/plenty_client/version.rb +1 -1
  86. metadata +2 -2
@@ -1,9 +1,8 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class Account
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
6
-
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
7
6
 
8
7
  LIST_REFERRER_ACCOUNTS = '/items/sales_prices/{salesPriceId}/accounts'.freeze
9
8
  ACTIVATE_REFERRER_ACCOUNT = '/items/sales_prices/{salesPriceId}/accounts'.freeze
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class Country
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  LIST_SALES_PRICE_COUNTRIES = '/items/sales_prices/{salesPriceId}/countries'.freeze
8
8
  ACTIVATE_SALES_PRICE_COUNTRY = '/items/sales_prices/{salesPriceId}/countries'.freeze
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class Currency
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  LIST_SALES_PRICE_CURRENCIES = '/items/sales_prices/{salesPriceId}/currencies'.freeze
8
8
  ACTIVATE_SALES_PRICE_CURRENCY = '/items/sales_prices/{salesPriceId}/currencies'.freeze
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class CustomerClass
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  SALES_PRICE_PATH = '/items/sales_prices/{salesPriceId}'.freeze
8
8
  LIST_SALES_PRICE_CUSTOMER_CLASSES = '/customer_classes'.freeze
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class Name
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  LIST_SALES_PRICE_NAMES = '/items/sales_prices/{salesPriceId}/names'.freeze
8
8
  GET_SALES_PRICE_NAMES_BY_LANG = '/items/sales_prices/{salesPriceId}/names/{lang}'.freeze
@@ -22,12 +22,12 @@ module PlentyClient
22
22
  def create(sales_price_id, headers = {})
23
23
  post(build_endpoint(CREATE_SALES_PRICE_NAME, sales_price: sales_price_id), headers)
24
24
  end
25
-
25
+
26
26
  def update(sales_price_id, lang, headers = {})
27
27
  post(build_endpoint(UPDATE_SALES_PRICE_NAME, sales_price: sales_price_id, lang: lang), headers)
28
28
  end
29
29
 
30
- def delete(sales_price_id, lang, cross_sales_price_id)
30
+ def destroy(sales_price_id, lang)
31
31
  delete(build_endpoint(DELETE_SALES_PRICE_NAME, sales_price: sales_price_id, lang: lang))
32
32
  end
33
33
  end
@@ -1,8 +1,8 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class OnlineStore
4
- extend PlentyClient::Endpoint
5
- extend PlentyClient::Request
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
6
 
7
7
  LIST_SALES_PRICE_ONLINE_STORES = '/items/sales_prices/{salesPriceId}/online_stores'.freeze
8
8
  ACTIVATE_SALES_PRICE_ONLINE_STORE = '/items/sales_prices/{salesPriceId}/online_stores'.freeze
@@ -26,4 +26,3 @@ module PlentyClient
26
26
  end
27
27
  end
28
28
  end
29
-
@@ -1,7 +1,9 @@
1
1
  module PlentyClient
2
2
  module SalesPrice
3
3
  class Referrer
4
- include Endpoint
4
+ include PlentyClient::Endpoint
5
+ include PlentyClient::Request
6
+
5
7
  LIST_SALES_PRICE_REFERRER = '/items/sales_prices/{salesPriceId}/referrers'.freeze
6
8
  ACTIVATE_SALES_PRICE_REFERRER = '/items/sales_prices/{salesPriceId}/referrers'.freeze
7
9
  DEACTIVATE_SALES_PRICE_REFERRER = '/items/sales_prices/{salesPriceId}/referrers/{referrerId}'.freeze
@@ -22,4 +24,3 @@ module PlentyClient
22
24
  end
23
25
  end
24
26
  end
25
-
@@ -1,3 +1,3 @@
1
1
  module PlentyClient
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plenty_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dariusch Ochlast
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2017-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler