chartmogul-ruby 4.4.0 → 4.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73feaf0740f7b93fac1afbb843b14da2ae8795926e55a595b306c97fb789c973
4
- data.tar.gz: 4860d36f85289bf32be3f47a7f43de1c8b07c3d679b3c3ed96d4f1d64a6da0e7
3
+ metadata.gz: 412ac47a1b6aa99718ae0d49b5637ca3440d002fc3df7b65a559de92ee9855cc
4
+ data.tar.gz: be62073fffa5ab0fb374df1305fc9eeac218d489e6f664cd76bb452b95f85e94
5
5
  SHA512:
6
- metadata.gz: 55a5b492825b56014b4a7f6db1779c4bb3401c33c97fc7b4e6d825e64d673104ca4becb816bc692f2c56b41804d6a408ab088edacb83e9ccc4b3824597cfa0bf
7
- data.tar.gz: ef3babd9e379fa95fe43a0b1d746a081eb61b7c65058f7e82560d0493cd9521c33d542ac1c9e0b1165a36a22bfe30b892bff25c7fe029e9e2cf1790a2d650f8d
6
+ metadata.gz: 1f48e0c1e88f9a0a33ffcc4d496c6127845f6e995967444e5dfaeedeab2f48a76480e063592eb90128f4adfc6b97846021dcacc1aea9932461d7fb759ccd76d6
7
+ data.tar.gz: 5898d26b2120e9506451238a97d565aa1093664db3352b9374f802b406f5c0034cdf5e4fb66fbf98313a38a6d6cfd1f81e991654addcd120d8195ab446473b0f
data/changelog.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # chartmogul-ruby Change Log
2
2
 
3
+ ## Version 4.7.0 - April 25, 2025
4
+ - Adds support for Tasks (https://dev.chartmogul.com/reference/tasks)
5
+
6
+ ## Version 4.6.0 - March 14, 2025
7
+ - Adds support for disconnecting subscriptions
8
+ - Adds support for `transaction_fees_in_cents` attribute on transactions
9
+
10
+ ## Version 4.5.0 - February 19, 2025
11
+ - Adds support for proration type support for LineItems Subscription
12
+
3
13
  ## Version 4.4.0 - October 24, 2024
4
14
  - Adds support for unmerging customers
5
15
 
@@ -113,6 +113,14 @@ module ChartMogul
113
113
  Opportunity.create!(options.merge(customer_uuid: uuid))
114
114
  end
115
115
 
116
+ def tasks(options = {})
117
+ Tasks.all(options.merge(customer_uuid: uuid))
118
+ end
119
+
120
+ def create_task(options = {})
121
+ Task.create!(options.merge(customer_uuid: uuid))
122
+ end
123
+
116
124
  # Enrichment
117
125
  def tags
118
126
  @attributes[:tags]
@@ -12,6 +12,7 @@ module ChartMogul
12
12
  writeable_attr :amount_in_cents
13
13
  writeable_attr :cancelled_at, type: :time
14
14
  writeable_attr :prorated
15
+ writeable_attr :proration_type
15
16
  writeable_attr :quantity
16
17
  writeable_attr :discount_amount_in_cents
17
18
  writeable_attr :discount_code
@@ -30,6 +30,11 @@ module ChartMogul
30
30
  custom!(:post, "/v1/customers/#{customer_uuid}/connect_subscriptions", subscriptions: subscriptions.map(&:serialize_for_write))
31
31
  end
32
32
 
33
+ def disconnect(customer_uuid, subscriptions)
34
+ subscriptions.unshift(self)
35
+ custom!(:post, "/v1/customers/#{customer_uuid}/disconnect_subscriptions", subscriptions: subscriptions.map(&:serialize_for_write))
36
+ end
37
+
33
38
  def self.all(customer_uuid, options = {})
34
39
  Subscriptions.all(customer_uuid, options)
35
40
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'forwardable'
4
+
5
+ module ChartMogul
6
+ class Task < APIResource
7
+ set_resource_name 'Task'
8
+ set_resource_path '/v1/tasks'
9
+
10
+ readonly_attr :customer_uuid
11
+ readonly_attr :task_uuid
12
+ readonly_attr :created_at
13
+ readonly_attr :updated_at
14
+
15
+ writeable_attr :task_details
16
+ writeable_attr :assignee
17
+ writeable_attr :due_date
18
+ writeable_attr :completed_at
19
+
20
+ include API::Actions::Create
21
+ include API::Actions::Destroy
22
+ include API::Actions::Retrieve
23
+ include API::Actions::Update
24
+
25
+ def self.all(options = {})
26
+ Tasks.all(options)
27
+ end
28
+ end
29
+
30
+ class Tasks < APIResource
31
+ set_resource_name 'Tasks'
32
+ set_resource_path '/v1/tasks'
33
+
34
+ include Concerns::Entries
35
+ include Concerns::PageableWithCursor
36
+
37
+ set_entry_class Task
38
+ end
39
+ end
@@ -13,6 +13,7 @@ module ChartMogul
13
13
  writeable_attr :result
14
14
  writeable_attr :external_id
15
15
  writeable_attr :amount_in_cents
16
+ writeable_attr :transaction_fees_in_cents
16
17
  writeable_attr :invoice_uuid
17
18
 
18
19
  def initialize(attributes = {})
@@ -13,6 +13,7 @@ module ChartMogul
13
13
  writeable_attr :result
14
14
  writeable_attr :external_id
15
15
  writeable_attr :amount_in_cents
16
+ writeable_attr :transaction_fees_in_cents
16
17
  writeable_attr :invoice_uuid
17
18
 
18
19
  def initialize(attributes = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChartMogul
4
- VERSION = '4.4.0'
4
+ VERSION = '4.7.0'
5
5
  end
data/lib/chartmogul.rb CHANGED
@@ -65,6 +65,7 @@ require 'chartmogul/plan_groups/plans'
65
65
  require 'chartmogul/account'
66
66
  require 'chartmogul/subscription_event'
67
67
  require 'chartmogul/opportunity'
68
+ require 'chartmogul/task'
68
69
 
69
70
  require 'chartmogul/metrics/arpa'
70
71
  require 'chartmogul/metrics/arr'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chartmogul-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Kopac
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-24 00:00:00.000000000 Z
11
+ date: 2025-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -260,6 +260,7 @@ files:
260
260
  - lib/chartmogul/subscription_event.rb
261
261
  - lib/chartmogul/summary.rb
262
262
  - lib/chartmogul/summary_all.rb
263
+ - lib/chartmogul/task.rb
263
264
  - lib/chartmogul/transactions/payment.rb
264
265
  - lib/chartmogul/transactions/refund.rb
265
266
  - lib/chartmogul/utils/hash_snake_caser.rb
@@ -290,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
291
  - !ruby/object:Gem::Version
291
292
  version: '0'
292
293
  requirements: []
293
- rubygems_version: 3.2.3
294
+ rubygems_version: 3.5.15
294
295
  signing_key:
295
296
  specification_version: 4
296
297
  summary: Chartmogul API Ruby Client