gotransverse-tract-api 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gotransverse-tract-api.rb +1 -6
- data/lib/gotransverse-tract-api/api_data.rb +1 -0
- data/lib/gotransverse-tract-api/billing_account/adjustment.rb +18 -12
- data/lib/gotransverse-tract-api/billing_account/adjustment_application.rb +6 -4
- data/lib/gotransverse-tract-api/billing_account/adjustment_reason.rb +12 -8
- data/lib/gotransverse-tract-api/billing_account/billing_account.rb +54 -38
- data/lib/gotransverse-tract-api/billing_account/counter.rb +24 -16
- data/lib/gotransverse-tract-api/billing_account/custom_field.rb +15 -10
- data/lib/gotransverse-tract-api/billing_account/custom_field_value.rb +47 -22
- data/lib/gotransverse-tract-api/billing_account/invoice.rb +27 -18
- data/lib/gotransverse-tract-api/billing_account/invoice_item.rb +9 -6
- data/lib/gotransverse-tract-api/billing_account/invoice_item_charge.rb +3 -2
- data/lib/gotransverse-tract-api/billing_account/payment.rb +21 -14
- data/lib/gotransverse-tract-api/billing_account/reason.rb +9 -6
- data/lib/gotransverse-tract-api/billing_account/recurring_payment.rb +9 -6
- data/lib/gotransverse-tract-api/billing_account/refund.rb +24 -16
- data/lib/gotransverse-tract-api/billing_account/scheduled_charge.rb +29 -8
- data/lib/gotransverse-tract-api/billing_account/standard_invoice_adjustment_application.rb +6 -4
- data/lib/gotransverse-tract-api/general_ledger/general_ledger.rb +10 -7
- data/lib/gotransverse-tract-api/general_ledger/gl_account.rb +13 -9
- data/lib/gotransverse-tract-api/general_ledger/gl_account_category.rb +10 -7
- data/lib/gotransverse-tract-api/general_ledger/gl_accounting_entry.rb +18 -12
- data/lib/gotransverse-tract-api/general_ledger/gl_accounting_transaction.rb +21 -14
- data/lib/gotransverse-tract-api/general_ledger/gl_adjustment_accounting_transaction.rb +21 -14
- data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_batch.rb +18 -12
- data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_entry.rb +15 -10
- data/lib/gotransverse-tract-api/general_ledger/gl_transaction_batch.rb +15 -10
- data/lib/gotransverse-tract-api/order/adjustment_category.rb +9 -6
- data/lib/gotransverse-tract-api/order/agreement.rb +24 -16
- data/lib/gotransverse-tract-api/order/bill_cycle.rb +15 -10
- data/lib/gotransverse-tract-api/order/billing_account_category.rb +9 -6
- data/lib/gotransverse-tract-api/order/order_item.rb +31 -18
- data/lib/gotransverse-tract-api/order/order_item_charge.rb +21 -14
- data/lib/gotransverse-tract-api/order/organization.rb +9 -6
- data/lib/gotransverse-tract-api/order/party_category.rb +12 -8
- data/lib/gotransverse-tract-api/order/payment_term.rb +12 -8
- data/lib/gotransverse-tract-api/order/people.rb +12 -8
- data/lib/gotransverse-tract-api/order/product_relation.rb +9 -6
- data/lib/gotransverse-tract-api/order/renewal_order.rb +30 -20
- data/lib/gotransverse-tract-api/order/sales_order.rb +31 -20
- data/lib/gotransverse-tract-api/product/action.rb +7 -5
- data/lib/gotransverse-tract-api/product/billing_account_segment_field.rb +15 -10
- data/lib/gotransverse-tract-api/product/discount.rb +15 -10
- data/lib/gotransverse-tract-api/product/discount_category.rb +9 -6
- data/lib/gotransverse-tract-api/product/discount_code.rb +30 -20
- data/lib/gotransverse-tract-api/product/discount_identifier.rb +9 -6
- data/lib/gotransverse-tract-api/product/one_time_product_price.rb +3 -2
- data/lib/gotransverse-tract-api/product/operation.rb +6 -5
- data/lib/gotransverse-tract-api/product/operation_attribute.rb +7 -5
- data/lib/gotransverse-tract-api/product/price_list.rb +6 -4
- data/lib/gotransverse-tract-api/product/product.rb +37 -25
- data/lib/gotransverse-tract-api/product/product_price.rb +21 -14
- data/lib/gotransverse-tract-api/product/product_price_range.rb +18 -12
- data/lib/gotransverse-tract-api/product/product_tag.rb +9 -6
- data/lib/gotransverse-tract-api/product/recurring_product_price.rb +56 -14
- data/lib/gotransverse-tract-api/product/usage_rule.rb +7 -5
- data/lib/gotransverse-tract-api/service/service.rb +30 -20
- data/lib/gotransverse-tract-api/service/service_device_inventory_item.rb +12 -8
- data/lib/gotransverse-tract-api/service/service_period.rb +15 -10
- data/lib/gotransverse-tract-api/service/service_price.rb +15 -10
- data/lib/gotransverse-tract-api/service/service_price_range.rb +6 -4
- data/lib/gotransverse-tract-api/service/service_resource.rb +21 -14
- data/lib/gotransverse-tract-api/service/service_resource_category.rb +22 -6
- data/lib/gotransverse-tract-api/usage/global_usage_rule.rb +9 -6
- data/lib/gotransverse-tract-api/usage/order_item_usage_rule.rb +47 -6
- data/lib/gotransverse-tract-api/usage/product_usage_rule.rb +41 -8
- data/lib/gotransverse-tract-api/usage/rate_table.rb +6 -4
- data/lib/gotransverse-tract-api/usage/service_usage_rule.rb +9 -6
- data/lib/gotransverse-tract-api/usage/usage_event.rb +15 -10
- data/lib/gotransverse-tract-api/usage/usage_lookup_table.rb +9 -6
- data/lib/gotransverse-tract-api/usage/usage_lookup_table_entry.rb +12 -8
- data/lib/gotransverse-tract-api/usage/usage_price_category.rb +6 -4
- data/lib/gotransverse-tract-api/{order → usage}/usage_rate.rb +1 -2
- data/lib/gotransverse-tract-api/usage/usage_rule.rb +6 -4
- data/lib/gotransverse-tract-api/version.rb +1 -1
- data/spec/gotransverse-tract-api/billing_account/adjustment_spec.rb +1 -1
- data/spec/gotransverse-tract-api/billing_account/billing_account_spec.rb +14 -0
- data/spec/gotransverse-tract-api/billing_account/counter_spec.rb +1 -1
- data/spec/gotransverse-tract-api/billing_account/invoice_spec.rb +1 -1
- data/spec/gotransverse-tract-api/billing_account/payment_spec.rb +1 -1
- data/spec/gotransverse-tract-api/billing_account/refund_spec.rb +1 -1
- data/spec/gotransverse-tract-api/general_ledger/gl_aggregate_batch_spec.rb +1 -1
- data/spec/gotransverse-tract-api/general_ledger/gl_transaction_batch_spec.rb +1 -1
- data/spec/gotransverse-tract-api/order/order_item_spec.rb +2 -4
- data/spec/gotransverse-tract-api/order/organization_spec.rb +2 -4
- data/spec/gotransverse-tract-api/order/people_spec.rb +1 -5
- data/spec/gotransverse-tract-api/service/service_resource_spec.rb +1 -1
- data/spec/gotransverse-tract-api/service/service_spec.rb +1 -1
- data/spec/gotransverse-tract-api/{order → usage}/order_item_usage_rule_spec.rb +3 -2
- data/spec/gotransverse-tract-api/{order → usage}/product_usage_rule_spec.rb +1 -1
- metadata +7 -12
- data/lib/gotransverse-tract-api/order/order_item_usage_rule.rb +0 -65
- data/lib/gotransverse-tract-api/order/product_usage_rule.rb +0 -49
- data/lib/gotransverse-tract-api/order/recurring_product_price.rb +0 -48
- data/lib/gotransverse-tract-api/order/scheduled_charge.rb +0 -26
- data/lib/gotransverse-tract-api/product/service_resource_category.rb +0 -20
@@ -8,37 +8,42 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def self.find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def self.find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {Long} service_eid
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_service_eid service_eid
|
20
|
-
GoTransverseTractApi.get_response_for(self, {service_eid: service_eid})
|
21
|
+
def find_by_service_eid service_eid, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {service_eid: service_eid, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
#
|
24
26
|
# @param {Date} start_date
|
27
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
25
28
|
#
|
26
|
-
def find_by_start_date start_date
|
27
|
-
GoTransverseTractApi.get_response_for(self, {start_date: start_date})
|
29
|
+
def find_by_start_date start_date, query_scope=nil
|
30
|
+
GoTransverseTractApi.get_response_for(self, {start_date: start_date, queryScope: query_scope})
|
28
31
|
end
|
29
32
|
|
30
33
|
#
|
31
34
|
# @param {Date} end_date
|
35
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
32
36
|
#
|
33
|
-
def find_by_end_date end_date
|
34
|
-
GoTransverseTractApi.get_response_for(self, {end_date: end_date})
|
37
|
+
def find_by_end_date end_date, query_scope=nil
|
38
|
+
GoTransverseTractApi.get_response_for(self, {end_date: end_date, queryScope: query_scope})
|
35
39
|
end
|
36
40
|
|
37
41
|
#
|
38
42
|
# @param {Boolean} closed
|
43
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
39
44
|
#
|
40
|
-
def find_by_closed closed
|
41
|
-
GoTransverseTractApi.get_response_for(self, {closed: closed})
|
45
|
+
def find_by_closed closed, query_scope=nil
|
46
|
+
GoTransverseTractApi.get_response_for(self, {closed: closed, queryScope: query_scope})
|
42
47
|
end
|
43
48
|
|
44
49
|
end
|
@@ -8,37 +8,42 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def self.find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def self.find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {Long} service_eid
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_service_eid service_eid
|
20
|
-
GoTransverseTractApi.get_response_for(self, {service_eid: service_eid})
|
21
|
+
def find_by_service_eid service_eid, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {service_eid: service_eid, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
#
|
24
26
|
# @param {Date} start_date
|
27
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
25
28
|
#
|
26
|
-
def find_by_start_date start_date
|
27
|
-
GoTransverseTractApi.get_response_for(self, {start_date: start_date})
|
29
|
+
def find_by_start_date start_date, query_scope=nil
|
30
|
+
GoTransverseTractApi.get_response_for(self, {start_date: start_date, queryScope: query_scope})
|
28
31
|
end
|
29
32
|
|
30
33
|
#
|
31
34
|
# @param {Date} end_date
|
35
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
32
36
|
#
|
33
|
-
def find_by_end_date end_date
|
34
|
-
GoTransverseTractApi.get_response_for(self, {end_date: end_date})
|
37
|
+
def find_by_end_date end_date, query_scope=nil
|
38
|
+
GoTransverseTractApi.get_response_for(self, {end_date: end_date, queryScope: query_scope})
|
35
39
|
end
|
36
40
|
|
37
41
|
#
|
38
42
|
# @param {Long} recurrence_period
|
43
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
39
44
|
#
|
40
|
-
def find_by_recurrence_period recurrence_period
|
41
|
-
GoTransverseTractApi.get_response_for(self, {recurrence_period: recurrence_period})
|
45
|
+
def find_by_recurrence_period recurrence_period, query_scope=nil
|
46
|
+
GoTransverseTractApi.get_response_for(self, {recurrence_period: recurrence_period, queryScope: query_scope})
|
42
47
|
end
|
43
48
|
|
44
49
|
end
|
@@ -8,16 +8,18 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def self.find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def self.find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {Long} service_price_eid
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_service_price_eid service_price_eid
|
20
|
-
GoTransverseTractApi.get_response_for(self, {service_price_eid: service_price_eid})
|
21
|
+
def find_by_service_price_eid service_price_eid, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {service_price_eid: service_price_eid, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
end
|
@@ -8,51 +8,58 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {Long} service_eid
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_service_eid service_eid
|
20
|
-
GoTransverseTractApi.get_response_for(self, {service_eid: service_eid})
|
21
|
+
def find_by_service_eid service_eid, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {service_eid: service_eid, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
#
|
24
26
|
# @param {Long} order_item_eid
|
27
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
25
28
|
#
|
26
|
-
def find_by_order_item_eid order_item_eid
|
27
|
-
GoTransverseTractApi.get_response_for(self, {order_item_eid: order_item_eid})
|
29
|
+
def find_by_order_item_eid order_item_eid, query_scope=nil
|
30
|
+
GoTransverseTractApi.get_response_for(self, {order_item_eid: order_item_eid, queryScope: query_scope})
|
28
31
|
end
|
29
32
|
|
30
33
|
#
|
31
34
|
# @param {Long} service_resource_category_eid
|
35
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
32
36
|
#
|
33
|
-
def find_by_service_resource_category_eid service_resource_category_eid
|
34
|
-
GoTransverseTractApi.get_response_for(self, {service_resource_category_eid: service_resource_category_eid})
|
37
|
+
def find_by_service_resource_category_eid service_resource_category_eid, query_scope=nil
|
38
|
+
GoTransverseTractApi.get_response_for(self, {service_resource_category_eid: service_resource_category_eid, queryScope: query_scope})
|
35
39
|
end
|
36
40
|
|
37
41
|
#
|
38
42
|
# @param {Long} identifier
|
43
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
39
44
|
#
|
40
|
-
def find_by_identifier identifier
|
41
|
-
GoTransverseTractApi.get_response_for(self, {identifier: identifier})
|
45
|
+
def find_by_identifier identifier, query_scope=nil
|
46
|
+
GoTransverseTractApi.get_response_for(self, {identifier: identifier, queryScope: query_scope})
|
42
47
|
end
|
43
48
|
|
44
49
|
#
|
45
50
|
# @param {String} status
|
51
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
46
52
|
#
|
47
|
-
def find_by_status status
|
48
|
-
GoTransverseTractApi.get_response_for(self, {status: status})
|
53
|
+
def find_by_status status, query_scope=nil
|
54
|
+
GoTransverseTractApi.get_response_for(self, {status: status, queryScope: query_scope})
|
49
55
|
end
|
50
56
|
|
51
57
|
#
|
52
58
|
# @param {String} description
|
59
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
53
60
|
#
|
54
|
-
def find_by_description description
|
55
|
-
GoTransverseTractApi.get_response_for(self, {description: description})
|
61
|
+
def find_by_description description, query_scope=nil
|
62
|
+
GoTransverseTractApi.get_response_for(self, {description: description, queryScope: query_scope})
|
56
63
|
end
|
57
64
|
|
58
65
|
#
|
@@ -12,25 +12,41 @@ module GoTransverseTractApi
|
|
12
12
|
|
13
13
|
#
|
14
14
|
# @param {Long} eid
|
15
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
15
16
|
#
|
16
|
-
def find_by_eid eid
|
17
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
17
|
+
def find_by_eid eid, query_scope=nil
|
18
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
18
19
|
end
|
19
20
|
|
20
21
|
#
|
21
22
|
# @param {String} name
|
23
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
22
24
|
#
|
23
|
-
def find_by_name name
|
24
|
-
GoTransverseTractApi.get_response_for(self, {name: name})
|
25
|
+
def find_by_name name, query_scope=nil
|
26
|
+
GoTransverseTractApi.get_response_for(self, {name: name, queryScope: query_scope})
|
25
27
|
end
|
26
28
|
|
27
29
|
#
|
28
30
|
# @param {String} type
|
31
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
29
32
|
#
|
30
|
-
def find_by_type type
|
31
|
-
GoTransverseTractApi.get_response_for(self, {type: type})
|
33
|
+
def find_by_type type, query_scope=nil
|
34
|
+
GoTransverseTractApi.get_response_for(self, {type: type, queryScope: query_scope})
|
32
35
|
end
|
33
36
|
|
37
|
+
#
|
38
|
+
# @param {Hash} service_resource_category
|
39
|
+
#
|
40
|
+
def get_service_resource_category(service_resource_category)
|
41
|
+
svc_resource_category = {
|
42
|
+
name: service_resource_category[:name],
|
43
|
+
type: service_resource_category[:type],
|
44
|
+
status: service_resource_category[:status],
|
45
|
+
eid: service_resource_category[:eid]
|
46
|
+
}
|
47
|
+
|
48
|
+
svc_resource_category
|
49
|
+
end
|
34
50
|
end
|
35
51
|
|
36
52
|
end
|
@@ -12,23 +12,26 @@ module GoTransverseTractApi
|
|
12
12
|
|
13
13
|
#
|
14
14
|
# @param {Long} eid
|
15
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
15
16
|
#
|
16
|
-
def find_by_eid eid
|
17
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
17
|
+
def find_by_eid eid, query_scope=nil
|
18
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
18
19
|
end
|
19
20
|
|
20
21
|
#
|
21
22
|
# @param {Boolean} is_global
|
23
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
22
24
|
#
|
23
|
-
def find_by_is_global is_global
|
24
|
-
GoTransverseTractApi.get_response_for(self, {is_global: is_global})
|
25
|
+
def find_by_is_global is_global, query_scope=nil
|
26
|
+
GoTransverseTractApi.get_response_for(self, {is_global: is_global, queryScope: query_scope})
|
25
27
|
end
|
26
28
|
|
27
29
|
#
|
28
30
|
# @param {String} status
|
31
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
29
32
|
#
|
30
|
-
def find_by_status status
|
31
|
-
GoTransverseTractApi.get_response_for(self, {status: status})
|
33
|
+
def find_by_status status, query_scope=nil
|
34
|
+
GoTransverseTractApi.get_response_for(self, {status: status, queryScope: query_scope})
|
32
35
|
end
|
33
36
|
|
34
37
|
end
|
@@ -8,25 +8,66 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {Long} order_item_eid
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_order_item_eid order_item_eid
|
20
|
-
GoTransverseTractApi.get_response_for(self, {order_item_eid: order_item_eid})
|
21
|
+
def find_by_order_item_eid order_item_eid, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {order_item_eid: order_item_eid, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
#
|
24
26
|
# @param {String} status
|
27
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
25
28
|
#
|
26
|
-
def find_by_status status
|
27
|
-
GoTransverseTractApi.get_response_for(self, {status: status})
|
29
|
+
def find_by_status status, query_scope=nil
|
30
|
+
GoTransverseTractApi.get_response_for(self, {status: status, queryScope: query_scope})
|
28
31
|
end
|
29
32
|
|
33
|
+
#
|
34
|
+
# @param {Hash} order_item_usage_rule
|
35
|
+
#
|
36
|
+
def get_order_item_usage_rule(order_item_usage_rule)
|
37
|
+
if order_item_usage_rule.has_key?(:match_all_order_item_usage_rule)
|
38
|
+
if order_item_usage_rule[:match_all_order_item_usage_rule].has_key?(:usage_rate)
|
39
|
+
usage_rate = UsageRate.get_usage_rate(order_item_usage_rule[:match_all_order_item_usage_rule][:usage_rate])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
order_item_usage_rules = {
|
44
|
+
attributes: {},
|
45
|
+
matchAllOrderItemUsageRule: {
|
46
|
+
attributes: {
|
47
|
+
eid: order_item_usage_rule[:match_all_order_item_usage_rule][:eid],
|
48
|
+
limit: order_item_usage_rule[:match_all_order_item_usage_rule][:limit],
|
49
|
+
usageUom: order_item_usage_rule[:match_all_order_item_usage_rule][:usage_uom],
|
50
|
+
name: order_item_usage_rule[:match_all_order_item_usage_rule][:name],
|
51
|
+
order: order_item_usage_rule[:match_all_order_item_usage_rule][:order],
|
52
|
+
proratedOnOrder: order_item_usage_rule[:match_all_order_item_usage_rule][:prorated_on_order],
|
53
|
+
proratedOnCancel: order_item_usage_rule[:match_all_order_item_usage_rule][:prorated_on_cancel],
|
54
|
+
rollOverType: order_item_usage_rule[:match_all_order_item_usage_rule][:roll_over_type],
|
55
|
+
allowanceType: order_item_usage_rule[:match_all_order_item_usage_rule][:allowance_type],
|
56
|
+
validFrom: order_item_usage_rule[:match_all_order_item_usage_rule][:valid_from],
|
57
|
+
validTo: order_item_usage_rule[:match_all_order_item_usage_rule][:valid_to],
|
58
|
+
ruleType: order_item_usage_rule[:match_all_order_item_usage_rule][:rule_type],
|
59
|
+
status: order_item_usage_rule[:match_all_order_item_usage_rule][:status],
|
60
|
+
chargeCategory: order_item_usage_rule[:match_all_order_item_usage_rule][:charge_category]
|
61
|
+
}.delete_if{|k,v| v.nil?},
|
62
|
+
matchAllProductUsageRule: {
|
63
|
+
eid: order_item_usage_rule[:match_all_order_item_usage_rule][:match_all_product_usage_rule][:eid]
|
64
|
+
},
|
65
|
+
usageRate: usage_rate
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
order_item_usage_rules.delete_if{|k,v| v.nil?}
|
70
|
+
end
|
30
71
|
end
|
31
72
|
|
32
73
|
end
|
@@ -8,32 +8,65 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {Long} product_eid
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_product_eid product_eid
|
20
|
-
GoTransverseTractApi.get_response_for(self, {product_eid: product_eid})
|
21
|
+
def find_by_product_eid product_eid, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {product_eid: product_eid, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
#
|
24
26
|
# @param {Long} product_price_eid
|
27
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
25
28
|
#
|
26
|
-
def find_by_product_price_eid product_price_eid
|
27
|
-
GoTransverseTractApi.get_response_for(self, {product_price_eid: product_price_eid})
|
29
|
+
def find_by_product_price_eid product_price_eid, query_scope=nil
|
30
|
+
GoTransverseTractApi.get_response_for(self, {product_price_eid: product_price_eid, queryScope: query_scope})
|
28
31
|
end
|
29
32
|
|
30
33
|
#
|
31
34
|
# @param {String} status
|
35
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
32
36
|
#
|
33
|
-
def find_by_status status
|
34
|
-
GoTransverseTractApi.get_response_for(self, {status: status})
|
37
|
+
def find_by_status status, query_scope=nil
|
38
|
+
GoTransverseTractApi.get_response_for(self, {status: status, queryScope: query_scope})
|
35
39
|
end
|
36
40
|
|
41
|
+
#
|
42
|
+
# @param {Hash} product_usage_rules
|
43
|
+
#
|
44
|
+
def get_product_usage_rules(product_usage_rules)
|
45
|
+
product_usage_rule = {
|
46
|
+
attributes: {},
|
47
|
+
matchAllProductUsageRule: {
|
48
|
+
attributes: {
|
49
|
+
eid: product_usage_rule[:eid],
|
50
|
+
limit: product_usage_rule[:limit],
|
51
|
+
usageUom: product_usage_rule[:usage_uom],
|
52
|
+
name: product_usage_rule[:name],
|
53
|
+
order: product_usage_rule[:order],
|
54
|
+
proratedOnOrder: product_usage_rule[:prorated_on_order],
|
55
|
+
proratedOnCancel: product_usage_rule[:prorated_on_cancel],
|
56
|
+
rollOverType: product_usage_rule[:roll_over_type],
|
57
|
+
allowanceType: product_usage_rule[:allowance_type],
|
58
|
+
validFrom: product_usage_rule[:valid_from],
|
59
|
+
validTo: product_usage_rule[:valid_to],
|
60
|
+
ruleType: product_usage_rule[:rule_type],
|
61
|
+
status: product_usage_rule[:status],
|
62
|
+
chargeCategory: product_usage_rule[:charge_category]
|
63
|
+
}.delete_if{|k,v| v.nil?},
|
64
|
+
usageRate: UsageRate.get_usage_rate(product_usage_rule[:usage_rate])
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
product_usage_rule
|
69
|
+
end
|
37
70
|
end
|
38
71
|
|
39
72
|
end
|
@@ -8,16 +8,18 @@ module GoTransverseTractApi
|
|
8
8
|
|
9
9
|
#
|
10
10
|
# @param {Long} eid
|
11
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
11
12
|
#
|
12
|
-
def find_by_eid eid
|
13
|
-
GoTransverseTractApi.get_response_for(self, {eid: eid})
|
13
|
+
def find_by_eid eid, query_scope=nil
|
14
|
+
GoTransverseTractApi.get_response_for(self, {eid: eid, queryScope: query_scope})
|
14
15
|
end
|
15
16
|
|
16
17
|
#
|
17
18
|
# @param {String} name
|
19
|
+
# @param {String} query_scope (default: 'SHALLOW')
|
18
20
|
#
|
19
|
-
def find_by_name name
|
20
|
-
GoTransverseTractApi.get_response_for(self, {name: name})
|
21
|
+
def find_by_name name, query_scope=nil
|
22
|
+
GoTransverseTractApi.get_response_for(self, {name: name, queryScope: query_scope})
|
21
23
|
end
|
22
24
|
|
23
25
|
end
|