processout 2.13.0 → 2.14.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/processout/activity.rb +14 -0
  3. data/lib/processout/addon.rb +21 -0
  4. data/lib/processout/api_request.rb +21 -0
  5. data/lib/processout/api_version.rb +10 -0
  6. data/lib/processout/card.rb +36 -0
  7. data/lib/processout/card_information.rb +14 -0
  8. data/lib/processout/coupon.rb +20 -0
  9. data/lib/processout/customer.rb +34 -22
  10. data/lib/processout/customer_action.rb +9 -0
  11. data/lib/processout/discount.rb +21 -0
  12. data/lib/processout/dunning_action.rb +9 -0
  13. data/lib/processout/event.rb +14 -0
  14. data/lib/processout/gateway.rb +18 -0
  15. data/lib/processout/gateway_configuration.rb +18 -0
  16. data/lib/processout/invoice.rb +43 -1
  17. data/lib/processout/invoice_detail.rb +22 -0
  18. data/lib/processout/invoice_device.rb +9 -0
  19. data/lib/processout/invoice_risk.rb +9 -0
  20. data/lib/processout/invoice_shipping.rb +19 -0
  21. data/lib/processout/networking/request.rb +1 -1
  22. data/lib/processout/payment_data_network_authentication.rb +8 -0
  23. data/lib/processout/payment_data_three_ds_authentication.rb +8 -0
  24. data/lib/processout/payment_data_three_ds_request.rb +11 -0
  25. data/lib/processout/payout.rb +27 -0
  26. data/lib/processout/payout_item.rb +20 -0
  27. data/lib/processout/plan.rb +21 -0
  28. data/lib/processout/product.rb +19 -0
  29. data/lib/processout/project.rb +18 -27
  30. data/lib/processout/refund.rb +17 -0
  31. data/lib/processout/subscription.rb +42 -0
  32. data/lib/processout/token.rb +39 -33
  33. data/lib/processout/transaction.rb +57 -0
  34. data/lib/processout/transaction_operation.rb +52 -0
  35. data/lib/processout/version.rb +1 -1
  36. data/lib/processout/webhook.rb +21 -0
  37. data/lib/processout/webhook_endpoint.rb +14 -0
  38. metadata +2 -2
@@ -1,3 +1,3 @@
1
1
  module ProcessOut
2
- VERSION = "2.13.0"
2
+ VERSION = "2.14.0"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  # The content of this file was automatically generated
2
2
 
3
3
  require "cgi"
4
+ require "json"
4
5
  require "processout/networking/request"
5
6
  require "processout/networking/response"
6
7
 
@@ -133,6 +134,26 @@ module ProcessOut
133
134
  Webhook.new(@client, data)
134
135
  end
135
136
 
137
+ # Overrides the JSON marshaller to only send the fields we want
138
+ def to_json(options)
139
+ {
140
+ "id": self.id,
141
+ "project": self.project,
142
+ "project_id": self.project_id,
143
+ "event": self.event,
144
+ "event_id": self.event_id,
145
+ "request_url": self.request_url,
146
+ "request_method": self.request_method,
147
+ "response_body": self.response_body,
148
+ "response_code": self.response_code,
149
+ "response_headers": self.response_headers,
150
+ "response_time_ms": self.response_time_ms,
151
+ "status": self.status,
152
+ "created_at": self.created_at,
153
+ "release_at": self.release_at,
154
+ }.to_json
155
+ end
156
+
136
157
  # Fills the object with data coming from the API
137
158
  # Params:
138
159
  # +data+:: +Hash+ of data coming from the API
@@ -1,6 +1,7 @@
1
1
  # The content of this file was automatically generated
2
2
 
3
3
  require "cgi"
4
+ require "json"
4
5
  require "processout/networking/request"
5
6
  require "processout/networking/response"
6
7
 
@@ -80,6 +81,19 @@ module ProcessOut
80
81
  WebhookEndpoint.new(@client, data)
81
82
  end
82
83
 
84
+ # Overrides the JSON marshaller to only send the fields we want
85
+ def to_json(options)
86
+ {
87
+ "id": self.id,
88
+ "project": self.project,
89
+ "project_id": self.project_id,
90
+ "url": self.url,
91
+ "events_whitelist": self.events_whitelist,
92
+ "sandbox": self.sandbox,
93
+ "created_at": self.created_at,
94
+ }.to_json
95
+ end
96
+
83
97
  # Fills the object with data coming from the API
84
98
  # Params:
85
99
  # +data+:: +Hash+ of data coming from the API
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processout
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.13.0
4
+ version: 2.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel HUEZ
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler