simplify 1.3.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simplify.rb +2 -1
- data/lib/simplify/accesstoken.rb +1 -1
- data/lib/simplify/apiexception.rb +1 -1
- data/lib/simplify/authentication.rb +1 -1
- data/lib/simplify/authorization.rb +35 -2
- data/lib/simplify/cardtoken.rb +2 -2
- data/lib/simplify/chargeback.rb +1 -1
- data/lib/simplify/constants.rb +2 -2
- data/lib/simplify/coupon.rb +1 -1
- data/lib/simplify/customer.rb +1 -1
- data/lib/simplify/datatoken.rb +91 -0
- data/lib/simplify/deposit.rb +1 -1
- data/lib/simplify/event.rb +1 -1
- data/lib/simplify/fraudcheck.rb +19 -3
- data/lib/simplify/invoice.rb +5 -5
- data/lib/simplify/invoiceitem.rb +2 -2
- data/lib/simplify/payment.rb +36 -2
- data/lib/simplify/paymentsapi.rb +1 -1
- data/lib/simplify/plan.rb +1 -1
- data/lib/simplify/refund.rb +3 -3
- data/lib/simplify/subscription.rb +1 -1
- data/lib/simplify/tax.rb +1 -1
- data/lib/simplify/transactionreview.rb +1 -1
- data/lib/simplify/webhook.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 545d426adaf264152b6db339b5ba1946666d2a4d
|
4
|
+
data.tar.gz: f2de05a3f0e4aac1683f1e0ddde009b6f6f36d4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4e4b7413b649e8b1b099070181cd5ffebe02b964dcc3823c3c19e3e3b736caae227407d696e372618d8446edef3ceccf23fa7a9ca4d074722d7e2f4889dcf8f
|
7
|
+
data.tar.gz: 7f6dfa44d51b3419cfc9d4ffecc266361e755590fc89f702d28d5758a8c512fcc93d673c2125951198da2fbbc9be5e457b3586b904cef209ffc1ef5918ba92cd
|
data/lib/simplify.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -32,6 +32,7 @@ require File.dirname(__FILE__) + '/simplify/cardtoken'
|
|
32
32
|
require File.dirname(__FILE__) + '/simplify/chargeback'
|
33
33
|
require File.dirname(__FILE__) + '/simplify/coupon'
|
34
34
|
require File.dirname(__FILE__) + '/simplify/customer'
|
35
|
+
require File.dirname(__FILE__) + '/simplify/datatoken'
|
35
36
|
require File.dirname(__FILE__) + '/simplify/deposit'
|
36
37
|
require File.dirname(__FILE__) + '/simplify/event'
|
37
38
|
require File.dirname(__FILE__) + '/simplify/fraudcheck'
|
data/lib/simplify/accesstoken.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -65,7 +65,7 @@ class Authorization < Hash
|
|
65
65
|
# * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
|
66
66
|
# * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
|
67
67
|
# * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
|
68
|
-
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255
|
68
|
+
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
|
69
69
|
# * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 9, min length: 3]
|
70
70
|
# * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
|
71
71
|
# * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
|
@@ -75,6 +75,39 @@ class Authorization < Hash
|
|
75
75
|
# * <code>currency</code> Currency code (ISO-4217) for the transaction. Must match the currency associated with your account. [default: USD] <b>required </b>
|
76
76
|
# * <code>customer</code> ID of customer. If specified, card on file of customer will be used.
|
77
77
|
# * <code>description</code> Free form text field to be used as a description of the payment. This field is echoed back with the payment on any find or list operations. [max length: 1024]
|
78
|
+
# * <code>order => commodityCode</code> Standard classification code for products and services. [max length: 5]
|
79
|
+
# * <code>order => customer</code> ID of the customer associated with the order.
|
80
|
+
# * <code>order => customerEmail</code> Customer email address.
|
81
|
+
# * <code>order => customerName</code> Customer name.
|
82
|
+
# * <code>order => customerNote</code> Additional notes provided by the customer. [max length: 255]
|
83
|
+
# * <code>order => customerReference</code> A merchant reference for the customer.
|
84
|
+
# * <code>order => items => amount</code> Cost of the item.
|
85
|
+
# * <code>order => items => description</code> Description of the item.
|
86
|
+
# * <code>order => items => name</code> Item name.
|
87
|
+
# * <code>order => items => product</code> Product information associated with the item.
|
88
|
+
# * <code>order => items => quantity</code> Quantity of the item contained in the order [min value: 1, max value: 999999, default: 1] <b>required </b>
|
89
|
+
# * <code>order => items => reference</code> A merchant reference for the item. [max length: 255]
|
90
|
+
# * <code>order => items => tax</code> Taxes associated with the item.
|
91
|
+
# * <code>order => merchantNote</code> Additional notes provided by the merchant. [max length: 255]
|
92
|
+
# * <code>order => payment</code> ID of the payment associated with the order.
|
93
|
+
# * <code>order => reference</code> A merchant reference for the order. [max length: 255]
|
94
|
+
# * <code>order => shippingAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
|
95
|
+
# * <code>order => shippingAddress => country</code> 2-character country code. [max length: 2, min length: 2]
|
96
|
+
# * <code>order => shippingAddress => line1</code> Street address. [max length: 255]
|
97
|
+
# * <code>order => shippingAddress => line2</code> (Opt) Street address continued. [max length: 255]
|
98
|
+
# * <code>order => shippingAddress => name</code> Name of the entity being shipped to. [max length: 255]
|
99
|
+
# * <code>order => shippingAddress => state</code> State or province. [max length: 255]
|
100
|
+
# * <code>order => shippingAddress => zip</code> Postal code. [max length: 32]
|
101
|
+
# * <code>order => shippingFromAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
|
102
|
+
# * <code>order => shippingFromAddress => country</code> 2-character country code. [max length: 2, min length: 2]
|
103
|
+
# * <code>order => shippingFromAddress => line1</code> Street address. [max length: 255]
|
104
|
+
# * <code>order => shippingFromAddress => line2</code> (Opt) Street address continued. [max length: 255]
|
105
|
+
# * <code>order => shippingFromAddress => name</code> Name of the entity performing the shipping. [max length: 255]
|
106
|
+
# * <code>order => shippingFromAddress => state</code> State or province. [max length: 255]
|
107
|
+
# * <code>order => shippingFromAddress => zip</code> Postal code. [max length: 32]
|
108
|
+
# * <code>order => shippingName</code> Name of the entity being shipped to.
|
109
|
+
# * <code>order => source</code> Order source. [default: WEB] <b>required </b>
|
110
|
+
# * <code>order => status</code> Status of the order. [default: INCOMPLETE] <b>required </b>
|
78
111
|
# * <code>reference</code> Custom reference field to be used with outside systems.
|
79
112
|
# * <code>replayId</code> An identifier that can be sent to uniquely identify a payment request to facilitate retries due to I/O related issues. This identifier must be unique for your account (sandbox or live) across all of your payments. If supplied, we will check for a payment on your account that matches this identifier, and if one is found we will attempt to return an identical response of the original request. [max length: 50, min length: 1]
|
80
113
|
# * <code>statementDescription => name</code> Merchant name <b>required </b>
|
data/lib/simplify/cardtoken.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -65,7 +65,7 @@ class CardToken < Hash
|
|
65
65
|
# * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
|
66
66
|
# * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
|
67
67
|
# * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
|
68
|
-
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255
|
68
|
+
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
|
69
69
|
# * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 in length and only contain numbers or letters. [max length: 9, min length: 3]
|
70
70
|
# * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
|
71
71
|
# * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
|
data/lib/simplify/chargeback.rb
CHANGED
data/lib/simplify/constants.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -30,7 +30,7 @@ module Simplify
|
|
30
30
|
# Constants.
|
31
31
|
class Constants
|
32
32
|
|
33
|
-
@@version = '1.
|
33
|
+
@@version = '1.6.0'
|
34
34
|
@@api_base_live_url = 'https://api.simplify.com/v1/api'
|
35
35
|
@@api_base_sandbox_url = 'https://sandbox.simplify.com/v1/api'
|
36
36
|
@@oauth_base_url = 'https://www.simplify.com/commerce/oauth';
|
data/lib/simplify/coupon.rb
CHANGED
data/lib/simplify/customer.rb
CHANGED
@@ -0,0 +1,91 @@
|
|
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 DataToken object.
|
33
|
+
#
|
34
|
+
class DataToken < 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 DataToken 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 DataToken object.
|
65
|
+
def self.create(parms, *auth)
|
66
|
+
|
67
|
+
auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
|
68
|
+
h = Simplify::PaymentsApi.execute("dataToken", 'create', parms, auth_obj)
|
69
|
+
obj = DataToken.new()
|
70
|
+
obj.authentication = auth_obj
|
71
|
+
obj = obj.merge!(h)
|
72
|
+
obj
|
73
|
+
end
|
74
|
+
|
75
|
+
# Retrieve a DataToken object from the API
|
76
|
+
#
|
77
|
+
# id:: ID of object to retrieve
|
78
|
+
# 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.
|
79
|
+
# Returns a DataToken object.
|
80
|
+
def self.find(id, *auth)
|
81
|
+
|
82
|
+
auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
|
83
|
+
h = Simplify::PaymentsApi.execute("dataToken", 'show', {"id" => id}, auth_obj)
|
84
|
+
obj = DataToken.new()
|
85
|
+
obj.authentication = auth_obj
|
86
|
+
obj = obj.merge!(h)
|
87
|
+
obj
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
end
|
data/lib/simplify/deposit.rb
CHANGED
data/lib/simplify/event.rb
CHANGED
data/lib/simplify/fraudcheck.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -65,7 +65,7 @@ class FraudCheck < Hash
|
|
65
65
|
# * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
|
66
66
|
# * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
|
67
67
|
# * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
|
68
|
-
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255
|
68
|
+
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
|
69
69
|
# * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 characters in length and only contains numbers or letters. [max length: 9, min length: 3]
|
70
70
|
# * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
|
71
71
|
# * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
|
@@ -95,7 +95,7 @@ class FraudCheck < Hash
|
|
95
95
|
# * <code>filter</code> Allows for ascending or descending sorting of the list.
|
96
96
|
# * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
|
97
97
|
# * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
|
98
|
-
# * <code>sorting</code> Used in paging of the list. This is the start offset of the page. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are:
|
98
|
+
# * <code>sorting</code> Used in paging of the list. This is the start offset of the page. The value maps properties to the sort direction (either <code>asc</code> for ascending or <code>desc</code> for descending). Sortable properties are: <code> amount</code><code> dateCreated</code><code> fraudResult</code>.
|
99
99
|
# 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.
|
100
100
|
# Returns an object where the <code>list</code> property contains the list of FraudCheck objects and the <code>total</code>
|
101
101
|
# property contains the total number of FraudCheck objects available for the given criteria.
|
@@ -125,5 +125,21 @@ class FraudCheck < Hash
|
|
125
125
|
obj
|
126
126
|
end
|
127
127
|
|
128
|
+
# Updates this object
|
129
|
+
#
|
130
|
+
# The properties that can be updated:
|
131
|
+
# * <code>integratorAuthCode</code> Authorization code for the transaction. [max length: 255]
|
132
|
+
# * <code>integratorAvsAddress</code> AVS address response. [max length: 255]
|
133
|
+
# * <code>integratorAvsZip</code> AVS zip response. [max length: 255]
|
134
|
+
# * <code>integratorCvc</code> CVC response. [max length: 255]
|
135
|
+
# * <code>integratorDeclineReason</code> Reason for the decline if applicable. [max length: 255]
|
136
|
+
# * <code>integratorTransactionRef</code> Reference id for the transaction. [max length: 255] <b>(required)</b>
|
137
|
+
# * <code>integratorTransactionStatus</code> Status of the transaction, valid values are "APPROVED", "DECLINED", "SETTLED", "REFUNDED" or "VOIDED".
|
138
|
+
def update()
|
139
|
+
h = Simplify::PaymentsApi.execute("fraudCheck", 'update', self, self.authentication)
|
140
|
+
self.merge!(h)
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
128
144
|
end
|
129
145
|
end
|
data/lib/simplify/invoice.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -82,14 +82,14 @@ class Invoice < Hash
|
|
82
82
|
# * <code>email</code> The email of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email.
|
83
83
|
# * <code>invoiceId</code> User defined invoice id. If not provided the system will generate a numeric id. [max length: 255]
|
84
84
|
# * <code>invoiceToCopy</code> The id of an existing invoice to be copied. This is optional if customer or a name and email are provided
|
85
|
-
# * <code>items => amount</code> Amount of the invoice item (the smallest unit of your currency). Example: 100 = $1.00USD
|
85
|
+
# * <code>items => amount</code> Amount of the invoice item (the smallest unit of your currency). Example: 100 = $1.00USD <b>required </b>
|
86
86
|
# * <code>items => description</code> The description of the invoice item. [max length: 1024]
|
87
87
|
# * <code>items => invoice</code> The ID of the invoice this item belongs to.
|
88
88
|
# * <code>items => product</code> The product this invoice item refers to.
|
89
89
|
# * <code>items => quantity</code> Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999, default: 1]
|
90
90
|
# * <code>items => reference</code> User defined reference field. [max length: 255]
|
91
91
|
# * <code>items => tax</code> The tax ID of the tax charge in the invoice item.
|
92
|
-
# * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00USD
|
92
|
+
# * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00USD
|
93
93
|
# * <code>memo</code> A memo that is displayed to the customer on the invoice payment screen. [max length: 4000]
|
94
94
|
# * <code>name</code> The name of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email. [max length: 50, min length: 2]
|
95
95
|
# * <code>note</code> This field can be used to store a note that is not displayed to the customer. [max length: 4000]
|
@@ -182,14 +182,14 @@ class Invoice < Hash
|
|
182
182
|
# * <code>dueDate</code> The date invoice payment is due. If a late fee is provided this will be added to the invoice total is the due date has past.
|
183
183
|
# * <code>email</code> The email of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email.
|
184
184
|
# * <code>invoiceId</code> User defined invoice id. If not provided the system will generate a numeric id. [max length: 255]
|
185
|
-
# * <code>items => amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD
|
185
|
+
# * <code>items => amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD <b>(required)</b>
|
186
186
|
# * <code>items => description</code> The description of the invoice item. [max length: 1024]
|
187
187
|
# * <code>items => invoice</code> The ID of the invoice this item belongs to.
|
188
188
|
# * <code>items => product</code> The Id of the product this item refers to.
|
189
189
|
# * <code>items => quantity</code> Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999, default: 1]
|
190
190
|
# * <code>items => reference</code> User defined reference field. [max length: 255]
|
191
191
|
# * <code>items => tax</code> The tax ID of the tax charge in the invoice item.
|
192
|
-
# * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00USD
|
192
|
+
# * <code>lateFee</code> The late fee amount that will be added to the invoice total is the due date is past due. Value provided must be in the smallest unit of your currency. Example: 100 = $1.00USD
|
193
193
|
# * <code>memo</code> A memo that is displayed to the customer on the invoice payment screen. [max length: 4000]
|
194
194
|
# * <code>name</code> The name of the customer we are invoicing. This is optional if customer or invoiceToCopy is provided. A new customer will be created using the the name and email. [max length: 50, min length: 2]
|
195
195
|
# * <code>note</code> This field can be used to store a note that is not displayed to the customer. [max length: 4000]
|
data/lib/simplify/invoiceitem.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -60,7 +60,7 @@ class InvoiceItem < Hash
|
|
60
60
|
# Creates an InvoiceItem object
|
61
61
|
#
|
62
62
|
# parms:: a hash of parameters; valid keys are:
|
63
|
-
# * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD
|
63
|
+
# * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD <b>required </b>
|
64
64
|
# * <code>description</code> Individual items of an invoice [max length: 1024]
|
65
65
|
# * <code>invoice</code> The ID of the invoice this item belongs to.
|
66
66
|
# * <code>product</code> Product ID this item relates to.
|
data/lib/simplify/payment.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -66,7 +66,7 @@ class Payment < Hash
|
|
66
66
|
# * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
|
67
67
|
# * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
|
68
68
|
# * <code>card => addressLine2</code> Address of the cardholder if needed. [max length: 255]
|
69
|
-
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255
|
69
|
+
# * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. [max length: 255]
|
70
70
|
# * <code>card => addressZip</code> Postal code of the cardholder. The postal code size is between 5 and 9 in length and only contain numbers or letters. [max length: 9, min length: 3]
|
71
71
|
# * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
|
72
72
|
# * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
|
@@ -77,10 +77,44 @@ class Payment < Hash
|
|
77
77
|
# * <code>customer</code> ID of customer. If specified, card on file of customer will be used.
|
78
78
|
# * <code>description</code> Free form text field to be used as a description of the payment. This field is echoed back with the payment on any find or list operations. [max length: 1024]
|
79
79
|
# * <code>invoice</code> ID of invoice for which this payment is being made.
|
80
|
+
# * <code>order => commodityCode</code> Standard classification code for products and services. [max length: 5]
|
81
|
+
# * <code>order => customer</code> ID of the customer associated with the order.
|
82
|
+
# * <code>order => customerEmail</code> Customer email address.
|
83
|
+
# * <code>order => customerName</code> Customer name.
|
84
|
+
# * <code>order => customerNote</code> Additional notes provided by the customer. [max length: 255]
|
85
|
+
# * <code>order => customerReference</code> A merchant reference for the customer.
|
86
|
+
# * <code>order => items => amount</code> Cost of the item.
|
87
|
+
# * <code>order => items => description</code> Description of the item.
|
88
|
+
# * <code>order => items => name</code> Item name.
|
89
|
+
# * <code>order => items => product</code> Product information associated with the item.
|
90
|
+
# * <code>order => items => quantity</code> Quantity of the item contained in the order [min value: 1, max value: 999999, default: 1] <b>required </b>
|
91
|
+
# * <code>order => items => reference</code> A merchant reference for the item. [max length: 255]
|
92
|
+
# * <code>order => items => tax</code> Taxes associated with the item.
|
93
|
+
# * <code>order => merchantNote</code> Additional notes provided by the merchant. [max length: 255]
|
94
|
+
# * <code>order => payment</code> ID of the payment associated with the order.
|
95
|
+
# * <code>order => reference</code> A merchant reference for the order. [max length: 255]
|
96
|
+
# * <code>order => shippingAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
|
97
|
+
# * <code>order => shippingAddress => country</code> 2-character country code. [max length: 2, min length: 2]
|
98
|
+
# * <code>order => shippingAddress => line1</code> Street address. [max length: 255]
|
99
|
+
# * <code>order => shippingAddress => line2</code> (Opt) Street address continued. [max length: 255]
|
100
|
+
# * <code>order => shippingAddress => name</code> Name of the entity being shipped to. [max length: 255]
|
101
|
+
# * <code>order => shippingAddress => state</code> State or province. [max length: 255]
|
102
|
+
# * <code>order => shippingAddress => zip</code> Postal code. [max length: 32]
|
103
|
+
# * <code>order => shippingFromAddress => city</code> City, town, or municipality. [max length: 255, min length: 2]
|
104
|
+
# * <code>order => shippingFromAddress => country</code> 2-character country code. [max length: 2, min length: 2]
|
105
|
+
# * <code>order => shippingFromAddress => line1</code> Street address. [max length: 255]
|
106
|
+
# * <code>order => shippingFromAddress => line2</code> (Opt) Street address continued. [max length: 255]
|
107
|
+
# * <code>order => shippingFromAddress => name</code> Name of the entity performing the shipping. [max length: 255]
|
108
|
+
# * <code>order => shippingFromAddress => state</code> State or province. [max length: 255]
|
109
|
+
# * <code>order => shippingFromAddress => zip</code> Postal code. [max length: 32]
|
110
|
+
# * <code>order => shippingName</code> Name of the entity being shipped to.
|
111
|
+
# * <code>order => source</code> Order source. [default: WEB] <b>required </b>
|
112
|
+
# * <code>order => status</code> Status of the order. [default: INCOMPLETE] <b>required </b>
|
80
113
|
# * <code>reference</code> Custom reference field to be used with outside systems.
|
81
114
|
# * <code>replayId</code> An identifier that can be sent to uniquely identify a payment request to facilitate retries due to I/O related issues. This identifier must be unique for your account (sandbox or live) across all of your payments. If supplied, we will check for a payment on your account that matches this identifier. If found will attempt to return an identical response of the original request. [max length: 50, min length: 1]
|
82
115
|
# * <code>statementDescription => name</code> Merchant name. <b>required </b>
|
83
116
|
# * <code>statementDescription => phoneNumber</code> Merchant contact phone number.
|
117
|
+
# * <code>taxExempt</code> Specify true to indicate that the payment is tax-exempt.
|
84
118
|
# * <code>token</code> If specified, card associated with card token will be used. [max length: 255]
|
85
119
|
# 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.
|
86
120
|
# Returns a Payment object.
|
data/lib/simplify/paymentsapi.rb
CHANGED
data/lib/simplify/plan.rb
CHANGED
data/lib/simplify/refund.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright (c) 2013 -
|
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
|
@@ -60,8 +60,8 @@ class Refund < Hash
|
|
60
60
|
# Creates an Refund object
|
61
61
|
#
|
62
62
|
# parms:: a hash of parameters; valid keys are:
|
63
|
-
# * <code>amount</code> Amount of the refund in the smallest unit of your currency. Example: 100 = $1.00USD
|
64
|
-
# * <code>payment</code> ID of the payment for the refund
|
63
|
+
# * <code>amount</code> Amount of the refund in the smallest unit of your currency. Example: 100 = $1.00USD <b>required </b>
|
64
|
+
# * <code>payment</code> ID of the payment for the refund
|
65
65
|
# * <code>reason</code> Reason for the refund
|
66
66
|
# * <code>reference</code> Custom reference field to be used with outside systems.
|
67
67
|
# * <code>replayId</code> An identifier that can be sent to uniquely identify a refund request to facilitate retries due to I/O related issues. This identifier must be unique for your account (sandbox or live) across all of your refunds. If supplied, we will check for a refund on your account that matches this identifier. If found we will return an identical response to that of the original request. [max length: 50, min length: 1]
|
data/lib/simplify/tax.rb
CHANGED
data/lib/simplify/webhook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.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:
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -68,6 +68,7 @@ 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
|
73
74
|
- lib/simplify/fraudcheck.rb
|
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
102
|
version: '0'
|
102
103
|
requirements: []
|
103
104
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
105
|
+
rubygems_version: 2.5.1
|
105
106
|
signing_key:
|
106
107
|
specification_version: 4
|
107
108
|
summary: Simplify Commerce Ruby SDK
|