moyasar 0.3.2 → 0.3.3

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: 298526f8718185cb92cb8dc021a640517dff47e0
4
- data.tar.gz: aa1a54fbd0e53f3fc1e4bede00fe9735b546d9fa
3
+ metadata.gz: 4a5825f485b6b9d2481d6ef791902733a96a3d60
4
+ data.tar.gz: d64a15c3921af39ae8e7bb65a7cee68f305331ec
5
5
  SHA512:
6
- metadata.gz: ebed6503b83367cdc136477df4112e0fb61dda42f1949c3fefe6f8145555a855e50bbaa4c09bb16d87555375a1a988f0b820dbc1657513d321293bb6ff8e655a
7
- data.tar.gz: d6a9322eb522eebd2383facbf5d206856bd824f6c4073deba97d0a1c0b468d59119a2d98d5ee172b471c02c86904c97098530a3c6709a3b174047e8217b0d2ab
6
+ metadata.gz: 7c5e7ba63511d5d241ed63eef52bc2762399950a56a7b0b4bc40d886d9b7fd56b716e5570462c3dcb8acf79681b096d6a376c953a69e34327ab70d0f6bc85c81
7
+ data.tar.gz: 69894a759921515c9567cef3f566080887d50247644bf728206e487ded1eefe3cded12f0ddd8caf8ee3b470aab43a055a4de2978a49bc2544d76c8baf17cd0c2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- moyasar (0.3.2)
4
+ moyasar (0.3.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -35,11 +35,11 @@ Moyasar.api_key = "sk_test_..."
35
35
  # list payments
36
36
  Moyasar::Payment.list()
37
37
 
38
- # fetch single charge
38
+ # fetch single payment
39
39
  Moyasar::Payment.fetch("760878ec-d1d3-5f72-9056-191683f55872")
40
40
 
41
41
  # create an invoice
42
- Moyasar::Invoice.create({amount: 2500, description: "Monthly subscription"})
42
+ Moyasar::Invoice.create(amount: 2500, currency: 'SAR', description: 'Monthly subscription')
43
43
  ```
44
44
 
45
45
  ## Development
@@ -48,6 +48,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
48
48
 
49
49
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
50
50
 
51
+
51
52
  ## Contributing
52
53
 
53
54
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/moyasar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
@@ -11,6 +11,7 @@ module Moyasar
11
11
  end
12
12
 
13
13
  module InstanceMethods
14
+
14
15
  def update(attrs = {})
15
16
  response = request(:put, update_url(id), params: attrs)
16
17
 
@@ -7,10 +7,5 @@ module Moyasar
7
7
  @http_code = attrs['code']
8
8
  super(attrs['message'])
9
9
  end
10
-
11
- def to_s
12
- status_string = @http_code.nil? ? "" : "(Status #{@http_code}) "
13
- "#{status_string}#{@message}"
14
- end
15
10
  end
16
11
  end
@@ -2,6 +2,5 @@ module Moyasar
2
2
  class Invoice < Resource
3
3
  attr_reader :id, :status, :created_at, :modified_at
4
4
  attr_accessor :description, :amount, :currency
5
-
6
5
  end
7
6
  end
@@ -1,3 +1,3 @@
1
1
  module Moyasar
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moyasar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdulaziz AlShetwi