nexio_activemerchant 0.2.6 → 0.2.7

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
  SHA256:
3
- metadata.gz: c71ca2a7f93f4b56d210272254bb2e5b42f21971a67dcdb4577b7676aeb77963
4
- data.tar.gz: 438164011b498f1d97be2d03e41ddfb5cd5d92c06ef66aa65cfdf7def2baafc9
3
+ metadata.gz: '09b41171285a1391d8d99233c196e387bc1822c3efdbb8187eb8422764f1beae'
4
+ data.tar.gz: 85f11b3a8a146594f3f0919a1f8b3aa2a6a5415c342b541931acea748ce81c94
5
5
  SHA512:
6
- metadata.gz: fbcaea369894ec54d50b0aab65cdfa66fd17c97febbeaadd80b07a6c3b7165e97728a115eecfd60d144c0aefc030682fb6d5331946db14129f966636eb584f8f
7
- data.tar.gz: 418c3d334030134e369d897ac2a4a09b7226af458cc6972b2f90d0de1201250614baecc94b06a3f657ab4c6a52e4fdd5c287a8ef2c4a0f86f0bd62c23ca2d91d
6
+ metadata.gz: '094f7c5d9058ef1ceb7ed58fc77f217c0190175a64f75a24027909d75003b3bd4b7da8812a3b972b62b864e5f123e63c38129856ad74f0d5483592cc803377c0'
7
+ data.tar.gz: b82b1e74e01c35752e1f64e4949ccb038b841d62e32686590a58e3aba1ee2dd6959883fda3d0e9a7529130b86b216419f3983ee1b3ade95b0b93b18500a3fcae
@@ -172,15 +172,12 @@ module ActiveMerchant
172
172
  def add_address(post, data, prefix)
173
173
  return post if data.blank?
174
174
 
175
- post[:data][:customer].merge!({
176
- "#{prefix}AddressOne": data[:address1],
177
- "#{prefix}AddressTwo": data[:address2],
178
- "#{prefix}City": data[:city],
179
- "#{prefix}Country": data[:country],
180
- "#{prefix}Phone": data[:phone],
181
- "#{prefix}Postal": data[:zip],
182
- "#{prefix}State": data[:state]
183
- })
175
+ {
176
+ AddressOne: :address1, AddressTwo: :address2, City: :city,
177
+ Country: :country, Phone: :phone, Postal: :zip, State: :state
178
+ }.each do |suffix, key|
179
+ post[:data][:customer]["#{prefix}#{suffix}"] = data[key] if data[key].present?
180
+ end
184
181
  end
185
182
 
186
183
  def add_payment(post, payment, options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NexioActivemerchant
4
- VERSION = '0.2.6'
4
+ VERSION = '0.2.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexio_activemerchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Whitespectre