zaikio-hub 0.7.0 → 0.8.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/CHANGELOG.md +4 -0
- data/lib/zaikio/hub/current_organization.rb +8 -0
- data/lib/zaikio/hub/subscription.rb +1 -1
- data/lib/zaikio/hub/version.rb +1 -1
- data/lib/zaikio/hub.rb +0 -1
- metadata +8 -9
- data/lib/zaikio/error.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 334a558132d7077ca054fbdf5c085025e324d7e37061d5608bcd8e4ab11b8266
|
4
|
+
data.tar.gz: cc234b4c4dbb4dfad4f0fc68cdd58091206057701b7307fa26a2cc18e6ae4705
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c84626e8323410a6d4d4f28302ec04fc18d61ee52347ed281635cbdcc389291f9df274cf4f53e5cbf0b4086da2b478ea28b4c9bd7aa89398f495783432589c7a
|
7
|
+
data.tar.gz: 75cc5d306c754be2f701e629818e65746cf0fef20dd3129af3587be68b8251b7a8b917e008c19a905842da1ed3962ba69eba22c871de431eba2c5f4f386c52c6
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.8.0] - 2021-08-25
|
11
|
+
|
12
|
+
* Added `CurrentOrganization#create_subscription`
|
13
|
+
|
10
14
|
## [0.7.0] - 2021-06-18
|
11
15
|
|
12
16
|
* **BREAKING** `Relation#all` now fetches all following paginated resources by default
|
@@ -47,6 +47,14 @@ module Zaikio
|
|
47
47
|
def members
|
48
48
|
memberships.with_fallback.map(&:person)
|
49
49
|
end
|
50
|
+
|
51
|
+
def create_subscription(status: "active", plan_name: nil)
|
52
|
+
if Zaikio::Hub.current_token_data.subject_type == "Organization"
|
53
|
+
result = self.class.request(:post, "organization/subscription",
|
54
|
+
subscription: { status: status, plan_name: plan_name })
|
55
|
+
Zaikio::Hub::Subscription.new(result.data)
|
56
|
+
end
|
57
|
+
end
|
50
58
|
end
|
51
59
|
end
|
52
60
|
end
|
@@ -8,7 +8,7 @@ module Zaikio
|
|
8
8
|
# Attributes
|
9
9
|
attributes :updated_at, :created_at, :subscriber_type, :subscriber_id,
|
10
10
|
:status, :app_name, :activated_at, :last_billed_at,
|
11
|
-
:last_paid_at, :trial_ended_at, :plan, :preceding_plan,
|
11
|
+
:last_paid_at, :trial_ended_at, :plan, :plan_name, :preceding_plan,
|
12
12
|
:changed_plan_at, :usages_in_current_billing_period
|
13
13
|
|
14
14
|
def initialize(attributes = {})
|
data/lib/zaikio/hub/version.rb
CHANGED
data/lib/zaikio/hub.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zaikio-hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- crispymtn
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-08-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: concurrent-ruby
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
version: 3.10.5
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 3.
|
72
|
+
version: 3.14.0
|
73
73
|
type: :runtime
|
74
74
|
prerelease: false
|
75
75
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -79,7 +79,7 @@ dependencies:
|
|
79
79
|
version: 3.10.5
|
80
80
|
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.
|
82
|
+
version: 3.14.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: spyke
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,16 +104,16 @@ dependencies:
|
|
104
104
|
name: zaikio-client-helpers
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
109
|
+
version: '0.2'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
116
|
+
version: '0.2'
|
117
117
|
description: Ruby API Client for Zaikio's Hub
|
118
118
|
email:
|
119
119
|
- op@crispymtn.com
|
@@ -127,7 +127,6 @@ files:
|
|
127
127
|
- MIT-LICENSE
|
128
128
|
- README.md
|
129
129
|
- Rakefile
|
130
|
-
- lib/zaikio/error.rb
|
131
130
|
- lib/zaikio/hub.rb
|
132
131
|
- lib/zaikio/hub/address.rb
|
133
132
|
- lib/zaikio/hub/asset.rb
|
data/lib/zaikio/error.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module Zaikio
|
2
|
-
class Error < StandardError; end
|
3
|
-
|
4
|
-
class ConnectionError < Zaikio::Error; end
|
5
|
-
|
6
|
-
class ResourceNotFound < Zaikio::Error; end
|
7
|
-
end
|
8
|
-
|
9
|
-
module Spyke
|
10
|
-
instance_eval do
|
11
|
-
# avoid warning: already initialized constant
|
12
|
-
remove_const("ConnectionError")
|
13
|
-
remove_const("ResourceNotFound")
|
14
|
-
end
|
15
|
-
|
16
|
-
ConnectionError = Class.new Zaikio::ConnectionError
|
17
|
-
ResourceNotFound = Class.new Zaikio::ResourceNotFound
|
18
|
-
end
|