gotransverse-tract-api 0.1.12 → 0.2.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
  SHA1:
3
- metadata.gz: 8959990f5f4270a9d7b3026469512d170eecd83e
4
- data.tar.gz: 922b5a7291dc74d869ac6bc8c471b15238e37c45
3
+ metadata.gz: f40e942ea3a286494ffa6ccd3a075d52a578c132
4
+ data.tar.gz: 31b8403d8dbd576c136e5c532aed68d9a495a318
5
5
  SHA512:
6
- metadata.gz: b9f8b6ae3d9f8402b061fe4de4f9f47c38f506ba5100a2c4e951f63aa99d38a5810bf75cd3a9038acff93688461d4eb5368524d78e90f2d4104071fd3d72e8ec
7
- data.tar.gz: f3e270c15139a8caccafb4dcd283f297cf3486af2228dd5df7085597649500170ccb95b3b949be86d983283c6b363c33afd7fccb9c5149fe91873379d6f18a8e
6
+ metadata.gz: 12445a23c05d6fa9fdb03076050ac6e71514b53a2d85630c7a1de77ebb37a869be28e5fbb07287b407a77b14caf50e01884e6b68468893969c113309cba614b7
7
+ data.tar.gz: 728b482a3635c6727579550d66430aadfd5e9fad6c72e4dec36349c7a849dffe3b6690d9a760b9e3ceda35a043d88705df0e57266e5915c4f29ed5789c50471e
data/README.md CHANGED
@@ -51,9 +51,8 @@ end
51
51
  GoTransverseTractApi::BillingAccount::Invoice.find_by_eid(<eid>)
52
52
 
53
53
  products = GoTransverseTractApi::Product::Product.find_all
54
- some_product = GoTransverseTractApi::Product::Product.find_by_eid(<eid>)
54
+ product = GoTransverseTractApi::Product::Product.find_by_eid(<eid>)
55
55
 
