amazon_flex_pay 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,22 +8,32 @@ module AmazonFlexPay::API
8
8
  end
9
9
 
10
10
  # generated from http://docs.amazonwebservices.com/AmazonFPS/latest/FPSAPIReference/APIErrorCodesTable.html
11
- # 2010-08-28
11
+ # as of: 2012-06-15
12
12
  %w(
13
13
  AccessFailure
14
14
  AccountClosed
15
15
  AccountLimitsExceeded
16
16
  AmountOutOfRange
17
+ AuthFailure
17
18
  ConcurrentModification
18
19
  DuplicateRequest
19
20
  InactiveInstrument
21
+ IncompatibleTokens
22
+ InstrumentAccessDenied
23
+ InstrumentExpired
20
24
  InsufficientBalance
21
25
  InternalError
22
26
  InvalidAccountState
23
27
  InvalidAccountState_Caller
24
28
  InvalidAccountState_Recipient
25
29
  InvalidAccountState_Sender
30
+ InvalidCallerReference
31
+ InvalidClientTokenId
32
+ InvalidDateRange
26
33
  InvalidParams
34
+ InvalidPaymentInstrument
35
+ InvalidPaymentMethod
36
+ InvalidRecipientForCCTransaction
27
37
  InvalidSenderRoleForAccountType
28
38
  InvalidTokenId
29
39
  InvalidTokenId_Recipient
@@ -31,15 +41,24 @@ module AmazonFlexPay::API
31
41
  InvalidTokenType
32
42
  InvalidTransactionId
33
43
  InvalidTransactionState
44
+ NotMarketplaceApp
34
45
  OriginalTransactionFailed
46
+ OriginalTransactionIncomplete
47
+ PaymentInstrumentNotCC
48
+ PaymentMethodNotDefined
49
+ PrepaidFundingLimitExceeded
35
50
  RefundAmountExceeded
51
+ SameSenderAndRecipient
52
+ SameTokenIdUsedMultipleTimes
36
53
  SenderNotOriginalRecipient
37
54
  SettleAmountGreaterThanDebt
38
55
  SettleAmountGreaterThanReserveAmount
56
+ SignatureDoesNotMatch
39
57
  TokenAccessDenied
40
58
  TokenNotActive
41
59
  TokenNotActive_Recipient
42
60
  TokenNotActive_Sender
61
+ TokenUsageError
43
62
  TransactionDenied
44
63
  TransactionFullyRefundedAlready
45
64
  TransactionTypeNotRefundable
@@ -24,5 +24,6 @@ module AmazonFlexPay::Pipelines #:nodoc:
24
24
  attribute :state
25
25
  attribute :zip
26
26
  attribute :phone_number
27
+ attribute :disable_guest
27
28
  end
28
29
  end
@@ -20,5 +20,6 @@ module AmazonFlexPay::Pipelines #:nodoc:
20
20
  attribute :payment_method, :enumeration => :payment_method
21
21
  attribute :payment_reason
22
22
  attribute :reserve
23
+ attribute :disable_guest
23
24
  end
24
25
  end
@@ -17,7 +17,7 @@ require 'amazon_flex_pay/api'
17
17
  require 'amazon_flex_pay/pipelines'
18
18
 
19
19
  module AmazonFlexPay
20
- VERSION = '0.9.10'
20
+ VERSION = '0.9.11'
21
21
  API_VERSION = '2011-09-20'
22
22
  PIPELINE_VERSION = '2009-01-09'
23
23
 
data/test/api_test.rb CHANGED
@@ -135,7 +135,7 @@ class AmazonFlexPayTest < AmazonFlexPay::Test
135
135
  assert_nothing_raised do
136
136
  response = AmazonFlexPay::API::GetTokenUsage::Response.from_xml(get_token_usage_response)
137
137
  end
138
- assert 2, response.token_usage_limits.count
138
+ assert_equal 2, response.token_usage_limits.count
139
139
  assert_equal '10.000000', response.token_usage_limits.first.amount.value
140
140
  assert_equal '1', response.token_usage_limits.last.count
141
141
  end
@@ -154,7 +154,7 @@ class AmazonFlexPayTest < AmazonFlexPay::Test
154
154
  assert_nothing_raised do
155
155
  response = AmazonFlexPay::API::GetTokens::Response.from_xml(get_tokens_response)
156
156
  end
157
- assert 1, response.tokens.count
157
+ assert_equal 1, response.tokens.count
158
158
  end
159
159
 
160
160
  ## GetTransaction
@@ -37,10 +37,12 @@ class AmazonFlexPayPipelinesTest < AmazonFlexPay::Test
37
37
  assert_nothing_raised do
38
38
  params = AmazonFlexPay.single_use_pipeline('pipe4',
39
39
  :recipient_token => 'token',
40
- :transaction_amount => '25.00'
40
+ :transaction_amount => '25.00',
41
+ :disable_guest => true
41
42
  ).to_params('http://example.com/return')
42
43
  end
43
44
  assert_equal 'pipe4', params['callerReference']
44
45
  assert_equal '25.00', params['transactionAmount']
46
+ assert_equal 'True', params['disableGuest']
45
47
  end
46
48
  end
metadata CHANGED
@@ -1,94 +1,66 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: amazon_flex_pay
3
- version: !ruby/object:Gem::Version
4
- hash: 47
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.11
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 10
10
- version: 0.9.10
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Lance Ivy
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-17 00:00:00 -04:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rest-client
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70199527530040 !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 13
30
- segments:
31
- - 1
32
- - 6
33
- - 1
20
+ - !ruby/object:Gem::Version
34
21
  version: 1.6.1
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: multi_xml
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70199527530040
25
+ - !ruby/object:Gem::Dependency
26
+ name: multi_xml
27
+ requirement: &70199527529440 !ruby/object:Gem::Requirement
41
28
  none: false
42
- requirements:
29
+ requirements:
43
30
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 23
46
- segments:
47
- - 0
48
- - 2
49
- - 0
31
+ - !ruby/object:Gem::Version
50
32
  version: 0.2.0
51
33
  type: :runtime
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: activesupport
55
34
  prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70199527529440
36
+ - !ruby/object:Gem::Dependency
37
+ name: activesupport
38
+ requirement: &70199527528820 !ruby/object:Gem::Requirement
57
39
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- hash: 21
62
- segments:
63
- - 2
64
- - 3
65
- - 11
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
66
43
  version: 2.3.11
67
44
  type: :runtime
68
- version_requirements: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: mocha
71
45
  prerelease: false
72
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70199527528820
47
+ - !ruby/object:Gem::Dependency
48
+ name: mocha
49
+ requirement: &70199527527760 !ruby/object:Gem::Requirement
73
50
  none: false
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- hash: 3
78
- segments:
79
- - 0
80
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
81
55
  type: :development
82
- version_requirements: *id004
56
+ prerelease: false
57
+ version_requirements: *70199527527760
83
58
  description: A straight-forward REST API for Amazon's Flexible Payments Services.
84
59
  email: lance@kickstarter.com
85
60
  executables: []
86
-
87
61
  extensions: []
88
-
89
62
  extra_rdoc_files: []
90
-
91
- files:
63
+ files:
92
64
  - lib/amazon_flex_pay/api/base_request.rb
93
65
  - lib/amazon_flex_pay/api/cancel.rb
94
66
  - lib/amazon_flex_pay/api/cancel_token.rb
@@ -127,41 +99,31 @@ files:
127
99
  - test/pipelines_test.rb
128
100
  - test/response_samples.rb
129
101
  - test/test_helper.rb
130
- has_rdoc: true
131
102
  homepage: http://github.com/kickstarter/amazon_flex_pay
132
103
  licenses: []
133
-
134
104
  post_install_message:
135
105
  rdoc_options: []
136
-
137
- require_paths:
106
+ require_paths:
138
107
  - lib
139
- required_ruby_version: !ruby/object:Gem::Requirement
108
+ required_ruby_version: !ruby/object:Gem::Requirement
140
109
  none: false
141
- requirements:
142
- - - ">="
143
- - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
146
- - 0
147
- version: "0"
148
- required_rubygems_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ! '>='
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
115
  none: false
150
- requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- hash: 3
154
- segments:
155
- - 0
156
- version: "0"
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
157
120
  requirements: []
158
-
159
121
  rubyforge_project:
160
- rubygems_version: 1.6.2
122
+ rubygems_version: 1.8.11
161
123
  signing_key:
162
124
  specification_version: 3
163
125
  summary: API layer for Amazon FPS
164
- test_files:
126
+ test_files:
165
127
  - test/amazon_flex_pay_test.rb
166
128
  - test/api_test.rb
167
129
  - test/data_types_test.rb