avangate 0.1.7 → 0.1.8
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/README.md +10 -4
- data/avangate.gemspec +1 -1
- data/lib/avangate.rb +14 -0
- data/lib/avangate/errors.rb +2 -1
- data/lib/avangate/version.rb +1 -1
- metadata +4 -10
- data/avangate-0.1.0.gem +0 -0
- data/avangate-0.1.1.gem +0 -0
- data/avangate-0.1.2.gem +0 -0
- data/avangate-0.1.3.gem +0 -0
- data/avangate-0.1.4.gem +0 -0
- data/avangate-0.1.5.gem +0 -0
- data/avangate-0.1.6.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99d44300ab535eca54d6e1e69d58d34c022e7425
|
4
|
+
data.tar.gz: 0042118b5a6c03460f2ed5cd303b77cce51731e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8937f339c993d4808bc17878f1f5394206c737e327976090bef849f9902fbce7e13381c61cfe25928fa9d16071282a3f3f9d6e0a88d52b99dd38464fdc9fac6a
|
7
|
+
data.tar.gz: 96fd57d16ec48dd2f721bcb5477f6eb30110bcb6bb591e549cb84c0bd1faa8df884cdb53c6abdde835d64abb3383e46cc0dbb3ecab0a4b2dac16939923e0fc74
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Avangate
|
2
2
|
|
3
|
-
|
3
|
+
This gem is a library to interact with Avangate SOAP API
|
4
4
|
|
5
|
-
|
5
|
+
Current methods implemented:
|
6
|
+
|
7
|
+
#login
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -20,14 +22,18 @@ Or install it yourself as:
|
|
20
22
|
|
21
23
|
$ gem install avangate
|
22
24
|
|
23
|
-
You need to provide your secret key and your merchant code, both you can get when you sign in to avangate website, then you need to create an initializer
|
25
|
+
You need to provide your secret key and your merchant code, both you can get when you sign in to avangate website, then you need to create an initializer
|
26
|
+
|
27
|
+
config/initializers/avangate.rb
|
28
|
+
|
29
|
+
Inside you can and set up:
|
24
30
|
|
25
31
|
Avangate::Base.secret_key = "SECRET_KEY"
|
26
32
|
Avangate::Base.merchant_code = "MERCHANT_CODE"
|
27
33
|
|
28
34
|
## Usage
|
29
35
|
|
30
|
-
|
36
|
+
sessionId = Avangate::SOAP.login
|
31
37
|
|
32
38
|
## Development
|
33
39
|
|
data/avangate.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["leo.majowka@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = "Avangate integration for Ruby on Rails using their SOAP API with Savon"
|
13
|
-
spec.description = "Avangate integration for Ruby on Rails using their SOAP API with Savon"
|
13
|
+
spec.description = "Avangate integration for Ruby on Rails using their SOAP API with Savon. Methods #login"
|
14
14
|
spec.homepage = "https://github.com/lmajowka/avangate"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
data/lib/avangate.rb
CHANGED
@@ -17,6 +17,20 @@ module Avangate
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def self.addProduct(options={})
|
21
|
+
raise MissingSessionId, "missing param session_id" unless options[:session_id].presence
|
22
|
+
raise MissingProductId, "missing param product_id" unless options[:product_id].presence
|
23
|
+
quantity = options[:quantity].presence ? options[:quantity] : 1
|
24
|
+
params = {
|
25
|
+
sessionID: options[:session_id],
|
26
|
+
ProductId: options[:product_id],
|
27
|
+
Quantity: quantity
|
28
|
+
|
29
|
+
}
|
30
|
+
response = client.call :addProduct, message: params
|
31
|
+
return response.body.first[1].first[1]
|
32
|
+
end
|
33
|
+
|
20
34
|
private
|
21
35
|
|
22
36
|
def self.client
|
data/lib/avangate/errors.rb
CHANGED
data/lib/avangate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avangate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: Avangate integration for Ruby on Rails using their SOAP API with Savon
|
69
|
+
description: 'Avangate integration for Ruby on Rails using their SOAP API with Savon.
|
70
|
+
Methods #login'
|
70
71
|
email:
|
71
72
|
- leo.majowka@gmail.com
|
72
73
|
executables: []
|
@@ -89,13 +90,6 @@ files:
|
|
89
90
|
- LICENSE.txt
|
90
91
|
- README.md
|
91
92
|
- Rakefile
|
92
|
-
- avangate-0.1.0.gem
|
93
|
-
- avangate-0.1.1.gem
|
94
|
-
- avangate-0.1.2.gem
|
95
|
-
- avangate-0.1.3.gem
|
96
|
-
- avangate-0.1.4.gem
|
97
|
-
- avangate-0.1.5.gem
|
98
|
-
- avangate-0.1.6.gem
|
99
93
|
- avangate.gemspec
|
100
94
|
- bin/console
|
101
95
|
- bin/setup
|
data/avangate-0.1.0.gem
DELETED
Binary file
|
data/avangate-0.1.1.gem
DELETED
Binary file
|
data/avangate-0.1.2.gem
DELETED
Binary file
|
data/avangate-0.1.3.gem
DELETED
Binary file
|
data/avangate-0.1.4.gem
DELETED
Binary file
|
data/avangate-0.1.5.gem
DELETED
Binary file
|
data/avangate-0.1.6.gem
DELETED
Binary file
|