pobo-sdk 1.0.4 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4aa664de88b4c596865af37a27bf9afc5f0a6c6787f1300d285ea7b2f08f195d
4
- data.tar.gz: 02a1a223a18aafaa323b02b27e34a4370738a4ec994b5764f14071c0c3edb1a8
3
+ metadata.gz: 9a34c26065802db8c85f460b56f66a0425d1307aa433c6e79f465c1c71a595ef
4
+ data.tar.gz: 218f2c3486337f5dd62da55dc57c7f0add26094dca66158f2605ca8e8a4fb0ad
5
5
  SHA512:
6
- metadata.gz: 708d54d745c7fafef95f2254dd86303f9b0ef909927b0f9a6b3541e72964072f478ff4f3581a68308453efa026fbd2bce4c7d691415fccf5f806c20311b9ad93
7
- data.tar.gz: b5cbfe0382a5b355dc7f0d35699e20547e506309276e15d112a170aebddde717d27435692ad5ed8a7ca9bbf1d9812eea7438a45d878373e208f5b78db500b51b
6
+ metadata.gz: b9c48eefa592357f10ee80bee1bd8b7f5464f82135f52e5798a79132a7c92f56cf41dd9894b1b050739be7e69afe41e8000a1db424d806423a609c7bd6b980e6
7
+ data.tar.gz: e5004d4aea1edb6b2d86c49923457378842fcae37aa955b456001883f18cd97201be2a1f7253470e00cef2e105c2eebdd95bb6ff62e72d840e938b11d54a0b48
data/README.md CHANGED
@@ -251,6 +251,8 @@ class WebhooksController < ApplicationController
251
251
  SyncProductsJob.perform_later
252
252
  when Pobo::WebhookEvent::CATEGORIES_UPDATE
253
253
  SyncCategoriesJob.perform_later
254
+ when Pobo::WebhookEvent::BLOGS_UPDATE
255
+ SyncBlogsJob.perform_later
254
256
  end
255
257
 
256
258
  render json: { status: 'ok' }
@@ -273,7 +275,7 @@ payload = handler.handle(
273
275
  ### Webhook Payload
274
276
 
275
277
  ```ruby
276
- payload.event # String: "products.update" or "categories.update"
278
+ payload.event # String: "products.update", "categories.update", or "blogs.update"
277
279
  payload.timestamp # Time
278
280
  payload.eshop_id # Integer
279
281
  ```
@@ -336,6 +338,19 @@ name.to_hash # => { 'default' => '...', 'cs' => '...', ...
336
338
  | `each_category(last_update_from:, is_edited:)` | Iterate all categories |
337
339
  | `each_blog(last_update_from:, is_edited:)` | Iterate all blogs |
338
340
 
341
+ ## Limits
342
+
343
+ | Limit | Value |
344
+ |------------------------------|--------------|
345
+ | Max items per import request | 100 |
346
+ | Max items per export page | 100 |
347
+ | Product/Category ID length | 255 chars |
348
+ | Name length | 250 chars |
349
+ | URL length | 255 chars |
350
+ | Image URL length | 650 chars |
351
+ | Description length | 65,000 chars |
352
+ | SEO description length | 500 chars |
353
+
339
354
  ## Development
340
355
 
341
356
  After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests.
data/lib/pobo/dto/blog.rb CHANGED
@@ -40,7 +40,7 @@ module Pobo
40
40
  def self.from_hash(hash)
41
41
  new(
42
42
  id: hash["id"] || hash[:id],
43
- is_visible: hash["is_visible"] || hash[:is_visible],
43
+ is_visible: hash.key?("is_visible") ? hash["is_visible"] : hash[:is_visible],
44
44
  name: LocalizedString.from_hash(hash["name"] || hash[:name]),
45
45
  url: LocalizedString.from_hash(hash["url"] || hash[:url]),
46
46
  category: hash["category"] || hash[:category],
@@ -49,7 +49,7 @@ module Pobo
49
49
  seo_description: LocalizedString.from_hash(hash["seo_description"] || hash[:seo_description]),
50
50
  content: Content.from_hash(hash["content"] || hash[:content]),
51
51
  images: hash["images"] || hash[:images] || [],
52
- is_loaded: hash["is_loaded"] || hash[:is_loaded],
52
+ is_loaded: hash.key?("is_loaded") ? hash["is_loaded"] : hash[:is_loaded],
53
53
  created_at: parse_time(hash["created_at"] || hash[:created_at]),
54
54
  updated_at: parse_time(hash["updated_at"] || hash[:updated_at])
55
55
  )
@@ -40,7 +40,7 @@ module Pobo
40
40
  def self.from_hash(hash)
41
41
  new(
42
42
  id: hash["id"] || hash[:id],
43
- is_visible: hash["is_visible"] || hash[:is_visible],
43
+ is_visible: hash.key?("is_visible") ? hash["is_visible"] : hash[:is_visible],
44
44
  name: LocalizedString.from_hash(hash["name"] || hash[:name]),
45
45
  url: LocalizedString.from_hash(hash["url"] || hash[:url]),
46
46
  description: LocalizedString.from_hash(hash["description"] || hash[:description]),
@@ -49,7 +49,7 @@ module Pobo
49
49
  content: Content.from_hash(hash["content"] || hash[:content]),
50
50
  images: hash["images"] || hash[:images] || [],
51
51
  guid: hash["guid"] || hash[:guid],
52
- is_loaded: hash["is_loaded"] || hash[:is_loaded],
52
+ is_loaded: hash.key?("is_loaded") ? hash["is_loaded"] : hash[:is_loaded],
53
53
  created_at: parse_time(hash["created_at"] || hash[:created_at]),
54
54
  updated_at: parse_time(hash["updated_at"] || hash[:updated_at])
55
55
  )
@@ -48,7 +48,7 @@ module Pobo
48
48
  def self.from_hash(hash)
49
49
  new(
50
50
  id: hash["id"] || hash[:id],
51
- is_visible: hash["is_visible"] || hash[:is_visible],
51
+ is_visible: hash.key?("is_visible") ? hash["is_visible"] : hash[:is_visible],
52
52
  name: LocalizedString.from_hash(hash["name"] || hash[:name]),
53
53
  url: LocalizedString.from_hash(hash["url"] || hash[:url]),
54
54
  short_description: LocalizedString.from_hash(hash["short_description"] || hash[:short_description]),
@@ -60,7 +60,7 @@ module Pobo
60
60
  categories_ids: hash["categories_ids"] || hash[:categories_ids] || [],
61
61
  parameters_ids: hash["parameters_ids"] || hash[:parameters_ids] || [],
62
62
  guid: hash["guid"] || hash[:guid],
63
- is_loaded: hash["is_loaded"] || hash[:is_loaded],
63
+ is_loaded: hash.key?("is_loaded") ? hash["is_loaded"] : hash[:is_loaded],
64
64
  categories: hash["categories"] || hash[:categories] || [],
65
65
  created_at: parse_time(hash["created_at"] || hash[:created_at]),
66
66
  updated_at: parse_time(hash["updated_at"] || hash[:updated_at])
@@ -4,8 +4,9 @@ module Pobo
4
4
  module WebhookEvent
5
5
  PRODUCTS_UPDATE = "products.update"
6
6
  CATEGORIES_UPDATE = "categories.update"
7
+ BLOGS_UPDATE = "blogs.update"
7
8
 
8
- ALL = [PRODUCTS_UPDATE, CATEGORIES_UPDATE].freeze
9
+ ALL = [PRODUCTS_UPDATE, CATEGORIES_UPDATE, BLOGS_UPDATE].freeze
9
10
 
10
11
  def self.valid?(event)
11
12
  ALL.include?(event)
data/lib/pobo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pobo
4
- VERSION = "1.0.4"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pobo-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pobo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-28 00:00:00.000000000 Z
11
+ date: 2026-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday