gotransverse-tract-api 0.7.5 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gotransverse-tract-api/api_data.rb +21 -2
  3. data/lib/gotransverse-tract-api/billing_account/adjustment.rb +6 -6
  4. data/lib/gotransverse-tract-api/billing_account/adjustment_application.rb +2 -2
  5. data/lib/gotransverse-tract-api/billing_account/adjustment_reason.rb +5 -5
  6. data/lib/gotransverse-tract-api/billing_account/billing_account.rb +17 -17
  7. data/lib/gotransverse-tract-api/billing_account/counter.rb +8 -8
  8. data/lib/gotransverse-tract-api/billing_account/custom_field.rb +6 -6
  9. data/lib/gotransverse-tract-api/billing_account/custom_field_value.rb +12 -12
  10. data/lib/gotransverse-tract-api/billing_account/invoice.rb +9 -9
  11. data/lib/gotransverse-tract-api/billing_account/invoice_item.rb +3 -3
  12. data/lib/gotransverse-tract-api/billing_account/invoice_item_charge.rb +1 -1
  13. data/lib/gotransverse-tract-api/billing_account/payment.rb +7 -7
  14. data/lib/gotransverse-tract-api/billing_account/reason.rb +4 -4
  15. data/lib/gotransverse-tract-api/billing_account/recurring_payment.rb +4 -4
  16. data/lib/gotransverse-tract-api/billing_account/refund.rb +5 -5
  17. data/lib/gotransverse-tract-api/billing_account/scheduled_charge.rb +5 -5
  18. data/lib/gotransverse-tract-api/billing_account/standard_invoice_adjustment_application.rb +2 -2
  19. data/lib/gotransverse-tract-api/general_ledger/general_ledger.rb +4 -4
  20. data/lib/gotransverse-tract-api/general_ledger/gl_account.rb +4 -4
  21. data/lib/gotransverse-tract-api/general_ledger/gl_account_category.rb +3 -3
  22. data/lib/gotransverse-tract-api/general_ledger/gl_accounting_entry.rb +6 -6
  23. data/lib/gotransverse-tract-api/general_ledger/gl_accounting_transaction.rb +7 -7
  24. data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_batch.rb +6 -6
  25. data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_entry.rb +5 -5
  26. data/lib/gotransverse-tract-api/general_ledger/gl_transaction_batch.rb +5 -5
  27. data/lib/gotransverse-tract-api/order/adjustment_category.rb +4 -4
  28. data/lib/gotransverse-tract-api/order/agreement.rb +9 -9
  29. data/lib/gotransverse-tract-api/order/bill_cycle.rb +6 -6
  30. data/lib/gotransverse-tract-api/order/billing_account_category.rb +4 -4
  31. data/lib/gotransverse-tract-api/order/order_item.rb +8 -8
  32. data/lib/gotransverse-tract-api/order/order_item_charge.rb +7 -7
  33. data/lib/gotransverse-tract-api/order/organization.rb +4 -4
  34. data/lib/gotransverse-tract-api/order/party_category.rb +5 -5
  35. data/lib/gotransverse-tract-api/order/payment_term.rb +5 -5
  36. data/lib/gotransverse-tract-api/order/people.rb +5 -5
  37. data/lib/gotransverse-tract-api/order/product_relation.rb +3 -3
  38. data/lib/gotransverse-tract-api/order/renewal_order.rb +10 -10
  39. data/lib/gotransverse-tract-api/order/sales_order.rb +11 -11
  40. data/lib/gotransverse-tract-api/product/action.rb +2 -2
  41. data/lib/gotransverse-tract-api/product/billing_account_segment_field.rb +5 -5
  42. data/lib/gotransverse-tract-api/product/discount.rb +5 -5
  43. data/lib/gotransverse-tract-api/product/discount_category.rb +4 -4
  44. data/lib/gotransverse-tract-api/product/discount_code.rb +10 -10
  45. data/lib/gotransverse-tract-api/product/discount_identifier.rb +4 -4
  46. data/lib/gotransverse-tract-api/product/one_time_product_price.rb +1 -1
  47. data/lib/gotransverse-tract-api/product/operation.rb +2 -2
  48. data/lib/gotransverse-tract-api/product/operation_attribute.rb +2 -2
  49. data/lib/gotransverse-tract-api/product/price_list.rb +3 -3
  50. data/lib/gotransverse-tract-api/product/product.rb +16 -16
  51. data/lib/gotransverse-tract-api/product/product_price.rb +7 -7
  52. data/lib/gotransverse-tract-api/product/product_price_range.rb +6 -6
  53. data/lib/gotransverse-tract-api/product/product_tag.rb +4 -4
  54. data/lib/gotransverse-tract-api/product/recurring_product_price.rb +7 -7
  55. data/lib/gotransverse-tract-api/service/service.rb +10 -10
  56. data/lib/gotransverse-tract-api/service/service_device_inventory_item.rb +4 -4
  57. data/lib/gotransverse-tract-api/service/service_period.rb +5 -5
  58. data/lib/gotransverse-tract-api/service/service_price.rb +5 -5
  59. data/lib/gotransverse-tract-api/service/service_price_range.rb +2 -2
  60. data/lib/gotransverse-tract-api/service/service_resource.rb +7 -7
  61. data/lib/gotransverse-tract-api/service/service_resource_category.rb +4 -4
  62. data/lib/gotransverse-tract-api/usage/global_usage_rule.rb +4 -4
  63. data/lib/gotransverse-tract-api/usage/order_item_usage_rule.rb +3 -3
  64. data/lib/gotransverse-tract-api/usage/product_usage_rule.rb +4 -4
  65. data/lib/gotransverse-tract-api/usage/rate_table.rb +2 -2
  66. data/lib/gotransverse-tract-api/usage/service_usage_rule.rb +3 -3
  67. data/lib/gotransverse-tract-api/usage/usage_event.rb +8 -8
  68. data/lib/gotransverse-tract-api/usage/usage_lookup_table.rb +3 -3
  69. data/lib/gotransverse-tract-api/usage/usage_lookup_table_entry.rb +4 -4
  70. data/lib/gotransverse-tract-api/usage/usage_price_category.rb +3 -3
  71. data/lib/gotransverse-tract-api/usage/usage_rule.rb +2 -2
  72. data/lib/gotransverse-tract-api/version.rb +1 -1
  73. data/spec/gotransverse-tract-api/billing_account/billing_account_spec.rb +51 -5
  74. data/spec/gotransverse-tract-api/billing_account/invoice_spec.rb +27 -1
  75. metadata +2 -2
@@ -9,7 +9,7 @@ module GoTransverseTractApi
9
9
  #
10
10
  # @param {Hash} options
11
11
  #
12
- def find_all options=nil
12
+ def find_all options={}
13
13
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
14
14
  GoTransverseTractApi.get_response_for(self, params)
15
15
  end
@@ -18,7 +18,7 @@ module GoTransverseTractApi
18
18
  # @param {Long} eid
19
19
  # @param {Hash} options
20
20
  #
21
- def find_by_eid eid, options=nil
21
+ def find_by_eid eid, options={}
22
22
  return nil unless eid.present?
23
23
 
24
24
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -29,7 +29,7 @@ module GoTransverseTractApi
29
29
  # @param {String} name
30
30
  # @param {Hash} options
31
31
  #
32
- def find_by_name name, options=nil
32
+ def find_by_name name, options={}
33
33
  return nil unless name.present?
34
34
 
35
35
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({name: name}, options)
@@ -40,7 +40,7 @@ module GoTransverseTractApi
40
40
  # @param {String} type
41
41
  # @param {Hash} options
42
42
  #
43
- def find_by_type type, options=nil
43
+ def find_by_type type, options={}
44
44
  return nil unless type.present?
45
45
 
46
46
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({type: type}, options)
@@ -9,7 +9,7 @@ module GoTransverseTractApi
9
9
  #
10
10
  # @param {Hash} options
11
11
  #
12
- def find_all options=nil
12
+ def find_all options={}
13
13
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
14
14
  GoTransverseTractApi.get_response_for(self, params)
