mifiel 2.0.0 → 2.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.
- checksums.yaml +4 -4
- data/Appraisals +5 -2
- data/README.md +28 -13
- data/gemfiles/rails_7.gemfile +2 -1
- data/gemfiles/rails_8.gemfile +1 -1
- data/lib/mifiel/version.rb +1 -1
- data/lib/mifiel/webhook.rb +24 -0
- data/lib/mifiel.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fba43da41b56717d0f34d2d23441a29685b1014eff732a8c7c3c2a886cbcf81f
|
|
4
|
+
data.tar.gz: a067295115e5ae373cb996708138bef64ed3f5a5f7406e3027df2f321ff13d3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 224c26fd5767508ffaddd0a8f824f6f70129728c7ff1d81834a33117a470d6e697b92d5a8b5f166f4679f57fe8619ef048936c9e45bd3a6717100b23dd427956
|
|
7
|
+
data.tar.gz: 6babe35d31fcc72e070079b5e718f47e2157254f33a40f01989685bcf2e0d91a4cd73bb2793183f65d090593e6adb852b25ab6d6de2b2056b379d5e8bb08edca
|
data/Appraisals
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
appraise 'rails-7' do
|
|
4
|
-
gem 'rails', '7'
|
|
4
|
+
gem 'rails', '~> 7.2.0'
|
|
5
|
+
# ActiveSupport 7.2 still calls JSON.generate(quirks_mode: true), which json 3 dropped.
|
|
6
|
+
gem 'json', '< 3'
|
|
5
7
|
gem 'mutex_m'
|
|
6
8
|
gem 'benchmark'
|
|
7
9
|
gem 'ostruct'
|
|
8
10
|
end
|
|
9
11
|
|
|
10
12
|
appraise 'rails-8' do
|
|
11
|
-
|
|
13
|
+
# 8.0.x still passes quirks_mode; 8.1 removed it and works with json 3.
|
|
14
|
+
gem 'rails', '~> 8.1.0'
|
|
12
15
|
end
|
data/README.md
CHANGED
|
@@ -4,8 +4,16 @@
|
|
|
4
4
|
[![Build Status][travis-image]][travis-url]
|
|
5
5
|
[![Coverage Status][coveralls-image]][coveralls-url]
|
|
6
6
|
|
|
7
|
-
Ruby SDK for [Mifiel](https://www.mifiel.com) API.
|
|
8
|
-
|
|
7
|
+
Ruby SDK for the [Mifiel](https://www.mifiel.com) API.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
10
|
+
|
|
11
|
+
API reference, guides, and examples:
|
|
12
|
+
|
|
13
|
+
- English: https://docs.mifiel.com/en/
|
|
14
|
+
- Español: https://docs.mifiel.com/es/
|
|
15
|
+
|
|
16
|
+
This README covers installation and client setup only.
|
|
9
17
|
|
|
10
18
|
## Installation
|
|
11
19
|
|
|
@@ -17,28 +25,35 @@ gem 'mifiel'
|
|
|
17
25
|
|
|
18
26
|
And then execute:
|
|
19
27
|
|
|
20
|
-
|
|
28
|
+
```bash
|
|
29
|
+
bundle
|
|
30
|
+
```
|
|
21
31
|
|
|
22
32
|
Or install it yourself as:
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
```bash
|
|
35
|
+
gem install mifiel
|
|
36
|
+
```
|
|
25
37
|
|
|
26
|
-
##
|
|
38
|
+
## Setup
|
|
27
39
|
|
|
28
|
-
|
|
40
|
+
1. Create an account (production or [sandbox](https://app-sandbox.mifiel.com)).
|
|
41
|
+
2. Generate an `APP_ID` and `APP_SECRET` in [Access Tokens](https://app-sandbox.mifiel.com/settings/access-tokens).
|
|
42
|
+
3. Configure the gem:
|
|
29
43
|
|
|
30
44
|
```ruby
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
Mifiel.config do |config|
|
|
46
|
+
config.app_id = '<APP_ID>'
|
|
47
|
+
config.app_secret = '<APP_SECRET>'
|
|
48
|
+
# Production is the default.
|
|
49
|
+
# For sandbox:
|
|
50
|
+
config.base_url = 'https://app-sandbox.mifiel.com/api/v1'
|
|
51
|
+
end
|
|
37
52
|
```
|
|
38
53
|
|
|
39
54
|
## Contributing
|
|
40
55
|
|
|
41
|
-
1. Fork it (
|
|
56
|
+
1. Fork it (https://github.com/Mifiel/ruby-api-client/fork)
|
|
42
57
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
43
58
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
44
59
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/gemfiles/rails_7.gemfile
CHANGED
data/gemfiles/rails_8.gemfile
CHANGED
data/lib/mifiel/version.rb
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Mifiel
|
|
4
|
+
# Account-level webhook subscriptions.
|
|
5
|
+
# @see https://docs.mifiel.com/en/#tag/Webhooks
|
|
6
|
+
class Webhook < Mifiel::Base
|
|
7
|
+
get :all, '/webhooks'
|
|
8
|
+
get :find, '/webhooks/:id'
|
|
9
|
+
post :create, '/webhooks'
|
|
10
|
+
delete :delete, '/webhooks/:id'
|
|
11
|
+
|
|
12
|
+
# Trigger delivery for this webhook.
|
|
13
|
+
#
|
|
14
|
+
# @param resource [String] UUID of the related resource included in the callback payload
|
|
15
|
+
# @param instant [Boolean] when true, deliver immediately once instead of enqueueing retries
|
|
16
|
+
def trigger(resource:, instant: false)
|
|
17
|
+
self.class.process_request(
|
|
18
|
+
"/webhooks/#{id}/trigger",
|
|
19
|
+
:post,
|
|
20
|
+
payload: { resource: resource, instant: instant },
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/lib/mifiel.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mifiel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genaro Madrid
|
|
@@ -64,6 +64,7 @@ files:
|
|
|
64
64
|
- lib/mifiel/template.rb
|
|
65
65
|
- lib/mifiel/user.rb
|
|
66
66
|
- lib/mifiel/version.rb
|
|
67
|
+
- lib/mifiel/webhook.rb
|
|
67
68
|
- mifiel-ruby-api-client.sublime-project
|
|
68
69
|
- mifiel.gemspec
|
|
69
70
|
- mise.toml
|
|
@@ -96,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
97
|
- !ruby/object:Gem::Version
|
|
97
98
|
version: '0'
|
|
98
99
|
requirements: []
|
|
99
|
-
rubygems_version: 4.0.
|
|
100
|
+
rubygems_version: 4.0.20
|
|
100
101
|
specification_version: 4
|
|
101
102
|
summary: Ruby SDK for mifiel.com.
|
|
102
103
|
test_files: []
|