alpha_card 0.2.3 → 0.2.4

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: 4c5e5fb8c704ad1100003d8eb8023a7adf9c782d
4
- data.tar.gz: 8207975985e90e9287e360eccda6ffdc649a0cba
3
+ metadata.gz: 36744d2c2e89bb5acb72ae8da81b9a5c684e5d2d
4
+ data.tar.gz: 1b402affc8aa94c7f20ea1895f2744c265d48296
5
5
  SHA512:
6
- metadata.gz: 6eb401a030e241fa9345168a1efe3dbcfdb26b1a3a4a8cb490bc6d94013cfdfc22ff029e753bdcc1e7e6854b57a6a0afd91c6263a4644a7c30da437c2f1ff5ab
7
- data.tar.gz: 63c3e4f5fa8936433ad872e45e652357f4c773f8b3a003eb9dc75abcc2edf7f59e078fee5e0df6e62c5691d7651c212171d4638b4ca66f5db7c35fea11c6ed3c
6
+ metadata.gz: 15f2fe0c1206ff43f976ab80564944aad992e70fc61e4e7cabac1fccbe05f3afe08c1cbf4e8375bbf44bedf328b007e7528bf674e10e730f28ebb605acf9e700
7
+ data.tar.gz: 60d5b8edd45ede8faed993f8aaaf99d335349d71803b9c519b41861d50318f99690e9151ee8248dbcea727f7ae68fe2b0ecdbb408c86e8ecbb244071925648e1
data/.travis.yml CHANGED
@@ -6,6 +6,9 @@ rvm:
6
6
  - 1.9.3
7
7
  - 2.0.0
8
8
  - 2.1.0
9
+ - 2.1.1
10
+ - 2.1.2
11
+ - 2.1.5
9
12
  - jruby-19mode
10
13
  - ruby-head
