patch_retention 0.3.1 → 0.3.2
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/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/patch_retention/memberships.rb +3 -2
- data/lib/patch_retention/version.rb +1 -1
- metadata +4 -3
- data/patch_retention.gemspec +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 109e3aa27d410ae2245f0b1de8a71a1531951869ff99e1c122e406c172e41c5b
|
4
|
+
data.tar.gz: 6666fdc1241ae1bb07fe9e5a014fd6f8c4950c9e9521ebb1c4d1e036c9135f03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 747343cd474efbbf2e881bf9921cc0b9c4166821a96f2fcf69edcc8effee88481b0f80bcfae9921b631fb66a72df39d2934e4f69424df7c2352d4f2faaf5a28f
|
7
|
+
data.tar.gz: 18b13644f200d75450d070b085a054d02da6aab70d51981cce43126371d50dfe2eefc2c42bf2caa70d9d878cdcc15e18f9337dc7d721d5f1b4c85b6bc0e1ba3e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -278,6 +278,7 @@ membership = PatchRetention::Memberships.create(
|
|
278
278
|
product_id: "65de5xxxxxxxxxxxxx", # Required, ID of the product (e.g., from product creation)
|
279
279
|
start_at: Time.now.xmlschema, # Optional, ISO8601 timestamp
|
280
280
|
end_at: (Time.now + 30*24*60*60).xmlschema, # Optional, ISO8601 timestamp (e.g., 30 days from now)
|
281
|
+
next_billing_at: (Time.now + 7*24*60*60).xmlschema, # Optional, ISO8601 timestamp for next billing date
|
281
282
|
external_id: "MEM123", # Optional
|
282
283
|
data: {
|
283
284
|
"is_trial" => true,
|
@@ -3,14 +3,15 @@
|
|
3
3
|
module PatchRetention
|
4
4
|
class Memberships
|
5
5
|
class << self
|
6
|
-
def create(contact_id:, product_id:, start_at: nil, end_at: nil,
|
7
|
-
config: nil)
|
6
|
+
def create(contact_id:, product_id:, start_at: nil, end_at: nil, next_billing_at: nil, external_id: nil,
|
7
|
+
tags: nil, data: nil, config: nil)
|
8
8
|
payload = {
|
9
9
|
contact_id: contact_id,
|
10
10
|
product_id: product_id,
|
11
11
|
}
|
12
12
|
payload[:start_at] = start_at if start_at
|
13
13
|
payload[:end_at] = end_at if end_at
|
14
|
+
payload[:next_billing_at] = next_billing_at if next_billing_at
|
14
15
|
payload[:external_id] = external_id if external_id
|
15
16
|
payload[:tags] = tags if tags
|
16
17
|
payload[:data] = data if data
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patch_retention
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Playbypoint
|
8
8
|
- Gerardo Ortega
|
9
|
+
- Segundo Rebaza
|
9
10
|
autorequire:
|
10
11
|
bindir: exe
|
11
12
|
cert_chain: []
|
12
|
-
date: 2025-09-
|
13
|
+
date: 2025-09-19 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: faraday
|
@@ -225,6 +226,7 @@ description: Patch Retention API wrapper.
|
|
225
226
|
email:
|
226
227
|
- webmaster@playbypoint.com
|
227
228
|
- g3ortega@gmail.com
|
229
|
+
- alvaro.rp1593@gmail.com
|
228
230
|
executables: []
|
229
231
|
extensions: []
|
230
232
|
extra_rdoc_files: []
|
@@ -265,7 +267,6 @@ files:
|
|
265
267
|
- lib/patch_retention/products.rb
|
266
268
|
- lib/patch_retention/util.rb
|
267
269
|
- lib/patch_retention/version.rb
|
268
|
-
- patch_retention.gemspec
|
269
270
|
- script/setup_test_env
|
270
271
|
- sig/patch_retention.rbs
|
271
272
|
homepage: https://playbypoint.com
|
data/patch_retention.gemspec
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "lib/patch_retention/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "patch_retention"
|
7
|
-
spec.version = PatchRetention::VERSION
|
8
|
-
spec.authors = ["Playbypoint", "Gerardo Ortega"]
|
9
|
-
spec.email = ["webmaster@playbypoint.com", "g3ortega@gmail.com"]
|
10
|
-
|
11
|
-
spec.summary = "Patch Retention API wrapper."
|
12
|
-
spec.description = "Patch Retention API wrapper."
|
13
|
-
spec.homepage = "https://playbypoint.com"
|
14
|
-
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 3.1.0"
|
16
|
-
|
17
|
-
# spec.metadata["allowed_push_host"] = "Set to your gem server 'https://example.com'"
|
18
|
-
|
19
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
-
spec.metadata["source_code_uri"] = "https://playbypoint.com"
|
21
|
-
spec.metadata["changelog_uri"] = "https://playbypoint.com"
|
22
|
-
|
23
|
-
# Specify which files should be added to the gem when it is released.
|
24
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
-
spec.files = Dir.chdir(__dir__) do
|
26
|
-
%x(git ls-files -z).split("\x0").reject do |f|
|
27
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
|
-
end
|
29
|
-
end
|
30
|
-
spec.bindir = "exe"
|
31
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
-
spec.require_paths = ["lib"]
|
33
|
-
|
34
|
-
# Runtime dependencies
|
35
|
-
spec.add_dependency("faraday", "~> 1.10")
|
36
|
-
spec.add_dependency("zeitwerk", "~> 2.6")
|
37
|
-
|
38
|
-
# Development dependencies
|
39
|
-
spec.add_development_dependency("bundler", "~> 2.0")
|
40
|
-
spec.add_development_dependency("bundler-audit", "~> 0.9")
|
41
|
-
spec.add_development_dependency("byebug")
|
42
|
-
spec.add_development_dependency("dotenv", "~> 2.8")
|
43
|
-
spec.add_development_dependency("pry")
|
44
|
-
spec.add_development_dependency("rake", "~> 13.0")
|
45
|
-
spec.add_development_dependency("rspec", "~> 3.0")
|
46
|
-
spec.add_development_dependency("rubocop", "~> 1.21")
|
47
|
-
spec.add_development_dependency("rubocop-shopify", "~> 2.15")
|
48
|
-
spec.add_development_dependency("thor", ">= 1.4.0")
|
49
|
-
spec.add_development_dependency("vcr", "~> 6.0")
|
50
|
-
spec.add_development_dependency("webmock", "~> 3.0")
|
51
|
-
|
52
|
-
# Security update for rexml
|
53
|
-
spec.add_development_dependency("rexml", ">= 3.3.9")
|
54
|
-
|
55
|
-
# For more information and examples about making a new gem, check out our
|
56
|
-
# guide at: https://bundler.io/guides/creating_gem.html
|
57
|
-
end
|