moneta-api 1.12.7 → 1.12.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1002fb03d1ee243d568a4fb2ef77bdd9bf731faa
4
- data.tar.gz: 020b2053ccf5ec29fae5e7e81256ea5d25465ddf
3
+ metadata.gz: 372560965c09de9ba36c3050014096cad8c5e763
4
+ data.tar.gz: ca25d82ba2565f5e5d24c0115499fea00973fec1
5
5
  SHA512:
6
- metadata.gz: 22ab12c3fa2c6f7b0e1f25738a061a2ffeb5fbc1fcdbe6ae92ead0b392962e61c5db362c9eed1028e8025ffc90370df9fa356f549952349ebfa6447ee53753b5
7
- data.tar.gz: 464c9df5f595f71bd7e6a75adaf899ab3a556bb938665ee3d16e004e1a6fac6c62a1a5431cfe94bab83742ebb12c266dbf4e803d9c241be6b66ab836157305d0
6
+ metadata.gz: d127a79e63f3569685761db805f27265a5b8433c1061670d921d87a24fb4ea2501e14a8106fc09b7d4714bac886e07a11f081ff232f66c34d565de4935f8f397
7
+ data.tar.gz: aa3813d5096220dd6bb48429b311bff3da807aa7ad22679f59c97b5507d8de433bda289632ea20be7008f8efc5be48c93aaad733d5c242ede2006c4bcd344bda
@@ -3,6 +3,7 @@ module Moneta
3
3
  class Service
4
4
  DEMO = 'https://demo.moneta.ru/services.wsdl'
5
5
  PRODUCTION = 'https://www.moneta.ru/services.wsdl'
6
+ NAMESPACE = 'http://www.moneta.ru/schemas/messages.xsd'
6
7
 
7
8
  include ServiceMethods
8
9
  attr_reader :client
@@ -16,9 +17,11 @@ module Moneta
16
17
  def prepare_params(username, password, params)
17
18
  demo_mode = params.delete(:demo_mode)
18
19
 
19
- { wsse_auth: [ username, password ] }
20
- .merge(params)
21
- .merge(wsdl: wsdl_url(demo_mode))
20
+ {
21
+ wsse_auth: [ username, password ],
22
+ wsdl: wsdl_url(demo_mode),
23
+ namespace: NAMESPACE
24
+ }.merge(params)
22
25
  end
23
26
 
24
27
  def wsdl_url(demo_mode)
@@ -1,5 +1,5 @@
1
1
  module Moneta
2
2
  module Api
3
- VERSION = '1.12.7'
3
+ VERSION = '1.12.8'
4
4
  end
5
5
  end
@@ -0,0 +1,22 @@
1
+ describe Moneta::Api::DataMapper do
2
+ class Target
3
+ include Moneta::Api::DataMapper
4
+
5
+ property :field
6
+ end
7
+
8
+ it 'should set present value' do
9
+ object = Target.build(field: 1)
10
+ expect(object.field).to eq 1
11
+ end
12
+
13
+ it 'should set nil value' do
14
+ object = Target.build(field: nil)
15
+ expect(object.field).to be_nil
16
+ end
17
+
18
+ it 'should set false value' do
19
+ object = Target.build(field: false)
20
+ expect(object.field).to eq false
21
+ end
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moneta-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.7
4
+ version: 1.12.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssnikolay
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-30 00:00:00.000000000 Z
12
+ date: 2017-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon
@@ -281,6 +281,7 @@ files:
281
281
  - lib/moneta/core_ext/string.rb
282
282
  - moneta-api.gemspec
283
283
  - spec/lib/moneta/api/connection_exception_spec.rb
284
+ - spec/lib/moneta/api/data_mapper_spec.rb
284
285
  - spec/lib/moneta/api/http_exception_spec.rb
285
286
  - spec/lib/moneta/api/requests/approve_phone_apply_code_request_spec.rb
286
287
  - spec/lib/moneta/api/requests/approve_phone_send_confirmation_request_spec.rb
@@ -371,12 +372,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
372
  version: '0'
372
373
  requirements: []
373
374
  rubyforge_project:
374
- rubygems_version: 2.4.8
375
+ rubygems_version: 2.4.6
375
376
  signing_key:
376
377
  specification_version: 4
377
378
  summary: "МОНЕТА.РУ (MONETA.MerchantAPI.v2)"
378
379
  test_files:
379
380
  - spec/lib/moneta/api/connection_exception_spec.rb
381
+ - spec/lib/moneta/api/data_mapper_spec.rb
380
382
  - spec/lib/moneta/api/http_exception_spec.rb
381
383
  - spec/lib/moneta/api/requests/approve_phone_apply_code_request_spec.rb
382
384
  - spec/lib/moneta/api/requests/approve_phone_send_confirmation_request_spec.rb