Class: Taxamo::SettlementDailyStatsSchema

Inherits:
Object
  • Object
show all
Defined in:
lib/taxamo/models/settlementdailystatsschema.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SettlementDailyStatsSchema

Returns a new instance of SettlementDailyStatsSchema.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 33

def initialize(attributes = {})
  return if attributes.nil? or attributes.empty?
  # Morph attribute keys into undescored rubyish style
  if attributes.key?("b2c")
    @b2c = attributes["b2c"]
      
  end
  if attributes.key?("untaxed")
    @untaxed = attributes["untaxed"]
      
  end
  if attributes.key?("eu_taxed")
    @eu_taxed = attributes["eu_taxed"]
      
  end
  if attributes.key?("eu_b2b")
    @eu_b2b = attributes["eu_b2b"]
      
  end
  if attributes.key?("count")
    @count = attributes["count"]
      
  end
  if attributes.key?("eu_total")
    @eu_total = attributes["eu_total"]
      
  end
  if attributes.key?("day_raw")
    @day_raw = attributes["day_raw"]
      
  end
  if attributes.key?("b2b")
    @b2b = attributes["b2b"]
      
  end
  if attributes.key?("day")
    @day = attributes["day"]
      
  end
  

end

Instance Attribute Details

#b2bObject

Returns the value of attribute b2b.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def b2b
  @b2b
end

#b2cObject

Returns the value of attribute b2c.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def b2c
  @b2c
end

#countObject

Returns the value of attribute count.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def count
  @count
end

#dayObject

Returns the value of attribute day.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def day
  @day
end

#day_rawObject

Returns the value of attribute day_raw.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def day_raw
  @day_raw
end

#eu_b2bObject

Returns the value of attribute eu_b2b.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def eu_b2b
  @eu_b2b
end

#eu_taxedObject

Returns the value of attribute eu_taxed.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def eu_taxed
  @eu_taxed
end

#eu_totalObject

Returns the value of attribute eu_total.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def eu_total
  @eu_total
end

#untaxedObject

Returns the value of attribute untaxed.



15
16
17
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 15

def untaxed
  @untaxed
end

Class Method Details

.attribute_mapObject

:internal => :external



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 18

def self.attribute_map
  {
    :b2c => :b2c,
    :untaxed => :untaxed,
    :eu_taxed => :eu_taxed,
    :eu_b2b => :eu_b2b,
    :count => :count,
    :eu_total => :eu_total,
    :day_raw => :day_raw,
    :b2b => :b2b,
    :day => :day

  }
end

Instance Method Details

#to_bodyObject



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/taxamo/models/settlementdailystatsschema.rb', line 76

def to_body
  body = {}
  self.class.attribute_map.each_pair do |key, value|
    v = self.send(key)
    unless v.nil?
      if v.is_a?(Array)
        array = Array.new
        v.each do |item|
          if item.respond_to?("to_body".to_sym)
            array.push item.to_body
          else
            array.push item
          end
        end
        body[value] = array
      else
        if v.respond_to?("to_body".to_sym)
          body[value] = v.to_body
        else
          body[value] = v
        end
      end
    end
  end
  body
end