cxml-ruby 0.6.1 → 0.7.0

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
  SHA256:
3
- metadata.gz: 87772dd26f3194f54c29efa9a993202f79e8102f9bda767bbab87fb43579b9be
4
- data.tar.gz: 227e6acd1a26406c8eaeabdec57326e5ac85ff5a965ff11c0d24650d786c3f51
3
+ metadata.gz: 1f43fac9295a9de5ac9f0c327a73b26260569c239c70bad553e8cb0721c5fb7b
4
+ data.tar.gz: 41e42f9b4a188923bf7c42105571c0f81da954fc82d4825d0c1c0dbd49ec7f93
5
5
  SHA512:
6
- metadata.gz: 812724e750bb2f67a33fa0cd2acef0d03996d394574ea265f40b90c842f1b5244de9ab7ca74a7acedc38a6dbd0d96030933be52a6ef0cf7d2713328117d660bb
7
- data.tar.gz: 93d10408aaaafaa739ffa6841a83b0ecabe253247cff418684887ac8bfb3fed328e29a649e09d9e1ed043f8aa3d7adfcfbff4104156fb5e80993463d9ed147b6
6
+ metadata.gz: 90361cf48f65bc79bde60722efe16be0f61f60e455998aa7c73bdbbcba7984b2c9b7b322b70579572d2d44988ed554db0f4ecd046038de6d0fc43086fe64fd77
7
+ data.tar.gz: 23892b7370c13805e5ad69c0c1bed7b2181c872abc8cb9abed99c074e7423f28d764d8cfa3889593cd0a528ec3674b5384b4f5d5a97bcf59c576adebbf06cd61
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
 
15
15
  ---
16
16
 
17
+ ## [0.7.0] - 2021-01-12
18
+ ### Added
19
+ - Support parsing Phone tags.
20
+
17
21
  ## [0.6.1] - 2020-09-04
18
22
  ### Fixed
19
23
  - Handle parsing CDATA tags in cXML content (Thanks @CRiva!).
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CXML
4
+ class CountryCode < DocumentNode
5
+ accessible_attributes %i[
6
+ iso_country_code
7
+ ]
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CXML
4
+ class Phone < DocumentNode
5
+ accessible_attributes %i[
6
+ name
7
+ ]
8
+
9
+ accessible_nodes %i[
10
+ telephone_number
11
+ ]
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CXML
4
+ class TelephoneNumber < DocumentNode
5
+ accessible_nodes %i[
6
+ country_code
7
+ area_or_city_code
8
+ number
9
+ ]
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CXML
4
- VERSION = '0.6.1'
4
+ VERSION = '0.7.0'
5
5
  end
@@ -39,6 +39,13 @@
39
39
  <Country isoCountryCode="US">United States</Country>
40
40
  </PostalAddress>
41
41
  <Email name="default">jmadden@coupa1.com</Email>
42
+ <Phone name="work">
43
+ <TelephoneNumber>
44
+ <CountryCode isoCountryCode="US">1</CountryCode>
45
+ <AreaOrCityCode>855</AreaOrCityCode>
46
+ <Number>8671234</Number>
47
+ </TelephoneNumber>
48
+ </Phone>
42
49
  </Address>
43
50
  </ShipTo>
44
51
  </PunchOutSetupRequest>
@@ -38,6 +38,8 @@ describe CXML::PunchOutSetupRequest do
38
38
  doc = CXML::Document.new(data)
39
39
  doc.request.punch_out_setup_request.ship_to.should_not be_nil
40
40
  doc.request.punch_out_setup_request.ship_to.address.name.should_not be_nil
41
+ doc.request.punch_out_setup_request.ship_to.address.phone.should_not be_nil
42
+ doc.request.punch_out_setup_request.ship_to.address.phone.telephone_number.should_not be_nil
41
43
  end
42
44
  end
43
45
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cxml-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Beckman
8
8
  - Eleni Chappen
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-04 00:00:00.000000000 Z
12
+ date: 2021-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ox
@@ -115,6 +115,7 @@ files:
115
115
  - lib/cxml/confirmation_status.rb
116
116
  - lib/cxml/contact.rb
117
117
  - lib/cxml/country.rb
118
+ - lib/cxml/country_code.rb
118
119
  - lib/cxml/credential.rb
119
120
  - lib/cxml/credential_mac.rb
120
121
  - lib/cxml/deducted_price.rb
@@ -170,6 +171,7 @@ files:
170
171
  - lib/cxml/parser.rb
171
172
  - lib/cxml/payment_term.rb
172
173
  - lib/cxml/period.rb
174
+ - lib/cxml/phone.rb
173
175
  - lib/cxml/postal_address.rb
174
176
  - lib/cxml/protocol.rb
175
177
  - lib/cxml/punch_out_order_message.rb
@@ -195,6 +197,7 @@ files:
195
197
  - lib/cxml/tax_detail.rb
196
198
  - lib/cxml/tax_location.rb
197
199
  - lib/cxml/taxable_amount.rb
200
+ - lib/cxml/telephone_number.rb
198
201
  - lib/cxml/to.rb
199
202
  - lib/cxml/total.rb
200
203
  - lib/cxml/total_allowances.rb
@@ -250,7 +253,7 @@ homepage: https://github.com/officeluv/cxml-ruby
250
253
  licenses:
251
254
  - MIT
252
255
  metadata: {}
253
- post_install_message:
256
+ post_install_message:
254
257
  rdoc_options: []
255
258
  require_paths:
256
259
  - lib
@@ -265,8 +268,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
268
  - !ruby/object:Gem::Version
266
269
  version: '0'
267
270
  requirements: []
268
- rubygems_version: 3.1.2
269
- signing_key:
271
+ rubygems_version: 3.0.3
272
+ signing_key:
270
273
  specification_version: 4
271
274
  summary: Parse/generate documents with the cXML protocol
272
275
  test_files: