bill_forward 1.2014.296 → 1.2015.183
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +29 -27
- data/.idea/compiler.xml +23 -23
- data/.idea/copyright/profiles_settings.xml +2 -2
- data/.idea/encodings.xml +5 -5
- data/.idea/inspectionProfiles/Project_Default.xml +10 -10
- data/.idea/inspectionProfiles/profiles_settings.xml +6 -6
- data/.idea/misc.xml +23 -23
- data/.idea/modules.xml +9 -9
- data/.idea/scopes/scope_settings.xml +4 -4
- data/.idea/vcs.xml +7 -7
- data/.rspec +1 -1
- data/Gemfile +13 -9
- data/LICENSE.md +22 -22
- data/README.md +285 -227
- data/Rakefile +73 -73
- data/bill_forward.gemspec +28 -29
- data/bill_forward.iml +28 -28
- data/lib/bill_forward/billing_entity.rb +295 -262
- data/lib/bill_forward/client.rb +350 -355
- data/lib/bill_forward/entities/account.rb +18 -18
- data/lib/bill_forward/entities/amendments/issue_invoice_amendment.rb +10 -0
- data/lib/bill_forward/entities/amendments/product_rate_plan_migration_amendment.rb +18 -0
- data/lib/bill_forward/entities/api_configuration.rb +12 -0
- data/lib/bill_forward/entities/invoice.rb +29 -3
- data/lib/bill_forward/entities/invoice_parts/taxation_link.rb +5 -5
- data/lib/bill_forward/entities/organisation.rb +36 -36
- data/lib/bill_forward/entities/payment_method.rb +4 -4
- data/lib/bill_forward/entities/payment_method_subscription_link.rb +5 -5
- data/lib/bill_forward/entities/pricing_component.rb +21 -21
- data/lib/bill_forward/entities/pricing_component_tier.rb +5 -5
- data/lib/bill_forward/entities/pricing_component_value.rb +5 -5
- data/lib/bill_forward/entities/pricing_component_value_migration_amendment_mapping.rb +31 -0
- data/lib/bill_forward/entities/product.rb +5 -5
- data/lib/bill_forward/entities/product_rate_plan.rb +43 -19
- data/lib/bill_forward/entities/profile.rb +14 -14
- data/lib/bill_forward/entities/refund.rb +5 -0
- data/lib/bill_forward/entities/role.rb +3 -3
- data/lib/bill_forward/entities/stripe_ach_token.rb +9 -0
- data/lib/bill_forward/entities/subscription.rb +83 -53
- data/lib/bill_forward/entities/subscription_charge.rb +14 -0
- data/lib/bill_forward/insertable_entity.rb +21 -31
- data/lib/bill_forward/mutable_entity.rb +26 -46
- data/lib/bill_forward/resource_path.rb +10 -10
- data/lib/bill_forward/type_check.rb +20 -20
- data/lib/bill_forward/version.rb +4 -4
- data/lib/bill_forward.rb +17 -17
- data/scratch/Gemfile +9 -0
- data/scratch/scratch.example.rb +8 -0
- data/spec/component/account_spec.rb +199 -199
- data/spec/component/billing_entity_spec.rb +152 -152
- data/spec/functional/account_spec.rb +24 -24
- data/spec/functional/bad_citizen/account_spec.rb +102 -102
- data/spec/functional/bad_citizen/credit_note_spec.rb +14 -13
- data/spec/functional/bad_citizen/payment_method_spec.rb +1 -1
- data/spec/functional/bad_citizen/product_rate_plan_migration_amendment_spec.rb +379 -0
- data/spec/functional/bad_citizen/product_rate_plan_spec.rb +103 -47
- data/spec/functional/bad_citizen/product_spec.rb +16 -9
- data/spec/functional/bad_citizen/situational/authorize_net_token_spec.rb +4 -0
- data/spec/functional/bad_citizen/situational/malordered_entity_spec.rb +1 -1
- data/spec/functional/bad_citizen/situational/payment_method_spec.rb +6 -1
- data/spec/functional/bad_citizen/situational/subscription_chargeable_spec.rb +96 -65
- data/spec/functional/bad_citizen/subscription_spec.rb +99 -60
- data/spec/functional/bad_citizen/subscription_with_credit_spec.rb +121 -91
- data/spec/functional/bad_citizen/unit_of_measure_spec.rb +14 -7
- data/spec/functional/client_spec.rb +23 -23
- data/spec/functional/organisation_spec.rb +27 -27
- data/spec/setup_test_constants.rb +72 -72
- data/spec/spec_helper.rb +10 -10
- data/spec/syntax/account_spec.rb +23 -23
- data/spec/syntax/billing_entity_spec.rb +92 -92
- data/tools/RSpec hardcoded.sublime-build +16 -0
- data/tools/RSpec.sublime-build +13 -0
- data/tools/Ruby legacy.sublime-build +7 -0
- data/tools/local_bundle_build.sh +8 -0
- data/tools/local_bundle_install.sh +9 -0
- metadata +30 -85
data/bill_forward.gemspec
CHANGED
@@ -1,29 +1,28 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'bill_forward/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "bill_forward"
|
8
|
-
spec.version = BillForward::VERSION
|
9
|
-
spec.authors = ["BillForward"]
|
10
|
-
spec.email = ["support@billforward.net"]
|
11
|
-
spec.summary = "BillForward Ruby Client Library"
|
12
|
-
spec.description = "Enables you to call the BillForward API easily using Ruby"
|
13
|
-
spec.homepage = "http://www.billforward.net"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_dependency 'rest-client', '~> 1.
|
22
|
-
spec.add_dependency 'json', '~> 1.8.1'
|
23
|
-
spec.add_dependency 'require_all'
|
24
|
-
|
25
|
-
|
26
|
-
spec.add_development_dependency "
|
27
|
-
spec.add_development_dependency "
|
28
|
-
|
29
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'bill_forward/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "bill_forward"
|
8
|
+
spec.version = BillForward::VERSION
|
9
|
+
spec.authors = ["BillForward"]
|
10
|
+
spec.email = ["support@billforward.net"]
|
11
|
+
spec.summary = "BillForward Ruby Client Library"
|
12
|
+
spec.description = "Enables you to call the BillForward API easily using Ruby"
|
13
|
+
spec.homepage = "http://www.billforward.net"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'rest-client', '~> 1.4'
|
22
|
+
spec.add_dependency 'json', '~> 1.8.1'
|
23
|
+
spec.add_dependency 'require_all'
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "rake"
|
28
|
+
end
|
data/bill_forward.iml
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="CompassSettings">
|
4
|
-
<option name="compassSupportEnabled" value="true" />
|
5
|
-
</component>
|
6
|
-
<component name="FacetManager">
|
7
|
-
<facet type="gem" name="Ruby Gem">
|
8
|
-
<configuration>
|
9
|
-
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
10
|
-
<option name="GEM_APP_TEST_PATH" value="$MODULE_DIR$/test" />
|
11
|
-
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
12
|
-
</configuration>
|
13
|
-
</facet>
|
14
|
-
</component>
|
15
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
16
|
-
<exclude-output />
|
17
|
-
<content url="file://$MODULE_DIR$">
|
18
|
-
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
19
|
-
</content>
|
20
|
-
<orderEntry type="jdk" jdkName="ruby-2.0.0-p451" jdkType="RUBY_SDK" />
|
21
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.3, ruby-2.0.0-p451) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.1, ruby-2.0.0-p451) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="mime-types (v2.3, ruby-2.0.0-p451) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rest-client (v1.6.7, ruby-2.0.0-p451) [gem]" level="application" />
|
26
|
-
</component>
|
27
|
-
</module>
|
28
|
-
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="CompassSettings">
|
4
|
+
<option name="compassSupportEnabled" value="true" />
|
5
|
+
</component>
|
6
|
+
<component name="FacetManager">
|
7
|
+
<facet type="gem" name="Ruby Gem">
|
8
|
+
<configuration>
|
9
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
10
|
+
<option name="GEM_APP_TEST_PATH" value="$MODULE_DIR$/test" />
|
11
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
12
|
+
</configuration>
|
13
|
+
</facet>
|
14
|
+
</component>
|
15
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
16
|
+
<exclude-output />
|
17
|
+
<content url="file://$MODULE_DIR$">
|
18
|
+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
19
|
+
</content>
|
20
|
+
<orderEntry type="jdk" jdkName="ruby-2.0.0-p451" jdkType="RUBY_SDK" />
|
21
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.3, ruby-2.0.0-p451) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.1, ruby-2.0.0-p451) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v2.3, ruby-2.0.0-p451) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="rest-client (v1.6.7, ruby-2.0.0-p451) [gem]" level="application" />
|
26
|
+
</component>
|
27
|
+
</module>
|
28
|
+
|