clearsaleID 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clearsale/object.rb +3 -3
- data/lib/clearsale/order.rb +3 -3
- data/lib/clearsale/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bb43b33381a6508c62f48f1d59e7b76ca80dc29d2da46ab7b7eb1f8183c1ea9
|
4
|
+
data.tar.gz: 7184e24f49ce1dca603b900b3be08f09a88ce33af977b543333d4898cf3879e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7a1e7bf22d68f6e2c6d54a09298b6719965ef02a5efff494f499fc184c6264459a613387cab63afc8e82a7bdc15e9be8a41c6b40689735ed05a4246eac6fd60
|
7
|
+
data.tar.gz: 9eb7fc75411e76a510b1816076da12f13a542ee5b46e7a0149c8bd65ee70e7ff2f6731a6b0dddd7700a02aa1285099c25d73078a0f95235f59478689bd672aeb
|
data/lib/clearsale/object.rb
CHANGED
@@ -10,11 +10,11 @@ module Clearsale
|
|
10
10
|
v = @table[name]
|
11
11
|
case v
|
12
12
|
when Hash
|
13
|
-
Object.new(v)
|
13
|
+
return Object.new(v)
|
14
14
|
when Array
|
15
|
-
v.each_with_index { |item, index| v[index] = Object.new(item) }
|
15
|
+
return v.each_with_index { |item, index| v[index] = Object.new(item) }
|
16
16
|
else
|
17
|
-
v
|
17
|
+
return v
|
18
18
|
end
|
19
19
|
}
|
20
20
|
define_method("#{name}=") { |x| modifiable[name] = x }
|
data/lib/clearsale/order.rb
CHANGED
@@ -28,10 +28,10 @@ module Clearsale
|
|
28
28
|
builder.tag!('QtdItens', order.items_count)
|
29
29
|
builder.tag!('IP', user.last_sign_in_ip)
|
30
30
|
builder.tag!('DadosCobranca') do |b|
|
31
|
-
build_user_data(b, user,
|
31
|
+
build_user_data(b, user, order.billing_address)
|
32
32
|
end
|
33
33
|
builder.tag!('DadosEntrega') do |b|
|
34
|
-
build_user_data(b, user,
|
34
|
+
build_user_data(b, user, order.shipping_address)
|
35
35
|
end
|
36
36
|
|
37
37
|
builder.tag!('Pagamentos') do |b|
|
@@ -53,7 +53,7 @@ module Clearsale
|
|
53
53
|
builder.tag!('Email', user.email)
|
54
54
|
builder.tag!('Sexo', user.gender.downcase)
|
55
55
|
builder.tag!('Nascimento', user.birthdate.to_time.strftime("%Y-%m-%dT%H:%M:%S")) if user.birthdate.present?
|
56
|
-
build_address(builder, billing_address)
|
56
|
+
build_address(builder, Object.new(billing_address))
|
57
57
|
builder.tag!('Telefones') do |b|
|
58
58
|
build_phone(b, user)
|
59
59
|
end
|
data/lib/clearsale/version.rb
CHANGED