killbill-client 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile +3 -0
  3. data/README.md +18 -0
  4. data/Rakefile +26 -0
  5. data/killbill_client.gemspec +44 -0
  6. data/lib/killbill_client.rb +93 -0
  7. data/lib/killbill_client/api/api.rb +85 -0
  8. data/lib/killbill_client/api/errors.rb +175 -0
  9. data/lib/killbill_client/api/net_http_adapter.rb +131 -0
  10. data/lib/killbill_client/models/account.rb +36 -0
  11. data/lib/killbill_client/models/gen/account_attributes.rb +51 -0
  12. data/lib/killbill_client/models/gen/account_attributes_simple.rb +33 -0
  13. data/lib/killbill_client/models/gen/account_attributes_with_balance.rb +52 -0
  14. data/lib/killbill_client/models/gen/account_attributes_with_balance_and_c_b_a.rb +53 -0
  15. data/lib/killbill_client/models/gen/account_email_attributes.rb +33 -0
  16. data/lib/killbill_client/models/gen/account_timeline_attributes.rb +35 -0
  17. data/lib/killbill_client/models/gen/analytics_sanity_attributes.rb +36 -0
  18. data/lib/killbill_client/models/gen/audit_log_attributes.rb +37 -0
  19. data/lib/killbill_client/models/gen/bundle_attributes_no_subscriptions.rb +36 -0
  20. data/lib/killbill_client/models/gen/bundle_attributes_simple.rb +34 -0
  21. data/lib/killbill_client/models/gen/bundle_attributes_with_subscriptions.rb +35 -0
  22. data/lib/killbill_client/models/gen/bundle_timeline_attributes.rb +36 -0
  23. data/lib/killbill_client/models/gen/business_account_attributes.rb +41 -0
  24. data/lib/killbill_client/models/gen/business_field_attributes.rb +35 -0
  25. data/lib/killbill_client/models/gen/business_invoice_attributes.rb +43 -0
  26. data/lib/killbill_client/models/gen/business_invoice_item_attributes.rb +46 -0
  27. data/lib/killbill_client/models/gen/business_invoice_payment_attributes.rb +50 -0
  28. data/lib/killbill_client/models/gen/business_overdue_status_attributes.rb +37 -0
  29. data/lib/killbill_client/models/gen/business_snapshot_attributes.rb +38 -0
  30. data/lib/killbill_client/models/gen/business_subscription_transition_attributes.rb +64 -0
  31. data/lib/killbill_client/models/gen/business_tag_attributes.rb +34 -0
  32. data/lib/killbill_client/models/gen/catalog_attributes_simple.rb +33 -0
  33. data/lib/killbill_client/models/gen/chargeback_attributes.rb +37 -0
  34. data/lib/killbill_client/models/gen/chargeback_collection_attributes.rb +33 -0
  35. data/lib/killbill_client/models/gen/credit_attributes.rb +39 -0
  36. data/lib/killbill_client/models/gen/credit_collection_attributes.rb +33 -0
  37. data/lib/killbill_client/models/gen/custom_field_attributes.rb +33 -0
  38. data/lib/killbill_client/models/gen/invoice_attributes_simple.rb +42 -0
  39. data/lib/killbill_client/models/gen/invoice_attributes_with_bundle_keys.rb +44 -0
  40. data/lib/killbill_client/models/gen/invoice_attributes_with_items.rb +43 -0
  41. data/lib/killbill_client/models/gen/invoice_email_attributes.rb +33 -0
  42. data/lib/killbill_client/models/gen/invoice_item_attributes_simple.rb +45 -0
  43. data/lib/killbill_client/models/gen/notification_attributes.rb +35 -0
  44. data/lib/killbill_client/models/gen/overdue_state_attributes.rb +38 -0
  45. data/lib/killbill_client/models/gen/payment_attributes_simple.rb +47 -0
  46. data/lib/killbill_client/models/gen/payment_attributes_with_bundle_keys.rb +50 -0
  47. data/lib/killbill_client/models/gen/payment_method_attributes.rb +36 -0
  48. data/lib/killbill_client/models/gen/payment_method_plugin_detail_attributes.rb +46 -0
  49. data/lib/killbill_client/models/gen/payment_method_properties.rb +34 -0
  50. data/lib/killbill_client/models/gen/phase_attributes.rb +33 -0
  51. data/lib/killbill_client/models/gen/plan_attributes.rb +33 -0
  52. data/lib/killbill_client/models/gen/plan_detail_attributes.rb +36 -0
  53. data/lib/killbill_client/models/gen/product_attributes.rb +36 -0
  54. data/lib/killbill_client/models/gen/refund_attributes.rb +40 -0
  55. data/lib/killbill_client/models/gen/require_gen.rb +80 -0
  56. data/lib/killbill_client/models/gen/subscription_attributes_no_events.rb +41 -0
  57. data/lib/killbill_client/models/gen/subscription_attributes_simple.rb +33 -0
  58. data/lib/killbill_client/models/gen/subscription_attributes_with_events.rb +36 -0
  59. data/lib/killbill_client/models/gen/subscription_deleted_event_attributes.rb +40 -0
  60. data/lib/killbill_client/models/gen/subscription_new_event_attributes.rb +38 -0
  61. data/lib/killbill_client/models/gen/subscription_read_event_attributes.rb +40 -0
  62. data/lib/killbill_client/models/gen/tag_attributes.rb +34 -0
  63. data/lib/killbill_client/models/gen/tag_definition_attributes.rb +36 -0
  64. data/lib/killbill_client/models/gen/tenant_attributes.rb +35 -0
  65. data/lib/killbill_client/models/gen/tenant_key_attributes.rb +33 -0
  66. data/lib/killbill_client/models/gen/time_series_data_attributes.rb +33 -0
  67. data/lib/killbill_client/models/invoice.rb +7 -0
  68. data/lib/killbill_client/models/invoice_item.rb +17 -0
  69. data/lib/killbill_client/models/models.rb +15 -0
  70. data/lib/killbill_client/models/payment.rb +6 -0
  71. data/lib/killbill_client/models/payment_method.rb +92 -0
  72. data/lib/killbill_client/models/resource.rb +125 -0
  73. data/lib/killbill_client/models/tag_definition.rb +6 -0
  74. data/lib/killbill_client/utils.rb +30 -0
  75. data/lib/killbill_client/version.rb +18 -0
  76. data/lib/rails/generators/killbill_client/config_generator.rb +17 -0
  77. data/lib/rails/killbill_client.rb +7 -0
  78. data/spec/killbill_client/remote/api_spec.rb +10 -0
  79. data/spec/killbill_client/remote/model_spec.rb +77 -0
  80. data/spec/spec_helper.rb +31 -0
  81. metadata +165 -0
@@ -0,0 +1,43 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class InvoiceAttributesWithItems < Resource
29
+ attribute :amount
30
+ attribute :currency
31
+ attribute :credit_adj
32
+ attribute :refund_adj
33
+ attribute :invoice_id
34
+ attribute :invoice_date
35
+ attribute :target_date
36
+ attribute :invoice_number
37
+ attribute :balance
38
+ attribute :account_id
39
+ attribute :items
40
+ attribute :audit_logs
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,33 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class InvoiceEmailAttributes < Resource
29
+ attribute :account_id
30
+ attribute :is_notified_for_invoices
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,45 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class InvoiceItemAttributesSimple < Resource
29
+ attribute :invoice_item_id
30
+ attribute :invoice_id
31
+ attribute :linked_invoice_item_id
32
+ attribute :account_id
33
+ attribute :bundle_id
34
+ attribute :subscription_id
35
+ attribute :plan_name
36
+ attribute :phase_name
37
+ attribute :description
38
+ attribute :start_date
39
+ attribute :end_date
40
+ attribute :amount
41
+ attribute :currency
42
+ attribute :audit_logs
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,35 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class NotificationAttributes < Resource
29
+ attribute :event_type
30
+ attribute :account_id
31
+ attribute :object_type
32
+ attribute :object_id
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,38 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class OverdueStateAttributes < Resource
29
+ attribute :name
30
+ attribute :external_message
31
+ attribute :days_between_payment_retries
32
+ attribute :disable_entitlement_and_changes_blocked
33
+ attribute :block_changes
34
+ attribute :clear_state
35
+ attribute :reevaluation_interval_days
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,47 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class PaymentAttributesSimple < Resource
29
+ attribute :amount
30
+ attribute :paid_amount
31
+ attribute :account_id
32
+ attribute :invoice_id
33
+ attribute :payment_id
34
+ attribute :payment_method_id
35
+ attribute :requested_date
36
+ attribute :effective_date
37
+ attribute :retry_count
38
+ attribute :currency
39
+ attribute :status
40
+ attribute :gateway_error_code
41
+ attribute :gateway_error_msg
42
+ attribute :ext_first_payment_id_ref
43
+ attribute :ext_second_payment_id_ref
44
+ attribute :audit_logs
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,50 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class PaymentAttributesWithBundleKeys < Resource
29
+ attribute :amount
30
+ attribute :paid_amount
31
+ attribute :account_id
32
+ attribute :invoice_id
33
+ attribute :payment_id
34
+ attribute :payment_method_id
35
+ attribute :requested_date
36
+ attribute :effective_date
37
+ attribute :retry_count
38
+ attribute :currency
39
+ attribute :status
40
+ attribute :gateway_error_code
41
+ attribute :gateway_error_msg
42
+ attribute :ext_first_payment_id_ref
43
+ attribute :ext_second_payment_id_ref
44
+ attribute :external_bundle_keys
45
+ attribute :refunds
46
+ attribute :chargebacks
47
+ attribute :audit_logs
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,36 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class PaymentMethodAttributes < Resource
29
+ attribute :payment_method_id
30
+ attribute :account_id
31
+ attribute :is_default
32
+ attribute :plugin_name
33
+ attribute :plugin_info
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,46 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class PaymentMethodPluginDetailAttributes < Resource
29
+ attribute :external_payment_id
30
+ attribute :is_default_payment_method
31
+ attribute :type
32
+ attribute :cc_name
33
+ attribute :cc_type
34
+ attribute :cc_expiration_month
35
+ attribute :cc_expiration_year
36
+ attribute :cc_last4
37
+ attribute :address1
38
+ attribute :address2
39
+ attribute :city
40
+ attribute :state
41
+ attribute :zip
42
+ attribute :country
43
+ attribute :properties
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,34 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class PaymentMethodProperties < Resource
29
+ attribute :key
30
+ attribute :value
31
+ attribute :is_updatable
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,33 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module KillBillClient
27
+ module Model
28
+ class PhaseAttributes < Resource
29
+ attribute :type
30
+ attribute :prices
31
+ end
32
+ end
33
+ end