wes-data-api 7.1.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b679fe9e0da82150a343e0254f8b2e2f92c2df1
4
- data.tar.gz: d8337cc6f4170c81cbe7d1b3990f6ed5fe8edf85
3
+ metadata.gz: 660f47ee41899d5d40397085d45ee91aa0c15cd7
4
+ data.tar.gz: a161311b99cb52e90ded36d58e14d77fb75aa3cb
5
5
  SHA512:
6
- metadata.gz: 63388870113430a3d7ad1f19b9daa67cb2901ed05c38e7606feda277f24bb1703bba1eb2d4a54c738175185fcee55144e0a3392cc079299d2580fa7da288e14a
7
- data.tar.gz: 947a8069e894db1913fe57604d6f3138c5d9428790abecb4459dede7a12a6f3f44af123851d635631b5b3082b42f973d59621fee6d4feef3f44de3a0e8372c28
6
+ metadata.gz: c496a5575ae262b0161c3997d22b4e7c97482ff725a5e9415d2f1b1ad9e3a50709c8eef657fb3bdb314c321930f215155a77d1b220dfafbba323ef007ce0f464
7
+ data.tar.gz: 5775d781127630c51c110171471b88b71e985b790ac62f46c9b0d0811c0a2d0c2a99d0b79cf4179e2df9bc7c851af4c821dbc6dbfb7ddd0c25efd763ec6aa0cf
@@ -5,7 +5,7 @@ require "wes/data/api/configuration"
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = "7.1.0".freeze
8
+ VERSION = "8.0.0".freeze
9
9
  end
10
10
  end
11
11
  end
@@ -5,7 +5,6 @@ module Wes
5
5
  class << self
6
6
  def hash
7
7
  OpenStruct.new(
8
- :billing => "billing",
9
8
  :brand => "brand",
10
9
  :brand_user => "brand-user",
11
10
  :brands => "brands",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,7 +118,6 @@ files:
118
118
  - Gemfile
119
119
  - lib/wes/data/api.rb
120
120
  - lib/wes/data/api/base.rb
121
- - lib/wes/data/api/billing.rb
122
121
  - lib/wes/data/api/brand.rb
123
122
  - lib/wes/data/api/brand_user.rb
124
123
  - lib/wes/data/api/challenge.rb
@@ -129,7 +128,6 @@ files:
129
128
  - lib/wes/data/api/error/response.rb
130
129
  - lib/wes/data/api/error/unexpected.rb
131
130
  - lib/wes/data/api/model/base.rb
132
- - lib/wes/data/api/model/billing.rb
133
131
  - lib/wes/data/api/model/brand.rb
134
132
  - lib/wes/data/api/model/brand_user.rb
135
133
  - lib/wes/data/api/model/challenge.rb
@@ -1,39 +0,0 @@
1
- require "wes/data/api/base"
2
- require "wes/data/api/model/billing"
3
-
4
- module Wes
5
- module Data
6
- module API
7
- class Billing
8
- class << self
9
- include Base
10
-
11
- def create(data)
12
- attributes = client.post(routes.billing, data).first
13
- attributes.nil? ? nil : model_klass.new(attributes)
14
- end
15
-
16
- def find(key, value)
17
- attributes = client.get(find_route(key, value)).first
18
- attributes.nil? ? nil : model_klass.new(attributes)
19
- end
20
-
21
- private
22
-
23
- def find_route(key, value)
24
- case key
25
- when :id
26
- [routes.billing, value].join("/")
27
- when :user_id
28
- [routes.creator_user, value, routes.billing].join("/")
29
- end
30
- end
31
-
32
- def model_klass
33
- Wes::Data::API::Model::Billing
34
- end
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,20 +0,0 @@
1
- require "wes/data/api/model/base"
2
-
3
- module Wes
4
- module Data
5
- module API
6
- module Model
7
- class Billing < Base
8
- def update(changes)
9
- route = [routes.billing, id].join("/")
10
- @attributes = client.put(
11
- route, @attributes.to_h.merge(changes)
12
- ).first
13
-
14
- self
15
- end
16
- end
17
- end
18
- end
19
- end
20
- end