zuora4r 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
data/lib/zuora/ZUORA.rb CHANGED
@@ -164,8 +164,9 @@ class Amendment < ZObject
164
164
  attr_accessor :termCommitment
165
165
  attr_accessor :termStartDate
166
166
  attr_accessor :type
167
+ attr_accessor :ratePlanData
167
168
 
168
- def initialize(fieldsToNull = [], id = nil, contractEffectiveDate = nil, customerAcceptanceDate = nil, description = nil, effectiveDate = nil, initialTerm = nil, name = nil, renewalTerm = nil, serviceActivationDate = nil, status = nil, subscriptionId = nil, termCommitment = nil, termStartDate = nil, type = nil)
169
+ def initialize(fieldsToNull = [], id = nil, contractEffectiveDate = nil, customerAcceptanceDate = nil, description = nil, effectiveDate = nil, initialTerm = nil, name = nil, renewalTerm = nil, serviceActivationDate = nil, status = nil, subscriptionId = nil, termCommitment = nil, termStartDate = nil, type = nil, ratePlanData =[])
169
170
  @fieldsToNull = fieldsToNull
170
171
  @id = id
171
172
  @contractEffectiveDate = contractEffectiveDate
@@ -181,6 +182,7 @@ class Amendment < ZObject
181
182
  @termCommitment = termCommitment
182
183
  @termStartDate = termStartDate
183
184
  @type = type
185
+ @ratePlanData = ratePlanData
184
186
  end
185
187
  end
186
188
 
@@ -962,10 +964,22 @@ end
962
964
  class RatePlanData
963
965
  attr_accessor :ratePlan
964
966
  attr_accessor :ratePlanCharge
967
+ attr_accessor :ratePlanChargeData
965
968
 
966
- def initialize(ratePlan = nil, ratePlanCharge = [])
969
+ def initialize(ratePlan = nil, ratePlanCharge = nil, ratePlanChargeData = [])
967
970
  @ratePlan = ratePlan
968
971
  @ratePlanCharge = ratePlanCharge
972
+ @ratePlanChargeData = ratePlanChargeData
973
+ end
974
+ end
975
+
976
+ class RatePlanChargeData
977
+ attr_accessor :ratePlanCharge
978
+ attr_accessor :ratePlanChargeTier
979
+
980
+ def initialize(ratePlanCharge = nil, ratePlanChargeTier = [])
981
+ @ratePlanCharge = ratePlanCharge
982
+ @ratePlanChargeTier = ratePlanChargeTier
969
983
  end
970
984
  end
971
985
 
@@ -74,6 +74,8 @@ class Soap < ::SOAP::RPC::Driver
74
74
  def initialize(endpoint_url = nil)
75
75
  endpoint_url ||= $ZUORA_ENDPOINT
76
76
  super(endpoint_url, nil)
77
+ streamhandler.client.connect_timeout = 360
78
+ streamhandler.client.receive_timeout = 360
77
79
  self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
78
80
  self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
79
81
  end
@@ -98,7 +98,8 @@ module DefaultMappingRegistry
98
98
  ["subscriptionId", [nil, XSD::QName.new(NsObjectApiZuoraCom, "SubscriptionId")], [0, 1]],
99
99
  ["termCommitment", ["SOAP::SOAPString", XSD::QName.new(NsObjectApiZuoraCom, "TermCommitment")], [0, 1]],
100
100
  ["termStartDate", ["SOAP::SOAPDateTime", XSD::QName.new(NsObjectApiZuoraCom, "TermStartDate")], [0, 1]],
101
- ["type", ["SOAP::SOAPString", XSD::QName.new(NsObjectApiZuoraCom, "Type")], [0, 1]]
101
+ ["type", ["SOAP::SOAPString", XSD::QName.new(NsObjectApiZuoraCom, "Type")], [0, 1]],
102
+ ["ratePlanData", ["ZUORA::RatePlanData", XSD::QName.new(NsObjectApiZuoraCom, "RatePlanData")], [0, 1]]
102
103
  ]
103
104
  )
104
105
 
@@ -469,7 +470,17 @@ module DefaultMappingRegistry
469
470
  :schema_type => XSD::QName.new(NsApiZuoraCom, "RatePlanData"),
470
471
  :schema_element => [
471
472
  ["ratePlan", ["ZUORA::RatePlan", XSD::QName.new(NsApiZuoraCom, "RatePlan")], [0, 1]],
472
- ["ratePlanCharge", ["ZUORA::RatePlanCharge[]", XSD::QName.new(NsApiZuoraCom, "RatePlanCharge")], [0, nil]]
473
+ ["ratePlanCharge", ["ZUORA::RatePlanCharge[]", XSD::QName.new(NsApiZuoraCom, "RatePlanCharge")], [0, nil]],
474
+ ["ratePlanChargeData", ["ZUORA::RatePlanChargeData[]", XSD::QName.new(NsApiZuoraCom, "RatePlanChargeData")], [0, nil]]
475
+ ]
476
+ )
477
+
478
+ EncodedRegistry.register(
479
+ :class => ZUORA::RatePlanChargeData,
480
+ :schema_type => XSD::QName.new(NsApiZuoraCom, "RatePlanChargeData"),
481
+ :schema_element => [
482
+ ["ratePlanCharge", ["ZUORA::RatePlanCharge", XSD::QName.new(NsApiZuoraCom, "RatePlanCharge")], [0, nil]],
483
+ ["ratePlanChargeTier", ["ZUORA::RatePlanChargeTier[]", XSD::QName.new(NsApiZuoraCom, "ratePlanChargeTier")], [0, nil]]
473
484
  ]
474
485
  )
475
486
 
@@ -690,7 +701,8 @@ module DefaultMappingRegistry
690
701
  ["subscriptionId", [nil, XSD::QName.new(NsObjectApiZuoraCom, "SubscriptionId")], [0, 1]],
691
702
  ["termCommitment", ["SOAP::SOAPString", XSD::QName.new(NsObjectApiZuoraCom, "TermCommitment")], [0, 1]],
692
703
  ["termStartDate", ["SOAP::SOAPDateTime", XSD::QName.new(NsObjectApiZuoraCom, "TermStartDate")], [0, 1]],
693
- ["type", ["SOAP::SOAPString", XSD::QName.new(NsObjectApiZuoraCom, "Type")], [0, 1]]
704
+ ["type", ["SOAP::SOAPString", XSD::QName.new(NsObjectApiZuoraCom, "Type")], [0, 1]],
705
+ ["ratePlanData", ["ZUORA::RatePlanData", XSD::QName.new(NsObjectApiZuoraCom, "RatePlanData")], [0, 1]]
694
706
  ]
695
707
  )
696
708
 
@@ -1077,7 +1089,17 @@ module DefaultMappingRegistry
1077
1089
  :schema_type => XSD::QName.new(NsApiZuoraCom, "RatePlanData"),
1078
1090
  :schema_element => [
1079
1091
  ["ratePlan", ["ZUORA::RatePlan", XSD::QName.new(NsApiZuoraCom, "RatePlan")], [0, 1]],
1080
- ["ratePlanCharge", ["ZUORA::RatePlanCharge[]", XSD::QName.new(NsApiZuoraCom, "RatePlanCharge")], [0, nil]]
1092
+ ["ratePlanCharge", ["ZUORA::RatePlanCharge[]", XSD::QName.new(NsApiZuoraCom, "RatePlanCharge")], [0, nil]],
1093
+ ["ratePlanChargeData", ["ZUORA::RatePlanChargeData[]", XSD::QName.new(NsApiZuoraCom, "RatePlanChargeData")], [0, nil]]
1094
+ ]
1095
+ )
1096
+
1097
+ LiteralRegistry.register(
1098
+ :class => ZUORA::RatePlanChargeData,
1099
+ :schema_type => XSD::QName.new(NsApiZuoraCom, "RatePlanChargeData"),
1100
+ :schema_element => [
1101
+ ["ratePlanCharge", ["ZUORA::RatePlanCharge", XSD::QName.new(NsApiZuoraCom, "RatePlanCharge")], [0, nil]],
1102
+ ["ratePlanChargeTier", ["ZUORA::RatePlanChargeTier[]", XSD::QName.new(NsApiZuoraCom, "ratePlanChargeTier")], [0, nil]]
1081
1103
  ]
1082
1104
  )
1083
1105
 
data/test/helper.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
6
+ require 'zuora_client'
@@ -0,0 +1,11 @@
1
+ require 'helper'
2
+
3
+ class TestZuoraClient < Test::Unit::TestCase
4
+ def test_query
5
+ z = ZuoraClient.new('tester', 'qaqa')
6
+ result = z.query('select Id, Name, SKU, CreatedDate from Product')
7
+ assert_not_nil(result)
8
+ assert(result.size > 0)
9
+ end
10
+
11
+ end
data/zuora4r.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{zuora4r}
8
- s.version = "1.2.1"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Cloocher"]
12
- s.date = %q{2011-06-01}
12
+ s.date = %q{2011-04-26}
13
13
  s.description = %q{A client for Zuora API}
14
14
  s.email = %q{gene@ning.com}
15
15
  s.executables = ["zuora-query", "zuora-create", "zuora-update", "zuora-bill-run", "zuora-payment-run", "zuora-delete", "zq"]
@@ -40,10 +40,15 @@ Gem::Specification.new do |s|
40
40
  s.homepage = %q{http://github.com/cloocher/zuora4r}
41
41
  s.require_paths = ["lib"]
42
42
  s.requirements = ["none"]
43
- s.rubygems_version = %q{1.6.2}
43
+ s.rubygems_version = %q{1.3.7}
44
44
  s.summary = %q{Zuora4r}
45
+ s.test_files = [
46
+ "test/helper.rb",
47
+ "test/test_zuora_client.rb"
48
+ ]
45
49
 
46
50
  if s.respond_to? :specification_version then
51
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
47
52
  s.specification_version = 3
48
53
 
49
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora4r
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cloocher
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-01 00:00:00 -07:00
18
+ date: 2011-06-17 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -86,6 +86,8 @@ files:
86
86
  - zuora4r.gemspec
87
87
  - LICENSE
88
88
  - README.rdoc
89
+ - test/helper.rb
90
+ - test/test_zuora_client.rb
89
91
  has_rdoc: true
90
92
  homepage: http://github.com/cloocher/zuora4r
91
93
  licenses: []
@@ -120,5 +122,6 @@ rubygems_version: 1.6.2
120
122
  signing_key:
121
123
  specification_version: 3
122
124
  summary: Zuora4r
123
- test_files: []
124
-
125
+ test_files:
126
+ - test/helper.rb
127
+ - test/test_zuora_client.rb