ravelin 0.1.33 → 0.1.34

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: 1e21817ff2cec66a582b1e4fbe3123cfa3f58e0d6645d05eb71b93c1d9079cad
4
- data.tar.gz: be656f247d59729f0c82332ce6dc133ecaa680d609cac7d0c14c6e54e2403a97
3
+ metadata.gz: 4a9f40b6308fcc73d7fdf88845254973b6c09eca4b8deac74b8885c6db755067
4
+ data.tar.gz: 23f8ce1a7e4d2c9398b569be342260e1fb9d1520a822fe8fc1f835cb9ab86542
5
5
  SHA512:
6
- metadata.gz: 1c362ba755c944f70105ab188e407af5daf085b3292a21454438408aed3954e071f1d79d6ac8f3ddbda13c67b4547771813545ebdb51a5cb7d4e1b94aa1bf382
7
- data.tar.gz: c751c7d82c51b62378d01f429a3af52be9067ba8e354384a186273522589813b2f6cb8b9e7cc14a519ad0a63972eef4d5bcc00a3e0428c5bc1ea45e7b37484ea
6
+ metadata.gz: 8273aaf40a22a7f95099851824e1d03b943523bac0b8d8ed55a6a7110134bed0442d73abaa9b72bfb92e27573c1610d577520ffa4cc08ffe3d38ca6989194bda
7
+ data.tar.gz: c01bdce148538af7ab80a21b2d2498305b9c0b78ceaac336f82d6b359afa26e28bbd95d9df13f119d2a32faa0882d881976d2300655be4da90f9487da1244cfc
@@ -23,6 +23,7 @@ require 'ravelin/item'
23
23
  require 'ravelin/location'
24
24
  require 'ravelin/login'
25
25
  require 'ravelin/order'
26
+ require 'ravelin/app'
26
27
  require 'ravelin/payment_method'
27
28
  require 'ravelin/password'
28
29
  require 'ravelin/pre_transaction'
@@ -0,0 +1,27 @@
1
+ module Ravelin
2
+ class App < RavelinObject
3
+ attr_accessor :name, :platform, :domain
4
+
5
+ PLATFORM_IOS = 'ios'
6
+ PLATFORM_ANDROID = 'android'
7
+ PLATFORM_WEB = 'web'
8
+ PLATFORM_MOBILE_WEB = 'mobile-web'
9
+ PLATFORM_VALUES = [PLATFORM_IOS, PLATFORM_ANDROID, PLATFORM_WEB, PLATFORM_MOBILE_WEB]
10
+
11
+ def validate
12
+ super
13
+
14
+ raise ArgumentError, "Platform value be one of #{PLATFORM_VALUES.join(', ')}" unless App.valid_platform?(platform)
15
+ raise ArgumentError, 'Domain is not valid' unless App.valid_domain?(domain)
16
+ end
17
+
18
+ def self.valid_platform?(platform)
19
+ platform.nil? || PLATFORM_VALUES.include?(platform)
20
+ end
21
+
22
+ def self.valid_domain?(domain)
23
+ domain.nil? || /^[a-z0-9\-\\.]+$/.match(domain)
24
+ end
25
+
26
+ end
27
+ end
@@ -13,7 +13,8 @@ module Ravelin
13
13
  :custom,
14
14
  :creation_time,
15
15
  :execution_time,
16
- :status
16
+ :status,
17
+ :app
17
18
 
18
19
  attr_required :order_id
19
20
 
@@ -30,5 +31,9 @@ module Ravelin
30
31
  def to=(obj)
31
32
  @to = Ravelin::Location.new(obj)
32
33
  end
34
+
35
+ def app=(obj)
36
+ @app = Ravelin::App.new(obj)
37
+ end
33
38
  end
34
39
  end
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = '0.1.33'
2
+ VERSION = '0.1.34'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ravelin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.33
4
+ version: 0.1.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Levy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2020-11-19 00:00:00.000000000 Z
14
+ date: 2020-12-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
@@ -108,6 +108,7 @@ extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
110
  - lib/ravelin.rb
111
+ - lib/ravelin/app.rb
111
112
  - lib/ravelin/ato_login.rb
112
113
  - lib/ravelin/ato_reclaim.rb
113
114
  - lib/ravelin/authentication_mechanism.rb