veeqo_api_ruby 0.1.2 → 0.2.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: 0c3c8de73b79df709358f08e906590b37858d96a
4
- data.tar.gz: bd0dbac717a64b25504fa9901e4e68f11a026f8c
3
+ metadata.gz: 9948d55b4dcb60a0a7e90a4498720f58ad49fe2c
4
+ data.tar.gz: de8ede2dccca4f2d0a51bdfad912789e735cafcf
5
5
  SHA512:
6
- metadata.gz: 2163527e0c245fe0c88113dee2213d76a16707abaf372b2de970cfa604651c83d272f3cabd89d068caca574c95095cedd8ad389a3879b22a0bb8369af0f0612d
7
- data.tar.gz: 1a3e0b7bc84b5845db6f4351adb828fdd0459214714aa438ab8d95c27d64613cf76eb857e24d5cd7658b7d96e5fa735bc01780d8a8946f316797e4414e4a56cf
6
+ metadata.gz: 6a1f5c0262a3451bf37e49179eea94570ba4173d15f1d5a6264b8ba41c9ada0d4da5cf67e5ebc6ef353a497be3eb97e1c257cc6c6003df72032050ae4044da4b
7
+ data.tar.gz: 5fa9cb66467b2d63bf9b220d3194bee8c27220742e6e819fa06bdfd1b8b01478a0ef4956b32433ed2698ac1e7f0ca6664b5231af1bdbf73a5f2d5d1297fce811
@@ -7,6 +7,24 @@ module Veeqo
7
7
  include Veeqo::Request.new 'current_company'
8
8
 
9
9
  property :id
10
+ property :name
11
+ property :created_at
12
+ property :updated_at
13
+ property :card_valid
14
+ property :stripe_customer_id
15
+ property :has_right_to_use_veeqo
16
+ property :subscription_status
17
+ property :billing_period_started
18
+ property :chargify_product_handle
19
+ property :chargify_current_plan
20
+ property :trial_end_date
21
+ property :can_change_subscription_plan
22
+ property :has_ever_created_remote_channel
23
+ property :owner
24
+ property :subscription_plan
25
+ property :employees
26
+ property :guide_progress
27
+ property :settings
10
28
 
11
29
  def self.info(params = {})
12
30
  get path.build, params
@@ -18,5 +36,10 @@ module Veeqo
18
36
  rescue Veeqo::Unauthorized
19
37
  false
20
38
  end
39
+
40
+ def self.current_user(params = {})
41
+ include Veeqo::ResourceActions.new uri: 'current_user'
42
+ get path.build, params
43
+ end
21
44
  end
22
45
  end
@@ -42,5 +42,12 @@ module Veeqo
42
42
  property :web_page_title
43
43
  property :web_page_url
44
44
  property :weight
45
+
46
+ def self.update_suppliers(resource_id, params = {})
47
+ include Veeqo::ResourceActions.new uri: 'supplier_product_variants'
48
+ raise ArgumentError if resource_id.nil?
49
+ params[:product_id] = resource_id
50
+ get path.build, params
51
+ end
45
52
  end
46
53
  end
@@ -4,7 +4,7 @@
4
4
 
5
5
  module Veeqo
6
6
  class PurchaseOrder < Resource
7
- include Veeqo::ResourceActions.new(uri: 'purchase_orders/%d', disable: [:create, :update, :destroy, :destroy_all])
7
+ include Veeqo::ResourceActions.new(uri: 'purchase_orders/%d', disable: [:update, :destroy, :destroy_all])
8
8
 
9
9
  property :id
10
10
  property :number
@@ -30,5 +30,11 @@ module Veeqo
30
30
  property :send_to_supplier
31
31
  property :line_items
32
32
  property :supplier
33
+
34
+ def self.create(params = {})
35
+ post path.build, params
36
+ rescue JSON::ParserError
37
+ nil
38
+ end
33
39
  end
34
40
  end
data/lib/veeqo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Veeqo
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: veeqo_api_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurkiv Misha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2017-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler