invoiced 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +35 -0
- data/Gemfile +2 -2
- data/README.md +11 -2
- data/lib/invoiced/bank_account.rb +0 -1
- data/lib/invoiced/card.rb +0 -1
- data/lib/invoiced/custom_field.rb +10 -0
- data/lib/invoiced/customer_chasing_cadence.rb +10 -0
- data/lib/invoiced/email_template.rb +10 -0
- data/lib/invoiced/gl_account.rb +10 -0
- data/lib/invoiced/inbox.rb +7 -0
- data/lib/invoiced/invoice_chasing_cadence.rb +10 -0
- data/lib/invoiced/late_fee_schedule.rb +10 -0
- data/lib/invoiced/member.rb +10 -0
- data/lib/invoiced/merchant_account.rb +10 -0
- data/lib/invoiced/object.rb +5 -1
- data/lib/invoiced/payment_method.rb +8 -0
- data/lib/invoiced/pdf_template.rb +10 -0
- data/lib/invoiced/report.rb +7 -0
- data/lib/invoiced/role.rb +10 -0
- data/lib/invoiced/sign_up_page.rb +10 -0
- data/lib/invoiced/sms_template.rb +10 -0
- data/lib/invoiced/tax_rule.rb +10 -0
- data/lib/invoiced/theme.rb +10 -0
- data/lib/invoiced/version.rb +1 -1
- data/lib/invoiced/webhook.rb +10 -0
- data/lib/invoiced.rb +39 -2
- data/test/invoiced/charge_test.rb +8 -6
- data/test/invoiced/contact_test.rb +10 -86
- data/test/invoiced/coupon_test.rb +10 -83
- data/test/invoiced/credit_balance_adjustment_test.rb +17 -0
- data/test/invoiced/credit_note_test.rb +10 -83
- data/test/invoiced/custom_field_test.rb +17 -0
- data/test/invoiced/customer_chasing_cadence_test.rb +17 -0
- data/test/invoiced/customer_test.rb +10 -83
- data/test/invoiced/email_template_test.rb +17 -0
- data/test/invoiced/estimate_test.rb +10 -83
- data/test/invoiced/event_test.rb +6 -21
- data/test/invoiced/file_test.rb +8 -47
- data/test/invoiced/gl_account_test.rb +17 -0
- data/test/invoiced/inbox_test.rb +13 -0
- data/test/invoiced/invoice_chasing_cadence_test.rb +17 -0
- data/test/invoiced/invoice_test.rb +10 -83
- data/test/invoiced/item_test.rb +10 -83
- data/test/invoiced/late_fee_schedule_test.rb +17 -0
- data/test/invoiced/line_item_test.rb +10 -86
- data/test/invoiced/member_test.rb +17 -0
- data/test/invoiced/merchant_account_test.rb +17 -0
- data/test/invoiced/note_test.rb +10 -83
- data/test/invoiced/operations/create_test.rb +22 -0
- data/test/invoiced/operations/delete_test.rb +20 -0
- data/test/invoiced/operations/endpoint_test.rb +13 -0
- data/test/invoiced/operations/list_test.rb +26 -0
- data/test/invoiced/operations/operations.rb +0 -0
- data/test/invoiced/operations/retrieve_test.rb +22 -0
- data/test/invoiced/operations/update_test.rb +29 -0
- data/test/invoiced/payment_method_test.rb +15 -0
- data/test/invoiced/payment_plan_test.rb +7 -0
- data/test/invoiced/payment_test.rb +10 -83
- data/test/invoiced/pdf_template_test.rb +17 -0
- data/test/invoiced/plan_test.rb +10 -83
- data/test/invoiced/refund_test.rb +5 -3
- data/test/invoiced/report_test.rb +14 -0
- data/test/invoiced/role_test.rb +17 -0
- data/test/invoiced/sign_up_page_test.rb +17 -0
- data/test/invoiced/sms_template_test.rb +17 -0
- data/test/invoiced/subscription_test.rb +10 -71
- data/test/invoiced/task_test.rb +10 -83
- data/test/invoiced/tax_rate_test.rb +10 -83
- data/test/invoiced/tax_rule_test.rb +17 -0
- data/test/invoiced/theme_test.rb +17 -0
- data/test/invoiced/webhook_test.rb +17 -0
- data/test/test_helper.rb +6 -0
- metadata +76 -8
- data/.travis.yml +0 -15
- data/test/invoiced/credit_balance_adjustment.rb +0 -90
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: invoiced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared King
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -44,8 +44,8 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- ".github/workflows/ci.yml"
|
47
48
|
- ".gitignore"
|
48
|
-
- ".travis.yml"
|
49
49
|
- Gemfile
|
50
50
|
- LICENSE
|
51
51
|
- README.md
|
@@ -60,8 +60,11 @@ files:
|
|
60
60
|
- lib/invoiced/coupon.rb
|
61
61
|
- lib/invoiced/credit_balance_adjustment.rb
|
62
62
|
- lib/invoiced/credit_note.rb
|
63
|
+
- lib/invoiced/custom_field.rb
|
63
64
|
- lib/invoiced/customer.rb
|
65
|
+
- lib/invoiced/customer_chasing_cadence.rb
|
64
66
|
- lib/invoiced/email.rb
|
67
|
+
- lib/invoiced/email_template.rb
|
65
68
|
- lib/invoiced/error/api_connection_error.rb
|
66
69
|
- lib/invoiced/error/api_error.rb
|
67
70
|
- lib/invoiced/error/authentication_error.rb
|
@@ -71,11 +74,17 @@ files:
|
|
71
74
|
- lib/invoiced/estimate.rb
|
72
75
|
- lib/invoiced/event.rb
|
73
76
|
- lib/invoiced/file.rb
|
77
|
+
- lib/invoiced/gl_account.rb
|
78
|
+
- lib/invoiced/inbox.rb
|
74
79
|
- lib/invoiced/invoice.rb
|
80
|
+
- lib/invoiced/invoice_chasing_cadence.rb
|
75
81
|
- lib/invoiced/item.rb
|
82
|
+
- lib/invoiced/late_fee_schedule.rb
|
76
83
|
- lib/invoiced/letter.rb
|
77
84
|
- lib/invoiced/line_item.rb
|
78
85
|
- lib/invoiced/list.rb
|
86
|
+
- lib/invoiced/member.rb
|
87
|
+
- lib/invoiced/merchant_account.rb
|
79
88
|
- lib/invoiced/note.rb
|
80
89
|
- lib/invoiced/object.rb
|
81
90
|
- lib/invoiced/operations/create.rb
|
@@ -83,48 +92,82 @@ files:
|
|
83
92
|
- lib/invoiced/operations/list.rb
|
84
93
|
- lib/invoiced/operations/update.rb
|
85
94
|
- lib/invoiced/payment.rb
|
95
|
+
- lib/invoiced/payment_method.rb
|
86
96
|
- lib/invoiced/payment_plan.rb
|
87
97
|
- lib/invoiced/payment_source.rb
|
88
98
|
- lib/invoiced/payment_source_object.rb
|
99
|
+
- lib/invoiced/pdf_template.rb
|
89
100
|
- lib/invoiced/plan.rb
|
90
101
|
- lib/invoiced/refund.rb
|
102
|
+
- lib/invoiced/report.rb
|
103
|
+
- lib/invoiced/role.rb
|
104
|
+
- lib/invoiced/sign_up_page.rb
|
105
|
+
- lib/invoiced/sms_template.rb
|
91
106
|
- lib/invoiced/subscription.rb
|
92
107
|
- lib/invoiced/task.rb
|
93
108
|
- lib/invoiced/tax_rate.rb
|
109
|
+
- lib/invoiced/tax_rule.rb
|
94
110
|
- lib/invoiced/text_message.rb
|
111
|
+
- lib/invoiced/theme.rb
|
95
112
|
- lib/invoiced/util.rb
|
96
113
|
- lib/invoiced/version.rb
|
114
|
+
- lib/invoiced/webhook.rb
|
97
115
|
- test/invoiced/charge_test.rb
|
98
116
|
- test/invoiced/contact_test.rb
|
99
117
|
- test/invoiced/coupon_test.rb
|
100
|
-
- test/invoiced/
|
118
|
+
- test/invoiced/credit_balance_adjustment_test.rb
|
101
119
|
- test/invoiced/credit_note_test.rb
|
120
|
+
- test/invoiced/custom_field_test.rb
|
121
|
+
- test/invoiced/customer_chasing_cadence_test.rb
|
102
122
|
- test/invoiced/customer_test.rb
|
123
|
+
- test/invoiced/email_template_test.rb
|
103
124
|
- test/invoiced/error_test.rb
|
104
125
|
- test/invoiced/estimate_test.rb
|
105
126
|
- test/invoiced/event_test.rb
|
106
127
|
- test/invoiced/file_test.rb
|
128
|
+
- test/invoiced/gl_account_test.rb
|
129
|
+
- test/invoiced/inbox_test.rb
|
130
|
+
- test/invoiced/invoice_chasing_cadence_test.rb
|
107
131
|
- test/invoiced/invoice_test.rb
|
108
132
|
- test/invoiced/invoiced_test.rb
|
109
133
|
- test/invoiced/item_test.rb
|
134
|
+
- test/invoiced/late_fee_schedule_test.rb
|
110
135
|
- test/invoiced/line_item_test.rb
|
136
|
+
- test/invoiced/member_test.rb
|
137
|
+
- test/invoiced/merchant_account_test.rb
|
111
138
|
- test/invoiced/note_test.rb
|
112
139
|
- test/invoiced/object_test.rb
|
140
|
+
- test/invoiced/operations/create_test.rb
|
141
|
+
- test/invoiced/operations/delete_test.rb
|
142
|
+
- test/invoiced/operations/endpoint_test.rb
|
143
|
+
- test/invoiced/operations/list_test.rb
|
144
|
+
- test/invoiced/operations/operations.rb
|
145
|
+
- test/invoiced/operations/retrieve_test.rb
|
146
|
+
- test/invoiced/operations/update_test.rb
|
147
|
+
- test/invoiced/payment_method_test.rb
|
113
148
|
- test/invoiced/payment_plan_test.rb
|
114
149
|
- test/invoiced/payment_source_test.rb
|
115
150
|
- test/invoiced/payment_test.rb
|
151
|
+
- test/invoiced/pdf_template_test.rb
|
116
152
|
- test/invoiced/plan_test.rb
|
117
153
|
- test/invoiced/refund_test.rb
|
154
|
+
- test/invoiced/report_test.rb
|
155
|
+
- test/invoiced/role_test.rb
|
156
|
+
- test/invoiced/sign_up_page_test.rb
|
157
|
+
- test/invoiced/sms_template_test.rb
|
118
158
|
- test/invoiced/subscription_test.rb
|
119
159
|
- test/invoiced/task_test.rb
|
120
160
|
- test/invoiced/tax_rate_test.rb
|
161
|
+
- test/invoiced/tax_rule_test.rb
|
162
|
+
- test/invoiced/theme_test.rb
|
121
163
|
- test/invoiced/util_test.rb
|
164
|
+
- test/invoiced/webhook_test.rb
|
122
165
|
- test/test_helper.rb
|
123
166
|
homepage: https://invoiced.com/docs/dev
|
124
167
|
licenses:
|
125
168
|
- MIT
|
126
169
|
metadata: {}
|
127
|
-
post_install_message:
|
170
|
+
post_install_message:
|
128
171
|
rdoc_options: []
|
129
172
|
require_paths:
|
130
173
|
- lib
|
@@ -140,33 +183,58 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
183
|
version: '0'
|
141
184
|
requirements: []
|
142
185
|
rubygems_version: 3.1.4
|
143
|
-
signing_key:
|
186
|
+
signing_key:
|
144
187
|
specification_version: 4
|
145
188
|
summary: Ruby client library for the Invoiced API
|
146
189
|
test_files:
|
147
190
|
- test/invoiced/charge_test.rb
|
148
191
|
- test/invoiced/contact_test.rb
|
149
192
|
- test/invoiced/coupon_test.rb
|
150
|
-
- test/invoiced/
|
193
|
+
- test/invoiced/credit_balance_adjustment_test.rb
|
151
194
|
- test/invoiced/credit_note_test.rb
|
195
|
+
- test/invoiced/custom_field_test.rb
|
196
|
+
- test/invoiced/customer_chasing_cadence_test.rb
|
152
197
|
- test/invoiced/customer_test.rb
|
198
|
+
- test/invoiced/email_template_test.rb
|
153
199
|
- test/invoiced/error_test.rb
|
154
200
|
- test/invoiced/estimate_test.rb
|
155
201
|
- test/invoiced/event_test.rb
|
156
202
|
- test/invoiced/file_test.rb
|
203
|
+
- test/invoiced/gl_account_test.rb
|
204
|
+
- test/invoiced/inbox_test.rb
|
205
|
+
- test/invoiced/invoice_chasing_cadence_test.rb
|
157
206
|
- test/invoiced/invoice_test.rb
|
158
207
|
- test/invoiced/invoiced_test.rb
|
159
208
|
- test/invoiced/item_test.rb
|
209
|
+
- test/invoiced/late_fee_schedule_test.rb
|
160
210
|
- test/invoiced/line_item_test.rb
|
211
|
+
- test/invoiced/member_test.rb
|
212
|
+
- test/invoiced/merchant_account_test.rb
|
161
213
|
- test/invoiced/note_test.rb
|
162
214
|
- test/invoiced/object_test.rb
|
215
|
+
- test/invoiced/operations/create_test.rb
|
216
|
+
- test/invoiced/operations/delete_test.rb
|
217
|
+
- test/invoiced/operations/endpoint_test.rb
|
218
|
+
- test/invoiced/operations/list_test.rb
|
219
|
+
- test/invoiced/operations/operations.rb
|
220
|
+
- test/invoiced/operations/retrieve_test.rb
|
221
|
+
- test/invoiced/operations/update_test.rb
|
222
|
+
- test/invoiced/payment_method_test.rb
|
163
223
|
- test/invoiced/payment_plan_test.rb
|
164
224
|
- test/invoiced/payment_source_test.rb
|
165
225
|
- test/invoiced/payment_test.rb
|
226
|
+
- test/invoiced/pdf_template_test.rb
|
166
227
|
- test/invoiced/plan_test.rb
|
167
228
|
- test/invoiced/refund_test.rb
|
229
|
+
- test/invoiced/report_test.rb
|
230
|
+
- test/invoiced/role_test.rb
|
231
|
+
- test/invoiced/sign_up_page_test.rb
|
232
|
+
- test/invoiced/sms_template_test.rb
|
168
233
|
- test/invoiced/subscription_test.rb
|
169
234
|
- test/invoiced/task_test.rb
|
170
235
|
- test/invoiced/tax_rate_test.rb
|
236
|
+
- test/invoiced/tax_rule_test.rb
|
237
|
+
- test/invoiced/theme_test.rb
|
171
238
|
- test/invoiced/util_test.rb
|
239
|
+
- test/invoiced/webhook_test.rb
|
172
240
|
- test/test_helper.rb
|
data/.travis.yml
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
require File.expand_path('../../test_helper', __FILE__)
|
2
|
-
|
3
|
-
module Invoiced
|
4
|
-
class CreditBalanceAdjustmentTest < Test::Unit::TestCase
|
5
|
-
should "return the api endpoint" do
|
6
|
-
creditBalanceAdjustment = CreditBalanceAdjustment.new(@client, "test")
|
7
|
-
assert_equal('/credit_balance_adjustment/test', creditBalanceAdjustment.endpoint())
|
8
|
-
end
|
9
|
-
|
10
|
-
should "create a credit balance adjustments" do
|
11
|
-
mockResponse = mock('RestClient::Response')
|
12
|
-
mockResponse.stubs(:code).returns(201)
|
13
|
-
mockResponse.stubs(:body).returns('{"id":"test","amount":800}')
|
14
|
-
mockResponse.stubs(:headers).returns({})
|
15
|
-
|
16
|
-
RestClient::Request.any_instance.expects(:execute).returns(mockResponse)
|
17
|
-
|
18
|
-
creditBalanceAdjustment = @client.CreditBalanceAdjustment.create({:amount => 800})
|
19
|
-
|
20
|
-
assert_instance_of(Invoiced::CreditBalanceAdjustment, creditBalanceAdjustment)
|
21
|
-
assert_equal("test", creditBalanceAdjustment.id)
|
22
|
-
assert_equal(800, creditBalanceAdjustment.amount)
|
23
|
-
end
|
24
|
-
|
25
|
-
should "retrieve a credit balance adjustments" do
|
26
|
-
mockResponse = mock('RestClient::Response')
|
27
|
-
mockResponse.stubs(:code).returns(200)
|
28
|
-
mockResponse.stubs(:body).returns('{"id":"test","amount":800}')
|
29
|
-
mockResponse.stubs(:headers).returns({})
|
30
|
-
|
31
|
-
RestClient::Request.any_instance.expects(:execute).returns(mockResponse)
|
32
|
-
|
33
|
-
creditBalanceAdjustment = @client.CreditBalanceAdjustment.retrieve("test")
|
34
|
-
|
35
|
-
assert_instance_of(Invoiced::CreditBalanceAdjustment, creditBalanceAdjustment)
|
36
|
-
assert_equal("test", creditBalanceAdjustment.id)
|
37
|
-
assert_equal(800, creditBalanceAdjustment.amount)
|
38
|
-
end
|
39
|
-
|
40
|
-
should "not update a credit balance adjustments when no params" do
|
41
|
-
creditBalanceAdjustment = CreditBalanceAdjustment.new(@client, "test")
|
42
|
-
assert_false(creditBalanceAdjustment.save)
|
43
|
-
end
|
44
|
-
|
45
|
-
should "update a credit balance adjustments" do
|
46
|
-
mockResponse = mock('RestClient::Response')
|
47
|
-
mockResponse.stubs(:code).returns(200)
|
48
|
-
mockResponse.stubs(:body).returns('{"id":"test","amount":800}')
|
49
|
-
mockResponse.stubs(:headers).returns({})
|
50
|
-
|
51
|
-
RestClient::Request.any_instance.expects(:execute).returns(mockResponse)
|
52
|
-
|
53
|
-
creditBalanceAdjustment = CreditBalanceAdjustment.new(@client, "test")
|
54
|
-
creditBalanceAdjustment.amount = 800
|
55
|
-
assert_true(creditBalanceAdjustment.save)
|
56
|
-
|
57
|
-
assert_equal(creditBalanceAdjustment.amount, 800)
|
58
|
-
end
|
59
|
-
|
60
|
-
should "list all credit balance adjustments" do
|
61
|
-
mockResponse = mock('RestClient::Response')
|
62
|
-
mockResponse.stubs(:code).returns(200)
|
63
|
-
mockResponse.stubs(:body).returns('[{"id":"test","amount":800}]')
|
64
|
-
mockResponse.stubs(:headers).returns(:x_total_count => 15, :link => '<https://api.invoiced.com/catalog_items?per_page=25&page=1>; rel="self", <https://api.invoiced.com/catalog_items?per_page=25&page=1>; rel="first", <https://api.invoiced.com/catalog_items?per_page=25&page=1>; rel="last"')
|
65
|
-
|
66
|
-
RestClient::Request.any_instance.expects(:execute).returns(mockResponse)
|
67
|
-
|
68
|
-
creditBalanceAdjustments, metadata = @client.CreditBalanceAdjustment.list
|
69
|
-
|
70
|
-
assert_instance_of(Array, creditBalanceAdjustments)
|
71
|
-
assert_equal(1, creditBalanceAdjustments.length)
|
72
|
-
assert_equal("test", creditBalanceAdjustments[0].id)
|
73
|
-
|
74
|
-
assert_instance_of(Invoiced::List, metadata)
|
75
|
-
assert_equal(15, metadata.total_count)
|
76
|
-
end
|
77
|
-
|
78
|
-
should "delete a credit balance adjustments" do
|
79
|
-
mockResponse = mock('RestClient::Response')
|
80
|
-
mockResponse.stubs(:code).returns(204)
|
81
|
-
mockResponse.stubs(:body).returns('')
|
82
|
-
mockResponse.stubs(:headers).returns({})
|
83
|
-
|
84
|
-
RestClient::Request.any_instance.expects(:execute).returns(mockResponse)
|
85
|
-
|
86
|
-
creditBalanceAdjustment = CreditBalanceAdjustment.new(@client, "test")
|
87
|
-
assert_true(creditBalanceAdjustment.delete)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|