56
- Hash.from_xml(some_product.to_s)
57
56
  ```
58
57
 
59
58
  ## Version History & Changelog
@@ -19,11 +19,11 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
- spec.add_development_dependency "rake", ">= 10.4.2"
23
- spec.add_development_dependency "rspec"
22
+ spec.add_development_dependency 'rspec', '~> 0'
24
23
 
25
- spec.add_runtime_dependency 'httpclient', ">= 2.7.0"
26
- spec.add_runtime_dependency 'nokogiri', ">= 1.6.6.4"
24
+ spec.add_development_dependency 'rake', '~> 10.4', '>= 10.4.2'
25
+ spec.add_runtime_dependency 'httpclient', '~> 2.7', '>= 2.7.0'
26
+ spec.add_runtime_dependency 'nokogiri', '~> 1.6', '>= 1.6.6.4'
27
27
 
28
28
  spec.required_ruby_version = ">= 2.2.3"
29
29
  end
@@ -20,10 +20,16 @@ require "gotransverse-tract-api/general/system_setting"
20
20
  require "gotransverse-tract-api/general_ledger/general_ledger"
21
21
  require "gotransverse-tract-api/general_ledger/gl_account"
22
22
  require "gotransverse-tract-api/general_ledger/gl_account_category"
23
+ require "gotransverse-tract-api/general_ledger/gl_accounting_transaction"
24
+ require "gotransverse-tract-api/general_ledger/gl_adjustment_accounting_transaction"
23
25
  require "gotransverse-tract-api/general_ledger/gl_accounting_entry"
24
26
  require "gotransverse-tract-api/general_ledger/gl_aggregate_batch"
25
27
  require "gotransverse-tract-api/general_ledger/gl_aggregate_entry"
28
+ require "gotransverse-tract-api/general_ledger/gl_invoice_accounting_transaction"
29
+ require "gotransverse-tract-api/general_ledger/gl_payment_accounting_transaction"
30
+ require "gotransverse-tract-api/general_ledger/gl_transaction_batch"
26
31
 
32
+ require "gotransverse-tract-api/order/adjustment_category"
27
33
  require "gotransverse-tract-api/order/agreement"
28
34
  require "gotransverse-tract-api/order/bill_cycle"
29
35
  require "gotransverse-tract-api/order/billing_account_category"
@@ -31,6 +37,7 @@ require "gotransverse-tract-api/order/order_item"
31
37
  require "gotransverse-tract-api/order/order_item_charge"
32
38
  require "gotransverse-tract-api/order/organization"
33
39
  require "gotransverse-tract-api/order/party_category"
40
+ require "gotransverse-tract-api/order/payment_term"
34
41
  require "gotransverse-tract-api/order/people"
35
42
  require "gotransverse-tract-api/order/product_relation"
36
43
  require "gotransverse-tract-api/order/renewal_order"
@@ -49,6 +56,7 @@ require "gotransverse-tract-api/product/operation_attribute"
49
56
  require "gotransverse-tract-api/product/price_list"
50
57
  require "gotransverse-tract-api/product/product_price_range"
51
58
  require "gotransverse-tract-api/product/product"
59
+ require "gotransverse-tract-api/product/product_tag"
52
60
  require "gotransverse-tract-api/product/product_category"
53
61
  require "gotransverse-tract-api/product/product_price"
54
62
  require "gotransverse-tract-api/product/one_time_product_price"
@@ -128,7 +136,7 @@ module GoTransverseTractApi
128
136
  end
129
137
 
130
138
  # Unless cached
131
- self.call(api_url, api_params, :get)
139
+ self.call(klass, api_url, api_params, :get)
132
140
  end
133
141
 
134
142
  #
@@ -136,13 +144,13 @@ module GoTransverseTractApi
136
144
  #
137
145
  # @param {Class} klass
138
146
  # @param {Hash} api_params (optional)
139
- # @param {String} request_body
147
+ # @param {Hash} request_body
140
148
  # @param {String} command
141
149
  #
142
150
  def self.post_request_for(klass, api_params={}, request_body, command)
143
151
  api_url = GoTransverseTractApi.get_api_url_for(klass)
144
152
  api_url = "#{api_url}/#{command}"
145
- self.call(api_url, api_params, :post, request_body)
153
+ self.call(klass, api_url, api_params, :post, request_body.to_xml)
146
154
  end
147
155
 
148
156
  #
@@ -150,11 +158,11 @@ module GoTransverseTractApi
150
158
  #
151
159
  # @param {Class} klass
152
160
  # @param {Hash} api_params (optional)
153
- # @param {String} request_body
161
+ # @param {Hash} request_body
154
162
  #
155
163
  def self.put_request_for(klass, api_params={}, request_body)
156
164
  api_url = GoTransverseTractApi.get_api_url_for(klass)
157
- self.call(api_url, api_params, :put, request_body)
165
+ self.call(klass, api_url, api_params, :put, request_body.to_xml)
158
166
  end
159
167
 
160
168
  private
@@ -178,12 +186,13 @@ module GoTransverseTractApi
178
186
  #
179
187
  # self.call
180
188
  #
189
+ # @param {Class} klass
181
190
  # @param {String} api_url
182
191
  # @param {Hash} api_params (optional)
183
192
  # @param {String} method (optional)
184
193
  # @param {String} request_body (optional, put/post requests only)
185
194
  #
186
- def self.call(api_url, api_params={}, method=:get, request_body="")
195
+ def self.call(klass, api_url, api_params={}, method=:get, request_body="")
187
196
 
188
197
  # Camelize parameters
189
198
  api_params = camelize_keys(api_params)
@@ -200,7 +209,13 @@ module GoTransverseTractApi
200
209
  response = http_client.put(api_url, request_body, api_params)
201
210
  end
202
211
 
203
- Nokogiri::XML(response.body.to_s)
212
+ xml_response = Nokogiri::XML(response.body.to_s)
213
+
214
+ klass = klass.to_s.split("::").last
215
+ hsh = Hash.from_xml(xml_response.to_s)
216
+
217
+ hsh = hsh[klass.pluralize.camelize(:lower)][klass.camelize(:lower)] rescue Hash.from_xml(xml_response.to_s)[klass.camelize(:lower)]
218
+ return hsh
204
219
  end
205
220
 
206
221
  #
@@ -50,10 +50,10 @@ module GoTransverseTractApi
50
50
 
51
51
  #
52
52
  # @param {Long} eid
53
- # @param {Nokogiri::XML::Document} gl_aggregate_batch
53
+ # @param {Hash} gl_aggregate_batch
54
54
  #
55
55
  def update eid, gl_aggregate_batch
56
- GoTransverseTractApi.put_request_for(self, {eid: eid}, gl_aggregate_batch.to_s)
56
+ GoTransverseTractApi.put_request_for(self, {eid: eid}, gl_aggregate_batch)
57
57
  end
58
58
 
59
59
  end
@@ -43,10 +43,10 @@ module GoTransverseTractApi
43
43
 
44
44
  #
45
45
  # @param {Long} eid
46
- # @param {Nokogiri::XML::Document} gl_transaction_batch
46
+ # @param {Hash} gl_transaction_batch
47
47
  #
48
48
  def update eid, gl_transaction_batch
49
- GoTransverseTractApi.put_request_for(self, {eid: eid}, gl_transaction_batch.to_s)
49
+ GoTransverseTractApi.put_request_for(self, {eid: eid}, gl_transaction_batch)
50
50
  end
51
51
 
52
52
  end
@@ -62,18 +62,18 @@ module GoTransverseTractApi
62
62
 
63
63
  #
64
64
  # @param {Long} eid
65
- # @param {Nokogiri::XML::Document} approve
65
+ # @param {Hash} approve
66
66
  #
67
67
  def self.approve eid, approve
68
- GoTransverseTractApi.post_request_for(self, {eid: eid}, approve.to_s, "approve")
68
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, approve, "approve")
69
69
  end
70
70
 
71
71
  #
72
72
  # @param {Long} eid
73
- # @param {Nokogiri::XML::Document} deny
73
+ # @param {Hash} deny
74
74
  #
75
75
  def self.deny eid, deny
76
- GoTransverseTractApi.post_request_for(self, {eid: eid}, deny.to_s, "deny")
76
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, deny, "deny")
77
77
  end
78
78
 
79
79
  end
@@ -31,18 +31,18 @@ module GoTransverseTractApi
31
31
 
32
32
  #
33
33
  # @param {Long} eid
34
- # @param {Nokogiri::XML::Document} address
34
+ # @param {Hash} address
35
35
  #
36
36
  def self.add_address eid, address
37
- GoTransverseTractApi.post_request_for(self, {eid: eid}, address.to_s, "addAddress")
37
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, address, "addAddress")
38
38
  end
39
39
 
40
40
  #
41
41
  # @param {Long} eid
42
- # @param {Nokogiri::XML::Document} organization
42
+ # @param {Hash} organization
43
43
  #
44
44
  def self.update eid, organization
45
- GoTransverseTractApi.put_request_for(self, {eid: eid}, organization.to_s)
45
+ GoTransverseTractApi.put_request_for(self, {eid: eid}, organization)
46
46
  end
47
47
 
48
48
  end
@@ -38,34 +38,34 @@ module GoTransverseTractApi
38
38
 
39
39
  #
40
40
  # @param {Long} eid
41
- # @param {Nokogiri::XML::Document} people
41
+ # @param {Hash} people
42
42
  #
43
43
  def self.update eid, people
44
- GoTransverseTractApi.put_request_for(self, {eid: eid}, people.to_s)
44
+ GoTransverseTractApi.put_request_for(self, {eid: eid}, people)
45
45
  end
46
46
 
47
47
  #
48
48
  # @param {Long} eid
49
- # @param {Nokogiri::XML::Document} address
49
+ # @param {Hash} address
50
50
  #
51
51
  def self.add_address eid, address
52
- GoTransverseTractApi.post_request_for(self, {eid: eid}, address.to_s, "addAddress")
52
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, address, "addAddress")
53
53
  end
54
54
 
55
55
  #
56
56
  # @param {Long} eid
57
- # @param {Nokogiri::XML::Document} person
57
+ # @param {Hash} person
58
58
  #
59
59
  def self.add_person eid, person
60
- GoTransverseTractApi.post_request_for(self, {eid: eid}, person.to_s, "addPerson")
60
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, person, "addPerson")
61
61
  end
62
62
 
63
63
  #
64
64
  # @param {Long} eid
65
- # @param {Nokogiri::XML::Document} person
65
+ # @param {Hash} person
66
66
  #
67
67
  def self.remove_person eid, person
68
- GoTransverseTractApi.post_request_for(self, {eid: eid}, person.to_s, "removePerson")
68
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, person, "removePerson")
69
69
  end
70
70
 
71
71
  end
@@ -83,50 +83,50 @@ module GoTransverseTractApi
83
83
  #
84
84
  # @param {Long} eid
85
85
  # @param {Long} sequence
86
- # @param {Nokogiri::XML::Document} sales_order
86
+ # @param {Hash} sales_order
87
87
  #
88
88
  def approve eid, sequence, sales_order
89
- GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order.to_s, "item/#{sequence}/approve")
89
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order, "item/#{sequence}/approve")
90
90
  end
91
91
 
92
92
  #
93
93
  # @param {Long} eid
94
94
  # @param {Long} sequence
95
- # @param {Nokogiri::XML::Document} sales_order
95
+ # @param {Hash} sales_order
96
96
  #
97
97
  def deny eid, sequence, sales_order
98
- GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order.to_s, "item/#{sequence}/deny")
98
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order, "item/#{sequence}/deny")
99
99
  end
100
100
 
101
101
  #
102
102
  # @param {Long} eid
103
- # @param {Nokogiri::XML::Document} sales_order
103
+ # @param {Hash} sales_order
104
104
  #
105
105
  def confirm eid, sales_order
106
- GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order.to_s)
106
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order)
107
107
  end
108
108
 
109
109
  #
110
110
  # @param {Long} eid
111
- # @param {Nokogiri::XML::Document} sales_order
111
+ # @param {Hash} sales_order
112
112
  #
113
113
  def self.add_custom_field_value eid, sales_order
114
- GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order.to_s, "addCustomFieldValue")
114
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order, "addCustomFieldValue")
115
115
  end
116
116
 
117
117
  #
118
118
  # @param {Long} eid
119
- # @param {Nokogiri::XML::Document} sales_order
119
+ # @param {Hash} sales_order
120
120
  #
121
121
  def self.remove_custom_field_value eid, sales_order
122
- GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order.to_s, "removeCustomFieldValue")
122
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, sales_order, "removeCustomFieldValue")
123
123
  end
124
124
 
125
125
  #
126
- # @param {Nokogiri::XML::Document} person
126
+ # @param {Hash} person
127
127
  #
128
128
  def self.create_sales_order sales_order
129
- GoTransverseTractApi.post_request_for(self, {}, sales_order.to_s, "")
129
+ GoTransverseTractApi.post_request_for(self, {}, sales_order, "")
130
130
  end
131
131
 
132
132
 
@@ -78,130 +78,130 @@ module GoTransverseTractApi
78
78
 
79
79
  #
80
80
  # @param {Long} eid
81
- # @param {Nokogiri::XML::Document} service
81
+ # @param {Hash} service
82
82
  #
83
83
  def resume eid, service
84
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "resume")
84
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "resume")
85
85
  end
86
86
 
87
87
  #
88
88
  # @param {Long} eid
89
- # @param {Nokogiri::XML::Document} service
89
+ # @param {Hash} service
90
90
  #
91
91
  def suspend eid, service
92
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "suspend")
92
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "suspend")
93
93
  end
94
94
 
95
95
  #
96
96
  # @param {Long} eid
97
- # @param {Nokogiri::XML::Document} service
97
+ # @param {Hash} service
98
98
  #
99
99
  def self.add_service_resource eid, service
100
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "addServiceResource")
100
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "addServiceResource")
101
101
  end
102
102
 
103
103
  #
104
104
  # @param {Long} eid
105
- # @param {Nokogiri::XML::Document} service
105
+ # @param {Hash} service
106
106
  #
107
107
  def self.remove_service_resource eid, service
108
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "removeServiceResource")
108
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "removeServiceResource")
109
109
  end
110
110
 
111
111
  #
112
112
  # @param {Long} eid
113
- # @param {Nokogiri::XML::Document} service
113
+ # @param {Hash} service
114
114
  #
115
115
  def self.add_service_usage_rule_to_service eid, service
116
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "addServiceUsageRuleToService")
116
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "addServiceUsageRuleToService")
117
117
  end
118
118
 
119
119
  #
120
120
  # @param {Long} eid
121
- # @param {Nokogiri::XML::Document} service
121
+ # @param {Hash} service
122
122
  #
123
123
  def self.remove_service_usage_rule_from_service eid, service
124
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "removeServiceUsageRuleFromService")
124
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "removeServiceUsageRuleFromService")
125
125
  end
126
126
 
127
127
  #
128
128
  # @param {Long} eid
129
- # @param {Nokogiri::XML::Document} service
129
+ # @param {Hash} service
130
130
  #
131
131
  def self.add_agreement eid, service
132
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "addAgreement")
132
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "addAgreement")
133
133
  end
134
134
 
135
135
  #
136
136
  # @param {Long} eid
137
- # @param {Nokogiri::XML::Document} service
137
+ # @param {Hash} service
138
138
  #
139
139
  def self.add_counter eid, service
140
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "addCounter")
140
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "addCounter")
141
141
  end
142
142
 
143
143
  #
144
144
  # @param {Long} eid
145
- # @param {Nokogiri::XML::Document} service
145
+ # @param {Hash} service
146
146
  #
147
147
  def self.add_custom_field_value eid, service
148
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "addCustomFieldValue")
148
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "addCustomFieldValue")
149
149
  end
150
150
 
151
151
  #
152
152
  # @param {Long} eid
153
- # @param {Nokogiri::XML::Document} service
153
+ # @param {Hash} service
154
154
  #
155
155
  def self.remove_custom_field_value eid, service
156
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "removeCustomFieldValue")
156
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "removeCustomFieldValue")
157
157
  end
158
158
 
159
159
  #
160
160
  # @param {Long} eid
161
- # @param {Nokogiri::XML::Document} service
161
+ # @param {Hash} service
162
162
  #
163
163
  def self.add_discount_identifier eid, service
164
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "addDiscountIdentifier")
164
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "addDiscountIdentifier")
165
165
  end
166
166
 
167
167
  #
168
168
  # @param {Long} eid
169
- # @param {Nokogiri::XML::Document} service
169
+ # @param {Hash} service
170
170
  #
171
171
  def change_price eid, service
172
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "changePrice")
172
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "changePrice")
173
173
  end
174
174
 
175
175
  #
176
176
  # @param {Long} eid
177
- # @param {Nokogiri::XML::Document} service
177
+ # @param {Hash} service
178
178
  #
179
179
  def change_quantity eid, service
180
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "changeQuantity")
180
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "changeQuantity")
181
181
  end
182
182
 
183
183
  #
184
184
  # @param {Long} eid
185
- # @param {Nokogiri::XML::Document} service
185
+ # @param {Hash} service
186
186
  #
187
187
  def renew eid, service
188
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "renew")
188
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "renew")
189
189
  end
190
190
 
191
191
  #
192
192
  # @param {Long} eid
193
- # @param {Nokogiri::XML::Document} service
193
+ # @param {Hash} service
194
194
  #
195
195
  def deactivate eid, service
196
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service.to_s, "deactivate")
196
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service, "deactivate")
197
197
  end
198
198
 
199
199
  #
200
200
  # @param {Long} eid
201
- # @param {Nokogiri::XML::Document} service
201
+ # @param {Hash} service
202
202
  #
203
203
  def update eid, service
204
- GoTransverseTractApi.put_request_for(self, {eid: eid}, service.to_s)
204
+ GoTransverseTractApi.put_request_for(self, {eid: eid}, service)
205
205
  end
206
206
 
207
207
  end
@@ -56,57 +56,57 @@ module GoTransverseTractApi
56
56
  end
57
57
 
58
58
  #
59
- # @param {Nokogiri::XML::Document} service_resource
59
+ # @param {Hash} service_resource
60
60
  #
61
61
  def request service_resource
62
- GoTransverseTractApi.post_request_for(self, {}, service_resource.to_s, "request")
62
+ GoTransverseTractApi.post_request_for(self, {}, service_resource, "request")
63
63
  end
64
64
 
65
65
  #
66
66
  # @param {Long} eid
67
- # @param {Nokogiri::XML::Document} service_resource
67
+ # @param {Hash} service_resource
68
68
  #
69
69
  def change eid, service_resource
70
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource.to_s, "change")
70
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource, "change")
71
71
  end
72
72
 
73
73
  #
74
74
  # @param {Long} eid
75
- # @param {Nokogiri::XML::Document} service_resource
75
+ # @param {Hash} service_resource
76
76
  #
77
77
  def deactivate eid, service_resource
78
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource.to_s, "deactivate")
78
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource, "deactivate")
79
79
  end
80
80
 
81
81
  #
82
- # @param {Nokogiri::XML::Document} service_resource
82
+ # @param {Hash} service_resource
83
83
  #
84
84
  def create_service_resource service_resource
85
- GoTransverseTractApi.post_request_for(self, {}, service_resource.to_s, "")
85
+ GoTransverseTractApi.post_request_for(self, {}, service_resource, "")
86
86
  end
87
87
 
88
88
  #
89
89
  # @param {Long} eid
90
- # @param {Nokogiri::XML::Document} service_resource
90
+ # @param {Hash} service_resource
91
91
  #
92
92
  def update eid, service_resource
93
- GoTransverseTractApi.put_response_for(self, {eid: eid}, service_resource.to_s)
93
+ GoTransverseTractApi.put_response_for(self, {eid: eid}, service_resource)
94
94
  end
95
95
 
96
96
  #
97
97
  # @param {Long} eid
98
- # @param {Nokogiri::XML::Document} service_resource
98
+ # @param {Hash} service_resource
99
99
  #
100
100
  def self.add_service_resource eid, service_resource
101
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource.to_s, "addServiceResource")
101
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource, "addServiceResource")
102
102
  end
103
103
 
104
104
  #
105
105
  # @param {Long} eid
106
- # @param {Nokogiri::XML::Document} service_resource
106
+ # @param {Hash} service_resource
107
107
  #
108
108
  def self.remove_service_resource eid, service_resource
109
- GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource.to_s, "removeServiceResource")
109
+ GoTransverseTractApi.post_request_for(self, {eid: eid}, service_resource, "removeServiceResource")
110
110
  end
111
111
 
112
112
  end
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.1.12"
3
+ VERSION = "0.2.0"
4
4
  TARGET_API_VERSION = "1.28"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotransverse-tract-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -26,37 +26,46 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.6'
28
28
  - !ruby/object:Gem::Dependency
29
- name: rake
29
+ name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 10.4.2
34
+ version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 10.4.2
41
+ version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: rspec
43
+ name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '10.4'
46
49
  - - ">="
47
50
  - !ruby/object:Gem::Version
48
- version: '0'
51
+ version: 10.4.2
49
52
  type: :development
50
53
  prerelease: false
51
54
  version_requirements: !ruby/object:Gem::Requirement
52
55
  requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '10.4'
53
59
  - - ">="
54
60
  - !ruby/object:Gem::Version
55
- version: '0'
61
+ version: 10.4.2
56
62
  - !ruby/object:Gem::Dependency
57
63
  name: httpclient
58
64
  requirement: !ruby/object:Gem::Requirement
59
65
  requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.7'
60
69
  - - ">="
61
70
  - !ruby/object:Gem::Version
62
71
  version: 2.7.0
@@ -64,6 +73,9 @@ dependencies:
64
73
  prerelease: false
65
74
  version_requirements: !ruby/object:Gem::Requirement
66
75
  requirements:
76
+ - - "~>"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.7'
67
79
  - - ">="
68
80
  - !ruby/object:Gem::Version
69
81
  version: 2.7.0
@@ -71,6 +83,9 @@ dependencies:
71
83
  name: nokogiri
72
84
  requirement: !ruby/object:Gem::Requirement
73
85
  requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.6'
74
89
  - - ">="
75
90
  - !ruby/object:Gem::Version
76
91
  version: 1.6.6.4
@@ -78,6 +93,9 @@ dependencies:
78
93
  prerelease: false
79
94
  version_requirements: !ruby/object:Gem::Requirement
80
95
  requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '1.6'
81
99
  - - ">="
82
100
  - !ruby/object:Gem::Version
83
101
  version: 1.6.6.4