checkout_sdk 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: bba173b4cd357fc0413c4a464572237123622e7fc14f67f0808d4391570ea530
4
- data.tar.gz: 238febcf16b81bc9d2bbc989081396fb3ff0126e00bc94b94c7c450fb13cd5f9
3
+ metadata.gz: 75baa606a4ecfc3ffbf1bade0c9b0c486dac075d7c300eb1c6d8a4a38aac852f
4
+ data.tar.gz: 83d0eac9ca0a6917764f17810e368a43493ae3d5caa0cec5e81ab03fa1417e21
5
5
  SHA512:
6
- metadata.gz: 64992def6eef9f6d839b7716e27f9d77cca12750bc30745eca5572bb39509cdff3141636c59c1461edd83407528ea07e16540a378fdd115894205f62b956ce9e
7
- data.tar.gz: f420dc2e38b57ff7e38f0eff734e3e3fe369b74116d671e77b31c5f39575cee016f8550b6342dffaa5bd61183ee045630e6e1fe950a2088b445c727bc7db8edc
6
+ metadata.gz: d7d385205bf6bb151f199e68c0a7dec74a3c7857d4c5556194a747b82909c68950a3d77a817eac253b4dea620cf6527a4d8a7fb092859bcf8daf1fa185941b66
7
+ data.tar.gz: 06502a2bee8cc90d2114c4da9bdc17b0ba8fae953f9c7f0e2779c703137e6af6f6512186b8a8414ea8af60b8a703a7defe432e8578d615268f1917e86377a3fb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- checkout (0.1.0)
4
+ checkout_sdk (0.1.0)
5
5
  excon
6
6
 
7
7
  GEM
@@ -34,7 +34,7 @@ PLATFORMS
34
34
 
35
35
  DEPENDENCIES
36
36
  bundler (~> 1.16)
37
- checkout!
37
+ checkout_sdk!
38
38
  pry
39
39
  rake (~> 10.0)
40
40
  rspec (~> 3.0)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Checkout
1
+ # CheckoutSdk
2
2
 
3
- You are reading documentation for version: 0.1.0
3
+ You are reading documentation for version: 0.1.1
4
4
 
5
5
  ## Installation
6
6
 
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
  API keys must be configured in the gem setup. You can do this anywhere in your application before you make API calls using the gem.
24
24
 
25
25
  ```ruby
26
- Checkout.configure do |config|
26
+ CheckoutSdk.configure do |config|
27
27
  config.secret_key = ENV['SECRET_KEY']
28
28
  config.public_key = ENV['PUBLIC_KEY']
29
29
  config.base_url = ENV['BASE_URL']
@@ -33,7 +33,7 @@ end
33
33
  ## Usage
34
34
 
35
35
  ```ruby
36
- p = Checkout::PaymentRequestSource.new
36
+ p = CheckoutSdk::PaymentRequestSource.new
37
37
  p.type = "card"
38
38
  p.card_number = "4242424242424242"
39
39
  p.card_expiry_month = 6
@@ -52,9 +52,9 @@ p.recipient_last_name = "Elmo"
52
52
  p.risk_enabled = true
53
53
  p.billing_descriptor_name = "Nancy"
54
54
  p.billing_descriptor_city = "Berlin"
55
- p.processing_mid = "Checkout"
55
+ p.processing_mid = "CheckoutSdk"
56
56
 
57
- r = Checkout::ApiResource.new
57
+ r = CheckoutSdk::ApiResource.new
58
58
  r.request_payments(p)
