gotransverse-tract-api 0.7.2 → 0.7.3
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: 55d484a878c67280004af5c6716a43dc246328c6
|
4
|
+
data.tar.gz: 095a7793ccb0fb6475c0e5bb9c4a847d5bef12ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ff5f925a24282ce277f76f18c9be0c80cc1ca66a4d7e971e4c6ceed6c3a7c2c306f45f63a1a426db7f10544b580183b2f84195db88db92ee73b6eb85fbe9e0
|
7
|
+
data.tar.gz: 72bf96c6bd4c17cbc83edd09974a60ed1c2742156d76e0ad8d9418b77193ccc7c2492ffbad51e1b1e2cbb26ea589118db35328c0dd166d2dbda6d6e3d852ca11
|
@@ -39,17 +39,24 @@ module GoTransverseTractApi
|
|
39
39
|
def self.add_address eid, address
|
40
40
|
data = {
|
41
41
|
addAddressToParty: {},
|
42
|
-
person: {eid: eid},
|
43
|
-
postalAddress: {
|
44
|
-
purpose: address[:purpose],
|
45
|
-
country: address[:country],
|
46
|
-
city: address[:city],
|
47
|
-
regionOrState: address[:region_or_state],
|
48
|
-
postalCode: address[:postal_code],
|
49
|
-
line1: address[:line1]
|
50
|
-
}
|
51
42
|
}
|
52
43
|
|
44
|
+
if (address.has_key?(:person))
|
45
|
+
data.merge!({ person: {eid: eid} })
|
46
|
+
else
|
47
|
+
data.merge!({ organization: {eid: eid} })
|
48
|
+
end
|
49
|
+
|
50
|
+
if (address.has_key?(:postal_address))
|
51
|
+
data.merge!({ postalAddress: address[:postal_address] })
|
52
|
+
end
|
53
|
+
if (address.has_key?(:email_address))
|
54
|
+
data.merge!({ emailAddress: address[:email_address] })
|
55
|
+
end
|
56
|
+
if (address.has_key?(:telecom_address))
|
57
|
+
data.merge!({ telecomAddress: address[:telecom_address] })
|
58
|
+
end
|
59
|
+
|
53
60
|
xml_data = GoTransverseTractApi.generateXML(data, 'addAddressToParty')
|
54
61
|
GoTransverseTractApi.post_request_for(self, {eid: eid}, xml_data, "addAddress")
|
55
62
|
end
|
@@ -12,12 +12,23 @@ module GoTransverseTractApi
|
|
12
12
|
eid = '48406'
|
13
13
|
|
14
14
|
data = {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
person: {eid: eid},
|
16
|
+
postal_address: {
|
17
|
+
city: 'fsfsfs',
|
18
|
+
country: 'USA',
|
19
|
+
line1: 'wefsvgg ggdgdgd',
|
20
|
+
postal_code: '232433',
|
21
|
+
purpose: 'Billing',
|
22
|
+
region_or_state: 'CA'
|
23
|
+
},
|
24
|
+
email_address: {
|
25
|
+
email: 'test@test.com'
|
26
|
+
},
|
27
|
+
telecom_address: {
|
28
|
+
country_code: '001',
|
29
|
+
area_code: '925',
|
30
|
+
number: '123-3214'
|
31
|
+
}
|
21
32
|
}
|
22
33
|
|
23
34
|
allow(subject).to receive(:add_address).with(eid, data).and_return(response)
|