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,37 @@
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 AuditLogAttributes < Resource
29
+ attribute :change_type
30
+ attribute :change_date
31
+ attribute :changed_by
32
+ attribute :reason_code
33
+ attribute :comments
34
+ attribute :user_token
35
+ end
36
+ end
37
+ 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 BundleAttributesNoSubscriptions < Resource
29
+ attribute :bundle_id
30
+ attribute :account_id
31
+ attribute :external_key
32
+ attribute :subscriptions
33
+ attribute :audit_logs
34
+ end
35
+ end
36
+ 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 BundleAttributesSimple < Resource
29
+ attribute :bundle_id
30
+ attribute :external_key
31
+ attribute :audit_logs
32
+ end
33
+ end
34
+ 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 BundleAttributesWithSubscriptions < Resource
29
+ attribute :bundle_id
30
+ attribute :external_key
31
+ attribute :subscriptions
32
+ attribute :audit_logs
33
+ end
34
+ end
35
+ 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 BundleTimelineAttributes < Resource
29
+ attribute :view_id
30
+ attribute :bundle
31
+ attribute :payments
32
+ attribute :invoices
33
+ attribute :reason_for_change
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,41 @@
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 BusinessAccountAttributes < Resource
29
+ attribute :external_key
30
+ attribute :name
31
+ attribute :currency
32
+ attribute :balance
33
+ attribute :last_invoice_date
34
+ attribute :total_invoice_balance
35
+ attribute :last_payment_status
36
+ attribute :default_payment_method_type
37
+ attribute :default_credit_card_type
38
+ attribute :default_billing_address_country
39
+ end
40
+ end
41
+ 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 BusinessFieldAttributes < Resource
29
+ attribute :object_type
30
+ attribute :id
31
+ attribute :name
32
+ attribute :value
33
+ end
34
+ end
35
+ end
@@ -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 BusinessInvoiceAttributes < Resource
29
+ attribute :invoice_id
30
+ attribute :invoice_number
31
+ attribute :account_id
32
+ attribute :account_key
33
+ attribute :invoice_date
34
+ attribute :target_date
35
+ attribute :currency
36
+ attribute :balance
37
+ attribute :amount_paid
38
+ attribute :amount_charged
39
+ attribute :amount_credited
40
+ attribute :invoice_items
41
+ end
42
+ end
43
+ 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 BusinessInvoiceItemAttributes < Resource
29
+ attribute :item_id
30
+ attribute :invoice_id
31
+ attribute :item_type
32
+ attribute :external_key
33
+ attribute :product_name
34
+ attribute :product_type
35
+ attribute :product_category
36
+ attribute :slug
37
+ attribute :phase
38
+ attribute :billing_period
39
+ attribute :start_date
40
+ attribute :end_date
41
+ attribute :amount
42
+ attribute :currency
43
+ attribute :linked_item_id
44
+ end
45
+ end
46
+ 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 BusinessInvoicePaymentAttributes < Resource
29
+ attribute :payment_id
30
+ attribute :ext_first_payment_ref_id
31
+ attribute :ext_second_payment_ref_id
32
+ attribute :account_key
33
+ attribute :invoice_id
34
+ attribute :invoice_number
35
+ attribute :effective_date
36
+ attribute :amount
37
+ attribute :currency
38
+ attribute :payment_error
39
+ attribute :processing_status
40
+ attribute :requested_amount
41
+ attribute :plugin_name
42
+ attribute :payment_type
43
+ attribute :payment_method
44
+ attribute :card_type
45
+ attribute :card_country
46
+ attribute :invoice_payment_type
47
+ attribute :linked_invoice_payment_id
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,37 @@
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 BusinessOverdueStatusAttributes < Resource
29
+ attribute :object_type
30
+ attribute :id
31
+ attribute :account_key
32
+ attribute :status
33
+ attribute :start_date
34
+ attribute :end_date
35
+ end
36
+ end
37
+ end