README.md in lemonway-1.0.0 vs README.md in lemonway-1.0.1
- old
+ new
@@ -23,13 +23,13 @@
1. Initialization : `LemonWay::Client.new(api_params, client_config_options, &client_config_block)`
- `api_options` (Hash) : mandatory hash where are passed the api param you want to reapeat every client query + the `:wsdl` uri
- `client_config_options` (Hash) : optional hash passed to savon to build its [global options](https://github.com/savonrb/savon/blob/master/lib/savon/options.rb) used by the client on every query
- `client_config_block` (Block) : optional block to customize the savon client, takes a [savon global options](https://github.com/savonrb/savon/blob/master/lib/savon/options.rb) instance as param
```ruby
-client = LemonWay::Client.new {wsdl: "https://ws.lemonway.fr/mb/my_lemon_name/dev/directkit/service.asmx?wsdl"}, {ssl_verify_mode: :none}
+client = LemonWay::Client.new({wsdl: "https://ws.lemonway.fr/[...]/service.asmx?wsdl"}, {ssl_verify_mode: :none})
#is the same as
-client = LemonWay::Client.new {wsdl: "https://ws.lemonway.fr/mb/my_lemon_name/dev/directkit/service.asmx?wsdl"} do |opts|
+client = LemonWay::Client.new wsdl: "https://ws.lemonway.fr/[...]/service.asmx?wsdl" do |opts|
opts.ssl_verify_mode(:none)
end
```
2. Query the API directly calling the method on the client instance : `client.api_method_name(params, client_config_override, &client_block_config_override)`
@@ -46,11 +46,12 @@
# initialize the client
client = LemonWay::Client.new wsdl: "https://ws.lemonway.fr/mb/ioio/dev/directkit/service.asmx?wsdl",
wl_login: "test",
wl_pass: "test",
language: "fr",
- version: "1.1"
+ version: "1.1",
+ wallet_ip: "127.0.0.1"
# list the available operations as follow :
resp = client.operations
=> [:register_wallet,
:update_wallet_details,
@@ -63,12 +64,13 @@
# requests takes underscored names, and undescored (or camelcased) options, some hash with indifferent access are returned
resp = client.register_wallet, wallet: "123",
client_mail: "nico@las.com",
client_first_name: "nicolas",
- client_last_name: "nicolas"
-=> { wallet: {id: '123', lwid: "98098"}
-resp[:wallet][:id] == resp['wallet']['id'] == '123'
+ client_last_name: "nicolas",
+ wallet_ip: "127.0.0.1"
+=> {id: '123', lwid: "98098"}
+resp[:id] == resp['id'] == '123'
```
Please refer to the Lemonway documentation for the complete list of methods and their parameters, or query https://ws.lemonway.fr/mb/[YOUR_LEMONWAY_NAME]/dev/directkitxml/service.asmx if Lemonway has provided you a development account