invoiced 2.0.0 → 3.0.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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +37 -0
- data/.github/workflows/publish.yml +24 -0
- data/Gemfile +4 -4
- data/README.md +3 -3
- data/invoiced.gemspec +2 -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 +2 -2
- 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 +78 -9
- 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:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared King
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jwt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,8 +44,9 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- ".github/workflows/ci.yml"
|
48
|
+
- ".github/workflows/publish.yml"
|
47
49
|
- ".gitignore"
|
48
|
-
- ".travis.yml"
|
49
50
|
- Gemfile
|
50
51
|
- LICENSE
|
51
52
|
- README.md
|
@@ -60,8 +61,11 @@ files:
|
|
60
61
|
- lib/invoiced/coupon.rb
|
61
62
|
- lib/invoiced/credit_balance_adjustment.rb
|
62
63
|
- lib/invoiced/credit_note.rb
|
64
|
+
- lib/invoiced/custom_field.rb
|
63
65
|
- lib/invoiced/customer.rb
|
66
|
+
- lib/invoiced/customer_chasing_cadence.rb
|
64
67
|
- lib/invoiced/email.rb
|
68
|
+
- lib/invoiced/email_template.rb
|
65
69
|
- lib/invoiced/error/api_connection_error.rb
|
66
70
|
- lib/invoiced/error/api_error.rb
|
67
71
|
- lib/invoiced/error/authentication_error.rb
|
@@ -71,11 +75,17 @@ files:
|
|
71
75
|
- lib/invoiced/estimate.rb
|
72
76
|
- lib/invoiced/event.rb
|
73
77
|
- lib/invoiced/file.rb
|
78
|
+
- lib/invoiced/gl_account.rb
|
79
|
+
- lib/invoiced/inbox.rb
|
74
80
|
- lib/invoiced/invoice.rb
|
81
|
+
- lib/invoiced/invoice_chasing_cadence.rb
|
75
82
|
- lib/invoiced/item.rb
|
83
|
+
- lib/invoiced/late_fee_schedule.rb
|
76
84
|
- lib/invoiced/letter.rb
|
77
85
|
- lib/invoiced/line_item.rb
|
78
86
|
- lib/invoiced/list.rb
|
87
|
+
- lib/invoiced/member.rb
|
88
|
+
- lib/invoiced/merchant_account.rb
|
79
89
|
- lib/invoiced/note.rb
|
80
90
|
- lib/invoiced/object.rb
|
81
91
|
- lib/invoiced/operations/create.rb
|
@@ -83,42 +93,76 @@ files:
|
|
83
93
|
- lib/invoiced/operations/list.rb
|
84
94
|
- lib/invoiced/operations/update.rb
|
85
95
|
- lib/invoiced/payment.rb
|
96
|
+
- lib/invoiced/payment_method.rb
|
86
97
|
- lib/invoiced/payment_plan.rb
|
87
98
|
- lib/invoiced/payment_source.rb
|
88
99
|
- lib/invoiced/payment_source_object.rb
|
100
|
+
- lib/invoiced/pdf_template.rb
|
89
101
|
- lib/invoiced/plan.rb
|
90
102
|
- lib/invoiced/refund.rb
|
103
|
+
- lib/invoiced/report.rb
|
104
|
+
- lib/invoiced/role.rb
|
105
|
+
- lib/invoiced/sign_up_page.rb
|
106
|
+
- lib/invoiced/sms_template.rb
|
91
107
|
- lib/invoiced/subscription.rb
|
92
108
|
- lib/invoiced/task.rb
|
93
109
|
- lib/invoiced/tax_rate.rb
|
110
|
+
- lib/invoiced/tax_rule.rb
|
94
111
|
- lib/invoiced/text_message.rb
|
112
|
+
- lib/invoiced/theme.rb
|
95
113
|
- lib/invoiced/util.rb
|
96
114
|
- lib/invoiced/version.rb
|
115
|
+
- lib/invoiced/webhook.rb
|
97
116
|
- test/invoiced/charge_test.rb
|
98
117
|
- test/invoiced/contact_test.rb
|
99
118
|
- test/invoiced/coupon_test.rb
|
100
|
-
- test/invoiced/
|
119
|
+
- test/invoiced/credit_balance_adjustment_test.rb
|
101
120
|
- test/invoiced/credit_note_test.rb
|
121
|
+
- test/invoiced/custom_field_test.rb
|
122
|
+
- test/invoiced/customer_chasing_cadence_test.rb
|
102
123
|
- test/invoiced/customer_test.rb
|
124
|
+
- test/invoiced/email_template_test.rb
|
103
125
|
- test/invoiced/error_test.rb
|
104
126
|
- test/invoiced/estimate_test.rb
|
105
127
|
- test/invoiced/event_test.rb
|
106
128
|
- test/invoiced/file_test.rb
|
129
|
+
- test/invoiced/gl_account_test.rb
|
130
|
+
- test/invoiced/inbox_test.rb
|
131
|
+
- test/invoiced/invoice_chasing_cadence_test.rb
|
107
132
|
- test/invoiced/invoice_test.rb
|
108
133
|
- test/invoiced/invoiced_test.rb
|
109
134
|
- test/invoiced/item_test.rb
|
135
|
+
- test/invoiced/late_fee_schedule_test.rb
|
110
136
|
- test/invoiced/line_item_test.rb
|
137
|
+
- test/invoiced/member_test.rb
|
138
|
+
- test/invoiced/merchant_account_test.rb
|
111
139
|
- test/invoiced/note_test.rb
|
112
140
|
- test/invoiced/object_test.rb
|
141
|
+
- test/invoiced/operations/create_test.rb
|
142
|
+
- test/invoiced/operations/delete_test.rb
|
143
|
+
- test/invoiced/operations/endpoint_test.rb
|
144
|
+
- test/invoiced/operations/list_test.rb
|
145
|
+
- test/invoiced/operations/operations.rb
|
146
|
+
- test/invoiced/operations/retrieve_test.rb
|
147
|
+
- test/invoiced/operations/update_test.rb
|
148
|
+
- test/invoiced/payment_method_test.rb
|
113
149
|
- test/invoiced/payment_plan_test.rb
|
114
150
|
- test/invoiced/payment_source_test.rb
|
115
151
|
- test/invoiced/payment_test.rb
|
152
|
+
- test/invoiced/pdf_template_test.rb
|
116
153
|
- test/invoiced/plan_test.rb
|
117
154
|
- test/invoiced/refund_test.rb
|
155
|
+
- test/invoiced/report_test.rb
|
156
|
+
- test/invoiced/role_test.rb
|
157
|
+
- test/invoiced/sign_up_page_test.rb
|
158
|
+
- test/invoiced/sms_template_test.rb
|
118
159
|
- test/invoiced/subscription_test.rb
|
119
160
|
- test/invoiced/task_test.rb
|
120
161
|
- test/invoiced/tax_rate_test.rb
|
162
|
+
- test/invoiced/tax_rule_test.rb
|
163
|
+
- test/invoiced/theme_test.rb
|
121
164
|
- test/invoiced/util_test.rb
|
165
|
+
- test/invoiced/webhook_test.rb
|
122
166
|
- test/test_helper.rb
|
123
167
|
homepage: https://invoiced.com/docs/dev
|
124
168
|
licenses:
|
@@ -132,14 +176,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
176
|
requirements:
|
133
177
|
- - ">="
|
134
178
|
- !ruby/object:Gem::Version
|
135
|
-
version: 2.
|
179
|
+
version: 2.3.0
|
136
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
181
|
requirements:
|
138
182
|
- - ">="
|
139
183
|
- !ruby/object:Gem::Version
|
140
184
|
version: '0'
|
141
185
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
186
|
+
rubygems_version: 3.5.22
|
143
187
|
signing_key:
|
144
188
|
specification_version: 4
|
145
189
|
summary: Ruby client library for the Invoiced API
|
@@ -147,26 +191,51 @@ test_files:
|
|
147
191
|
- test/invoiced/charge_test.rb
|
148
192
|
- test/invoiced/contact_test.rb
|
149
193
|
- test/invoiced/coupon_test.rb
|
150
|
-
- test/invoiced/
|
194
|
+
- test/invoiced/credit_balance_adjustment_test.rb
|
151
195
|
- test/invoiced/credit_note_test.rb
|
196
|
+
- test/invoiced/custom_field_test.rb
|
197
|
+
- test/invoiced/customer_chasing_cadence_test.rb
|
152
198
|
- test/invoiced/customer_test.rb
|
199
|
+
- test/invoiced/email_template_test.rb
|
153
200
|
- test/invoiced/error_test.rb
|
154
201
|
- test/invoiced/estimate_test.rb
|
155
202
|
- test/invoiced/event_test.rb
|
156
203
|
- test/invoiced/file_test.rb
|
204
|
+
- test/invoiced/gl_account_test.rb
|
205
|
+
- test/invoiced/inbox_test.rb
|
206
|
+
- test/invoiced/invoice_chasing_cadence_test.rb
|
157
207
|
- test/invoiced/invoice_test.rb
|
158
208
|
- test/invoiced/invoiced_test.rb
|
159
209
|
- test/invoiced/item_test.rb
|
210
|
+
- test/invoiced/late_fee_schedule_test.rb
|
160
211
|
- test/invoiced/line_item_test.rb
|
212
|
+
- test/invoiced/member_test.rb
|
213
|
+
- test/invoiced/merchant_account_test.rb
|
161
214
|
- test/invoiced/note_test.rb
|
162
215
|
- test/invoiced/object_test.rb
|
216
|
+
- test/invoiced/operations/create_test.rb
|
217
|
+
- test/invoiced/operations/delete_test.rb
|
218
|
+
- test/invoiced/operations/endpoint_test.rb
|
219
|
+
- test/invoiced/operations/list_test.rb
|
220
|
+
- test/invoiced/operations/operations.rb
|
221
|
+
- test/invoiced/operations/retrieve_test.rb
|
222
|
+
- test/invoiced/operations/update_test.rb
|
223
|
+
- test/invoiced/payment_method_test.rb
|
163
224
|
- test/invoiced/payment_plan_test.rb
|
164
225
|
- test/invoiced/payment_source_test.rb
|
165
226
|
- test/invoiced/payment_test.rb
|
227
|
+
- test/invoiced/pdf_template_test.rb
|
166
228
|
- test/invoiced/plan_test.rb
|
167
229
|
- test/invoiced/refund_test.rb
|
230
|
+
- test/invoiced/report_test.rb
|
231
|
+
- test/invoiced/role_test.rb
|
232
|
+
- test/invoiced/sign_up_page_test.rb
|
233
|
+
- test/invoiced/sms_template_test.rb
|
168
234
|
- test/invoiced/subscription_test.rb
|
169
235
|
- test/invoiced/task_test.rb
|
170
236
|
- test/invoiced/tax_rate_test.rb
|
237
|
+
- test/invoiced/tax_rule_test.rb
|
238
|
+
- test/invoiced/theme_test.rb
|
171
239
|
- test/invoiced/util_test.rb
|
240
|
+
- test/invoiced/webhook_test.rb
|
172
241
|
- 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
|