tessitura_rest 0.3.2 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9784f20baa001473f50f1e4644078fbd42d7685f
4
- data.tar.gz: f5931fbc4f509a43c0f5568cc8ed84768b23fdbe
3
+ metadata.gz: e365e01a3036a23dc0f5514bbc11a539b334e959
4
+ data.tar.gz: 42b89bd1eeeda38697c20e3f2ebc72c0859f0f59
5
5
  SHA512:
6
- metadata.gz: 7aa27efb265202e5abd6868a4058b0455dbff9d45c80a9f69c92563c309e7a144281e5869280253e6b923013d72e65e44b3f52637fb0694e106dfdb3f4f4eae3
7
- data.tar.gz: ab356e2824e075709270d0f0fae0a88842ce3fdc8be23b69d6b87bd938a7bb56522b9221c2a3e7c23595be70afd857a6ab69b8600e69de0c93f0909a00020635
6
+ metadata.gz: ddc109886c3272b5a6082c326d279b5e8c84ee76560ad3d7c675cdc70fe58ce4b22f1646fcdb667100d97207ac868b8494d8008777a16db243c4231a3ed781f1
7
+ data.tar.gz: be5fe19ddf7c7a6f0d7c17bac5291b549153b00aa8ff2b8d00fce267e45229862bae8a7357511d36471316d9b20f9c4fc9a40e6d22a18d9782886d24dc98c201
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -2,7 +2,20 @@ module Login
2
2
 
3
3
  def with_user(ip_address, business_unit_id, options={})
4
4
  options.merge!({:basic_auth => @auth})
5
- response = self.class.get(base_api_endpoint("Web/Session/"), options)
5
+ response = self.class.get(base_api_endpoint('Web/Session/'), options)
6
6
  JSON.parse(response.body)
7
7
  end
8
+
9
+ def login_using_external(email, login_type_id, promotion, session_key, options={})
10
+ parameters =
11
+ {
12
+ 'UserName': email,
13
+ 'LoginTypeId': login_type_id,
14
+ 'PromotionCode': promotion
15
+ }
16
+ options.merge!({:basic_auth => @auth})
17
+ options.merge!(:body => parameters.to_json, :headers => {'Content-Type' => 'application/json'})
18
+ post = self.class.post(base_api_endpoint("Web/Session/#{session_key}/Login/External"), options)
19
+ post.success?
20
+ end
8
21
  end
@@ -18,6 +18,7 @@ class TessituraRest
18
18
  include GiftCertificates
19
19
  include Issues
20
20
  include LocalProcedure
21
+ include Login
21
22
  include Orders
22
23
  include Package
23
24
  include Phones
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessitura_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler