veeqo_api_ruby 0.1.2 → 0.2.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 +4 -4
- data/lib/veeqo/resources/company.rb +23 -0
- data/lib/veeqo/resources/product.rb +7 -0
- data/lib/veeqo/resources/purchase_order.rb +7 -1
- data/lib/veeqo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9948d55b4dcb60a0a7e90a4498720f58ad49fe2c
|
|
4
|
+
data.tar.gz: de8ede2dccca4f2d0a51bdfad912789e735cafcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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: [:
|
|
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
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.
|
|
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:
|
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|