simplify 1.2.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/simplify/tax.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013, 2014 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2016 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -83,9 +83,9 @@ class Tax < Hash
83
83
 
84
84
  # Retrieve Tax objects.
85
85
  # criteria:: a hash of parameters; valid keys are:
86
- # * <code>filter</code> Filters to apply to the list.
87
- # * <code>max</code> Allows up to a max of 50 list items to return. [max value: 50, default: 20]
88
- # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [default: 0]
86
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the Id of the tax</td></tr><tr><td>filter.label</td><td>Filter by the label(name) of the tax</td></tr></table>
87
+ # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
88
+ # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
89
89
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> id</code><code> label</code>.
90
90
  # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
91
91
  # Returns an object where the <code>list</code> property contains the list of Tax objects and the <code>total</code>
@@ -0,0 +1,128 @@
1
+ #
2
+ # Copyright (c) 2013 - 2016 MasterCard International Incorporated
3
+ # All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without modification, are
6
+ # permitted provided that the following conditions are met:
7
+ #
8
+ # Redistributions of source code must retain the above copyright notice, this list of
9
+ # conditions and the following disclaimer.
10
+ # Redistributions in binary form must reproduce the above copyright notice, this list of
11
+ # conditions and the following disclaimer in the documentation and/or other materials
12
+ # provided with the distribution.
13
+ # Neither the name of the MasterCard International Incorporated nor the names of its
14
+ # contributors may be used to endorse or promote products derived from this software
15
+ # without specific prior written permission.
16
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
17
+ # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
+ # SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
+ # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22
+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
+ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
+ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
+ # SUCH DAMAGE.
26
+ #
27
+
28
+ require 'simplify/paymentsapi'
29
+
30
+ module Simplify
31
+
32
+ # A TransactionReview object.
33
+ #
34
+ class TransactionReview < Hash
35
+
36
+ # Authentication object used to access the API (See Simplify::Authentication for details)
37
+ attr_accessor :authentication
38
+
39
+ # Returns the public key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
40
+ def public_key
41
+ return self.authentication.public_key
42
+ end
43
+
44
+ # Sets the public key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
45
+ def public_key=(k)
46
+ return self.authentication.public_key = k
47
+ end
48
+
49
+ # Returns the private key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
50
+ def private_key
51
+ return self.authentication.private_key
52
+ end
53
+
54
+ # Sets the private key used when accessing this object. <b>Deprecated: please use 'authentication' instead.</b>
55
+ def private_key=(k)
56
+ return self.authentication.private_key = k
57
+ end
58
+
59
+
60
+ # Creates an TransactionReview object
61
+ #
62
+ # parms:: a hash of parameters; valid keys are:
63
+ # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
64
+ # Returns a TransactionReview object.
65
+ def self.create(parms, *auth)
66
+
67
+ auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
68
+ h = Simplify::PaymentsApi.execute("transactionReview", 'create', parms, auth_obj)
69
+ obj = TransactionReview.new()
70
+ obj.authentication = auth_obj
71
+ obj = obj.merge!(h)
72
+ obj
73
+ end
74
+
75
+ # Delete this object
76
+ def delete()
77
+ h = Simplify::PaymentsApi.execute("transactionReview", 'delete', self, self.authentication)
78
+ self.merge!(h)
79
+ self
80
+ end
81
+
82
+ # Retrieve TransactionReview objects.
83
+ # criteria:: a hash of parameters; valid keys are:
84
+ # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the Id of the transaction review</td></tr><tr><td>filter.label</td><td>Filter by the status of the transaction review</td></tr></table>
85
+ # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
86
+ # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
87
+ # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code><code> status</code>.
88
+ # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
89
+ # Returns an object where the <code>list</code> property contains the list of TransactionReview objects and the <code>total</code>
90
+ # property contains the total number of TransactionReview objects available for the given criteria.
91
+ def self.list(criteria = nil, *auth)
92
+
93
+ auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
94
+ h = Simplify::PaymentsApi.execute("transactionReview", 'list', criteria, auth_obj)
95
+ obj = TransactionReview.new()
96
+ obj.authentication = auth_obj
97
+ obj = obj.merge!(h)
98
+ obj
99
+
100
+ end
101
+
102
+ # Retrieve a TransactionReview object from the API
103
+ #
104
+ # id:: ID of object to retrieve
105
+ # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
106
+ # Returns a TransactionReview object.
107
+ def self.find(id, *auth)
108
+
109
+ auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
110
+ h = Simplify::PaymentsApi.execute("transactionReview", 'show', {"id" => id}, auth_obj)
111
+ obj = TransactionReview.new()
112
+ obj.authentication = auth_obj
113
+ obj = obj.merge!(h)
114
+ obj
115
+ end
116
+
117
+ # Updates this object
118
+ #
119
+ # The properties that can be updated:
120
+ # * <code>status</code> Status of the transaction review.
121
+ def update()
122
+ h = Simplify::PaymentsApi.execute("transactionReview", 'update', self, self.authentication)
123
+ self.merge!(h)
124
+ self
125
+ end
126
+
127
+ end
128
+ end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013, 2014 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2016 MasterCard International Incorporated
3
3
  # All rights reserved.
4
4
  #
5
5
  # Redistribution and use in source and binary forms, with or without modification, are
@@ -83,8 +83,8 @@ class Webhook < Hash
83
83
  # Retrieve Webhook objects.
84
84
  # criteria:: a hash of parameters; valid keys are:
85
85
  # * <code>filter</code> Filters to apply to the list.
86
- # * <code>max</code> Allows up to a max of 50 list items to return. [max value: 50, default: 20]
87
- # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [default: 0]
86
+ # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
87
+ # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
88
88
  # * <code>sorting</code> Allows for ascending or descending sorting of the list. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> dateCreated</code>.
89
89
  # auth:: Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
90
90
  # Returns an object where the <code>list</code> property contains the list of Webhook objects and the <code>total</code>
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simplify Commerce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2016-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ruby-hmac
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Ruby access to the Simplify Commerce API
@@ -68,8 +68,10 @@ files:
68
68
  - lib/simplify/constants.rb
69
69
  - lib/simplify/coupon.rb
70
70
  - lib/simplify/customer.rb
71
+ - lib/simplify/datatoken.rb
71
72
  - lib/simplify/deposit.rb
72
73
  - lib/simplify/event.rb
74
+ - lib/simplify/fraudcheck.rb
73
75
  - lib/simplify/invoice.rb
74
76
  - lib/simplify/invoiceitem.rb
75
77
  - lib/simplify/payment.rb
@@ -78,6 +80,7 @@ files:
78
80
  - lib/simplify/refund.rb
79
81
  - lib/simplify/subscription.rb
80
82
  - lib/simplify/tax.rb
83
+ - lib/simplify/transactionreview.rb
81
84
  - lib/simplify/webhook.rb
82
85
  homepage: https://www.simplify.com/commerce
83
86
  licenses:
@@ -89,17 +92,17 @@ require_paths:
89
92
  - lib
90
93
  required_ruby_version: !ruby/object:Gem::Requirement
91
94
  requirements:
92
- - - ">="
95
+ - - ! '>='
93
96
  - !ruby/object:Gem::Version
94
97
  version: '0'
95
98
  required_rubygems_version: !ruby/object:Gem::Requirement
96
99
  requirements:
97
- - - ">="
100
+ - - ! '>='
98
101
  - !ruby/object:Gem::Version
99
102
  version: '0'
100
103
  requirements: []
101
104
  rubyforge_project:
102
- rubygems_version: 2.2.2
105
+ rubygems_version: 2.4.8
103
106
  signing_key:
104
107
  specification_version: 4
105
108
  summary: Simplify Commerce Ruby SDK