59
59
  ```
60
60
 
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "checkout"
4
+ require "checkout_sdk"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
data/checkout.gemspec CHANGED
@@ -1,10 +1,10 @@
1
1
  lib = File.expand_path("../lib", __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "checkout/version"
3
+ require "checkout_sdk/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "checkout_sdk"
7
- spec.version = Checkout::VERSION
7
+ spec.version = CheckoutSdk::VERSION
8
8
  spec.authors = ["Khalid Jazaerly"]
9
9
  spec.email = ["khalid.jaz@gmail.com"]
10
10
 
@@ -1,9 +1,9 @@
1
- require "checkout/configuration"
2
- require "checkout/api_resource"
3
- require "checkout/data/capture_payment"
4
- require "checkout/data/payment_request_source"
1
+ require "checkout_sdk/configuration"
2
+ require "checkout_sdk/api_resource"
3
+ require "checkout_sdk/data/capture_payment"
4
+ require "checkout_sdk/data/payment_request_source"
5
5
 
6
- module Checkout
6
+ module CheckoutSdk
7
7
  class << self
8
8
  attr_accessor :configuration
9
9
  end
@@ -1,10 +1,10 @@
1
1
  require "excon"
2
2
 
3
- class Checkout::ApiResource
3
+ class CheckoutSdk::ApiResource
4
4
  attr_reader :checkout_connection
5
5
 
6
6
  def initialize
7
- @checkout_connection = Excon.new("#{Checkout.configuration.base_url}", persistent: true)
7
+ @checkout_connection = Excon.new("#{CheckoutSdk.configuration.base_url}", persistent: true)
8
8
  end
9
9
 
10
10
  def request_payments(data_object)
@@ -46,14 +46,14 @@ class Checkout::ApiResource
46
46
  path: path,
47
47
  body: data_object.to_json,
48
48
  headers: { "Content-Type" => "application/json",
49
- "Authorization" => "#{Checkout.configuration.secret_key}" }
49
+ "Authorization" => "#{CheckoutSdk.configuration.secret_key}" }
50
50
  )
51
51
  end
52
52
 
53
53
  def get(path)
54
54
  checkout_connection.get(
55
55
  path: path,
56
- headers: { "Authorization" => "#{Checkout.configuration.secret_key}" }
56
+ headers: { "Authorization" => "#{CheckoutSdk.configuration.secret_key}" }
57
57
  )
58
58
  end
59
59
  end
@@ -1,4 +1,4 @@
1
- class Checkout::Configuration
1
+ class CheckoutSdk::Configuration
2
2
  attr_accessor :secret_key, :public_key, :base_url
3
3
 
4
4
  def initialize
@@ -1,4 +1,4 @@
1
- class Checkout::CapturePayment
1
+ class CheckoutSdk::CapturePayment
2
2
  attr_accessor :id, :amount, :reference, :metadata
3
3
 
4
4
  def data
@@ -1,4 +1,4 @@
1
- class Checkout::PaymentRequestSource
1
+ class CheckoutSdk::PaymentRequestSource
2
2
  attr_accessor :type, :token, :billing_address_line1, :billing_address_line2, :billing_city, :billing_state,
3
3
  :billing_zip, :billing_country, :phone_country_code, :phone_number, :amount,
4
4
  :currency, :payment_type, :reference, :description, :capture, :capture_on, :customer_id,
@@ -1,4 +1,4 @@
1
- class Checkout::PaymentSource
1
+ class CheckoutSdk::PaymentSource
2
2
  attr_accessor :type, :reference, :billing_address_line1, :billing_address_line2,
3
3
  :billing_city, :billing_state, :billing_zip, :billing_country,
4
4
  :phone_country_code, :phone_number, :customer_id,
@@ -1,4 +1,4 @@
1
- class Checkout::RefundPayment
1
+ class CheckoutSdk::RefundPayment
2
2
  attr_accessor :id, :amount, :reference, :metadata
3
3
 
4
4
  def data
@@ -1,4 +1,4 @@
1
- class Checkout::RequestToken
1
+ class CheckoutSdk::RequestToken
2
2
  attr_accessor :type, :token_data_version, :token_data_data, :token_data_signature,
3
3
  :token_data_header, :token_data_signature, :token_data_protocolVersion,
4
4
  :token_data_signedMessage, :card_number, :card_expiry_month, :card_expiry_year,
@@ -1,4 +1,4 @@
1
- class Checkout::VoidPayment
1
+ class CheckoutSdk::VoidPayment
2
2
  attr_accessor :id, :reference, :metadata
3
3
 
4
4
  def data
@@ -0,0 +1,3 @@
1
+ module CheckoutSdk
2
+ VERSION = "0.1.1"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khalid Jazaerly
@@ -97,16 +97,16 @@ files:
97
97
  - bin/console
98
98
  - bin/setup
99
99
  - checkout.gemspec
100
- - lib/checkout.rb
101
- - lib/checkout/api_resource.rb
102
- - lib/checkout/configuration.rb
103
- - lib/checkout/data/capture_payment.rb
104
- - lib/checkout/data/payment_request_source.rb
105
- - lib/checkout/data/payment_source.rb
106
- - lib/checkout/data/refund_payment.rb
107
- - lib/checkout/data/request_token.rb
108
- - lib/checkout/data/void_payment.rb
109
- - lib/checkout/version.rb
100
+ - lib/checkout_sdk.rb
101
+ - lib/checkout_sdk/api_resource.rb
102
+ - lib/checkout_sdk/configuration.rb
103
+ - lib/checkout_sdk/data/capture_payment.rb
104
+ - lib/checkout_sdk/data/payment_request_source.rb
105
+ - lib/checkout_sdk/data/payment_source.rb
106
+ - lib/checkout_sdk/data/refund_payment.rb
107
+ - lib/checkout_sdk/data/request_token.rb
108
+ - lib/checkout_sdk/data/void_payment.rb
109
+ - lib/checkout_sdk/version.rb
110
110
  homepage: http://checkout.com
111
111
  licenses: []
112
112
  metadata: {}
@@ -1,3 +0,0 @@
1
- module Checkout
2
- VERSION = "0.1.0"
3
- end