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,18 +6,24 @@ module GoTransverseTractApi
6
6
 
7
7
  #
8
8
  # @param {Long} eid
9
- # @param {String} query_scope (default: 'SHALLOW')
9
+ # @param {Hash} options
10
10
  #
11
- def self.find_by_eid eid, query_scope=nil
12
- GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
11
+ def self.find_by_eid eid, options=nil
12
+ return nil unless eid.present?
13
+
14
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({eid: eid}, options)
15
+ GoTransverseTractApi.get_response_for(self, params)
13
16
  end
14
17
 
15
18
  #
16
19
  # @param {Long} product_eid
17
- # @param {String} query_scope (default: 'SHALLOW')
20
+ # @param {Hash} options
18
21
  #
19
- def self.find_by_product_eid product_eid, query_scope=nil
20
- GoTransverseTractApi.get_response_for(self, {product_eid: product_eid, queryScope: query_scope})
22
+ def self.find_by_product_eid product_eid, options=nil
23
+ return nil unless product_eid.present?
24
+
25
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({product_eid: product_eid}, options)
26
+ GoTransverseTractApi.get_response_for(self, params)
21
27
  end
22
28
 
23
29
  end
@@ -8,42 +8,57 @@ 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} billing_account_segment_eid
19
- # @param {String} query_scope (default: 'SHALLOW')
22
+ # @param {Hash} options
20
23
  #
21
- def find_by_billing_account_segment_eid billing_account_segment_eid, query_scope=nil
22
- GoTransverseTractApi.get_response_for(self, {billing_account_segment_eid: billing_account_segment_eid, queryScope: query_scope})
24
+ def find_by_billing_account_segment_eid billing_account_segment_eid, options=nil
25
+ return nil unless billing_account_segment_eid.present?
26
+
27
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_segment_eid: billing_account_segment_eid}, options)
28
+ GoTransverseTractApi.get_response_for(self, params)
23
29
  end
24
30
 
25
31
  #
26
32
  # @param {String} billing_account_segment_name
27
- # @param {String} query_scope (default: 'SHALLOW')
33
+ # @param {Hash} options
28
34
  #
29
- def find_by_billing_account_segment_name billing_account_segment_name, query_scope=nil
30
- GoTransverseTractApi.get_response_for(self, {billing_account_segment_name: billing_account_segment_name, queryScope: query_scope})
35
+ def find_by_billing_account_segment_name billing_account_segment_name, options=nil
36
+ return nil unless billing_account_segment_name.present?
37
+
38
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({billing_account_segment_name: billing_account_segment_name}, options)
39
+ GoTransverseTractApi.get_response_for(self, params)
31
40
  end
32
41
 
33
42
  #
34
43
  # @param {String} type
35
- # @param {String} query_scope (default: 'SHALLOW')
44
+ # @param {Hash} options
36
45
  #
37
- def find_by_type type, query_scope=nil
38
- GoTransverseTractApi.get_response_for(self, {type: type, queryScope: query_scope})
46
+ def find_by_type type, options=nil
47
+ return nil unless type.present?
48
+
49
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({type: type}, options)
50
+ GoTransverseTractApi.get_response_for(self, params)
39
51
  end
40
52
 
41
53
  #
42
54
  # @param {Boolean} required
43
- # @param {String} query_scope (default: 'SHALLOW')
55
+ # @param {Hash} options
44
56
  #
45
- def find_by_required required, query_scope=nil
46
- GoTransverseTractApi.get_response_for(self, {required: required, queryScope: query_scope})
57
+ def find_by_required required, options=nil
58
+ return nil unless required.present?
59
+
60
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({required: required}, options)
61
+ GoTransverseTractApi.get_response_for(self, params)
47
62
  end
48
63
 
49
64
  end
@@ -8,42 +8,57 @@ module GoTransverseTractApi
8
8
 
9
9
  #
10
10
  # @param {String} type
11
- # @param {String} query_scope (default: 'SHALLOW')
11
+ # @param {Hash} options
12
12
  #
13
- def find_by_type type, query_scope=nil
14
- GoTransverseTractApi.get_response_for(self, {type: type, queryScope: query_scope})
13
+ def find_by_type type, options=nil
14
+ return nil unless type.present?
15
+
16
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({type: type}, options)
17
+ GoTransverseTractApi.get_response_for(self, params)
15
18
  end
16
19
 
17
20
  #
18
21
  # @param {Long} discount_category_eid
19
- # @param {String} query_scope (default: 'SHALLOW')
22
+ # @param {Hash} options
20
23
  #
21
- def find_by_discount_category_eid discount_category_eid, query_scope=nil
22
- GoTransverseTractApi.get_response_for(self, {discount_category_eid: discount_category_eid, queryScope: query_scope})
24
+ def find_by_discount_category_eid discount_category_eid, options=nil
25
+ return nil unless discount_category_eid.present?
26
+
27
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({discount_category_eid: discount_category_eid}, options)
28
+ GoTransverseTractApi.get_response_for(self, params)
23
29
  end
24
30
 
25
31
  #
26
32
  # @param {Boolean} one_time
27
- # @param {String} query_scope (default: 'SHALLOW')
33
+ # @param {Hash} options
28
34
  #
29
- def find_by_one_time one_time, query_scope=nil
30
- GoTransverseTractApi.get_response_for(self, {one_time: one_time, queryScope: query_scope})
35
+ def find_by_one_time one_time, options=nil
36
+ return nil unless one_time.present?
37
+
38
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({one_time: one_time}, options)
39
+ GoTransverseTractApi.get_response_for(self, params)
31
40
  end
32
41
 
33
42
  #
34
43
  # @param {Boolean} recurring
35
- # @param {String} query_scope (default: 'SHALLOW')
44
+ # @param {Hash} options
36
45
  #
37
- def find_by_recurring recurring, query_scope=nil
38
- GoTransverseTractApi.get_response_for(self, {recurring: recurring, queryScope: query_scope})
46
+ def find_by_recurring recurring, options=nil
47
+ return nil unless recurring.present?
48
+
49
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({recurring: recurring}, options)
50
+ GoTransverseTractApi.get_response_for(self, params)
39
51
  end
40
52
 
41
53
  #
42
54
  # @param {String} currency_type
43
- # @param {String} query_scope (default: 'SHALLOW')
55
+ # @param {Hash} options
44
56
  #
45
- def find_by_currency_type currency_type, query_scope=nil
46
- GoTransverseTractApi.get_response_for(self, {currency_type: currency_type, queryScope: query_scope})
57
+ def find_by_currency_type currency_type, options=nil
58
+ return nil unless currency_type.present?
59
+
60
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({currency_type: currency_type}, options)
61
+ GoTransverseTractApi.get_response_for(self, params)
47
62
  end
48
63
 
49
64
  end
@@ -4,32 +4,45 @@ module GoTransverseTractApi
4
4
 
5
5
  class DiscountCategory
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} name
21
- # @param {String} query_scope (default: 'SHALLOW')
28
+ # @param {Hash} options
22
29
  #
23
- def self.find_by_name name, query_scope=nil
24
- GoTransverseTractApi.get_response_for(self, {name: name, queryScope: query_scope})
30
+ def self.find_by_name name, options=nil
31
+ return nil unless name.present?
32
+
33
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({name: name}, options)
34
+ GoTransverseTractApi.get_response_for(self, params)
25
35
  end
26
36
 
27
37
  #
28
38
  # @param {String} status
29
- # @param {String} query_scope (default: 'SHALLOW')
39
+ # @param {Hash} options
30
40
  #
31
- def self.find_by_status status, query_scope=nil
32
- GoTransverseTractApi.get_response_for(self, {status: status, queryScope: query_scope})
41
+ def self.find_by_status status, options=nil
42
+ return nil unless status.present?
43
+
44
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({status: status}, options)
45
+ GoTransverseTractApi.get_response_for(self, params)
33
46
  end
34
47
 
35
48
  end
@@ -6,82 +6,112 @@ module GoTransverseTractApi
6
6
 
7
7
  #
8
8
  # @param {Long} discount_charge_category_eid
9
- # @param {String} query_scope (default: 'SHALLOW')
9
+ # @param {Hash} options
10
10
  #
11
- def self.find_by_discount_charge_category_eid discount_charge_category_eid, query_scope=nil
12
- GoTransverseTractApi.get_response_for(self, {discount_charge_category_eid: discount_charge_category_eid, queryScope: query_scope})
11
+ def self.find_by_discount_charge_category_eid discount_charge_category_eid, options=nil
12
+ return nil unless discount_charge_category_eid.present?
13
+
14
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({discount_charge_category_eid: discount_charge_category_eid}, options)
15
+ GoTransverseTractApi.get_response_for(self, params)
13
16
  end
14
17
 
15
18
  #
16
19
  # @param {DateTime} valid_from
17
- # @param {String} query_scope (default: 'SHALLOW')
20
+ # @param {Hash} options
18
21
  #
19
- def self.find_by_valid_from valid_from, query_scope=nil
20
- GoTransverseTractApi.get_response_for(self, {valid_from: valid_from, queryScope: query_scope})
22
+ def self.find_by_valid_from valid_from, options=nil
23
+ return nil unless valid_from.present?
24
+
25
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({valid_from: valid_from}, options)
26
+ GoTransverseTractApi.get_response_for(self, params)
21
27
  end
22
28
 
23
29
  #
24
30
  # @param {DateTime} valid_to
25
- # @param {String} query_scope (default: 'SHALLOW')
31
+ # @param {Hash} options
26
32
  #
27
- def self.find_by_valid_to valid_to, query_scope=nil
28
- GoTransverseTractApi.get_response_for(self, {valid_to: valid_to, queryScope: query_scope})
33
+ def self.find_by_valid_to valid_to, options=nil
34
+ return nil unless valid_to.present?
35
+
36
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({valid_to: valid_to}, options)
37
+ GoTransverseTractApi.get_response_for(self, params)
29
38
  end
30
39
 
31
40
  #
32
41
  # @param {Long} discount_eid
33
- # @param {String} query_scope (default: 'SHALLOW')
42
+ # @param {Hash} options
34
43
  #
35
- def self.find_by_discount_eid discount_eid, query_scope=nil
36
- GoTransverseTractApi.get_response_for(self, {discount_eid: discount_eid, queryScope: query_scope})
44
+ def self.find_by_discount_eid discount_eid, options=nil
45
+ return nil unless discount_eid.present?
46
+
47
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({discount_eid: discount_eid}, options)
48
+ GoTransverseTractApi.get_response_for(self, params)
37
49
  end
38
50
 
39
51
  #
40
52
  # @param {Long} discount_identifier
41
- # @param {String} query_scope (default: 'SHALLOW')
53
+ # @param {Hash} options
42
54
  #
43
- def self.find_by_discount_identifier discount_identifier, query_scope=nil
44
- GoTransverseTractApi.get_response_for(self, {discount_identifier: discount_identifier, queryScope: query_scope})
55
+ def self.find_by_discount_identifier discount_identifier, options=nil
56
+ return nil unless discount_identifier.present?
57
+
58
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({discount_identifier: discount_identifier}, options)
59
+ GoTransverseTractApi.get_response_for(self, params)
45
60
  end
46
61
 
47
62
  #
48
63
  # @param {Long} discount_identifier_eid
49
- # @param {String} query_scope (default: 'SHALLOW')
64
+ # @param {Hash} options
50
65
  #
51
- def self.find_by_discount_identifier_eid discount_identifier_eid, query_scope=nil
52
- GoTransverseTractApi.get_response_for(self, {discount_identifier_eid: discount_identifier_eid, queryScope: query_scope})
66
+ def self.find_by_discount_identifier_eid discount_identifier_eid, options=nil
67
+ return nil unless discount_identifier_eid.present?
68
+
69
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({discount_identifier_eid: discount_identifier_eid}, options)
70
+ GoTransverseTractApi.get_response_for(self, params)
53
71
  end
54
72
 
55
73
  #
56
74
  # @param {Long} price_list_eid
57
- # @param {String} query_scope (default: 'SHALLOW')
75
+ # @param {Hash} options
58
76
  #
59
- def self.find_by_price_list_eid price_list_eid, query_scope=nil
60
- GoTransverseTractApi.get_response_for(self, {price_list_eid: price_list_eid, queryScope: query_scope})
77
+ def self.find_by_price_list_eid price_list_eid, options=nil
78
+ return nil unless price_list_eid.present?
79
+
80
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({price_list_eid: price_list_eid}, options)
81
+ GoTransverseTractApi.get_response_for(self, params)
61
82
  end
62
83
 
63
84
  #
64
85
  # @param {String} price_list_is_master
65
- # @param {String} query_scope (default: 'SHALLOW')
86
+ # @param {Hash} options
66
87
  #
67
- def self.find_by_price_list_is_master price_list_is_master, query_scope=nil
68
- GoTransverseTractApi.get_response_for(self, {price_list_is_master: price_list_is_master, queryScope: query_scope})
88
+ def self.find_by_price_list_is_master price_list_is_master, options=nil
89
+ return nil unless price_list_is_master.present?
90
+
91
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({price_list_is_master: price_list_is_master}, options)
92
+ GoTransverseTractApi.get_response_for(self, params)
69
93
  end
70
94
 
71
95
  #
72
96
  # @param {String} currency_type
73
- # @param {String} query_scope (default: 'SHALLOW')
97
+ # @param {Hash} options
74
98
  #
75
- def self.find_by_currency_type currency_type, query_scope=nil
76
- GoTransverseTractApi.get_response_for(self, {currency_type: currency_type, queryScope: query_scope})
99
+ def self.find_by_currency_type currency_type, options=nil
100
+ return nil unless currency_type.present?
101
+
102
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({currency_type: currency_type}, options)
103
+ GoTransverseTractApi.get_response_for(self, params)
77
104
  end
78
105
 
79
106
  #
80
107
  # @param {Long} product_eid
81
- # @param {String} query_scope (default: 'SHALLOW')
108
+ # @param {Hash} options
82
109
  #
83
- def self.find_by_product_eid product_eid, query_scope=nil
84
- GoTransverseTractApi.get_response_for(self, {product_eid: product_eid, queryScope: query_scope})
110
+ def self.find_by_product_eid product_eid, options=nil
111
+ return nil unless product_eid.present?
112
+
113
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({product_eid: product_eid}, options)
114
+ GoTransverseTractApi.get_response_for(self, params)
85
115
  end
86
116
 
87
117
  end
@@ -6,32 +6,45 @@ 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} identifier
23
- # @param {String} query_scope (default: 'SHALLOW')
30
+ # @param {Hash} options
24
31
  #
25
- def find_by_identifier identifier, query_scope=nil
26
- GoTransverseTractApi.get_response_for(self, {identifier: identifier, queryScope: query_scope})
32
+ def find_by_identifier identifier, options=nil
33
+ return nil unless identifier.present?
34
+
35
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({identifier: identifier}, options)
36
+ GoTransverseTractApi.get_response_for(self, params)
27
37
  end
28
38
 
29
39
  #
30
40
  # @param {Long} order_item_eid
31
- # @param {String} query_scope (default: 'SHALLOW')
41
+ # @param {Hash} options
32
42
  #
33
- def find_by_order_item_eid order_item_eid, query_scope=nil
34
- GoTransverseTractApi.get_response_for(self, {order_item_eid: order_item_eid, queryScope: query_scope})
43
+ def find_by_order_item_order_item_eid order_item_order_item_eid, options=nil
44
+ return nil unless order_item_eid.present?
45
+
46
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({order_item_eid: order_item_eid}, options)
47
+ GoTransverseTractApi.get_response_for(self, params)
35
48
  end
36
49
 
37
50
  end
@@ -8,10 +8,13 @@ module GoTransverseTractApi
8
8
 
9
9
  #
10
10
  # @param {Boolean} charge_during_renewal
11
- # @param {String} query_scope (default: 'SHALLOW')
11
+ # @param {Hash} options
12
12
  #
13
- def find_by_charge_during_renewal charge_during_renewal, query_scope=nil
14
- GoTransverseTractApi.get_response_for(self, {charge_during_renewal: charge_during_renewal, queryScope: query_scope})
13
+ def find_by_charge_during_renewal charge_during_renewal, options=nil
14
+ return nil unless charge_during_renewal.present?
15
+
16
+ params ||= GoTransverseTractApi::ApiData.new.get_query_params({charge_during_renewal: charge_during_renewal}, options)
17
+ GoTransverseTractApi.get_response_for(self, params)
15
18
  end
16
19
  end
17
20