11
14
  matrix:
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ruby lib for creating payments with AlphaCard DirectPost API
1
+ # Ruby lib for creating payments with Alpha Card Services
2
2
  [![Gem Version](https://badge.fury.io/rb/alpha_card.svg)](http://badge.fury.io/rb/alpha_card)
3
3
  [![Dependency Status](https://gemnasium.com/budev/alpha_card.png)](https://gemnasium.com/budev/alpha_card)
4
4
  [![Code Climate](https://codeclimate.com/github/budev/alpha_card.png)](https://codeclimate.com/github/budev/alpha_card)
@@ -38,15 +38,13 @@ gem install alpha_card
38
38
  Dependencies required:
39
39
 
40
40
  * ruby >= 1.9.3;
41
- * rest_client;
42
- * virtus (for nice OOP objects of AlphaCard).
43
41
 
44
42
 
45
43
  ## Alpha Card Objects
46
44
 
47
- Alpha Card sales operates with next 5 objects:
45
+ Alpha Card operates with next 5 objects:
48
46
 
49
- * Account
47
+ * Account (represent your Alpha Card credentials)
50
48
  * Order
51
49
  - Billing
52
50
  - Shipping
@@ -178,15 +176,13 @@ require 'alpha_card'
178
176
  def create_payment
179
177
  account = AlphaCard::Account.new('demo', 'password')
180
178
 
181
- billing = AlphaCard::Billing.new({email: 'test@example.com', phone: '+801311313111'})
182
- shipping = AlphaCard::Shipping.new({address_1: '33 N str', city: 'New York', state: 'NY', zip_code: '132'})
179
+ billing = AlphaCard::Billing.new({ email: 'test@example.com', phone: '+801311313111' })
180
+ shipping = AlphaCard::Shipping.new({ address_1: '33 N str', city: 'New York', state: 'NY', zip_code: '132' })
183
181
 
184
- order = AlphaCard::Order.new({orderid: 1, orderdescription: 'Test order'})
185
- order.billing = billing
186
- order.shipping = shipping
182
+ order = AlphaCard::Order.new({ orderid: 1, orderdescription: 'Test order' })
187
183
 
188
184
  # Format of amount: "XX.XX" ("%.2f" % Float)
189
- sale = AlphaCard::Sale.new({ccexp: '0117', ccnumber: '4111111111111111', amount: "1.50", cvv: '123'})
185
+ sale = AlphaCard::Sale.new({ ccexp: '0117', ccnumber: '4111111111111111', amount: "1.50", cvv: '123' })
190
186
  sale.create(order, account)
191
187
  rescue AlphaCard::AlphaCardError => e
192
188
  puts e.message
data/alpha_card.gemspec CHANGED
@@ -6,13 +6,13 @@ Gem::Specification.new do |gem|
6
6
  gem.name = 'alpha_card'
7
7
  gem.version = AlphaCard::VERSION
8
8
  gem.date = '2014-07-24'
9
- gem.summary = 'Alpha Card Services DirectPost API for Ruby'
10
- gem.description = 'Gem for creating sales with Alpha Card Services DirectPost API'
9
+ gem.summary = 'Alpha Card Services API for Ruby'
10
+ gem.description = 'Gem for creating sales with Alpha Card Services'
11
11
  gem.authors = ['Nikita Bulaj']
12
12
  gem.email = 'bulajnikita@gmail.com'
13
13
  gem.require_paths = ['lib']
14
14
  gem.files = `git ls-files`.split($RS)
15
- gem.homepage = 'http://github.com/budev/alpha_card'
15
+ gem.homepage = 'http://github.com/nbulaj/alpha_card'
16
16
  gem.license = 'MIT'
17
17
  gem.required_ruby_version = '>= 1.9.3'
18
18
 
data/lib/alpha_card.rb CHANGED
@@ -15,11 +15,11 @@ require 'alpha_card/errors/alpha_card_error'
15
15
  require 'alpha_card/errors/api_connection_error'
16
16
 
17
17
  # Alpha Card Resources
18
- require 'alpha_card/account'
19
- require 'alpha_card/shipping'
20
- require 'alpha_card/billing'
21
- require 'alpha_card/order'
22
- require 'alpha_card/sale'
18
+ require 'alpha_card/objects/account'
19
+ require 'alpha_card/objects/shipping'
20
+ require 'alpha_card/objects/billing'
21
+ require 'alpha_card/objects/order'
22
+ require 'alpha_card/objects/sale'
23
23
 
24
24
  ##
25
25
  # AlphaCard is a library for processing payments with Alpha Card Services, Inc.
@@ -32,7 +32,7 @@ module AlphaCard
32
32
  # Global Payment Systems (NDC) Credit Card Authorization Codes
33
33
  #
34
34
  # @see http://floristwiki.ftdi.com/images/c/ce/Appendix_A_-_Credit_Card_Authorization_Codes.pdf Credit Card Authorization Codes
35
- CREDIT_CARD_CODES ||= YAML.load_file(File.expand_path('../alpha_card/data/credit_card_codes.yml', __FILE__))
35
+ CREDIT_CARD_CODES = YAML.load_file(File.expand_path('../alpha_card/data/credit_card_codes.yml', __FILE__))
36
36
 
37
37
  class << self
38
38
  # @return [String] Alpha Card Gateway DirectPost API URL.
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  module AlphaCard
2
2
  ##
3
3
  # Version information for AlphaCard gem.
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_card
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Bulaj
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3'
55
- description: Gem for creating sales with Alpha Card Services DirectPost API
55
+ description: Gem for creating sales with Alpha Card Services
56
56
  email: bulajnikita@gmail.com
57
57
  executables: []
58
58
  extensions: []
@@ -67,16 +67,16 @@ files:
67
67
  - Rakefile
68
68
  - alpha_card.gemspec
69
69
  - lib/alpha_card.rb
70
- - lib/alpha_card/account.rb
71
70
  - lib/alpha_card/alpha_card_object.rb
72
71
  - lib/alpha_card/alpha_card_response.rb
73
- - lib/alpha_card/billing.rb
74
72
  - lib/alpha_card/data/credit_card_codes.yml
75
73
  - lib/alpha_card/errors/alpha_card_error.rb
76
74
  - lib/alpha_card/errors/api_connection_error.rb
77
- - lib/alpha_card/order.rb
78
- - lib/alpha_card/sale.rb
79
- - lib/alpha_card/shipping.rb
75
+ - lib/alpha_card/objects/account.rb
76
+ - lib/alpha_card/objects/billing.rb
77
+ - lib/alpha_card/objects/order.rb
78
+ - lib/alpha_card/objects/sale.rb
79
+ - lib/alpha_card/objects/shipping.rb
80
80
  - lib/alpha_card/utils.rb
81
81
  - lib/alpha_card/version.rb
82
82
  - spec/alpha_card/alpha_card_account_spec.rb
@@ -84,7 +84,7 @@ files:
84
84
  - spec/alpha_card/alpha_card_spec.rb
85
85
  - spec/alpha_card/alpha_card_utils_spec.rb
86
86
  - spec/spec_helper.rb
87
- homepage: http://github.com/budev/alpha_card
87
+ homepage: http://github.com/nbulaj/alpha_card
88
88
  licenses:
89
89
  - MIT
90
90
  metadata: {}
@@ -104,9 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.2.2
107
+ rubygems_version: 2.4.3
108
108
  signing_key:
109
109
  specification_version: 4
110
- summary: Alpha Card Services DirectPost API for Ruby
110
+ summary: Alpha Card Services API for Ruby
111
111
  test_files: []
112
- has_rdoc: