Class: Spaceship::ConnectAPI::Territory

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/territory.rb

Instance Attribute Summary collapse

Attributes included from Model

#id

Class Method Summary collapse

Methods included from Model

#attr_mapping, included, #initialize, #to_json, #update_attributes

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



7
8
9
# File 'spaceship/lib/spaceship/connect_api/models/territory.rb', line 7

def currency
  @currency
end

Class Method Details

.all(filter: {}, includes: nil, limit: 180, sort: nil) ⇒ Object

API



21
22
23
24
# File 'spaceship/lib/spaceship/connect_api/models/territory.rb', line 21

def self.all(filter: {}, includes: nil, limit: 180, sort: nil)
  resps = Spaceship::ConnectAPI.get_territories(filter: {}, includes: nil, limit: nil, sort: nil).all_pages
  return resps.flat_map(&:to_models)
end

.typeObject



13
14
15
# File 'spaceship/lib/spaceship/connect_api/models/territory.rb', line 13

def self.type
  return "territories"
end