cashbox 0.0.17 → 0.0.18
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/Gemfile.lock +1 -1
- data/lib/cashbox.rb +1 -0
- data/lib/cashbox/model/refund.rb +18 -0
- data/lib/cashbox/model/transaction.rb +1 -0
- data/lib/cashbox/request.rb +1 -1
- data/lib/cashbox/rest.rb +1 -0
- data/lib/cashbox/rest/refund.rb +16 -0
- data/lib/cashbox/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47a735087da637425a37c57f9388e45cd746a103
|
4
|
+
data.tar.gz: 3103c5ca7d9f5f796a6d1ac02809002704cd7761
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7d3cc94cc631fd4b2257a5f33d7f76b4b56afc935584f1fe9fde098b2812a213e1a42d2a4f819fcb93950458c54a98191d7b2a4ee2103c49c5a83bb6ab45395
|
7
|
+
data.tar.gz: 31abd4be4c2fc8b3d908d692718af698975050ada11a69c84016117515cfc5740b95730b0937add2bfa689c08a28a3d5981b19a154d1e2280360ab896b600843
|
data/Gemfile.lock
CHANGED
data/lib/cashbox.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Cashbox
|
2
|
+
class Refund < Model
|
3
|
+
include Concern::Objectable
|
4
|
+
include Rest::ReadWrite
|
5
|
+
include Rest::Refund
|
6
|
+
|
7
|
+
property :id
|
8
|
+
property :vid
|
9
|
+
property :created, coerce: Cashbox::Type.DateTime
|
10
|
+
property :transaction, coerce: Cashbox::Transaction
|
11
|
+
property :refund_distribution_strategy
|
12
|
+
property :amount
|
13
|
+
property :amount_includes_tax, coerce: Cashbox::Type.Boolean
|
14
|
+
property :currency
|
15
|
+
property :token_action
|
16
|
+
property :status
|
17
|
+
end
|
18
|
+
end
|
data/lib/cashbox/request.rb
CHANGED
data/lib/cashbox/rest.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
3
|
+
module Cashbox::Rest
|
4
|
+
module Refund
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
include Cashbox::Rest::Helpers
|
9
|
+
|
10
|
+
def refund
|
11
|
+
request = Cashbox::Request.new(:post, "#{route(self.vid)}/refunds")
|
12
|
+
self.class.cast(Cashbox::Refund.new, request.response)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/cashbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cashbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathon Storer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -191,6 +191,7 @@ files:
|
|
191
191
|
- lib/cashbox/model/product.rb
|
192
192
|
- lib/cashbox/model/product_description.rb
|
193
193
|
- lib/cashbox/model/product_price.rb
|
194
|
+
- lib/cashbox/model/refund.rb
|
194
195
|
- lib/cashbox/model/subscription.rb
|
195
196
|
- lib/cashbox/model/subscription_item.rb
|
196
197
|
- lib/cashbox/model/transaction.rb
|
@@ -204,6 +205,7 @@ files:
|
|
204
205
|
- lib/cashbox/rest/disentitle.rb
|
205
206
|
- lib/cashbox/rest/helpers.rb
|
206
207
|
- lib/cashbox/rest/read_write.rb
|
208
|
+
- lib/cashbox/rest/refund.rb
|
207
209
|
- lib/cashbox/type.rb
|
208
210
|
- lib/cashbox/version.rb
|
209
211
|
homepage: https://github.com/legalshield/cashbox
|