Class: Stripe::Terminal::Reader
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Terminal::Reader
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Delete, APIOperations::Save
- Defined in:
- lib/stripe/resources/terminal/reader.rb
Overview
A Reader represents a physical device for accepting payment details.
Related guide: [Connecting to a reader](stripe.com/docs/terminal/payments/connect-reader)
Defined Under Namespace
Classes: Action, CancelActionParams, CollectInputsParams, CollectPaymentMethodParams, ConfirmPaymentIntentParams, CreateParams, DeleteParams, ListParams, PresentPaymentMethodParams, ProcessPaymentIntentParams, ProcessSetupIntentParams, RefundPaymentParams, SetReaderDisplayParams, SucceedInputCollectionParams, TestHelpers, TimeoutInputCollectionParams, UpdateParams
Constant Summary collapse
- OBJECT_NAME =
"terminal.reader"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
The most recent action performed by the reader.
-
#deleted ⇒ Object
readonly
Always true for a deleted object.
-
#device_sw_version ⇒ Object
readonly
The current software version of the reader.
-
#device_type ⇒ Object
readonly
Type of reader, one of ‘bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#ip_address ⇒ Object
readonly
The local IP address of the reader.
-
#label ⇒ Object
readonly
Custom label given to the reader for easier identification.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#location ⇒ Object
readonly
The location identifier of the reader.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#serial_number ⇒ Object
readonly
Serial number of the reader.
-
#status ⇒ Object
readonly
The networking status of the reader.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.cancel_action(reader, params = {}, opts = {}) ⇒ Object
Cancels the current reader action.
-
.collect_inputs(reader, params = {}, opts = {}) ⇒ Object
Initiates an input collection flow on a Reader.
-
.collect_payment_method(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
-
.confirm_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Finalizes a payment on a Reader.
-
.create(params = {}, opts = {}) ⇒ Object
Creates a new Reader object.
-
.delete(reader, params = {}, opts = {}) ⇒ Object
Deletes a Reader object.
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Reader objects.
- .object_name ⇒ Object
-
.process_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader.
-
.process_setup_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a setup intent flow on a Reader.
-
.refund_payment(reader, params = {}, opts = {}) ⇒ Object
Initiates a refund on a Reader.
-
.set_reader_display(reader, params = {}, opts = {}) ⇒ Object
Sets reader display to show cart details.
-
.update(reader, params = {}, opts = {}) ⇒ Object
Updates a Reader object by setting the values of the parameters passed.
Instance Method Summary collapse
-
#cancel_action(params = {}, opts = {}) ⇒ Object
Cancels the current reader action.
-
#collect_inputs(params = {}, opts = {}) ⇒ Object
Initiates an input collection flow on a Reader.
-
#collect_payment_method(params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
-
#confirm_payment_intent(params = {}, opts = {}) ⇒ Object
Finalizes a payment on a Reader.
-
#delete(params = {}, opts = {}) ⇒ Object
Deletes a Reader object.
-
#process_payment_intent(params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader.
-
#process_setup_intent(params = {}, opts = {}) ⇒ Object
Initiates a setup intent flow on a Reader.
-
#refund_payment(params = {}, opts = {}) ⇒ Object
Initiates a refund on a Reader.
-
#set_reader_display(params = {}, opts = {}) ⇒ Object
Sets reader display to show cart details.
- #test_helpers ⇒ Object
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods included from APIOperations::Delete
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#action ⇒ Object (readonly)
The most recent action performed by the reader.
727 728 729 |
# File 'lib/stripe/resources/terminal/reader.rb', line 727 def action @action end |
#deleted ⇒ Object (readonly)
Always true for a deleted object
751 752 753 |
# File 'lib/stripe/resources/terminal/reader.rb', line 751 def deleted @deleted end |
#device_sw_version ⇒ Object (readonly)
The current software version of the reader.
729 730 731 |
# File 'lib/stripe/resources/terminal/reader.rb', line 729 def device_sw_version @device_sw_version end |
#device_type ⇒ Object (readonly)
Type of reader, one of ‘bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`.
731 732 733 |
# File 'lib/stripe/resources/terminal/reader.rb', line 731 def device_type @device_type end |
#id ⇒ Object (readonly)
Unique identifier for the object.
733 734 735 |
# File 'lib/stripe/resources/terminal/reader.rb', line 733 def id @id end |
#ip_address ⇒ Object (readonly)
The local IP address of the reader.
735 736 737 |
# File 'lib/stripe/resources/terminal/reader.rb', line 735 def ip_address @ip_address end |
#label ⇒ Object (readonly)
Custom label given to the reader for easier identification.
737 738 739 |
# File 'lib/stripe/resources/terminal/reader.rb', line 737 def label @label end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
739 740 741 |
# File 'lib/stripe/resources/terminal/reader.rb', line 739 def livemode @livemode end |
#location ⇒ Object (readonly)
The location identifier of the reader.
741 742 743 |
# File 'lib/stripe/resources/terminal/reader.rb', line 741 def location @location end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
743 744 745 |
# File 'lib/stripe/resources/terminal/reader.rb', line 743 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
745 746 747 |
# File 'lib/stripe/resources/terminal/reader.rb', line 745 def object @object end |
#serial_number ⇒ Object (readonly)
Serial number of the reader.
747 748 749 |
# File 'lib/stripe/resources/terminal/reader.rb', line 747 def serial_number @serial_number end |
#status ⇒ Object (readonly)
The networking status of the reader. We do not recommend using this field in flows that may block taking payments.
749 750 751 |
# File 'lib/stripe/resources/terminal/reader.rb', line 749 def status @status end |
Class Method Details
.cancel_action(reader, params = {}, opts = {}) ⇒ Object
Cancels the current reader action.
764 765 766 767 768 769 770 771 |
# File 'lib/stripe/resources/terminal/reader.rb', line 764 def self.cancel_action(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.collect_inputs(reader, params = {}, opts = {}) ⇒ Object
Initiates an input collection flow on a Reader.
784 785 786 787 788 789 790 791 |
# File 'lib/stripe/resources/terminal/reader.rb', line 784 def self.collect_inputs(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.collect_payment_method(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
804 805 806 807 808 809 810 811 |
# File 'lib/stripe/resources/terminal/reader.rb', line 804 def self.collect_payment_method(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.confirm_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Finalizes a payment on a Reader.
824 825 826 827 828 829 830 831 |
# File 'lib/stripe/resources/terminal/reader.rb', line 824 def self.confirm_payment_intent(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Creates a new Reader object.
834 835 836 837 838 839 840 841 |
# File 'lib/stripe/resources/terminal/reader.rb', line 834 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/terminal/readers", params: params, opts: opts ) end |
.delete(reader, params = {}, opts = {}) ⇒ Object
Deletes a Reader object.
844 845 846 847 848 849 850 851 |
# File 'lib/stripe/resources/terminal/reader.rb', line 844 def self.delete(reader, params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/terminal/readers/%<reader>s", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of Reader objects.
864 865 866 867 868 869 870 871 |
# File 'lib/stripe/resources/terminal/reader.rb', line 864 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/readers", params: params, opts: opts ) end |
.object_name ⇒ Object
16 17 18 |
# File 'lib/stripe/resources/terminal/reader.rb', line 16 def self.object_name "terminal.reader" end |
.process_payment_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader.
884 885 886 887 888 889 890 891 |
# File 'lib/stripe/resources/terminal/reader.rb', line 884 def self.process_payment_intent(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.process_setup_intent(reader, params = {}, opts = {}) ⇒ Object
Initiates a setup intent flow on a Reader.
904 905 906 907 908 909 910 911 |
# File 'lib/stripe/resources/terminal/reader.rb', line 904 def self.process_setup_intent(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.refund_payment(reader, params = {}, opts = {}) ⇒ Object
Initiates a refund on a Reader
924 925 926 927 928 929 930 931 |
# File 'lib/stripe/resources/terminal/reader.rb', line 924 def self.refund_payment(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.set_reader_display(reader, params = {}, opts = {}) ⇒ Object
Sets reader display to show cart details.
944 945 946 947 948 949 950 951 |
# File 'lib/stripe/resources/terminal/reader.rb', line 944 def self.set_reader_display(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
.update(reader, params = {}, opts = {}) ⇒ Object
Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
954 955 956 957 958 959 960 961 |
# File 'lib/stripe/resources/terminal/reader.rb', line 954 def self.update(reader, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s", { reader: CGI.escape(reader) }), params: params, opts: opts ) end |
Instance Method Details
#cancel_action(params = {}, opts = {}) ⇒ Object
Cancels the current reader action.
754 755 756 757 758 759 760 761 |
# File 'lib/stripe/resources/terminal/reader.rb', line 754 def cancel_action(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#collect_inputs(params = {}, opts = {}) ⇒ Object
Initiates an input collection flow on a Reader.
774 775 776 777 778 779 780 781 |
# File 'lib/stripe/resources/terminal/reader.rb', line 774 def collect_inputs(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#collect_payment_method(params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
794 795 796 797 798 799 800 801 |
# File 'lib/stripe/resources/terminal/reader.rb', line 794 def collect_payment_method(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#confirm_payment_intent(params = {}, opts = {}) ⇒ Object
Finalizes a payment on a Reader.
814 815 816 817 818 819 820 821 |
# File 'lib/stripe/resources/terminal/reader.rb', line 814 def confirm_payment_intent(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#delete(params = {}, opts = {}) ⇒ Object
Deletes a Reader object.
854 855 856 857 858 859 860 861 |
# File 'lib/stripe/resources/terminal/reader.rb', line 854 def delete(params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/terminal/readers/%<reader>s", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#process_payment_intent(params = {}, opts = {}) ⇒ Object
Initiates a payment flow on a Reader.
874 875 876 877 878 879 880 881 |
# File 'lib/stripe/resources/terminal/reader.rb', line 874 def process_payment_intent(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#process_setup_intent(params = {}, opts = {}) ⇒ Object
Initiates a setup intent flow on a Reader.
894 895 896 897 898 899 900 901 |
# File 'lib/stripe/resources/terminal/reader.rb', line 894 def process_setup_intent(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#refund_payment(params = {}, opts = {}) ⇒ Object
Initiates a refund on a Reader
914 915 916 917 918 919 920 921 |
# File 'lib/stripe/resources/terminal/reader.rb', line 914 def refund_payment(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#set_reader_display(params = {}, opts = {}) ⇒ Object
Sets reader display to show cart details.
934 935 936 937 938 939 940 941 |
# File 'lib/stripe/resources/terminal/reader.rb', line 934 def set_reader_display(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#test_helpers ⇒ Object
963 964 965 |
# File 'lib/stripe/resources/terminal/reader.rb', line 963 def test_helpers TestHelpers.new(self) end |