lemonway_ruby 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -2
- data/Rakefile +1 -1
- data/bin/console +1 -1
- data/lib/lemon_way/client.rb +7 -7
- data/lib/lemon_way/p2p.rb +17 -0
- data/lib/lemon_way/response_adapter.rb +1 -1
- data/lib/lemon_way/version.rb +1 -1
- data/lib/lemonway_ruby.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3153217b475accc913d406d34c293c548bfe523b
|
4
|
+
data.tar.gz: 31b00de9b65e0e67162c29c4cfaed205e5a9cbed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0182446eb9b9096f44145ed7d92abdf90c383c87f7e4bec642ffa0747e2cbd0bee0921423ccdc6b123b997d86f4a5a86d51685de6a00539b8c46949e9bc5f35a'
|
7
|
+
data.tar.gz: 5a79cb6107d4b66ed2e56bc5336fdd31120b67ee72e3a5387c9aa26b9e2ed1c542c44c688d4d6680447ae17ad4b12e36a84bffe9e9bd0ad51f31aa1fd53f5ec6
|
data/README.md
CHANGED
@@ -38,9 +38,10 @@ If you work with **Rails** :
|
|
38
38
|
lemon_way_configuration = {
|
39
39
|
login: ENV['LEMONWAY_LOGIN'],
|
40
40
|
password: ENV['LEMONWAY_PASSWORD'],
|
41
|
-
company: ENV['LEMONWAY_COMPANY']
|
41
|
+
company: ENV['LEMONWAY_COMPANY'],
|
42
|
+
society_wallet_id: ENV['LEMONWAY_SOCIETY_WALLET_ID']
|
42
43
|
}
|
43
|
-
lemon_way_configuration
|
44
|
+
lemon_way_configuration[:sandbox] = true unless Rails.env.production?
|
44
45
|
|
45
46
|
LemonWay.configuration = lemon_way_configuration
|
46
47
|
```
|
@@ -112,6 +113,15 @@ This module allows you to prepare/debit a wallet to credit a bank account:
|
|
112
113
|
|
113
114
|
Details of the [MoneyOut module](https://github.com/MesPetitsArtistes/lemon_way/wiki/MoneyOut).
|
114
115
|
|
116
|
+
### P2P
|
117
|
+
|
118
|
+
This module allows you to transfer fund from a Wallet to another Wallet
|
119
|
+
|
120
|
+
* Send payment from a wallet to another wallet
|
121
|
+
* Get details on wallet to wallet transfer
|
122
|
+
|
123
|
+
Details of the [P2P module](https://github.com/MesPetitsArtistes/lemon_way/wiki/P2P).
|
124
|
+
|
115
125
|
## License
|
116
126
|
|
117
127
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/lemon_way/client.rb
CHANGED
@@ -9,11 +9,8 @@ module LemonWay
|
|
9
9
|
class Client
|
10
10
|
include HTTParty
|
11
11
|
|
12
|
-
attr_reader :login, :password, :company, :env, :options
|
13
|
-
|
14
12
|
DIRECTKIT_URL = \
|
15
13
|
'https://sandbox-api.lemonway.fr/mb/{company_name}/{env}/directkitjson2/Service.asmx'.freeze
|
16
|
-
|
17
14
|
REQUIRED_CONFIGURATION = %i[login password company].freeze
|
18
15
|
DEFAULT_LANGUAGE = 'fr'.freeze
|
19
16
|
DEFAULT_HEADERS = {
|
@@ -23,6 +20,8 @@ module LemonWay
|
|
23
20
|
'Pragma' => 'no-cache'
|
24
21
|
}.freeze
|
25
22
|
|
23
|
+
attr_reader :login, :password, :company, :society_wallet_id, :env, :options
|
24
|
+
|
26
25
|
base_uri DIRECTKIT_URL
|
27
26
|
debug_output $stdout
|
28
27
|
|
@@ -31,11 +30,12 @@ module LemonWay
|
|
31
30
|
raise MissingConfigurationError.new
|
32
31
|
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
%i[login password company society_wallet_id].each do |key|
|
34
|
+
instance_variable_set("@#{key}".to_sym, options.delete(key))
|
35
|
+
end
|
36
|
+
|
37
37
|
@env = options[:sandbox] ? 'dev' : 'prod'
|
38
|
-
@options = options
|
38
|
+
@options = options
|
39
39
|
end
|
40
40
|
|
41
41
|
def send_request(lw_method, version, params = {})
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'lemon_way/error'
|
4
|
+
|
5
|
+
module LemonWay
|
6
|
+
class P2P
|
7
|
+
class << self
|
8
|
+
def send_payment(params = {})
|
9
|
+
LemonWay.client.send_request('SendPayment', '1.0', params)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_payment_details(params = {})
|
13
|
+
LemonWay.client.send_request('GetPaymentDetails', '1.0', params)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/lemon_way/version.rb
CHANGED
data/lib/lemonway_ruby.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lemonway_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Ktifa
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-07-
|
12
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -166,6 +166,7 @@ files:
|
|
166
166
|
- lib/lemon_way/middleware.rb
|
167
167
|
- lib/lemon_way/money_in.rb
|
168
168
|
- lib/lemon_way/money_out.rb
|
169
|
+
- lib/lemon_way/p2p.rb
|
169
170
|
- lib/lemon_way/railtie.rb
|
170
171
|
- lib/lemon_way/response_adapter.rb
|
171
172
|
- lib/lemon_way/version.rb
|
@@ -191,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
192
|
version: '0'
|
192
193
|
requirements: []
|
193
194
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.
|
195
|
+
rubygems_version: 2.6.11
|
195
196
|
signing_key:
|
196
197
|
specification_version: 4
|
197
198
|
summary: Client for LemonWay Directkit API in JSON
|