gotransverse-tract-api 0.9.0 → 0.9.1

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: d136e4e8970fc607b94e22759b72fae2cddbb307
4
- data.tar.gz: 307b3bd4ee70c747607d07ac053284750b81b205
3
+ metadata.gz: f1c38c026591c1c63f33dd05330b3fcf5da1140e
4
+ data.tar.gz: 5617de649a6f0afe16e934cd55908f5a0c959d3f
5
5
  SHA512:
6
- metadata.gz: 0fd42419191b221da0191415b805636d922df1637a453243b8b9acd473f5a3f6214f9ccbc237b840487de81775f666286bc29ba2e2f049535ffe9288cb1d2f8a
7
- data.tar.gz: f8b8777c10a99c76703bc1acf28a3beec27f087e5f1e6b8ab2f646c2310ca41eac8f928af26ee78f7732ded89ea4c25e0a1b66dda20309ed8f4115374ec0eba6
6
+ metadata.gz: 8d81eec88b40f116b0e1b9dc98f901272d95ad96a6790284edf3f47db65a1ae1282a85891db133421b78ea267016fd0df5eacb5733b512651bd514f43c2c9b3c
7
+ data.tar.gz: 4fcf5c8bc8e5965fa622aa4af21cb097e1bd78b265bb485b45eceb973c5897eb56f7b16902ce15335c1dc56f1c30b4e2712b9e5aaed3cff223001229a2d59e01
@@ -247,6 +247,19 @@ module GoTransverseTractApi
247
247
  custom_field_values = BillingAccount::CustomFieldValue.get_custom_field_values(order_item[:custom_field_values])
248
248
  end
249
249
 
250
+ if order_item.has_key?(:order_item_usage_rules)
251
+ order_item_usage_rules = Usage::OrderItemUsageRule.get_order_item_usage_rule(order_item[:order_item_usage_rules])
252
+ end
253
+
254
+ if order_item.has_key?(:service_resources)
255
+ service_resources = Service::ServiceResource.get_service_resource(order_item[:service_resources])
256
+ end
257
+
258
+ if order_item.has_key?(:agreement_configuration)
259
+ agreement_configuration = AgreementConfiguration.get_agreement_conf(order_item[:agreement_configuration])
260
+ end
261
+
262
+
250
263
  orderItem = {
251
264
  attributes: {
252
265
  awaitingApproval: order_item[:awaiting_approval],
@@ -258,15 +271,15 @@ module GoTransverseTractApi
258
271
  description: order_item[:description],
259
272
  eid: order_item[:eid]
260
273
  }.delete_if{|k,v| v.nil?},
261
- orderItemUsageRules: Usage::OrderItemUsageRule.get_order_item_usage_rule(order_item[:order_item_usage_rules]),
274
+ orderItemUsageRules: order_item_usage_rules,
262
275
  recurringProductPrice: Product::RecurringProductPrice.get_recurring_product_price(order_item[:recurring_product_price]),
263
276
  customFieldValues: custom_field_values,
264
277
  product: Product::Product.get_product_info(order_item[:product]),
265
278
  priceList: price_list,
266
279
  selectedAgreement: Agreement.get_selected_agreement(order_item[:selected_agreement]),
267
- serviceResources: Service::ServiceResource.get_service_resource(order_item[:service_resources]),
280
+ serviceResources: service_resources,
268
281
  inventoryItem: inventory_item,
269
- agreementConfiguration: AgreementConfiguration.get_agreement_conf(order_item[:agreement_configuration]),
282
+ agreementConfiguration: agreement_configuration,
270
283
  scheduledCharges: scheduled_charges,
271
284
  discountConfigurations: discount_configurations
272
285
  }
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.9.0"
3
+ VERSION = "0.9.1"
4
4
  TARGET_API_VERSION = "1.29"
5
5
 
6
6
  end
@@ -7,7 +7,7 @@ module GoTransverseTractApi
7
7
 
8
8
  let(:response) { {a: 'b', c: 'd'} }
9
9
 
10
- context ".approve" do
10
+ describe ".approve" do
11
11
  it "approves an order item" do
12
12
  eid = '48406'
13
13
 
@@ -163,5 +163,15 @@ module GoTransverseTractApi
163
163
  end
164
164
  end
165
165
 
166
+ describe ".get_order_item" do
167
+ it "returns an order item structure" do
168
+ order_item = {a: 'b', c: 'd'}
169
+ order_item_struct = { a: {attributes: 'b'}, c: 'd' }
170
+
171
+ allow(subject).to receive(:get_order_item).with(order_item).and_return(order_item_struct)
172
+ expect(subject.get_order_item(order_item)).to eq(order_item_struct)
173
+ end
174
+ end
175
+
166
176
  end
167
177
  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.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-09 00:00:00.000000000 Z
12
+ date: 2016-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler