paypal-sdk-subscriptions 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7ef2b48c865422c5a5cabcabb015e08d4005e5c5bd9ddb7d843b9b20e6f4b60
4
- data.tar.gz: 9b61cd74c811f06baf85d5fe35335b7a715b4fa8102ad79521c5978dc3f691d5
3
+ metadata.gz: 17bc14848210eed34b62b45f9bb5ca2851fe42fd808443716fb954b13d87cf18
4
+ data.tar.gz: 0fc5db01b5b4cc2d4f7061cf39e2fee8228ba4f2e14c53418ebd062a59a96a82
5
5
  SHA512:
6
- metadata.gz: 977ef24450013e919108cf20da39214e4a6c142ee9cb7e3daa96815e67bc7440a3cfa9647b1df63f9ffbd5f9890684309d7942dcc98f0adbb85885529d9266b3
7
- data.tar.gz: 299f751e776d2fb8d9db056a4328a09da594514e9827f43f023428646a4d9fccc6b745607203f41ea789d5f91352baaa32057206996103f969314d842ce47b4b
6
+ metadata.gz: e55cc8df6ace275789c36df33e509a393d49bfe9c72deeb4e4959e5837da03a336b4999248c268645c3ef7261e2edcb33850c1c89b0e50c98186d574d919c4a6
7
+ data.tar.gz: 0a4068c669755c185f7fc8c23e4b6c99019a68b52340d2866861d3f954152cadf517b6ce06b157075b9bb061be446a6fdf63e513694109d3930efc8ed8db7345
data/.travis.yml CHANGED
@@ -3,5 +3,5 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.5.1
6
+ - 2.6
7
7
  before_install: gem install bundler -v 2.0.1
data/README.md CHANGED
@@ -68,7 +68,7 @@ To release a new version, update the version number in `version.rb`, and then ru
68
68
 
69
69
  ## Contributing
70
70
 
71
- Bug reports and pull requests are welcome on GitHub at https://github.com/varyonic]/paypal-sdk-subscriptions.
71
+ Bug reports and pull requests are welcome on GitHub at https://github.com/varyonic/paypal-sdk-subscriptions.
72
72
 
73
73
  ## License
74
74
 
@@ -0,0 +1 @@
1
+ require 'paypal-sdk/subscriptions'
@@ -1,5 +1,6 @@
1
1
  module PayPal::SDK::Subscriptions
2
2
  # https://developer.paypal.com/docs/api/subscriptions/v1/#subscriptions
3
+ # https://developer.paypal.com/docs/api/subscriptions/v1/#definition-subscription
3
4
  class Subscription < RequestBase
4
5
 
5
6
  def self.path(resource_id = nil)
@@ -52,16 +53,44 @@ module PayPal::SDK::Subscriptions
52
53
  object_of :cancel_url, String
53
54
  end
54
55
 
56
+ # https://developer.paypal.com/docs/api/subscriptions/v1/#definition-cycle_execution
57
+ class CycleExecution < Base
58
+ object_of :tenure_type, String # REGULAR|TRIAL
59
+ object_of :sequence, Integer
60
+ object_of :cycles_completed, Integer
61
+ object_of :cycles_remaining, Integer
62
+ object_of :current_pricing_scheme_version, Integer
63
+ object_of :total_cycles, Integer
64
+ end
65
+
66
+ # https://developer.paypal.com/docs/api/subscriptions/v1/#definition-last_payment_details
67
+ class LastPaymentDetails < Base
68
+ object_of :amount, Money
69
+ object_of :time, DateTime
70
+ end
71
+
72
+ # https://developer.paypal.com/docs/api/subscriptions/v1/#definition-subscription_billing_info
73
+ class SubscriptionBillingInfo < Base
74
+ object_of :outstanding_balance, Money
75
+ array_of :cycle_executions, CycleExecution
76
+ object_of :last_payment, LastPaymentDetails
77
+ object_of :next_billing_time, DateTime
78
+ object_of :final_payment_time, DateTime
79
+ object_of :failed_payments_count, Integer
80
+ end
81
+
55
82
  object_of :plan_id, String
56
83
  object_of :id, String
57
84
  object_of :start_time, DateTime # default: Time.now
58
85
  object_of :status, String # APPROVAL_PENDING|APPROVED|ACTIVE|SUSPENDED|CANCELLED|EXPIRED
86
+ object_of :status_change_note, String
59
87
  object_of :status_update_time, DateTime
60
88
  object_of :quantity, Integer
61
89
  object_of :shipping_amount, Money
62
90
  object_of :subscriber, Subscriber
63
91
  object_of :auto_renewal, Boolean
64
92
  object_of :application_context, ApplicationContext
93
+ object_of :billing_info, SubscriptionBillingInfo
65
94
  object_of :create_time, DateTime
66
95
  array_of :links, Link
67
96
 
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module Subscriptions
4
- VERSION = "0.2.2"
4
+ VERSION = "0.3.0"
5
5
  end
6
6
  end
7
7
  end
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency('paypal-sdk-core')
26
26
 
27
27
  spec.add_development_dependency "bundler", "~> 2.0"
28
- spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rake"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal-sdk-subscriptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piers Chambers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-23 00:00:00.000000000 Z
11
+ date: 2020-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paypal-sdk-core
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -83,6 +83,7 @@ files:
83
83
  - bin/console
84
84
  - bin/setup
85
85
  - config/paypal.yml
86
+ - lib/paypal-sdk-subscriptions.rb
86
87
  - lib/paypal-sdk/subscriptions.rb
87
88
  - lib/paypal-sdk/subscriptions/data_types.rb
88
89
  - lib/paypal-sdk/subscriptions/error_hash.rb
@@ -113,7 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
114
  - !ruby/object:Gem::Version
114
115
  version: '0'
115
116
  requirements: []
116
- rubygems_version: 3.0.3
117
+ rubyforge_project:
118
+ rubygems_version: 2.7.10
117
119
  signing_key:
118
120
  specification_version: 4
119
121
  summary: Missing PayPal REST SDK for Subscriptions Management.