Class: SpreeOxygenPelatologio::PullProducts
- Inherits:
-
Object
- Object
- SpreeOxygenPelatologio::PullProducts
- Defined in:
- app/services/spree_oxygen_pelatologio/pull_products.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ PullProducts
constructor
A new instance of PullProducts.
Constructor Details
#initialize ⇒ PullProducts
Returns a new instance of PullProducts.
5 6 7 |
# File 'app/services/spree_oxygen_pelatologio/pull_products.rb', line 5 def initialize @client = SpreeOxygenPelatologio::Client.new end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'app/services/spree_oxygen_pelatologio/pull_products.rb', line 3 def client @client end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'app/services/spree_oxygen_pelatologio/pull_products.rb', line 9 def call client.call(:pull_products) do |products| products.each { |product| update_product(product) } end end |