gotransverse-tract-api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/gotransverse_tract_api.iml +19 -0
- data/.idea/misc.xml +14 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.idea/workspace.xml +906 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +79 -0
- data/Rakefile +2 -0
- data/gotransverse-tract-api.gemspec +26 -0
- data/lib/gotransverse-tract-api.rb +181 -0
- data/lib/gotransverse-tract-api/billing_account/adjustment.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/adjustment_reason.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/billing_account.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/custom_field.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/custom_field_value.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/invoice.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/invoice_item.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/invoice_item_charge.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/payment.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/reason.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/recurring_payment.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/refund.rb +11 -0
- data/lib/gotransverse-tract-api/billing_account/scheduled_charge.rb +11 -0
- data/lib/gotransverse-tract-api/configuration.rb +39 -0
- data/lib/gotransverse-tract-api/general/system_setting.rb +11 -0
- data/lib/gotransverse-tract-api/general_ledger/gl_account.rb +11 -0
- data/lib/gotransverse-tract-api/general_ledger/gl_account_category.rb +11 -0
- data/lib/gotransverse-tract-api/general_ledger/gl_accounting_entry.rb +11 -0
- data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_batch.rb +11 -0
- data/lib/gotransverse-tract-api/general_ledger/gl_aggregate_entry.rb +11 -0
- data/lib/gotransverse-tract-api/order/agreement.rb +11 -0
- data/lib/gotransverse-tract-api/order/bill_cycle.rb +11 -0
- data/lib/gotransverse-tract-api/order/billing_account_category.rb +11 -0
- data/lib/gotransverse-tract-api/order/order_item.rb +11 -0
- data/lib/gotransverse-tract-api/order/order_item_charge.rb +11 -0
- data/lib/gotransverse-tract-api/order/organization.rb +11 -0
- data/lib/gotransverse-tract-api/order/party_category.rb +11 -0
- data/lib/gotransverse-tract-api/order/person.rb +11 -0
- data/lib/gotransverse-tract-api/order/product_relation.rb +11 -0
- data/lib/gotransverse-tract-api/order/renewal_order.rb +11 -0
- data/lib/gotransverse-tract-api/order/sales_order.rb +11 -0
- data/lib/gotransverse-tract-api/product/action.rb +11 -0
- data/lib/gotransverse-tract-api/product/operation.rb +11 -0
- data/lib/gotransverse-tract-api/product/price_list.rb +11 -0
- data/lib/gotransverse-tract-api/product/price_range.rb +11 -0
- data/lib/gotransverse-tract-api/product/product.rb +11 -0
- data/lib/gotransverse-tract-api/product/product_category.rb +11 -0
- data/lib/gotransverse-tract-api/product/product_price.rb +11 -0
- data/lib/gotransverse-tract-api/product/usage_rule.rb +11 -0
- data/lib/gotransverse-tract-api/service/service.rb +11 -0
- data/lib/gotransverse-tract-api/service/service_device_inventory_item.rb +11 -0
- data/lib/gotransverse-tract-api/service/service_period.rb +11 -0
- data/lib/gotransverse-tract-api/service/service_price.rb +11 -0
- data/lib/gotransverse-tract-api/service/service_price_range.rb +11 -0
- data/lib/gotransverse-tract-api/service/service_resource.rb +11 -0
- data/lib/gotransverse-tract-api/service/service_resource_category.rb +11 -0
- data/lib/gotransverse-tract-api/usage/order_item_usage_rule.rb +11 -0
- data/lib/gotransverse-tract-api/usage/product_usage_rule.rb +11 -0
- data/lib/gotransverse-tract-api/usage/rate_table.rb +11 -0
- data/lib/gotransverse-tract-api/usage/service_usage_rule.rb +11 -0
- data/lib/gotransverse-tract-api/usage/usage_event.rb +11 -0
- data/lib/gotransverse-tract-api/usage/usage_lookup_table.rb +11 -0
- data/lib/gotransverse-tract-api/usage/usage_lookup_table_entry.rb +11 -0
- data/lib/gotransverse-tract-api/usage/usage_rule.rb +11 -0
- data/lib/gotransverse-tract-api/version.rb +6 -0
- metadata +173 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
class Configuration
|
2
|
+
|
3
|
+
attr_accessor :user_id
|
4
|
+
attr_accessor :password
|
5
|
+
attr_accessor :basic_credentials
|
6
|
+
|
7
|
+
attr_accessor :cache_enabled
|
8
|
+
attr_accessor :tract_api_url
|
9
|
+
|
10
|
+
#
|
11
|
+
# initialize
|
12
|
+
#
|
13
|
+
def initialize
|
14
|
+
|
15
|
+
@tract_api_url = "https://my.tractbilling.com/t/s/r/#{Version::TARGET_API_VERSION}/"
|
16
|
+
set_basic_credentials
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
#
|
23
|
+
# set_basic_credentials
|
24
|
+
#
|
25
|
+
def set_basic_credentials
|
26
|
+
|
27
|
+
# Perform Base-64 encoding of API login information
|
28
|
+
user_pass = "#{@user_id.to_s}:#{@password.to_s}"
|
29
|
+
|
30
|
+
# Sets basic_credentials attr_accessor
|
31
|
+
@basic_credentials = Base64.encode64(user_pass)
|
32
|
+
|
33
|
+
# Erase in-clear credentials
|
34
|
+
@user_id = @password = nil
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|