insales_api 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 1b059c0e53db8c1515b0f80fdd4f6a3b8d8540fa
4
- data.tar.gz: b51b151c44b1e340c8a88043ae09cfa1ccf44c28
3
+ metadata.gz: 775a094a7936896bf5c2016863c25252ee1b4d00
4
+ data.tar.gz: a1f9c51de691498d2ee419c5656936bcb80813d6
5
5
  SHA512:
6
- metadata.gz: e283d1aa7c0a1d311615566d30bf3319c9553d90ce1d2b44ed56950917d694ed980689fb24973e2747547a7c3160a4ad2a46172a62fe485bc5e34a1a522df419
7
- data.tar.gz: 150b0dc5f8f81a3f822a03752aadd189f296e35778276c6866bd7f4ff8e75c70922a0c2f8b92c274bd8d9ba83bcb9ae2e480a2b10c9f8acc535a1d3ae267f897
6
+ metadata.gz: 716796fb7b345110807446c862e623c989197145cab86b0ae70210939b815f76c3e9c06a1bb3d0bcb64c740a12c6da5703ad8f4bfdcaea8733f97178df107568
7
+ data.tar.gz: a443fc4c21aa6096f30ef7350fa6a2199d387ed99366480f4178d0b2154c8bf2aba950125a51ef0126f35aa65662bb8fd5f0dd50d2d2d441b333f650b6b9f470
@@ -4,3 +4,6 @@ rvm:
4
4
  - 2.1.0
5
5
  notifications:
6
6
  email: false
7
+ before_install:
8
+ - gem update bundler
9
+ - bundle install
@@ -25,6 +25,7 @@ module InsalesApi
25
25
  autoload :ClientGroup
26
26
  autoload :Collect
27
27
  autoload :Collection
28
+ autoload :Currency
28
29
  autoload :DeliveryVariant
29
30
  autoload :DiscountCode
30
31
  autoload :Domain
@@ -39,12 +40,14 @@ module InsalesApi
39
40
  autoload :OrderLine
40
41
  autoload :Page
41
42
  autoload :PaymentGateway
43
+ autoload :PriceKind
42
44
  autoload :Product
43
45
  autoload :ProductField
44
46
  autoload :ProductFieldValue
45
47
  autoload :Property
46
48
  autoload :Characteristic
47
49
  autoload :RecurringApplicationCharge
50
+ autoload :StockCurrency
48
51
  autoload :Theme
49
52
  autoload :User
50
53
  autoload :Variant
@@ -1,5 +1,6 @@
1
1
  module InsalesApi
2
2
  class Category < Base
3
+ extend Resource::WithUpdatedSince
3
4
  class << self
4
5
  def set_products_category(new_category_id, product_ids)
5
6
  data = {
@@ -1,3 +1,5 @@
1
1
  module InsalesApi
2
- class Collection < Base; end
2
+ class Collection < Base
3
+ extend Resource::WithUpdatedSince
4
+ end
3
5
  end
@@ -0,0 +1,6 @@
1
+ # coding: utf-8
2
+ module InsalesApi
3
+ class Currency < Base
4
+ include ActiveResource::Singleton
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ # coding: utf-8
2
+ module InsalesApi
3
+ class PriceKind < Base
4
+ def variant_price_method_name
5
+ "price#{price_index + 1}"
6
+ end
7
+ end
8
+ end
@@ -15,7 +15,11 @@ module InsalesApi
15
15
  updated_since: updated_since,
16
16
  from_id: last_id,
17
17
  ))
18
+
19
+ raise ActiveResource::ResourceNotFound if items.nil?
20
+
18
21
  return unless items.any?
22
+
19
23
  yield items
20
24
  return if items.count < per_page
21
25
  last_item = items.last
@@ -0,0 +1,5 @@
1
+ # coding: utf-8
2
+ module InsalesApi
3
+ class StockCurrency < Base
4
+ end
5
+ end
@@ -2,7 +2,7 @@ module InsalesApi
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insales_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - InSales
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-30 00:00:00.000000000 Z
11
+ date: 2016-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -100,6 +100,7 @@ files:
100
100
  - lib/insales_api/client_group.rb
101
101
  - lib/insales_api/collect.rb
102
102
  - lib/insales_api/collection.rb
103
+ - lib/insales_api/currency.rb
103
104
  - lib/insales_api/delivery_variant.rb
104
105
  - lib/insales_api/discount_code.rb
105
106
  - lib/insales_api/domain.rb
@@ -117,6 +118,7 @@ files:
117
118
  - lib/insales_api/page.rb
118
119
  - lib/insales_api/password.rb
119
120
  - lib/insales_api/payment_gateway.rb
121
+ - lib/insales_api/price_kind.rb
120
122
  - lib/insales_api/product.rb
121
123
  - lib/insales_api/product_field.rb
122
124
  - lib/insales_api/product_field_value.rb
@@ -125,6 +127,7 @@ files:
125
127
  - lib/insales_api/resource/countable.rb
126
128
  - lib/insales_api/resource/paginated.rb
127
129
  - lib/insales_api/resource/with_updated_since.rb
130
+ - lib/insales_api/stock_currency.rb
128
131
  - lib/insales_api/theme.rb
129
132
  - lib/insales_api/user.rb
130
133
  - lib/insales_api/variant.rb
@@ -153,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
156
  version: '0'
154
157
  requirements: []
155
158
  rubyforge_project: insales_api
156
- rubygems_version: 2.4.8
159
+ rubygems_version: 2.5.1
157
160
  signing_key:
158
161
  specification_version: 4
159
162
  summary: Gem for accessing the InSales REST web services