simplify 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MWM2NTcwY2YyYmMzNGQ2NmJlMjdhYWQ2Njc3NGE2YTUzYzY2NzJjNA==
5
- data.tar.gz: !binary |-
6
- ZDZhNzZhZWZmZDcwOWUyOWQ1YjY0ZDJiNDQ4OGYzODg0NzAxNDE3MQ==
2
+ SHA256:
3
+ metadata.gz: 255ec1cb67dd38ecb3f212a1dd680be5fc3ff92d80800ee0214377ce09560c78
4
+ data.tar.gz: 7b5fec623a660eb373d0f4816029b2b09d19d8c07d7e08d19096f4875efc8695
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MDgxNDZmMGExYjg5ZWQ4NWEwMDE1ZjlmNzA4OTRkNDE3MDRjZDhiMjExODll
10
- ZGRhZmZlN2I0Y2Q0Nzk2MjAwMGRlNzYxZGRmZTg0M2IxZDI5YzY2OWQ3YThk
11
- NzI3ZGZiNGZlNTk4OGU0MjEwOTIwNDA0YThiYTVkYzU0OThiODY=
12
- data.tar.gz: !binary |-
13
- MzBhOWI4ZGNlYjExODg1ZDZmN2NlMjFhODE4MDY0ODU5OTczOWI2NTk5MTVj
14
- MTc0NDk1M2E1ZmE4NDBkMTNmYjA4Njg4MzIxMjNjYmQ0M2VlNWY3YTQ4NjM1
15
- NDE5YjcwNDM3M2UzNzEzODBiZTY5ZjdhOGMwNTY2NTYyZGEwY2I=
6
+ metadata.gz: 248269fa2bf3947e07aac49b71e1361b291d1ad26f8eca6d8817efbbec482fde6314af03f63730570df635e87889d37f439306cd2bd9cd6cef2e6d1a5aa53826
7
+ data.tar.gz: 79a4379bf2276bd07e85c9f5585d856934d7a1cfc1fca07df0deeab4b7d456c71bbc27c99fd91b7880e67d9dfcda9ead60cf94224030b4e005279ab4ec3bee1d
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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,18 +60,18 @@ class Authorization < Hash
60
60
  # Creates an Authorization object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00USD <b>required </b>
63
+ # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00 <b>required </b>
64
64
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
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. State abbreviations should be used. [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: 32]
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
- # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
72
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
71
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
72
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
73
73
  # * <code>card => name</code> Name as it appears on the card. [max length: 50, min length: 2]
74
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
74
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
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]
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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,19 +60,26 @@ class CardToken < Hash
60
60
  # Creates an CardToken object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
+ # * <code>authenticatePayer</code> Set as true to create CardToken for EMV 3DS transaction. [default: false]
63
64
  # * <code>callback</code> The URL callback for the cardtoken
64
65
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
65
66
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. [max length: 2, min length: 2]
66
67
  # * <code>card => addressLine1</code> Address of the cardholder. [max length: 255]
67
68
  # * <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]
69
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. [max length: 255]
69
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: 32]
70
71
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123
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>
72
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
72
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
73
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
73
74
  # * <code>card => name</code> Name as appears on the card. [max length: 50, min length: 2]
74
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
75
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
76
  # * <code>key</code> Key used to create the card token.
77
+ # * <code>secure3DRequestData => amount</code> Amount of the subsequent transaction in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
78
+ # * <code>secure3DRequestData => authOnly</code> Specifies if the subsequent transaction is going to be a Payment or an Authorization (to be Captured later). If false or not specified, it refers to a Payment, otherwise it refers to an Authorization.
79
+ # * <code>secure3DRequestData => currency</code> Currency code (ISO-4217). Must match the currency associated with your account. <b>required </b>
80
+ # * <code>secure3DRequestData => description</code> A description of the transaction. [max length: 256]
81
+ # * <code>secure3DRequestData => id</code> 3D Secure data ID.
82
+ # * <code>source</code> Card Token Source [default: API]
76
83
  # 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.
77
84
  # Returns a CardToken object.
78
85
  def self.create(parms, *auth)
@@ -100,5 +107,21 @@ class CardToken < Hash
100
107
  obj
101
108
  end
102
109
 
110
+ # Updates this object
111
+ #
112
+ # The properties that can be updated:
113
+ # * <code>device => browser</code> The User-Agent header of the browser the customer used to place the order <b>(required)</b>
114
+ # * <code>device => ipAddress</code> The IP address of the device used by the payer, in nnn.nnn.nnn.nnn format. <b>(required)</b>
115
+ # * <code>device => language</code> The language supported for the payer's browser as defined in IETF BCP47.
116
+ # * <code>device => screenHeight</code> The total height of the payer's browser screen in pixels.
117
+ # * <code>device => screenWidth</code> The total width of the payer's browser screen in pixels.
118
+ # * <code>device => timeZone</code> The timezone of the device used by the payer, in Zone ID format. Example: "Europe/Dublin" <b>(required)</b>
119
+ # * <code>key</code> The public key of the merchant to be used for the token
120
+ def update()
121
+ h = Simplify::PaymentsApi.execute("cardToken", 'update', self, self.authentication)
122
+ self.merge!(h)
123
+ self
124
+ end
125
+
103
126
  end
104
127
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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.7.0'
33
+ @@version = '1.8.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';
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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 Coupon < Hash
60
60
  # Creates an Coupon object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amountOff</code> Amount off of the price of the product in the smallest units of the currency of the merchant. While this field is optional, you must provide either amountOff or percentOff for a coupon. Example: 100 = $1.00USD [min value: 1]
63
+ # * <code>amountOff</code> Amount off of the price of the product in the smallest units of the currency of the merchant. While this field is optional, you must provide either amountOff or percentOff for a coupon. Example: 100 = $1.00 [min value: 1]
64
64
  # * <code>couponCode</code> Code that identifies the coupon to be used. [min length: 2] <b>required </b>
65
65
  # * <code>description</code> A brief section that describes the coupon.
66
66
  # * <code>durationInMonths</code> DEPRECATED - Duration in months that the coupon will be applied after it has first been selected. [min value: 1, max value: 9999]
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -64,7 +64,7 @@ class Customer < Hash
64
64
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. <b>required </b>
65
65
  # * <code>card => addressLine1</code> Address of the cardholder <b>required </b>
66
66
  # * <code>card => addressLine2</code> Address of the cardholder if needed. <b>required </b>
67
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. <b>required </b>
67
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. <b>required </b>
68
68
  # * <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. <b>required </b>
69
69
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123 <b>required </b>
70
70
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 <b>required </b>
@@ -73,20 +73,23 @@ class Customer < Hash
73
73
  # * <code>card => name</code> Name as appears on the card. <b>required </b>
74
74
  # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
75
  # * <code>email</code> Email address of the customer <b>required </b>
76
- # * <code>name</code> Customer name [min length: 2] <b>required </b>
76
+ # * <code>name</code> Customer name [max length: 50, min length: 2] <b>required </b>
77
77
  # * <code>reference</code> Reference field for external applications use.
78
- # * <code>subscriptions => amount</code> Amount of payment in the smallest unit of your currency. Example: 100 = $1.00USD
78
+ # * <code>subscriptions => amount</code> Amount of payment in the smallest unit of your currency. Example: 100 = $1.00
79
79
  # * <code>subscriptions => billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
80
80
  # * <code>subscriptions => billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
81
81
  # * <code>subscriptions => coupon</code> Coupon associated with the subscription for the customer.
82
- # * <code>subscriptions => currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [default: USD]
82
+ # * <code>subscriptions => currency</code> Currency code (ISO-4217). Must match the currency associated with your account.
83
+ # * <code>subscriptions => currentPeriodEnd</code> End date of subscription's current period
84
+ # * <code>subscriptions => currentPeriodStart</code> Start date of subscription's current period
83
85
  # * <code>subscriptions => customer</code> The customer ID to create the subscription for. Do not supply this when creating a customer.
84
86
  # * <code>subscriptions => frequency</code> Frequency of payment for the plan. Used in conjunction with frequencyPeriod. Valid values are "DAILY", "WEEKLY", "MONTHLY" and "YEARLY".
85
87
  # * <code>subscriptions => frequencyPeriod</code> Period of frequency of payment for the plan. Example: if the frequency is weekly, and periodFrequency is 2, then the subscription is billed bi-weekly.
86
- # * <code>subscriptions => name</code> Name describing subscription
88
+ # * <code>subscriptions => name</code> Name describing subscription [max length: 50]
87
89
  # * <code>subscriptions => plan</code> The plan ID that the subscription should be created from.
88
90
  # * <code>subscriptions => quantity</code> Quantity of the plan for the subscription. [min value: 1]
89
91
  # * <code>subscriptions => renewalReminderLeadDays</code> If set, how many days before the next billing cycle that a renewal reminder is sent to the customer. If null, then no emails are sent. Minimum value is 7 if set.
92
+ # * <code>subscriptions => source</code> Source of where subscription was created
90
93
  # * <code>token</code> If specified, card associated with card token will be used
91
94
  # 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.
92
95
  # Returns a Customer object.
@@ -149,7 +152,7 @@ class Customer < Hash
149
152
  # * <code>card => addressCountry</code> Country code (ISO-3166-1-alpha-2 code) of residence of the cardholder. <b>(required)</b>
150
153
  # * <code>card => addressLine1</code> Address of the cardholder. <b>(required)</b>
151
154
  # * <code>card => addressLine2</code> Address of the cardholder if needed. <b>(required)</b>
152
- # * <code>card => addressState</code> State of residence of the cardholder. For the US, this is a 2-digit USPS code. <b>(required)</b>
155
+ # * <code>card => addressState</code> State of residence of the cardholder. State abbreviations should be used. <b>(required)</b>
153
156
  # * <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. <b>(required)</b>
154
157
  # * <code>card => cvc</code> CVC security code of the card. This is the code on the back of the card. Example: 123 <b>(required)</b>
155
158
  # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 <b>(required)</b>
@@ -158,7 +161,7 @@ class Customer < Hash
158
161
  # * <code>card => name</code> Name as appears on the card. <b>(required)</b>
159
162
  # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
160
163
  # * <code>email</code> Email address of the customer <b>(required)</b>
161
- # * <code>name</code> Customer name [min length: 2] <b>(required)</b>
164
+ # * <code>name</code> Customer name [max length: 50, min length: 2] <b>(required)</b>
162
165
  # * <code>reference</code> Reference field for external applications use.
163
166
  # * <code>token</code> If specified, card associated with card token will be added to the customer
164
167
  def update()
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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,24 +60,24 @@ class FraudCheck < Hash
60
60
  # Creates an FraudCheck object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the transaction to be checked for fraud (in the smallest unit of your currency). Example: 100 = $1.00USD. This field is required if using “full” or “advanced” mode.
63
+ # * <code>amount</code> Amount of the transaction to be checked for fraud (in the smallest unit of your currency). Example: 100 = $1.00. This field is required if using “full” or “advanced” mode.
64
64
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
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. State abbreviations should be used. [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: 32]
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
- # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
72
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
71
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
72
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
73
73
  # * <code>card => name</code> Name as it appears on the card. [max length: 50, min length: 2]
74
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
74
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
75
75
  # * <code>currency</code> Currency code (ISO-4217) for the transaction to be checked for fraud. This field is required if using “full” or “advanced” mode.
76
76
  # * <code>description</code> - Description of the fraud check. [max length: 255]
77
77
  # * <code>ipAddress</code> IP Address of the customer for which the fraud check is to be done. [max length: 45]
78
- # * <code>mode</code> Fraud check mode. “simple” only does an AVS and CVC check; “advanced” does a complete fraud check, running the input against the set up rules. [valid values: simple, advanced, full] <b>required </b>
78
+ # * <code>mode</code> Fraud check mode. “simple” only does an AVS and CVC check; “advanced” does a complete fraud check, running the input against the set up rules. [valid values: simple, advanced, full, SIMPLE, ADVANCED, FULL] <b>required </b>
79
79
  # * <code>sessionId</code> Session ID used during data collection. [max length: 255]
80
- # * <code>token</code> Card token token representing card details for the card to be checked. [max length: 255]
80
+ # * <code>token</code> Card token representing card details for the card to be checked. [max length: 255]
81
81
  # 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.
82
82
  # Returns a FraudCheck object.
83
83
  def self.create(parms, *auth)
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -74,22 +74,23 @@ class Invoice < Hash
74
74
  # * <code>businessAddress => name</code> The name of the business that is sending the invoice. [max length: 255]
75
75
  # * <code>businessAddress => state</code> Address state of the business that is sending the invoice. [max length: 255]
76
76
  # * <code>businessAddress => zip</code> Address zip of the business that is sending the invoice. [max length: 32]
77
- # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [max length: 3, min length: 3, default: USD]
77
+ # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [max length: 3, min length: 3]
78
78
  # * <code>customer</code> The customer ID of the customer we are invoicing. This is optional if invoiceToCopy or a name and email are provided
79
79
  # * <code>customerTaxNo</code> The tax number or VAT id of the person to whom the goods or services were supplied. [max length: 255]
80
80
  # * <code>discountRate</code> The discount percent as a decimal e.g. 12.5. This is used to calculate the discount amount which is subtracted from the total amount due before any tax is applied. [max length: 6]
81
81
  # * <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.
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
+ # * <code>invoiceLanguage</code> The language in which invoice will be displayed. [max length: 5, min length: 5]
84
85
  # * <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 <b>required </b>
86
+ # * <code>items => amount</code> Amount of the invoice item (the smallest unit of your currency). Example: 100 = $1.00 <b>required </b>
86
87
  # * <code>items => description</code> The description of the invoice item. [max length: 1024]
87
88
  # * <code>items => invoice</code> The ID of the invoice this item belongs to.
88
89
  # * <code>items => product</code> The product this invoice item refers to.
89
90
  # * <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
91
  # * <code>items => reference</code> User defined reference field. [max length: 255]
91
92
  # * <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
93
+ # * <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.00
93
94
  # * <code>memo</code> A memo that is displayed to the customer on the invoice payment screen. [max length: 4000]
94
95
  # * <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
96
  # * <code>note</code> This field can be used to store a note that is not displayed to the customer. [max length: 4000]
@@ -182,19 +183,21 @@ class Invoice < Hash
182
183
  # * <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
184
  # * <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
185
  # * <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 <b>(required)</b>
186
+ # * <code>invoiceLanguage</code> The language in which invoice will be displayed. [max length: 5, min length: 5]
187
+ # * <code>items => amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 <b>(required)</b>
186
188
  # * <code>items => description</code> The description of the invoice item. [max length: 1024]
187
189
  # * <code>items => invoice</code> The ID of the invoice this item belongs to.
188
190
  # * <code>items => product</code> The Id of the product this item refers to.
189
191
  # * <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
192
  # * <code>items => reference</code> User defined reference field. [max length: 255]
191
193
  # * <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
194
+ # * <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.00
193
195
  # * <code>memo</code> A memo that is displayed to the customer on the invoice payment screen. [max length: 4000]
194
196
  # * <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
197
  # * <code>note</code> This field can be used to store a note that is not displayed to the customer. [max length: 4000]
196
198
  # * <code>payment</code> The ID of the payment. Use this ID to query the /payment API. [max length: 255]
197
199
  # * <code>reference</code> User defined reference field. [max length: 255]
200
+ # * <code>sendMail</code> Boolean flag. If true the invoice will be sent to the customer if the invoice is in an OPEN state. [default: false] <b>(required)</b>
198
201
  # * <code>shippingAddress => city</code> Address city of the location where the goods or services were supplied. [max length: 255, min length: 2]
199
202
  # * <code>shippingAddress => country</code> Address country of the location where the goods or services were supplied. [max length: 2, min length: 2]
200
203
  # * <code>shippingAddress => line1</code> Address line 1 of the location where the goods or services were supplied. [max length: 255]
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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 <b>required </b>
63
+ # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 <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.
@@ -104,7 +104,7 @@ class InvoiceItem < Hash
104
104
  # Updates this object
105
105
  #
106
106
  # The properties that can be updated:
107
- # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00USD [min value: 1]
107
+ # * <code>amount</code> Amount of the invoice item in the smallest unit of your currency. Example: 100 = $1.00 [min value: 1]
108
108
  # * <code>description</code> Individual items of an invoice
109
109
  # * <code>quantity</code> Quantity of the item. This total amount of the invoice item is the amount * quantity. [min value: 1, max value: 999999]
110
110
  # * <code>reference</code> User defined reference field.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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,19 +60,19 @@ class Payment < Hash
60
60
  # Creates an Payment object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00USD
63
+ # * <code>amount</code> Amount of the payment (in the smallest unit of your currency). Example: 100 = $1.00
64
64
  # * <code>authorization</code> The ID of the authorization being used to capture the payment.
65
65
  # * <code>card => addressCity</code> City of the cardholder. [max length: 50, min length: 2]
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. State abbreviations should be used. [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: 32]
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
- # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12] <b>required </b>
73
- # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99] <b>required </b>
72
+ # * <code>card => expMonth</code> Expiration month of the card. Format is MM. Example: January = 01 [min value: 1, max value: 12]
73
+ # * <code>card => expYear</code> Expiration year of the card. Format is YY. Example: 2013 = 13 [min value: 0, max value: 99]
74
74
  # * <code>card => name</code> Name as it appears on the card. [max length: 50, min length: 2]
75
- # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13] <b>required </b>
75
+ # * <code>card => number</code> Card number as it appears on the card. [max length: 19, min length: 13]
76
76
  # * <code>currency</code> Currency code (ISO-4217) for the transaction. Must match the currency associated with your account. [default: USD] <b>required </b>
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]
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
data/lib/simplify/plan.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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 Plan < Hash
60
60
  # Creates an Plan object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of payment for the plan in the smallest unit of your currency. Example: 100 = $1.00USD <b>required </b>
63
+ # * <code>amount</code> Amount of payment for the plan in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
64
64
  # * <code>billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
65
65
  # * <code>billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
66
66
  # * <code>currency</code> Currency code (ISO-4217) for the plan. Must match the currency associated with your account. [default: USD] <b>required </b>
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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 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 <b>required </b>
63
+ # * <code>amount</code> Amount of the refund in the smallest unit of your currency. Example: 100 = $1.00 <b>required </b>
64
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.
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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,18 +60,21 @@ class Subscription < Hash
60
60
  # Creates an Subscription object
61
61
  #
62
62
  # parms:: a hash of parameters; valid keys are:
63
- # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00USD
63
+ # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00
64
64
  # * <code>billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
65
65
  # * <code>billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
66
66
  # * <code>coupon</code> Coupon ID associated with the subscription
67
- # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [default: USD]
67
+ # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account.
68
+ # * <code>currentPeriodEnd</code> End date of subscription's current period
69
+ # * <code>currentPeriodStart</code> Start date of subscription's current period
68
70
  # * <code>customer</code> Customer that is enrolling in the subscription.
69
71
  # * <code>frequency</code> Frequency of payment for the plan. Used in conjunction with frequencyPeriod. Valid values are "DAILY", "WEEKLY", "MONTHLY" and "YEARLY".
70
72
  # * <code>frequencyPeriod</code> Period of frequency of payment for the plan. Example: if the frequency is weekly, and periodFrequency is 2, then the subscription is billed bi-weekly.
71
- # * <code>name</code> Name describing subscription
73
+ # * <code>name</code> Name describing subscription [max length: 50]
72
74
  # * <code>plan</code> The ID of the plan that should be used for the subscription.
73
75
  # * <code>quantity</code> Quantity of the plan for the subscription. [min value: 1]
74
76
  # * <code>renewalReminderLeadDays</code> If set, how many days before the next billing cycle that a renewal reminder is sent to the customer. If null, then no emails are sent. Minimum value is 7 if set.
77
+ # * <code>source</code> Source of where subscription was created
75
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.
76
79
  # Returns a Subscription object.
77
80
  def self.create(parms, *auth)
@@ -129,11 +132,13 @@ class Subscription < Hash
129
132
  # Updates this object
130
133
  #
131
134
  # The properties that can be updated:
132
- # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00USD
135
+ # * <code>amount</code> Amount of the payment in the smallest unit of your currency. Example: 100 = $1.00
133
136
  # * <code>billingCycle</code> How the plan is billed to the customer. Values must be AUTO (indefinitely until the customer cancels) or FIXED (a fixed number of billing cycles). [default: AUTO]
134
137
  # * <code>billingCycleLimit</code> The number of fixed billing cycles for a plan. Only used if the billingCycle parameter is set to FIXED. Example: 4
135
138
  # * <code>coupon</code> Coupon being assigned to this subscription
136
- # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account. [default: USD]
139
+ # * <code>currency</code> Currency code (ISO-4217). Must match the currency associated with your account.
140
+ # * <code>currentPeriodEnd</code> End date of subscription's current period
141
+ # * <code>currentPeriodStart</code> Start date of subscription's current period
137
142
  # * <code>frequency</code> Frequency of payment for the plan. Used in conjunction with frequencyPeriod. Valid values are "DAILY", "WEEKLY", "MONTHLY" and "YEARLY".
138
143
  # * <code>frequencyPeriod</code> Period of frequency of payment for the plan. Example: if the frequency is weekly, and periodFrequency is 2, then the subscription is billed bi-weekly. [min value: 1]
139
144
  # * <code>name</code> Name describing subscription
data/lib/simplify/tax.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -81,10 +81,6 @@ class TransactionReview < Hash
81
81
 
82
82
  # Retrieve TransactionReview objects.
83
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
84
  # 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
85
  # Returns an object where the <code>list</code> property contains the list of TransactionReview objects and the <code>total</code>
90
86
  # property contains the total number of TransactionReview objects available for the given criteria.
@@ -117,8 +113,7 @@ class TransactionReview < Hash
117
113
  # Updates this object
118
114
  #
119
115
  # The properties that can be updated:
120
- # * <code>status</code> Status of the transaction review.
121
- def update()
116
+ def update()
122
117
  h = Simplify::PaymentsApi.execute("transactionReview", 'update', self, self.authentication)
123
118
  self.merge!(h)
124
119
  self
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
data/lib/simplify.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #
2
- # Copyright (c) 2013 - 2016 MasterCard International Incorporated
2
+ # Copyright (c) 2013 - 2022 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
@@ -29,11 +29,8 @@ require File.dirname(__FILE__) + '/simplify/authentication'
29
29
  require File.dirname(__FILE__) + '/simplify/authorization'
30
30
  require File.dirname(__FILE__) + '/simplify/accesstoken'
31
31
  require File.dirname(__FILE__) + '/simplify/cardtoken'
32
- require File.dirname(__FILE__) + '/simplify/chargeback'
33
32
  require File.dirname(__FILE__) + '/simplify/coupon'
34
33
  require File.dirname(__FILE__) + '/simplify/customer'
35
- require File.dirname(__FILE__) + '/simplify/datatoken'
36
- require File.dirname(__FILE__) + '/simplify/deposit'
37
34
  require File.dirname(__FILE__) + '/simplify/event'
38
35
  require File.dirname(__FILE__) + '/simplify/fraudcheck'
39
36
  require File.dirname(__FILE__) + '/simplify/invoice'
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.7.0
4
+ version: 1.8.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: 2016-11-11 00:00:00.000000000 Z
11
+ date: 2022-09-05 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
@@ -64,12 +64,9 @@ files:
64
64
  - lib/simplify/authentication.rb
65
65
  - lib/simplify/authorization.rb
66
66
  - lib/simplify/cardtoken.rb
67
- - lib/simplify/chargeback.rb
68
67
  - lib/simplify/constants.rb
69
68
  - lib/simplify/coupon.rb
70
69
  - lib/simplify/customer.rb
71
- - lib/simplify/datatoken.rb
72
- - lib/simplify/deposit.rb
73
70
  - lib/simplify/event.rb
74
71
  - lib/simplify/fraudcheck.rb
75
72
  - lib/simplify/invoice.rb
@@ -92,17 +89,16 @@ require_paths:
92
89
  - lib
93
90
  required_ruby_version: !ruby/object:Gem::Requirement
94
91
  requirements:
95
- - - ! '>='
92
+ - - ">="
96
93
  - !ruby/object:Gem::Version
97
94
  version: '0'
98
95
  required_rubygems_version: !ruby/object:Gem::Requirement
99
96
  requirements:
100
- - - ! '>='
97
+ - - ">="
101
98
  - !ruby/object:Gem::Version
102
99
  version: '0'
103
100
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.4.8
101
+ rubygems_version: 3.0.3
106
102
  signing_key:
107
103
  specification_version: 4
108
104
  summary: Simplify Commerce Ruby SDK
@@ -1,96 +0,0 @@
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 Chargeback object.
33
- #
34
- class Chargeback < 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
- # Retrieve Chargeback objects.
61
- # criteria:: a hash of parameters; valid keys are:
62
- # * <code>filter</code> <table class="filter_list"><tr><td>filter.text</td><td>Filter by the description of the chargeback </td></tr><tr><td>filter.id</td><td>Filter by the chargeback Id</td></tr><tr><td>filter.amount</td><td>Filter by the chargeback amount (in the smallest unit of your currency)</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.chargebackDateMin<sup>*</sup></td><td>Filter by the earliest chargeback date you are searching for - Date in UTC millis</td></tr><tr><td>filter.chargebackDateMax<sup>*</sup></td><td>Filter by the latest chargeback date you are searching for - Date in UTC millis</td></tr><tr><td>filter.deposit</td><td>Filter by the deposit id</td></tr><tr><td>filter.q</td><td>You can use this to filter by the Id, the payment card's last 4 digits or the chargeback amount</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax (or chargebackDateMin and chargebackDateMax) in the same filter if you want to search between two created dates
63
- # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
64
- # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
65
- # * <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> amount</code><code> description</code><code> dateCreated</code>.
66
- # 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.
67
- # Returns an object where the <code>list</code> property contains the list of Chargeback objects and the <code>total</code>
68
- # property contains the total number of Chargeback objects available for the given criteria.
69
- def self.list(criteria = nil, *auth)
70
-
71
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
72
- h = Simplify::PaymentsApi.execute("chargeback", 'list', criteria, auth_obj)
73
- obj = Chargeback.new()
74
- obj.authentication = auth_obj
75
- obj = obj.merge!(h)
76
- obj
77
-
78
- end
79
-
80
- # Retrieve a Chargeback object from the API
81
- #
82
- # id:: ID of object to retrieve
83
- # 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.
84
- # Returns a Chargeback object.
85
- def self.find(id, *auth)
86
-
87
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
88
- h = Simplify::PaymentsApi.execute("chargeback", 'show', {"id" => id}, auth_obj)
89
- obj = Chargeback.new()
90
- obj.authentication = auth_obj
91
- obj = obj.merge!(h)
92
- obj
93
- end
94
-
95
- end
96
- end
@@ -1,91 +0,0 @@
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
@@ -1,96 +0,0 @@
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 Deposit object.
33
- #
34
- class Deposit < 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
- # Retrieve Deposit objects.
61
- # criteria:: a hash of parameters; valid keys are:
62
- # * <code>filter</code> <table class="filter_list"><tr><td>filter.id</td><td>Filter by the deposit Id</td></tr><tr><td>filter.amount</td><td>Filter by the deposit amount (in the smallest unit of your currency)</td></tr><tr><td>filter.dateCreatedMin<sup>*</sup></td><td>Filter by the minimum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.dateCreatedMax<sup>*</sup></td><td>Filter by the maximum created date you are searching for - Date in UTC millis</td></tr><tr><td>filter.depositDateMin</td><td>Filter by the earliest deposit date you are searching for - Date in UTC millis</td></tr><tr><td>filter.depositDateMax</td><td>Filter by the latest deposit date you are searching for - Date in UTC millis</td></tr><tr><td>filter.creditCount</td><td>Filter by the creditCount figure for the deposit</td></tr><tr><td>filter.creditAmount</td><td>Filter by the creditAmount figure for the deposit</td></tr><tr><td>filter.debitCount</td><td>Filter by the debitCount figure for the deposit</td></tr><tr><td>filter.debitAmount</td><td>Filter by the debitAmount figure for the deposit</td></tr><tr><td>filter.netCount</td><td>Filter by the netCount figure for the deposit</td></tr><tr><td>filter.netAmount</td><td>Filter by the netAmount figure for the deposit</td></tr><tr><td>filter.q</td><td>You can use this to filter by different figures or strings - can be the Id, creditAmount or the debitAmount for the deposit</td></tr></table><br><sup>*</sup>Use dateCreatedMin with dateCreatedMax in the same filter if you want to search between two created dates
63
- # * <code>max</code> Allows up to a max of 50 list items to return. [min value: 0, max value: 50, default: 20]
64
- # * <code>offset</code> Used in paging of the list. This is the start offset of the page. [min value: 0, default: 0]
65
- # * <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> amount</code><code> dateCreated</code><code> depositDate</code>.
66
- # 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.
67
- # Returns an object where the <code>list</code> property contains the list of Deposit objects and the <code>total</code>
68
- # property contains the total number of Deposit objects available for the given criteria.
69
- def self.list(criteria = nil, *auth)
70
-
71
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
72
- h = Simplify::PaymentsApi.execute("deposit", 'list', criteria, auth_obj)
73
- obj = Deposit.new()
74
- obj.authentication = auth_obj
75
- obj = obj.merge!(h)
76
- obj
77
-
78
- end
79
-
80
- # Retrieve a Deposit object from the API
81
- #
82
- # id:: ID of object to retrieve
83
- # 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.
84
- # Returns a Deposit object.
85
- def self.find(id, *auth)
86
-
87
- auth_obj = Simplify::PaymentsApi.create_auth_object(auth)
88
- h = Simplify::PaymentsApi.execute("deposit", 'show', {"id" => id}, auth_obj)
89
- obj = Deposit.new()
90
- obj.authentication = auth_obj
91
- obj = obj.merge!(h)
92
- obj
93
- end
94
-
95
- end
96
- end