mailchimp_api_v3 0.0.12 → 0.0.13
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4df9c8de10385f2de08c7a4a4d0bb18e2c0714c
|
4
|
+
data.tar.gz: 655e8c4f4082a06e0b9f783abbf434242b3a1c11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb24e4cea3c415c0418358296bf55eb495a850389edd35a85af86aa1a2b59f4b05cf10b8d900745c891286d50b2e47eccf2ca8a0477fd528b48146858dc0b09d
|
7
|
+
data.tar.gz: 642a60da1263e53bec6410c5ccd12adeb1cc62f9e9ac608f261eab4c146d890c477e98f40d3f09006458eed861a435c0f367b5ace694efb2256d29bed7f9e5d9
|
@@ -53,14 +53,8 @@ module Mailchimp
|
|
53
53
|
|
54
54
|
def method_missing(symbol, options = {})
|
55
55
|
key = symbol.id2name
|
56
|
-
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
def fail_unless_exists(key, options = {})
|
61
|
-
return if @data.key? key
|
62
|
-
message = options == {} ? key : "#{key}: #{options}"
|
63
|
-
fail Mailchimp::Exception::UnknownAttribute, message
|
56
|
+
return @data[key] if @data.key? key
|
57
|
+
super
|
64
58
|
end
|
65
59
|
|
66
60
|
def subclass_instance_from(collection_class, id)
|
@@ -24,28 +24,24 @@ module Mailchimp
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def first_name
|
27
|
-
|
27
|
+
merge_fields['FNAME']
|
28
28
|
end
|
29
29
|
|
30
30
|
def last_name
|
31
|
-
|
31
|
+
merge_fields['LNAME']
|
32
32
|
end
|
33
33
|
|
34
34
|
def name
|
35
|
-
return @name if @name
|
36
35
|
delim = first_name && last_name ? ' ' : ''
|
37
|
-
|
36
|
+
"#{first_name}#{delim}#{last_name}"
|
38
37
|
end
|
39
38
|
|
40
|
-
def
|
41
|
-
|
42
|
-
super self.class.parse_name_from(new_data)
|
39
|
+
def to_s
|
40
|
+
"#{name} <#{email_address}>"
|
43
41
|
end
|
44
42
|
|
45
|
-
|
46
|
-
|
47
|
-
def invalidate_derived_fields
|
48
|
-
@first_name = @last_name = @name = nil
|
43
|
+
def update(new_data)
|
44
|
+
super self.class.parse_name_from(new_data)
|
49
45
|
end
|
50
46
|
end
|
51
47
|
|
@@ -28,7 +28,7 @@ describe Mailchimp::Exception::UnknownAttribute, vcr: { cassette_name: 'mailchim
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'fails if we ask for an unknown attribute' do
|
31
|
-
expect { account.blarbleferry }.to raise_error
|
31
|
+
expect { account.blarbleferry }.to raise_error NoMethodError
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|