synnex 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 153364e0fdd244e0b48bfa1b3c887205cb47bd0edc12fa6036a83daf750d90a4
4
- data.tar.gz: d86b72bcda517bc967a7b3b7cb96e856d5f9835e7ff5a8de0f9d5dcf998544f1
3
+ metadata.gz: 11da5bb246da9c446708af6c8dfd0ab121e9960014e8eaa2f08ee536327256cb
4
+ data.tar.gz: 4f2eb84f6e986480ec37e0ba3a7f36e086bc1d1848532da1ecfccfdbc5497798
5
5
  SHA512:
6
- metadata.gz: c7b05e30b78ccc5f200bf65d5bb5e71f6dde0fd8a968a89c12b4a4d1b8ea3a0b896653a041ee6ff657b6a2763079adab4dcb4e100d9ca4b6f2707dbb6696e8cb
7
- data.tar.gz: 6b468a3644c5b6af7caff628eb7240fa6f1aa5bd08447b3024e783746a089f8ae63d0ee232546228f0cbf4407ecb9b91b3e26a18b8db3b452c66fef84753779d
6
+ metadata.gz: aa16ae6ec2c40f9eabde4f13934f21bb4c45b769d60fe7d299d69947be7c244bc1b9027d5fcf8c85d05647bfef5e9fcc1f289bb00db74ef67a37b9a9f666801f
7
+ data.tar.gz: 87bf3cabad0476d2916f48064e189a841091c01f0baf8bdcb461c418599969e84c143924b4628df8fed4eeece502757e6382892a983d39d5fd307aea8f3f8528
@@ -19,7 +19,7 @@ module Synnex
19
19
 
20
20
  def subscriptions
21
21
  @subscriptions ||= api.customer_subscription(@snx_eu_no)
22
- .map {|subscription| Synnex::Subscription.new(api.subscription(subscription["subscription_id"]), self)}
22
+ .map {|subscription| Synnex::Subscription.new(api.subscription(subscription["subscription_id"]), self.api)}
23
23
  end
24
24
 
25
25
  def licenses
@@ -15,5 +15,9 @@ module Synnex
15
15
  customers.find {|c| c.snx_eu_no == snx_eu_no}
16
16
  end
17
17
 
18
+ def find_subscription(id)
19
+ Synnex::Subscription.new(api.subscription(id), @api)
20
+ end
21
+
18
22
  end
19
23
  end
@@ -1,7 +1,7 @@
1
1
  module Synnex
2
2
  class Subscription
3
3
  attr_reader :id, :service_name, :snx_sku_no, :quantity, :status, :po, :price, :msrp, :customer
4
- def initialize(json, customer)
4
+ def initialize(json, api)
5
5
  info = json["subscriptions_info"][0]
6
6
  @id = info["subscription_id"]
7
7
  @service_name = info["service_name"]
@@ -11,7 +11,7 @@ module Synnex
11
11
  @po = json["rs_po_no"]
12
12
  @price = info["unit_price"]
13
13
  @msrp = info["msrp"]
14
- @api = customer.api
14
+ @api = api
15
15
  end
16
16
 
17
17
  def change_quantity(qty, email=nil)
data/synnex.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "synnex"
4
- spec.version = '0.1.7'
4
+ spec.version = '0.1.8'
5
5
  spec.authors = ["Andrew Gauger"]
6
6
  spec.email = ["andygauge@gmail.com"]
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synnex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Gauger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-27 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty