Class: WebPay::ChargeListRequest
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
- #captured ⇒ Object
- #captured=(value) ⇒ Object
-
#count ⇒ Object
attributes accessors.
- #count=(value) ⇒ Object
- #created ⇒ Object
- #created=(value) ⇒ Object
- #customer ⇒ Object
- #customer=(value) ⇒ Object
-
#initialize(hash = {}) ⇒ ChargeListRequest
constructor
A new instance of ChargeListRequest.
- #offset ⇒ Object
- #offset=(value) ⇒ Object
- #paid ⇒ Object
- #paid=(value) ⇒ Object
- #query_params ⇒ Object
- #recursion ⇒ Object
- #recursion=(value) ⇒ Object
- #request_body ⇒ Object
- #shop ⇒ Object
- #shop=(value) ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ ChargeListRequest
Returns a new instance of ChargeListRequest.
620 621 622 623 624 |
# File 'lib/webpay/data_types.rb', line 620 def initialize(hash = {}) hash = normalize_hash(hash) hash['created'] = hash['created'].is_a?(Hash) ? WebPay::CreatedRange.new(hash['created']) : hash['created'] @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
603 604 605 |
# File 'lib/webpay/data_types.rb', line 603 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
610 611 612 613 614 615 616 617 618 |
# File 'lib/webpay/data_types.rb', line 610 def self.create(params) return params if params.is_a?(self) hash = case params when Hash; params else raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params) end self.new(hash) end |
.fields ⇒ Object
605 606 607 |
# File 'lib/webpay/data_types.rb', line 605 def self.fields ['count', 'offset', 'created', 'customer', 'recursion', 'shop', 'captured', 'paid'] end |
Instance Method Details
#captured ⇒ Object
696 697 698 |
# File 'lib/webpay/data_types.rb', line 696 def captured attributes['captured'] end |
#captured=(value) ⇒ Object
700 701 702 |
# File 'lib/webpay/data_types.rb', line 700 def captured=(value) attributes['captured'] = value end |
#count ⇒ Object
attributes accessors
647 648 649 |
# File 'lib/webpay/data_types.rb', line 647 def count attributes['count'] end |
#count=(value) ⇒ Object
651 652 653 |
# File 'lib/webpay/data_types.rb', line 651 def count=(value) attributes['count'] = value end |
#created ⇒ Object
663 664 665 |
# File 'lib/webpay/data_types.rb', line 663 def created attributes['created'] end |
#created=(value) ⇒ Object
667 668 669 670 |
# File 'lib/webpay/data_types.rb', line 667 def created=(value) value = value.is_a?(Hash) ? WebPay::CreatedRange.new(value) : value attributes['created'] = value end |
#customer ⇒ Object
672 673 674 |
# File 'lib/webpay/data_types.rb', line 672 def customer attributes['customer'] end |
#customer=(value) ⇒ Object
676 677 678 |
# File 'lib/webpay/data_types.rb', line 676 def customer=(value) attributes['customer'] = value end |
#offset ⇒ Object
655 656 657 |
# File 'lib/webpay/data_types.rb', line 655 def offset attributes['offset'] end |
#offset=(value) ⇒ Object
659 660 661 |
# File 'lib/webpay/data_types.rb', line 659 def offset=(value) attributes['offset'] = value end |
#paid ⇒ Object
704 705 706 |
# File 'lib/webpay/data_types.rb', line 704 def paid attributes['paid'] end |
#paid=(value) ⇒ Object
708 709 710 |
# File 'lib/webpay/data_types.rb', line 708 def paid=(value) attributes['paid'] = value end |
#query_params ⇒ Object
632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/webpay/data_types.rb', line 632 def query_params result = {} copy_if_exists(@attributes, result, 'count', 'query_params'); copy_if_exists(@attributes, result, 'offset', 'query_params'); copy_if_exists(@attributes, result, 'created', 'query_params'); copy_if_exists(@attributes, result, 'customer', 'query_params'); copy_if_exists(@attributes, result, 'recursion', 'query_params'); copy_if_exists(@attributes, result, 'shop', 'query_params'); copy_if_exists(@attributes, result, 'captured', 'query_params'); copy_if_exists(@attributes, result, 'paid', 'query_params'); return result end |
#recursion ⇒ Object
680 681 682 |
# File 'lib/webpay/data_types.rb', line 680 def recursion attributes['recursion'] end |
#recursion=(value) ⇒ Object
684 685 686 |
# File 'lib/webpay/data_types.rb', line 684 def recursion=(value) attributes['recursion'] = value end |
#request_body ⇒ Object
627 628 629 630 |
# File 'lib/webpay/data_types.rb', line 627 def request_body result = {} result end |
#shop ⇒ Object
688 689 690 |
# File 'lib/webpay/data_types.rb', line 688 def shop attributes['shop'] end |
#shop=(value) ⇒ Object
692 693 694 |
# File 'lib/webpay/data_types.rb', line 692 def shop=(value) attributes['shop'] = value end |