unlock_gateway 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: f5d850aa0d3ed3fd0b0bf454f3201145e58371c8
4
- data.tar.gz: 40b6558504281e14ac326f9e251a1d3139454ff5
3
+ metadata.gz: 5a899941b45bf6475771f02b67696673e27a90e8
4
+ data.tar.gz: 31b1d3c340898adf93489c7abd8c5749e0022de3
5
5
  SHA512:
6
- metadata.gz: 02e7cf6b6c41b3d84baf1b4f5eabf9ae3aba78884228f518b6207bc912f29379fb5d72ba62ea2293528e21ec0c7b3bfd45e6f0b1712a1de6148d94fd6f04a508
7
- data.tar.gz: b48cb6232a14b6b5e026e3d0db793713399174c803dcab471a9ec16816acf1ab5b572f9c08eac13732bb1b86a1e619f3e13c52b44f2b0395cca9d944ba6f66f3
6
+ metadata.gz: ddfc78a147f2c1078fe116a5adaa9ee8cc03ab40b128f526a2b7b37f747c9451270b6afa187789163c61161bd914b11508b76230d3e532e9daba1caab82c944e
7
+ data.tar.gz: f6723e0bdefb4c895e139ab6f8725b2af92e123ad3ca7c91ddc6e4ba932ed6f54e5ac158cc537cb6d18c30b05edc70de7665dc62260534c1aa6f9d3a8b5704a6
@@ -1,10 +1,14 @@
1
1
  module UnlockGateway
2
2
  module Models
3
+
4
+ # This module will be included in Unlock's Contribution model. All methods will run in the context of an instance of Contribution model.
3
5
  module Contribution
4
6
 
7
+ # This method should implement a way to check the state of the subscription with the gateway and update the contribution's state according to it's real state within the gateway.
5
8
  def update_state_from_gateway!
6
9
  end
7
10
 
8
11
  end
12
+
9
13
  end
10
14
  end
@@ -1,28 +1,37 @@
1
1
  module UnlockGateway
2
2
  module Models
3
+
4
+ # This module will be included in Unlock's Gateway model. All methods will run in the context of an instance of Gateway model.
3
5
  module Gateway
4
6
 
7
+ # This method should return the name of the payment gateway to be displayed in Unlock's gateways configurations.
5
8
  def name
6
9
  self.module_name
7
10
  end
8
11
 
12
+ # This method should return the description of the payment gateway to be displayed in Unlock's gateways configurations.
9
13
  def description
10
14
  end
11
15
 
16
+ # This method should return the image PATH of the payment gateway to be displayed in Unlock's gateways configurations, such as 'my_gateway/logo.png'.
12
17
  def image
13
18
  end
14
19
 
20
+ # This method should return the path for the routes generated by the gateway, such as '/my_gateway'.
15
21
  def path
16
22
  end
17
23
 
24
+ # This method should return true if the gateway has a sandbox alternative and false if not.
18
25
  def has_sandbox?
19
26
  true
20
27
  end
21
28
 
29
+ # This method should return an Array of UnlockGateway::Setting that will be displayed when configuring the gateway's settings. Here is the place for API keys, etc.
22
30
  def available_settings
23
31
  []
24
32
  end
25
33
 
26
34
  end
35
+
27
36
  end
28
37
  end
@@ -1,3 +1,3 @@
1
1
  module UnlockGateway
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unlock_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Weinmann