Class: Square::APIResource
- Inherits:
-
Object
- Object
- Square::APIResource
- Defined in:
- lib/square/api_resource.rb
Direct Known Subclasses
BankAccount, Category, Discount, Fee, Inventory, Item, Merchant, Payment, Refund, Settlement, Variation, Webhook
Class Method Summary collapse
-
.data_type(data_type = nil) ⇒ Square::DataType
Set a data_type property for this resource.
-
.endpoint_base(base = nil) ⇒ String
Set an endpoint base for this resource.
-
.nested_under(parent = nil) ⇒ String
Set a property for nested resources.
Class Method Details
.data_type(data_type = nil) ⇒ Square::DataType
Set a data_type property for this resource.
8 9 10 11 12 13 14 |
# File 'lib/square/api_resource.rb', line 8 def self.data_type(data_type = nil) if !data_type.nil? @data_type = data_type end @data_type end |
.endpoint_base(base = nil) ⇒ String
Set an endpoint base for this resource.
21 22 23 24 25 26 27 |
# File 'lib/square/api_resource.rb', line 21 def self.endpoint_base(base = nil) if !base.nil? @endpoint_base = base end @endpoint_base end |
.nested_under(parent = nil) ⇒ String
Set a property for nested resources.
34 35 36 37 38 39 40 |
# File 'lib/square/api_resource.rb', line 34 def self.nested_under(parent = nil) if !parent.nil? @nested_under = parent end @nested_under end |