gotransverse-tract-api 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gotransverse-tract-api.rb +0 -1
  3. data/lib/gotransverse-tract-api/api_data.rb +6 -0
  4. data/lib/gotransverse-tract-api/billing_account/adjustment.rb +38 -20
  5. data/lib/gotransverse-tract-api/billing_account/adjustment_application.rb +12 -6
  6. data/lib/gotransverse-tract-api/billing_account/adjustment_reason.rb +30 -14
  7. data/lib/gotransverse-tract-api/billing_account/billing_account.rb +103 -50
  8. data/lib/gotransverse-tract-api/billing_account/counter.rb +50 -26
  9. data/lib/gotransverse-tract-api/billing_account/custom_field.rb +36 -17
  10. data/lib/gotransverse-tract-api/billing_account/custom_field_value.rb +72 -35
  11. data/lib/gotransverse-tract-api/billing_account/invoice.rb +54 -27
  12. data/lib/gotransverse-tract-api/billing_account/invoice_item.rb +18 -9
  13. data/lib/gotransverse-tract-api/billing_account/invoice_item_charge.rb +6 -3
  14. data/lib/gotransverse-tract-api/billing_account/payment.rb +44 -23
  15. data/lib/gotransverse-tract-api/billing_account/reason.rb +24 -11
  16. data/lib/gotransverse-tract-api/billing_account/recurring_payment.rb +24 -11
  17. data/lib/gotransverse-tract-api/billing_account/refund.rb +30 -43
  18. data/lib/gotransverse-tract-api/billing_account/scheduled_charge.rb +30 -14
  19. data/lib/gotransverse-tract-api/billing_account/standard_invoice_adjustment_application.rb +12 -6
  20. data/lib/gotransverse-tract-api/general_ledger/general_ledger.rb +42 -25
  21. data/lib/gotransverse-tract-api/general_ledger/gl_account.rb +24 -12
  22. data/lib/gotransverse-tract-api/general_ledger/gl_account_category.rb +18 -9
  23. data/lib/gotransverse-tract-api/general_ledger/gl_accounting_entry.rb +36 -18
  24. data/lib/gotransverse-tract-api/general_ledger/gl_accounting_transaction.rb +42 -21
  25. data/lib/gotransverse-tract-api/general_ledger/gl_adjustment_accounting_transaction.rb +1 -61
  26. data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_batch.rb +37 -19
  27. data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_entry.rb +53 -34
  28. data/lib/gotransverse-tract-api/general_ledger/gl_invoice_accounting_transaction.rb +1 -1
  29. data/lib/gotransverse-tract-api/general_ledger/gl_payment_accounting_transaction.rb +1 -1
  30. data/lib/gotransverse-tract-api/general_ledger/gl_transaction_batch.rb +32 -17
  31. data/lib/gotransverse-tract-api/order/adjustment_category.rb +24 -11
  32. data/lib/gotransverse-tract-api/order/agreement.rb +55 -26
  33. data/lib/gotransverse-tract-api/order/bill_cycle.rb +36 -17
  34. data/lib/gotransverse-tract-api/order/billing_account_category.rb +26 -11
  35. data/lib/gotransverse-tract-api/order/order_item.rb +48 -24
  36. data/lib/gotransverse-tract-api/order/order_item_charge.rb +42 -21
  37. data/lib/gotransverse-tract-api/order/organization.rb +24 -11
  38. data/lib/gotransverse-tract-api/order/party_category.rb +30 -14
  39. data/lib/gotransverse-tract-api/order/payment_term.rb +33 -17
  40. data/lib/gotransverse-tract-api/order/people.rb +30 -14
  41. data/lib/gotransverse-tract-api/order/product_relation.rb +18 -9
  42. data/lib/gotransverse-tract-api/order/renewal_order.rb +61 -31
  43. data/lib/gotransverse-tract-api/order/sales_order.rb +66 -32
  44. data/lib/gotransverse-tract-api/product/action.rb +12 -6
  45. data/lib/gotransverse-tract-api/product/billing_account_segment_field.rb +30 -15
  46. data/lib/gotransverse-tract-api/product/discount.rb +30 -15
  47. data/lib/gotransverse-tract-api/product/discount_category.rb +24 -11
  48. data/lib/gotransverse-tract-api/product/discount_code.rb +60 -30
  49. data/lib/gotransverse-tract-api/product/discount_identifier.rb +24 -11
  50. data/lib/gotransverse-tract-api/product/one_time_product_price.rb +6 -3
  51. data/lib/gotransverse-tract-api/product/operation.rb +12 -5
  52. data/lib/gotransverse-tract-api/product/operation_attribute.rb +12 -6
  53. data/lib/gotransverse-tract-api/product/price_list.rb +18 -8
  54. data/lib/gotransverse-tract-api/product/product.rb +96 -47
  55. data/lib/gotransverse-tract-api/product/product_price.rb +42 -21
  56. data/lib/gotransverse-tract-api/product/product_price_range.rb +36 -18
  57. data/lib/gotransverse-tract-api/product/product_tag.rb +26 -13
  58. data/lib/gotransverse-tract-api/product/recurring_product_price.rb +42 -21
  59. data/lib/gotransverse-tract-api/service/service.rb +60 -31
  60. data/lib/gotransverse-tract-api/service/service_device_inventory_item.rb +24 -12
  61. data/lib/gotransverse-tract-api/service/service_period.rb +30 -15
  62. data/lib/gotransverse-tract-api/service/service_price.rb +30 -15
  63. data/lib/gotransverse-tract-api/service/service_price_range.rb +12 -6
  64. data/lib/gotransverse-tract-api/service/service_resource.rb +42 -21
  65. data/lib/gotransverse-tract-api/service/service_resource_category.rb +24 -11
  66. data/lib/gotransverse-tract-api/usage/global_usage_rule.rb +24 -11
  67. data/lib/gotransverse-tract-api/usage/order_item_usage_rule.rb +18 -9
  68. data/lib/gotransverse-tract-api/usage/product_usage_rule.rb +24 -12
  69. data/lib/gotransverse-tract-api/usage/rate_table.rb +12 -6
  70. data/lib/gotransverse-tract-api/usage/service_usage_rule.rb +18 -9
  71. data/lib/gotransverse-tract-api/usage/usage_event.rb +48 -24
  72. data/lib/gotransverse-tract-api/usage/usage_lookup_table.rb +19 -10
  73. data/lib/gotransverse-tract-api/usage/usage_lookup_table_entry.rb +24 -12
  74. data/lib/gotransverse-tract-api/usage/usage_price_category.rb +19 -9
  75. data/lib/gotransverse-tract-api/usage/usage_rule.rb +12 -6
  76. data/lib/gotransverse-tract-api/version.rb +1 -1
  77. data/spec/gotransverse-tract-api/order/sales_order_spec.rb +44 -0
  78. data/spec/gotransverse-tract-api/product/product_spec.rb +1 -1
  79. metadata +2 -3
  80. data/lib/gotransverse-tract-api/product/usage_rule.rb +0 -27
@@ -6,40 +6,56 @@ module GoTransverseTractApi
6
6
 
7
7
  class << self
8
8
 
9
- def find_all
10
- GoTransverseTractApi.get_response_for(self)
9
+ #
10
+ # @param {Hash} options
11
+ #
12
+ def find_all options=nil
13
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
14
+ GoTransverseTractApi.get_response_for(self, params)
11
15
  end
12
16
 
13
17
  #
14
18
  # @param {Long} eid
15
- # @param {String} query_scope (default: 'SHALLOW')
19
+ # @param {Hash} options
16
20
  #
17
- def find_by_eid eid, query_scope=nil
18
- GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
21
+ def find_by_eid eid, options=nil
22
+ return nil unless eid.present?
23
+
24
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
25
+ GoTransverseTractApi.get_response_for(self, params)
19
26
  end
20
27
 
21
28
  #
22
- # @param {Long} billing_account_category_eid
23
- # @param {String} query_scope (default: 'SHALLOW')
29
+ # @param {String} name
30
+ # @param {Hash} options
24
31
  #
25
- def find_by_billing_account_category_eid billing_account_category_eid, query_scope=nil
26
- GoTransverseTractApi.get_response_for(self, {billing_account_category_eid: billing_account_category_eid, queryScope: query_scope})
32
+ def find_by_name name, options=nil
33
+ return nil unless name.present?
34
+
35
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({name: name}, options)
36
+ GoTransverseTractApi.get_response_for(self, params)
27
37
  end
28
38
 
29
39
  #
30
- # @param {Long} billing_account_eid
31
- # @param {String} query_scope (default: 'SHALLOW')
40
+ # @param {Long} billing_account_category_eid
41
+ # @param {Hash} options
32
42
  #
33
- def find_by_billing_account_eid billing_account_eid, query_scope=nil
34
- GoTransverseTractApi.get_response_for(self, {billing_account_eid: billing_account_eid, queryScope: query_scope})
43
+ def find_by_billing_account_category_eid billing_account_category_eid, options=nil
44
+ return nil unless billing_account_category_eid.present?
45
+
46
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_category_eid: billing_account_category_eid}, options)
47
+ GoTransverseTractApi.get_response_for(self, params)
35
48
  end
36
49
 
37
50
  #
38
- # @param {String} name
39
- # @param {String} query_scope (default: 'SHALLOW')
51
+ # @param {Long} billing_account_eid
52
+ # @param {Hash} options
40
53
  #
41
- def find_by_name name, query_scope=nil
42
- GoTransverseTractApi.get_response_for(self, {name: name, queryScope: query_scope})
54
+ def find_by_billing_account_eid billing_account_eid, options=nil
55
+ return nil unless billing_account_eid.present?
56
+
57
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_eid: billing_account_eid}, options)
58
+ GoTransverseTractApi.get_response_for(self, params)
43
59
  end
44
60
 
45
61
  end
@@ -4,40 +4,56 @@ module GoTransverseTractApi
4
4
 
5
5
  class People
6
6
 
7
- def self.find_all
8
- GoTransverseTractApi.get_response_for(self)
7
+ #
8
+ # @param {Hash} options
9
+ #
10
+ def self.find_all options=nil
11
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
12
+ GoTransverseTractApi.get_response_for(self, params)
9
13
  end
10
14
 
11
15
  #
12
16
  # @param {Long} eid
13
- # @param {String} query_scope (default: 'SHALLOW')
17
+ # @param {Hash} options
14
18
  #
15
- def self.find_by_eid eid, query_scope=nil
16
- GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
19
+ def self.find_by_eid eid, options=nil
20
+ return nil unless eid.present?
21
+
22
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
23
+ GoTransverseTractApi.get_response_for(self, params)
17
24
  end
18
25
 
19
26
  #
20
27
  # @param {String} first_name
21
- # @param {String} query_scope (default: 'SHALLOW')
28
+ # @param {Hash} options
22
29
  #
23
- def self.find_by_first_name first_name, query_scope=nil
24
- GoTransverseTractApi.get_response_for(self, {first_name: first_name, queryScope: query_scope})
30
+ def self.find_by_first_name first_name, options=nil
31
+ return nil unless first_name.present?
32
+
33
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({first_name: first_name}, options)
34
+ GoTransverseTractApi.get_response_for(self, params)
25
35
  end
26
36
 
27
37
  #
28
38
  # @param {String} last_name
29
- # @param {String} query_scope (default: 'SHALLOW')
39
+ # @param {Hash} options
30
40
  #
31
- def self.find_by_last_name last_name, query_scope=nil
32
- GoTransverseTractApi.get_response_for(self, {last_name: last_name, queryScope: query_scope})
41
+ def self.find_by_last_name last_name, options=nil
42
+ return nil unless last_name.present?
43
+
44
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({last_name: last_name}, options)
45
+ GoTransverseTractApi.get_response_for(self, params)
33
46
  end
34
47
 
35
48
  #
36
49
  # @param {Long} billing_account_eid
37
- # @param {String} query_scope (default: 'SHALLOW')
50
+ # @param {Hash} options
38
51
  #
39
- def self.find_by_billing_account_eid billing_account_eid, query_scope=nil
40
- GoTransverseTractApi.get_response_for(self, {billing_account_eid: billing_account_eid, queryScope: query_scope})
52
+ def self.find_by_billing_account_eid billing_account_eid, options=nil
53
+ return nil unless billing_account_eid.present?
54
+
55
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_eid: billing_account_eid}, options)
56
+ GoTransverseTractApi.get_response_for(self, params)
41
57
  end
42
58
 
43
59
  #
@@ -8,26 +8,35 @@ module GoTransverseTractApi
8
8
 
9
9
  #
10
10
  # @param {Long} eid
11
- # @param {String} query_scope (default: 'SHALLOW')
11
+ # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, query_scope=nil
14
- GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
13
+ def find_by_eid eid, options=nil
14
+ return nil unless eid.present?
15
+
16
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
17
+ GoTransverseTractApi.get_response_for(self, params)
15
18
  end
16
19
 
17
20
  #
18
21
  # @param {Long} product_eid
19
- # @param {String} query_scope (default: 'SHALLOW')
22
+ # @param {Hash} options
20
23
  #
21
- def find_by_product_eid product_eid, query_scope=nil
22
- GoTransverseTractApi.get_response_for(self, {product_eid: product_eid, queryScope: query_scope})
24
+ def find_by_product_eid product_eid, options=nil
25
+ return nil unless product_eid.present?
26
+
27
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({product_eid: product_eid}, options)
28
+ GoTransverseTractApi.get_response_for(self, params)
23
29
  end
24
30
 
25
31
  #
26
32
  # @param {String} type
27
- # @param {String} query_scope (default: 'SHALLOW')
33
+ # @param {Hash} options
28
34
  #
29
- def find_by_type type, query_scope=nil
30
- GoTransverseTractApi.get_response_for(self, {type: type, queryScope: query_scope})
35
+ def find_by_type type, options=nil
36
+ return nil unless type.present?
37
+
38
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({type: type}, options)
39
+ GoTransverseTractApi.get_response_for(self, params)
31
40
  end
32
41
 
33
42
  end
@@ -8,82 +8,112 @@ module GoTransverseTractApi
8
8
 
9
9
  #
10
10
  # @param {Long} eid
11
- # @param {String} query_scope (default: 'SHALLOW')
11
+ # @param {Hash} options
12
12
  #
13
- def find_by_eid eid, query_scope=nil
14
- GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
13
+ def find_by_eid eid, options=nil
14
+ return nil unless eid.present?
15
+
16
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
17
+ GoTransverseTractApi.get_response_for(self, params)
15
18
  end
16
19
 
17
20
  #
18
21
  # @param {Long} order_num
19
- # @param {String} query_scope (default: 'SHALLOW')
22
+ # @param {Hash} options
20
23
  #
21
- def find_by_order_num order_num, query_scope=nil
22
- GoTransverseTractApi.get_response_for(self, {order_num: order_num, queryScope: query_scope})
24
+ def find_by_order_num order_num, options=nil
25
+ return nil unless order_num.present?
26
+
27
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_num: order_num}, options)
28
+ GoTransverseTractApi.get_response_for(self, params)
23
29
  end
24
30
 
25
31
  #
26
32
  # @param {Long} billing_account_eid
27
- # @param {String} query_scope (default: 'SHALLOW')
33
+ # @param {Hash} options
28
34
  #
29
- def find_by_billing_account_eid billing_account_eid, query_scope=nil
30
- GoTransverseTractApi.get_response_for(self, {billing_account_eid: billing_account_eid, queryScope: query_scope})
35
+ def find_by_billing_account_eid billing_account_eid, options=nil
36
+ return nil unless billing_account_eid.present?
37
+
38
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_eid: billing_account_eid}, options)
39
+ GoTransverseTractApi.get_response_for(self, params)
31
40
  end
32
41
 
33
42
  #
34
43
  # @param {Long} account_num
35
- # @param {String} query_scope (default: 'SHALLOW')
44
+ # @param {Hash} options
36
45
  #
37
- def find_by_account_num account_num, query_scope=nil
38
- GoTransverseTractApi.get_response_for(self, {account_num: account_num, queryScope: query_scope})
46
+ def find_by_account_num account_num, options=nil
47
+ return nil unless account_num.present?
48
+
49
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({account_num: account_num}, options)
50
+ GoTransverseTractApi.get_response_for(self, params)
39
51
  end
40
52
 
41
53
  #
42
54
  # @param {Long} external_account_num
43
- # @param {String} query_scope (default: 'SHALLOW')
55
+ # @param {Hash} options
44
56
  #
45
- def find_by_external_account_num external_account_num, query_scope=nil
46
- GoTransverseTractApi.get_response_for(self, {external_account_num: external_account_num, queryScope: query_scope})
57
+ def find_by_external_account_num external_account_num, options=nil
58
+ return nil unless external_account_num.present?
59
+
60
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({external_account_num: external_account_num}, options)
61
+ GoTransverseTractApi.get_response_for(self, params)
47
62
  end
48
63
 
49
64
  #
50
65
  # @param {Date} order_date
51
- # @param {String} query_scope (default: 'SHALLOW')
66
+ # @param {Hash} options
52
67
  #
53
- def find_by_order_date order_date, query_scope=nil
54
- GoTransverseTractApi.get_response_for(self, {order_date: order_date, queryScope: query_scope})
68
+ def find_by_order_date order_date, options=nil
69
+ return nil unless order_date.present?
70
+
71
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_date: order_date}, options)
72
+ GoTransverseTractApi.get_response_for(self, params)
55
73
  end
56
74
 
57
75
  #
58
76
  # @param {String} referral
59
- # @param {String} query_scope (default: 'SHALLOW')
77
+ # @param {Hash} options
60
78
  #
61
- def find_by_referral referral, query_scope=nil
62
- GoTransverseTractApi.get_response_for(self, {referral: referral, queryScope: query_scope})
79
+ def find_by_referral referral, options=nil
80
+ return nil unless referral.present?
81
+
82
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({referral: referral}, options)
83
+ GoTransverseTractApi.get_response_for(self, params)
63
84
  end
64
85
 
65
86
  #
66
- # @param {Long} purchase_order_number
67
- # @param {String} query_scope (default: 'SHALLOW')
87
+ # @param {Long} purchase_order_num
88
+ # @param {Hash} options
68
89
  #
69
- def find_by_purchase_order_number purchase_order_number, query_scope=nil
70
- GoTransverseTractApi.get_response_for(self, {purchase_order_number: purchase_order_number, queryScope: query_scope})
90
+ def find_by_purchase_order_num purchase_order_num, options=nil
91
+ return nil unless purchase_order_num.present?
92
+
93
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({purchase_order_num: purchase_order_num}, options)
94
+ GoTransverseTractApi.get_response_for(self, params)
71
95
  end
72
96
 
73
97
  #
74
98
  # @param {Date} renewal_date
75
- # @param {String} query_scope (default: 'SHALLOW')
99
+ # @param {Hash} options
76
100
  #
77
- def find_by_renewal_date renewal_date, query_scope=nil
78
- GoTransverseTractApi.get_response_for(self, {renewal_date: renewal_date, queryScope: query_scope})
101
+ def find_by_renewal_date renewal_date, options=nil
102
+ return nil unless renewal_date.present?
103
+
104
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({renewal_date: renewal_date}, options)
105
+ GoTransverseTractApi.get_response_for(self, params)
79
106
  end
80
107
 
81
108
  #
82
109
  # @param {Long} custom_field_value_eid
83
- # @param {String} query_scope (default: 'SHALLOW')
110
+ # @param {Hash} options
84
111
  #
85
- def find_by_custom_field_value_eid custom_field_value_eid, query_scope=nil
86
- GoTransverseTractApi.get_response_for(self, {custom_field_value_eid: custom_field_value_eid , queryScope: query_scope})
112
+ def find_by_custom_field_value_eid custom_field_value_eid, options=nil
113
+ return nil unless custom_field_value_eid.present?
114
+
115
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({custom_field_value_eid: custom_field_value_eid}, options)
116
+ GoTransverseTractApi.get_response_for(self, params)
87
117
  end
88
118
 
89
119
  end
@@ -6,88 +6,122 @@ module GoTransverseTractApi
6
6
 
7
7
  class << self
8
8
 
9
- def find_all
10
- GoTransverseTractApi.get_response_for(self)
9
+ #
10
+ # @param {Hash} options
11
+ #
12
+ def find_all options=nil
13
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({}, options)
14
+ GoTransverseTractApi.get_response_for(self, params)
11
15
  end
12
16
 
13
17
  #
14
18
  # @param {Long} eid
15
- # @param {String} query_scope (default: 'SHALLOW')
19
+ # @param {Hash} options
16
20
  #
17
- def find_by_eid eid, query_scope=nil
18
- GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
21
+ def find_by_eid eid, options=nil
22
+ return nil unless eid.present?
23
+
24
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
25
+ GoTransverseTractApi.get_response_for(self, params)
19
26
  end
20
27
 
21
28
  #
22
29
  # @param {Long} order_num
23
- # @param {String} query_scope (default: 'SHALLOW')
30
+ # @param {Hash} options
24
31
  #
25
- def find_by_order_num order_num, query_scope=nil
26
- GoTransverseTractApi.get_response_for(self, {order_num: order_num, queryScope: query_scope})
32
+ def find_by_order_num order_num, options=nil
33
+ return nil unless order_num.present?
34
+
35
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_num: order_num}, options)
36
+ GoTransverseTractApi.get_response_for(self, params)
27
37
  end
28
38
 
29
39
  #
30
40
  # @param {Long} billing_account_eid
31
- # @param {String} query_scope (default: 'SHALLOW')
41
+ # @param {Hash} options
32
42
  #
33
- def find_by_billing_account_eid billing_account_eid, query_scope=nil
34
- GoTransverseTractApi.get_response_for(self, {billing_account_eid: billing_account_eid, queryScope: query_scope})
43
+ def find_by_billing_account_eid billing_account_eid, options=nil
44
+ return nil unless billing_account_eid.present?
45
+
46
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_eid: billing_account_eid}, options)
47
+ GoTransverseTractApi.get_response_for(self, params)
35
48
  end
36
49
 
37
50
  #
38
51
  # @param {Long} account_num
39
- # @param {String} query_scope (default: 'SHALLOW')
52
+ # @param {Hash} options
40
53
  #
41
- def find_by_account_num account_num, query_scope=nil
42
- GoTransverseTractApi.get_response_for(self, {account_num: account_num, queryScope: query_scope})
54
+ def find_by_account_num account_num, options=nil
55
+ return nil unless account_num.present?
56
+
57
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({account_num: account_num}, options)
58
+ GoTransverseTractApi.get_response_for(self, params)
43
59
  end
44
60
 
45
61
  #
46
62
  # @param {Long} external_account_num
47
- # @param {String} query_scope (default: 'SHALLOW')
63
+ # @param {Hash} options
48
64
  #
49
- def find_by_external_account_num external_account_num, query_scope=nil
50
- GoTransverseTractApi.get_response_for(self, {external_account_num: external_account_num, queryScope: query_scope})
65
+ def find_by_external_account_num external_account_num, options=nil
66
+ return nil unless external_account_num.present?
67
+
68
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({external_account_num: external_account_num}, options)
69
+ GoTransverseTractApi.get_response_for(self, params)
51
70
  end
52
71
 
53
72
  #
54
73
  # @param {Date} order_date
55
- # @param {String} query_scope (default: 'SHALLOW')
74
+ # @param {Hash} options
56
75
  #
57
- def find_by_order_date order_date, query_scope=nil
58
- GoTransverseTractApi.get_response_for(self, {order_date: order_date, queryScope: query_scope})
76
+ def find_by_order_date order_date, options=nil
77
+ return nil unless order_date.present?
78
+
79
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_date: order_date}, options)
80
+ GoTransverseTractApi.get_response_for(self, params)
59
81
  end
60
82
 
61
83
  #
62
84
  # @param {String} referral
63
- # @param {String} query_scope (default: 'SHALLOW')
85
+ # @param {Hash} options
64
86
  #
65
- def find_by_referral referral, query_scope=nil
66
- GoTransverseTractApi.get_response_for(self, {referral: referral, queryScope: query_scope})
87
+ def find_by_referral referral, options=nil
88
+ return nil unless referral.present?
89
+
90
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({referral: referral}, options)
91
+ GoTransverseTractApi.get_response_for(self, params)
67
92
  end
68
93
 
69
94
  #
70
95
  # @param {Long} purchase_order_num
71
- # @param {String} query_scope (default: 'SHALLOW')
96
+ # @param {Hash} options
72
97
  #
73
- def find_by_purchase_order_num purchase_order_num, query_scope=nil
74
- GoTransverseTractApi.get_response_for(self, {purchase_order_num: purchase_order_num, queryScope: query_scope})
98
+ def find_by_purchase_order_num purchase_order_num, options=nil
99
+ return nil unless purchase_order_num.present?
100
+
101
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({purchase_order_num: purchase_order_num}, options)
102
+ GoTransverseTractApi.get_response_for(self, params)
75
103
  end
76
104
 
77
105
  #
78
106
  # @param {String} status
79
- # @param {String} query_scope (default: 'SHALLOW')
107
+ # @param {Hash} options
80
108
  #
81
- def find_by_status status, query_scope=nil
82
- GoTransverseTractApi.get_response_for(self, {status: status, queryScope: query_scope})
109
+ def find_by_status status, options=nil
110
+ return nil unless status.present?
111
+
112
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
113
+ GoTransverseTractApi.get_response_for(self, params)
83
114
  end
84
115
 
85
116
  #
86
117
  # @param {Long} custom_field_value_eid
87
- # @param {String} query_scope (default: 'SHALLOW')
118
+ # @param {Hash} options
88
119
  #
89
- def find_by_custom_field_value_eid custom_field_value_eid, query_scope=nil
90
- GoTransverseTractApi.get_response_for(self, {custom_field_value_eid: custom_field_value_eid, queryScope: query_scope})
120
+ def find_by_custom_field_value_eid custom_field_value_eid, options=nil
121
+ return nil unless custom_field_value_eid.present?
122
+
123
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({custom_field_value_eid: custom_field_value_eid}, options)
124
+ GoTransverseTractApi.get_response_for(self, params)
91
125
  end
92
126
 
93
127
  #