intacctrb 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2677b0de40dfce5fef1f249edaae5c76e700028
4
- data.tar.gz: 96f9b0f5d06c810a902e99cc4ea7524c37f4f6e1
3
+ metadata.gz: 7ef5155cd2bd13fe128803e21f938e9e4137f215
4
+ data.tar.gz: 842c50af8d19e306362a25e27d720edeeece7753
5
5
  SHA512:
6
- metadata.gz: cc6993f508e17efd8a834286f17c5cb177fcb6d5d472b4a2389c2280e38c7ba8dae0294f20587ee1434ab41f7a077dec4ed46d950d51f2193884633b33044a98
7
- data.tar.gz: de852d14bca19566bf3dc157c41d986012c06c827cfb2148e21c95905d7b5c6fdba63410edc1e4e1bd80c0f6f86ee05c48831a4b2558ab13df606c2e7505a81b
6
+ metadata.gz: e5ea8dbae460a74b576a95f3a90804643311023d2e6d2ca4ad4f063bcf9a6893d176e7f900f16d8e8e7b85418397c646e3f103ff3748b7944db5e6f46750de79
7
+ data.tar.gz: 730c66086be73706326de4b617b33dc32401013b2a5925a5df4d812a70508c16142f432752c15a51269fa20a762a7e4a1c63bba7c40ccbb72e97ff69bf69097d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- intacctrb (0.4.6)
4
+ intacctrb (0.4.7)
5
5
  hooks
6
6
  nokogiri
7
7
 
@@ -96,25 +96,16 @@ module IntacctRB
96
96
  xml.paymethod object.payment_method
97
97
  xml.onetime object.one_time || false
98
98
  xml.primary {
99
- xml.contact {
100
- xml.contactname object.company_name
101
- xml.printas object.print_as
102
- xml.companyname object.company_name
103
- xml.firstname object.first_name
104
- xml.lastname object.last_name
105
- xml.phone1 object.business_phone
106
- xml.cellphone object.cell_phone
107
- xml.email1 object.email
108
- if object.mailing_address.present?
109
- xml.mailaddress {
110
- xml.address1 object.mailing_address.address_1
111
- xml.address2 object.mailing_address.address_2
112
- xml.city object.mailing_address.city
113
- xml.state object.mailing_address.state
114
- xml.zip object.mailing_address.zip
115
- }
116
- end
117
- }
99
+ contact_xml(xml, object.primary)
100
+ }
101
+ xml.payto {
102
+ contact_xml(xml, object.pay_to)
103
+ }
104
+ xml.contactinfo {
105
+ contact_xml(xml, object.contact_info)
106
+ }
107
+ xml.returnto {
108
+ contact_xml(xml, object.return_to)
118
109
  }
119
110
  if object.ach_routing_number.present?
120
111
  xml.achenabled "#{object.ach_routing_number.present? ? "true" : "false"}"
@@ -124,5 +115,27 @@ module IntacctRB
124
115
  xml.achremittancetype "#{(object.ach_account_classification=="business" ? "CCD" : "PPD")}"
125
116
  end
126
117
  end
118
+
119
+ def contact_xml xml, contact_object
120
+ xml.contact {
121
+ xml.contactname contact_object.contact_name
122
+ xml.printas contact_object.print_as
123
+ xml.companyname contact_object.company_name
124
+ xml.firstname contact_object.first_name
125
+ xml.lastname contact_object.last_name
126
+ xml.phone1 contact_object.business_phone
127
+ xml.cellphone contact_object.cell_phone
128
+ xml.email1 contact_object.email
129
+ if contact_object.mailing_address.present?
130
+ xml.mailaddress {
131
+ xml.address1 contact_object.mailing_address.address_1
132
+ xml.address2 contact_object.mailing_address.address_2
133
+ xml.city contact_object.mailing_address.city
134
+ xml.state contact_object.mailing_address.state
135
+ xml.zip contact_object.mailing_address.zip
136
+ }
137
+ end
138
+ }
139
+ end
127
140
  end
128
141
  end
@@ -1,3 +1,3 @@
1
1
  module IntacctRB
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intacctrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-14 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri