cashbox 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0955e9b8aab603a2da0c602badf1c28b09a1f8a
4
- data.tar.gz: 1f28d48459db5ed5d3eab460563a7241819ad03c
3
+ metadata.gz: 8f0879313903596e6629faa4f5607e7b58289106
4
+ data.tar.gz: 766a69dd38f48d203e59d337ab0c6427c0fc1a8c
5
5
  SHA512:
6
- metadata.gz: d346d2981196462ede642d786570daf1d7612b9acd8e792b2cd4452cf3b40720d8d4828e2d002913e61a807c70e9aa214010da98a18a0a91da74a2077fd3557f
7
- data.tar.gz: 2b6bddb7ed66217ed60c480b264f050f48f36ab8b2d22514a2d960608b781477332f4341bc35c89e3468f28c226674822c6216ae333ef14dd201511f7bccc33f
6
+ metadata.gz: 92cb3dfe241b58bd704f58c04db19d25c8a6ed3769cb33ca70ce94a315ea66a534d7afff83d8849e85e3bafd767f5dcd631a01ce96f329b39eaf04f703c18f15
7
+ data.tar.gz: 5ebdd359fc3cf4e7fdc84f13c4b49ca47331bfbca93538b9b459e092230ba6dc25d6c7064c9e6475d1f363b278ae6b65226a72f676106aef896ef8b94eb74b49
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.25)
4
+ cashbox (0.0.26)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -84,4 +84,4 @@ DEPENDENCIES
84
84
  webmock (~> 2.0)
85
85
 
86
86
  BUNDLED WITH
87
- 1.16.2
87
+ 1.16.5
data/cashbox-0.0.7.gem ADDED
Binary file
@@ -2,6 +2,7 @@ module Cashbox
2
2
  class Account < Model
3
3
  include Concern::Objectable
4
4
  include Rest::ReadWrite
5
+ include Rest::UpdatePayment
5
6
 
6
7
  property :id
7
8
  property :vid
@@ -0,0 +1,24 @@
1
+ require 'active_support/concern'
2
+
3
+ module Cashbox::Rest
4
+ module UpdatePayment
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ include Cashbox::Rest::Helpers
9
+
10
+ def update_payment(payment_method)
11
+ request = Cashbox::Request.new(:post, "#{route(self.vid)}?update_behavior=CatchUp&replace_on_all_subscriptions=0&ignore_avs=0&ignore_cvn=0", {
12
+ body: {
13
+ id: self.vid,
14
+ payment_methods: {
15
+ object: "List",
16
+ data: [payment_method]
17
+ }
18
+ }.to_json
19
+ })
20
+ self.class.cast(self, request.response)
21
+ end
22
+ end
23
+ end
24
+ end
data/lib/cashbox/rest.rb CHANGED
@@ -10,5 +10,6 @@ module Cashbox::Rest
10
10
  autoload :Helpers
11
11
  autoload :ReadWrite
12
12
  autoload :Refund
13
+ autoload :UpdatePayment
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.25"
2
+ VERSION = "0.0.26"
3
3
  end
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.25
4
+ version: 0.0.26
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-09-20 00:00:00.000000000 Z
11
+ date: 2018-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -167,6 +167,7 @@ files:
167
167
  - LICENSE.txt
168
168
  - README.md
169
169
  - Rakefile
170
+ - cashbox-0.0.7.gem
170
171
  - cashbox.gemspec
171
172
  - codeship-services.yml
172
173
  - codeship-steps.yml
@@ -207,6 +208,7 @@ files:
207
208
  - lib/cashbox/rest/helpers.rb
208
209
  - lib/cashbox/rest/read_write.rb
209
210
  - lib/cashbox/rest/refund.rb
211
+ - lib/cashbox/rest/update_payment.rb
210
212
  - lib/cashbox/type.rb
211
213
  - lib/cashbox/version.rb
212
214
  homepage: https://github.com/legalshield/cashbox