15
15
  end
@@ -18,7 +18,7 @@ module GoTransverseTractApi
18
18
  # @param {Long} eid
19
19
  # @param {Hash} options
20
20
  #
21
- def find_by_eid eid, options=nil
21
+ def find_by_eid eid, options={}
22
22
  return nil unless eid.present?
23
23
 
24
24
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -29,7 +29,7 @@ module GoTransverseTractApi
29
29
  # @param {Boolean} is_global
30
30
  # @param {Hash} options
31
31
  #
32
- def find_by_is_global is_global, options=nil
32
+ def find_by_is_global is_global, options={}
33
33
  return nil unless is_global.present?
34
34
 
35
35
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({is_global: is_global}, options)
@@ -40,7 +40,7 @@ module GoTransverseTractApi
40
40
  # @param {String} status
41
41
  # @param {Hash} options
42
42
  #
43
- def find_by_status status, options=nil
43
+ def find_by_status status, options={}
44
44
  return nil unless status.present?
45
45
 
46
46
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Long} order_item_eid
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_order_item_eid order_item_eid, options=nil
24
+ def find_by_order_item_eid order_item_eid, options={}
25
25
  return nil unless order_item_eid.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_item_eid: order_item_eid}, options)
@@ -32,7 +32,7 @@ module GoTransverseTractApi
32
32
  # @param {String} status
33
33
  # @param {Hash} options
34
34
  #
35
- def find_by_status status, options=nil
35
+ def find_by_status status, options={}
36
36
  return nil unless status.present?
37
37
 
38
38
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Long} product_eid
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_product_eid product_eid, options=nil
24
+ def find_by_product_eid product_eid, options={}
25
25
  return nil unless product_eid.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({product_eid: product_eid}, options)
@@ -32,7 +32,7 @@ module GoTransverseTractApi
32
32
  # @param {Long} product_price_eid
33
33
  # @param {Hash} options
34
34
  #
35
- def find_by_product_price_eid product_price_eid, options=nil
35
+ def find_by_product_price_eid product_price_eid, options={}
36
36
  return nil unless product_price_eid.present?
37
37
 
38
38
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({product_price_eid: product_price_eid}, options)
@@ -43,7 +43,7 @@ module GoTransverseTractApi
43
43
  # @param {String} status
44
44
  # @param {Hash} options
45
45
  #
46
- def find_by_status status, options=nil
46
+ def find_by_status status, options={}
47
47
  return nil unless status.present?
48
48
 
49
49
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {String} name
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_name name, options=nil
24
+ def find_by_name name, options={}
25
25
  return nil unless name.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({name: name}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Long} service_eid
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_service_eid service_eid, options=nil
24
+ def find_by_service_eid service_eid, options={}
25
25
  return nil unless service_eid.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({service_eid: service_eid}, options)
@@ -32,7 +32,7 @@ module GoTransverseTractApi
32
32
  # @param {String} status
33
33
  # @param {Hash} options
34
34
  #
35
- def find_by_status status, options=nil
35
+ def find_by_status status, options={}
36
36
  return nil unless status.present?
37
37
 
38
38
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Long} billing_account_eid
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_billing_account_eid billing_account_eid, options=nil
24
+ def find_by_billing_account_eid billing_account_eid, options={}
25
25
  return nil unless billing_account_eid.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_eid: billing_account_eid}, options)
@@ -32,7 +32,7 @@ module GoTransverseTractApi
32
32
  # @param {Long} account_num
33
33
  # @param {Hash} options
34
34
  #
35
- def find_by_account_num account_num, options=nil
35
+ def find_by_account_num account_num, options={}
36
36
  return nil unless account_num.present?
37
37
 
38
38
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({account_num: account_num}, options)
@@ -43,7 +43,7 @@ module GoTransverseTractApi
43
43
  # @param {Long} service_period_eid
44
44
  # @param {Hash} options
45
45
  #
46
- def find_by_service_period_eid service_period_eid, options=nil
46
+ def find_by_service_period_eid service_period_eid, options={}
47
47
  return nil unless service_period_eid.present?
48
48
 
49
49
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({service_period_eid: service_period_eid}, options)
@@ -54,7 +54,7 @@ module GoTransverseTractApi
54
54
  # @param {Long} service_resource_identifier
55
55
  # @param {Hash} options
56
56
  #
57
- def find_by_service_resource_identifier service_resource_identifier, options=nil
57
+ def find_by_service_resource_identifier service_resource_identifier, options={}
58
58
  return nil unless service_resource_identifier.present?
59
59
 
60
60
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({service_resource_identifier: service_resource_identifier}, options)
@@ -65,7 +65,7 @@ module GoTransverseTractApi
65
65
  # @param {DateTime} start_time
66
66
  # @param {Hash} options
67
67
  #
68
- def find_by_start_time start_time, options=nil
68
+ def find_by_start_time start_time, options={}
69
69
  return nil unless start_time.present?
70
70
 
71
71
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({start_time: start_time}, options)
@@ -76,7 +76,7 @@ module GoTransverseTractApi
76
76
  # @param {DateTime} end_time
77
77
  # @param {Hash} options
78
78
  #
79
- def find_by_end_time end_time, options=nil
79
+ def find_by_end_time end_time, options={}
80
80
  return nil unless end_time.present?
81
81
 
82
82
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({end_time: end_time}, options)
@@ -87,7 +87,7 @@ module GoTransverseTractApi
87
87
  # @param {Long} reference_id
88
88
  # @param {Hash} options
89
89
  #
90
- def find_by_reference_id reference_id, options=nil
90
+ def find_by_reference_id reference_id, options={}
91
91
  return nil unless reference_id.present?
92
92
 
93
93
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({reference_id: reference_id}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Boolean} name
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_name name, options=nil
24
+ def find_by_name name, options={}
25
25
  return nil unless name.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({name: name}, options)
@@ -32,7 +32,7 @@ module GoTransverseTractApi
32
32
  # @param {String} status
33
33
  # @param {Hash} options
34
34
  #
35
- def find_by_status status, options=nil
35
+ def find_by_status status, options={}
36
36
  return nil unless status.present?
37
37
 
38
38
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Long} usage_lookup_table_eid
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_usage_lookup_table_usage_lookup_table_eid usage_lookup_table_usage_lookup_table_eid, options=nil
24
+ def find_by_usage_lookup_table_usage_lookup_table_eid usage_lookup_table_usage_lookup_table_eid, options={}
25
25
  return nil unless usage_lookup_table_eid.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({usage_lookup_table_eid: usage_lookup_table_eid}, options)
@@ -32,7 +32,7 @@ module GoTransverseTractApi
32
32
  # @param {String} key
33
33
  # @param {Hash} options
34
34
  #
35
- def find_by_key key, options=nil
35
+ def find_by_key key, options={}
36
36
  return nil unless key.present?
37
37
 
38
38
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({key: key}, options)
@@ -43,7 +43,7 @@ module GoTransverseTractApi
43
43
  # @param {String} value
44
44
  # @param {Hash} options
45
45
  #
46
- def find_by_value value, options=nil
46
+ def find_by_value value, options={}
47
47
  return nil unless value.present?
48
48
 
49
49
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({value: value}, options)
@@ -9,7 +9,7 @@ module GoTransverseTractApi
9
9
  #
10
10
  # @param {Hash} options
11
11
  #
12
- def find_all options=nil
12
+ def find_all options={}
13
13
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
14
14
  GoTransverseTractApi.get_response_for(self, params)
15
15
  end
@@ -18,7 +18,7 @@ module GoTransverseTractApi
18
18
  # @param {Long} eid
19
19
  # @param {Hash} options
20
20
  #
21
- def find_by_eid eid, options=nil
21
+ def find_by_eid eid, options={}
22
22
  return nil unless eid.present?
23
23
 
24
24
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -29,7 +29,7 @@ module GoTransverseTractApi
29
29
  # @param {Boolean} name
30
30
  # @param {Hash} options
31
31
  #
32
- def find_by_name name, options=nil
32
+ def find_by_name name, options={}
33
33
  return nil unless name.present?
34
34
 
35
35
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({name: name}, options)
@@ -10,7 +10,7 @@ module GoTransverseTractApi
10
10
  # @param {Long} eid
11
11
  # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, options=nil
13
+ def find_by_eid eid, options={}
14
14
  return nil unless eid.present?
15
15
 
16
16
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
@@ -21,7 +21,7 @@ module GoTransverseTractApi
21
21
  # @param {Long} service_period_eid
22
22
  # @param {Hash} options
23
23
  #
24
- def find_by_service_period_eid service_period_eid, options=nil
24
+ def find_by_service_period_eid service_period_eid, options={}
25
25
  return nil unless service_period_eid.present?
26
26
 
27
27
  params ||= GoTransverseTractApi::ApiData.new.get_query_params({service_period_eid: service_period_eid}, options)
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.7.5"
3
+ VERSION = "0.8.0"
4
4
  TARGET_API_VERSION = "1.29"
5
5
 
6
6
  end
@@ -232,7 +232,7 @@ module GoTransverseTractApi
232
232
  end
233
233
  end
234
234
 
235
- context ".create_draft_order" do
235
+ describe ".create_draft_order" do
236
236
  let(:data) {
237
237
  {
238
238
  sales_order: {
@@ -246,7 +246,7 @@ module GoTransverseTractApi
246
246
  }
247
247
  },
248
248
  order_items: {
249
- order_item: {
249
+ order_item: [{
250
250
  recurring_unit_price: '100.00',
251
251
  quantity: '1',
252
252
  sequence: '1',
@@ -285,11 +285,55 @@ module GoTransverseTractApi
285
285
  },
286
286
  service_resources: {
287
287
  service_resource: {
288
- identifier: 'PCFC2000098765',
288
+ identifier: 'PCFC2000053761',
289
289
  category: { eid: '9' }
290
290
  }
291
291
  }
292
- }
292
+ },
293
+ {
294
+ recurring_unit_price: '100.00',
295
+ quantity: '1',
296
+ sequence: '1',
297
+ description: 'dsfsgegebdbb',
298
+ product: { eid: '79' },
299
+ selected_agreement: { eid: '15' },
300
+ recurring_product_price: { eid: '174' },
301
+ custom_field_values: {
302
+ custom_field_value: {
303
+ value: 'JLS',
304
+ custom_field: {eid: '25'}
305
+ }
306
+ },
307
+ order_item_usage_rules: {
308
+ match_all_order_item_usage_rule: {
309
+ name: 'allowance',
310
+ status: 'ACTIVE',
311
+ allowance_type: 'One Time',
312
+ limit: '100',
313
+ usage_uom: 'COUNT',
314
+ charge_category: '39',
315
+ match_all_product_usage_rule: { eid: '74' },
316
+ usage_rate: {
317
+ flat_usage_rate: {
318
+ rate: '2.00',
319
+ uom: 'COUNT'
320
+ }
321
+ }
322
+ }
323
+ },
324
+ agreement_configuration: {
325
+ end_date: '01012016',
326
+ end_action: 'RENEW_AGREEMENT',
327
+ preserve_service_price: '1',
328
+ next_preserve_service_price: '0'
329
+ },
330
+ service_resources: {
331
+ service_resource: {
332
+ identifier: 'PCFC2004078764',
333
+ category: { eid: '9' }
334
+ }
335
+ }
336
+ }]
293
337
  },
294
338
  billing_account: { eid: eid }
295
339
  }
@@ -309,7 +353,8 @@ module GoTransverseTractApi
309
353
  }
310
354
  }
311
355
 
312
- data[:sales_order][:order_items][:order_item].merge! promo_code
356
+ [0,1].each { |i| data[:sales_order][:order_items][:order_item][i].merge! promo_code }
357
+
313
358
  allow(subject).to receive(:create_draft_order).with(eid, data).and_return(response)
314
359
  expect(subject.create_draft_order(eid, data)).to eq(response)
315
360
  end
@@ -345,3 +390,4 @@ module GoTransverseTractApi
345
390
 
346
391
  end
347
392
  end
393
+