activeresource-zoho_invoice 0.0.3 → 0.0.4

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: 7c14b2d4a27f6b0e6b41a769c1bc02c172e4ed5b
4
- data.tar.gz: 7f084e3312c1e88dd6af54516961aefb0f062d0c
3
+ metadata.gz: 1d7f5b3be71c69246d979365001d24a3fde9914d
4
+ data.tar.gz: 3787874ede20ea9392c972dd3175d41a34759adf
5
5
  SHA512:
6
- metadata.gz: 17826a918d136dc40c377a95013f669152a4cf9e61ad51dfbff5ab709881c7e92dc2870e383aaf81645f76b774e33e74c4d45ee4d4f0031bb84a6a088cddc0a7
7
- data.tar.gz: 688837c1c220e90e064b7a0584fa2302ff1592000b6d3cd7bfbbcd0ca65f1c3d7777543af762f85a7088d318e15487d1e90cef3b2a035f6315e6dd355a9d47b8
6
+ metadata.gz: 673870002e084bfbdb572db57531ea92a4276520d01200a0295d4ea41ef398e4e692325871650165cb9d2ff70f485b1384b4ac9ed983ff1104b45d81e74ab56f
7
+ data.tar.gz: 0a18ff958ef6fc70725907efc6c599e0129629a5feeaa4ba4da232c719c2ffb9ed5fe344dbf8482a543a00c347e38318194684184f3d94fe3654e1c2eaf62a49
@@ -36,9 +36,18 @@ module ZohoInvoiceResource
36
36
  }
37
37
  data['Contacts'] << item
38
38
  end if record.contacts
39
- data['CustomFields']['CustomFieldValue1'] = record.custom_fields.custom_field_value1 if record.custom_fields.custom_field_label1
40
- data['CustomFields']['CustomFieldValue2'] = record.custom_fields.custom_field_value2 if record.custom_fields.custom_field_label2
41
- data['CustomFields']['CustomFieldValue3'] = record.custom_fields.custom_field_value3 if record.custom_fields.custom_field_label3
39
+ if record.custom_fields.custom_field_label1
40
+ data['CustomFields']['CustomFieldLabel1'] = record.custom_fields.custom_field_label1
41
+ data['CustomFields']['CustomFieldValue1'] = record.custom_fields.custom_field_value1
42
+ end
43
+ if record.custom_fields.custom_field_label2
44
+ data['CustomFields']['CustomFieldLabel2'] = record.custom_fields.custom_field_label2
45
+ data['CustomFields']['CustomFieldValue2'] = record.custom_fields.custom_field_value2
46
+ end
47
+ if record.custom_fields.custom_field_label3
48
+ data['CustomFields']['CustomFieldLabel3'] = record.custom_fields.custom_field_label3
49
+ data['CustomFields']['CustomFieldValue3'] = record.custom_fields.custom_field_value3
50
+ end
42
51
  remove_empty!(data)
43
52
  data.to_xml(options)
44
53
  end
@@ -19,9 +19,19 @@ module ZohoInvoiceResource
19
19
  }
20
20
  data['InvoiceItems'] << item
21
21
  end if record.invoice_items
22
- data['CustomFields']['CustomField1'] = record.custom_fields.custom_field1 if record.custom_fields.custom_label1
23
- data['CustomFields']['CustomField2'] = record.custom_fields.custom_field2 if record.custom_fields.custom_label2
24
- data['CustomFields']['CustomField3'] = record.custom_fields.custom_field3 if record.custom_fields.custom_label3
22
+ if record.custom_fields.custom_label1
23
+ # maybe can not write CustomLabel via API
24
+ #data['CustomFields']['CustomLabel1'] = record.custom_fields.custom_label1
25
+ data['CustomFields']['CustomField1'] = record.custom_fields.custom_field1
26
+ end
27
+ if record.custom_fields.custom_label2
28
+ #data['CustomFields']['CustomLabel2'] = record.custom_fields.custom_label2
29
+ data['CustomFields']['CustomField2'] = record.custom_fields.custom_field2
30
+ end
31
+ if record.custom_fields.custom_label3
32
+ #data['CustomFields']['CustomLabel3'] = record.custom_fields.custom_label3
33
+ data['CustomFields']['CustomField3'] = record.custom_fields.custom_field3
34
+ end
25
35
  remove_empty!(data)
26
36
  data.to_xml(options)
27
37
  end
@@ -1,3 +1,3 @@
1
1
  module ZohoInvoiceResource
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeresource-zoho_invoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toru KAWAMURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-24 00:00:00.000000000 Z
11
+ date: 2013-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource